query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
listlengths 3
101
| negative_scores
listlengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Check whether the given world is a valid world for a entity. | @Model
private boolean isValidSuperWorld(World world){
return (world == null || !world.isTerminatedWorld());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean checkWorld(Entity entity) {\r\n return entity.getWorld() == worldFrom;\r\n }",
"@Raw\n\tpublic boolean canHaveAsWorld(World world) {\n\t\tif (world != null && (getXCoordinate() > world.getWidth() || getYCoordinate() > world.getHeight()))\n\t\t\treturn false;\n\t\treturn true;\n\t}",
"public boolean checkWorld(String world) {\n if (world_whitelist) {\n if (worlds.contains(world)) {\n return true;\n }\n \n return false;\n \n } else {\n if (worlds.contains(world)) {\n return false;\n }\n return true;\n }\n\n }",
"public boolean checkWorldAccess(String player, String world) {\n \n Set<String> worldsTMP = bannedWorlds.get(player);\n \n if (worldsTMP == null) {\n return true; //that means, that the player is not banned from any world\n }\n \n if (worldsTMP.contains(world)) {\n return false;\n }\n \n return true;\n }",
"private final boolean isInsideWorld() {\n\t\t// Check it is inside the world\n\t\tif (x<=0 || y<=0 || x+width>=_world.getWidth() || y+height>=_world.getHeight()) {\n\t\t\tif (_mass == 0 && alive && x == 0 && y == 0)\n\t\t\t\tdie(this);\n\t\t\t// Adjust direction\n\t\t\tif (x <= 0 || x + width >= _world.getWidth())\n\t\t\t\tdx = -dx;\n\t\t\tif (y <= 0 || y + height >= _world.getHeight())\n\t\t\t\tdy = -dy;\n\t\t\tdtheta = 0;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isLoadableWorld(String worldName);",
"boolean isGoodLocation(World world, int x, int y, int z);",
"public boolean isValid(CoreProtectAPI.ParseResult ore) {\n if (worldName != null && worldName.equalsIgnoreCase(ore.worldName())) {\n Location loc = new Location(Bukkit.getWorld(ore.worldName()), ore.getX(), ore.getY(), ore.getZ());\n if (loc.distance(getLocation()) <= MAX_DISTANCE) {\n if (ore.getType() == type) {\n return true;\n }\n }\n }\n return false;\n }",
"public boolean isValidEntity(Entity entity, IGame game) {\n return isValidEntity(entity,game,true);\n }",
"public boolean checkValidity(ArenaWorld world, ArenaAnimal animal, Location targetLocation) {\n boolean isValid = true;\n List<Location> occupiedLocations = new LinkedList<Location>();\n Set<Item> surroundingItems = new HashSet<Item>();\n surroundingItems = world.searchSurroundings(animal);\n Iterator<Item> itemIterator = surroundingItems.iterator();\n Util.isValidLocation(world, targetLocation);\n while (itemIterator.hasNext()) {\n Item newItem = itemIterator.next();\n occupiedLocations.add(newItem.getLocation());\n }\n Iterator<Location> locationIterator = occupiedLocations.iterator();\n while (locationIterator.hasNext()) {\n Location occupiedLocation = locationIterator.next();\n if (occupiedLocation.equals(targetLocation))\n isValid = false;\n if (!Util.isValidLocation(world, targetLocation))\n isValid = false;\n }\n\n return isValid;\n }",
"public static boolean removeWorld(World world) {\n\t\treturn worlds.remove(world);\n\t}",
"public boolean isValid(World world, BlockPos pos, IBlockState state) {\n return true;\n }",
"public boolean canTravelFromWorld(Player p, MultiverseWorld w) {\n List<String> blackList = w.getWorldBlacklist();\n \n boolean returnValue = true;\n \n for (String s : blackList) {\n if (s.equalsIgnoreCase(p.getWorld().getName())) {\n returnValue = false;\n break;\n }\n }\n \n return returnValue;\n }",
"public boolean canEnterWorld(Player p, MultiverseWorld w) {\n return this.hasPermission(p, \"multiverse.access.\" + w.getName(), false);\n }",
"public boolean isWorldOkayForPortalActivation(Player player, World world) {\n ConfigurationSection ymlGroups = getConfig().getConfigurationSection(\"groups\");\n if (ymlGroups != null) {\n\n Set<String> groups = ymlGroups.getKeys(false);\n for (String group : groups) {\n\n if (player.hasPermission(\"teleportals.group.\" + group)) {\n List<String> whitelist = ymlGroups.getStringList(group + \".worlds-can-activate\");\n if (!whitelist.isEmpty()) {\n return whitelist.contains(world.getName());\n }\n else {\n List<String> blacklist = ymlGroups.getStringList(group + \".worlds-cannot-activate\");\n if (!blacklist.isEmpty()) {\n return !blacklist.contains(world.getName());\n }\n\n }\n }\n }\n }\n return true;\n }",
"boolean testWorldEnds(Tester t) {\n return t.checkExpect(new NBullets(0).worldEnds(),\n new WorldEnd(true, new NBullets(0).makeAFinalScene()))\n && t.checkExpect(\n new NBullets(new ConsLoGamePiece(bullet9, new MtLoGamePiece()), new MtLoGamePiece(), 0,\n 0, 0).worldEnds(),\n new WorldEnd(false,\n new NBullets(new ConsLoGamePiece(bullet9, new MtLoGamePiece()), new MtLoGamePiece(),\n 0, 0, 0).makeScene()))\n && t.checkExpect(\n new NBullets(new MtLoGamePiece(), new MtLoGamePiece(), 15, 0, 0).worldEnds(),\n new WorldEnd(false,\n new NBullets(new MtLoGamePiece(), new MtLoGamePiece(), 15, 0, 0).makeScene()))\n && t.checkExpect(\n new NBullets(new ConsLoGamePiece(bullet9, new MtLoGamePiece()), new MtLoGamePiece(), 15,\n 0, 0).worldEnds(),\n new WorldEnd(false, new NBullets(new ConsLoGamePiece(bullet9, new MtLoGamePiece()),\n new MtLoGamePiece(), 15, 0, 0).makeScene()));\n }",
"public boolean withinWorld(int x, int y) {\n\t\treturn x >= 0 && x < MAX_WIDTH && y >= 0 && y < MAX_HEIGHT;\n\t}",
"public boolean isInThing(Graphics2D g, CoordinateMapper cm, int worldX, int worldY){\n\t\treturn false;\n/*\n\t\treturn((worldX >= t.getX1()) &&\n\t\t\t(worldX <= t.getX2()) &&\n\t\t\t(worldY >= t.getY1()) &&\n\t\t\t(worldY <= t.getY2()));\n\t\t\t*/\n\t}",
"public static boolean checkBlockSafe(World world, int x, int y, int z)\n\t{\n\t\tIBlockState block = world.getBlockState(new BlockPos(x, y, z));\n\t\treturn checkBlockSafe(block);\n\t}",
"@Override\n public boolean isValidEntity(Entity entity, IGame game,\n boolean useValidNonInfantryCheck) {\n return (super.isValidEntity(entity, game, useValidNonInfantryCheck) \n && (unitNumber == entity.getUnitNumber()));\n }",
"@NotNull\r\n World getWorld();",
"public static boolean checkDirectionOfRitualValid(World world, int x, int y, int z, int ritualID, int direction)\n {\n List<RitualComponent> ritual = Rituals.getRitualList(ritualID);\n\n if (ritual == null)\n {\n return false;\n }\n\n Block test = null;\n\n switch (direction)\n {\n case 1:\n for (RitualComponent rc : ritual)\n {\n test = world.getBlock(x + rc.getX(), y + rc.getY(), z + rc.getZ());\n\n if (!(test instanceof RitualStone))\n {\n return false;\n }\n\n if (world.getBlockMetadata(x + rc.getX(), y + rc.getY(), z + rc.getZ()) != rc.getStoneType())\n {\n return false;\n }\n }\n\n return true;\n\n case 2:\n for (RitualComponent rc : ritual)\n {\n \ttest = world.getBlock(x - rc.getZ(), y + rc.getY(), z + rc.getX());\n \t\n if (!(test instanceof RitualStone))\n {\n return false;\n }\n\n if (world.getBlockMetadata(x - rc.getZ(), y + rc.getY(), z + rc.getX()) != rc.getStoneType())\n {\n return false;\n }\n }\n\n return true;\n\n case 3:\n for (RitualComponent rc : ritual)\n {\n \ttest = world.getBlock(x - rc.getX(), y + rc.getY(), z - rc.getZ());\n \t\n if (!(test instanceof RitualStone))\n {\n return false;\n }\n\n if (world.getBlockMetadata(x - rc.getX(), y + rc.getY(), z - rc.getZ()) != rc.getStoneType())\n {\n return false;\n }\n }\n\n return true;\n\n case 4:\n for (RitualComponent rc : ritual)\n {\n \ttest = world.getBlock(x + rc.getZ(), y + rc.getY(), z - rc.getX());\n \t\n \tif (!(test instanceof RitualStone))\n {\n return false;\n }\n\n if (world.getBlockMetadata(x + rc.getZ(), y + rc.getY(), z - rc.getX()) != rc.getStoneType())\n {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n }",
"public boolean verifyRoom() throws NotEnoughDoorsException {\n if (getDoors().get(\"N\") == null && getDoors().get(\"W\") == null\n && getDoors().get(\"S\") == null && getDoors().get(\"E\") == null) {\n throw new NotEnoughDoorsException();\n }\n\n for (String key: getDoors().keySet()) {\n Door doorHolder = getDoors().get(key);\n if (doorHolder != null) {\n if (doorHolder.getConnectedRooms().size() < 2 || doorHolder.getOtherRoom(this) == null) {\n return false;\n }\n }\n }\n\n for (Item singleItem: roomItems) {\n int itemX = (int) singleItem.getXyLocation().getX();\n int itemY = (int) singleItem.getXyLocation().getY();\n if (itemX >= getWidth() - 1 || itemX <= 0) {\n return false;\n }\n if (itemY >= getHeight() - 1 || itemY <= 0) {\n return false;\n }\n }\n\n if (isPlayerInRoom()) {\n int playerX = (int) getPlayer().getXyLocation().getX();\n int playerY = (int) getPlayer().getXyLocation().getY();\n if (playerX >= getWidth() - 1 || playerX <= 0) {\n return false;\n }\n if (playerY >= getHeight() - 1 || playerY <= 0) {\n return false;\n }\n }\n\n return true;\n }",
"private boolean canEntityBuild(User user, Location location) {\n Collection<TownBlock> blocks = TownyUniverse.getInstance().getDataSource().getAllTownBlocks();\n\n int x = (int)Math.floor(location.getX() / 16.0);\n int z = (int)Math.floor(location.getZ() / 16.0);\n\n TownyWorld world;\n try {\n world = TownyUniverse.getInstance().getDataSource().getWorld(location.getWorld().getName());\n } catch (Exception e) {\n return true;\n }\n\n TownBlock block = new TownBlock(x, z, world);\n\n return !blocks.contains(block);\n }",
"public boolean isValidY(double y) {\n\t\tif (getWorld() != null)\n\t\t\treturn (y >= 0 && y < getWorld().getWorldHeight()); \n\t\treturn y >= 0;\n\t}",
"@OnlyIn(Dist.CLIENT)\n public boolean canLoadWorld(String saveName) {\n return Files.isDirectory(this.savesDir.resolve(saveName));\n }",
"@Test\n public void checkValidEntity() {\n cleanEntity0();\n entity0 = EntityUtil.getSampleRole();\n final Set<ConstraintViolation<Object>> cv = PersistenceValidation.validate(entity0);\n assertTrue(cv.isEmpty());\n }",
"public boolean checkYCoords(Entity entity) {\r\n\r\n // Gets y level\r\n Location location = entity.getLocation();\r\n int y = location.getBlockY();\r\n\r\n // Determines if entity is ready to be teleported for being in the teleportation range\r\n // Uses short-circuit programming for extra speed (The || operator and all in one statement)\r\n\r\n if(worldToIsBelow)\r\n return y <= yFrom;\r\n else\r\n return y >= yFrom;\r\n }",
"@Override\n public boolean isValidEntity(Entity entity, IGame game) {\n boolean retVal = false;\n // Null entities don't need to be checked.\n if (null != entity) {\n\n // Any entity in the array is valid.\n // N.B. Stop looking after we've found the match.\n final int entityId = entity.getId();\n for (int index = 0; (index < entityIds.length) && !retVal; index++) {\n if (entityId == entityIds[index]) {\n retVal = true;\n }\n }\n\n } // End entity-isn't-null\n\n return retVal;\n }",
"public boolean canMove(Location loc){\n if(loc.getX() >= theWorld.getX() || loc.getX() < 0){\n System.out.println(\"cant move1\");\n return false;\n }else if(loc.getY() >= theWorld.getY() || loc.getY() < 0){\n System.out.println(\"cant move2\");\n return false;\n }else{\n System.out.println(\"can move\");\n return true;\n }\n }",
"@Override\n public boolean isLocationValid(int x, int y)\n {\n return master.isLocationValid(x, y);\n }",
"public World getWorld(String worldName);",
"public void setWorld(World world) throws IllegalStateException {\n\t\tif (!canHaveAsWorld(world))\n\t\t\tthrow new IllegalStateException(\"Invalid position in the world trying to assign this entity to.\");\n\t\n\t\t//If current world is null, don't try to remove 'this' from it\n\t\t//If world is null, don't try to add anything to it\n\t\t//This allows us to provide 'null' as an argument in case we want to \n\t\t//undo the association for this entity.\n\t\tif (!(this.getWorld() == null) && !(world == null)) {\n\t\t\tthis.getWorld().removeEntity(this);\n\t\t\tworld.addEntity(this);\n\t\t}\n\n\t\tthis.world = world;\n\t\t\n\t}",
"@Override\n public boolean isValid(int playerId, Entity entity, IGame game) {\n return ((null != entity) && (entity.getOwnerId() == playerId) && isValidEntity(\n entity, game));\n }",
"boolean hasWorldid();",
"boolean hasWorldid();",
"@Test\r\n\tpublic void testMapValidation() {\r\n\t\tAssert.assertEquals(true,mapdata.contains(worldmap.getContinents()));\r\n\t\t\n\t\tAssert.assertEquals(true,mapdata.contains(worldmap.getTerritories()));\r\n\t}",
"public void setWorld(GameData world) {\r\n this.world = world;\r\n }",
"@Raw\n\tprivate boolean isValidYCoordinate(double y) {\n\t\tif (getWorld() == null)\n\t\t\treturn true;\n\t\treturn (y < getWorld().getHeight() && y >= 0);\n\t}",
"boolean canReplace(World world, int x, int y, int z);",
"public boolean isProjectileDestroyed(World world, Entity entity) {\n // Return false if entity has AT LEAST ONE of the following components\n return !(world.hasComponent(entity, ProjectileComponent.class)\n || world.hasComponent(entity, PositionComponent.class)\n || world.hasComponent(entity, InstantDamageComponent.class)\n || world.hasComponent(entity, MovementComponent.class)\n || world.hasComponent(entity, CollisionComponent.class)\n || world.hasComponent(entity, SpriteComponent.class)\n || world.hasComponent(entity, MassComponent.class)\n || world.hasComponent(entity, GravityComponent.class)\n || world.hasComponent(entity, RectangleComponent.class));\n }",
"private boolean canSelectCurWorldType() {\n WorldType worldtype = WorldType.WORLD_TYPES[this.selectedIndex];\n if (worldtype != null && worldtype.canBeCreated()) {\n return worldtype == WorldType.DEBUG_ALL_BLOCK_STATES ? hasShiftDown() : true;\n } else {\n return false;\n }\n }",
"public void setWorld(World world) {\n this.world = world;\n }",
"@Override\n\t\t\t\tpublic boolean validEntity(Entity me, Entity other) {\n\t\t\t\t\tif(Mappers.status.get(me).same(Mappers.status.get(other))) return false;\n\t\t\t\t\t\n\t\t\t\t\tFacingComponent facingComp = Mappers.facing.get(me);\n\t\t\t\t\tBody myBody = Mappers.body.get(me).body;\n\t\t\t\t\tBody otherBody = Mappers.body.get(other).body;\n\t\t\t\t\t\n\t\t\t\t\tfloat xOff = facingComp.facingRight ? 0.5f : -0.5f;\n\t\t\t\t\t\n\t\t\t\t\tfloat myX = myBody.getPosition().x + xOff;\n\t\t\t\t\tfloat myY = myBody.getPosition().y;\n\t\t\t\t\tfloat otherX = otherBody.getPosition().x;\n\t\t\t\t\tfloat otherY = otherBody.getPosition().y;\n\t\t\t\t\t\n\t\t\t\t\tfloat minX = 0.0f;\n\t\t\t\t\tfloat maxX = minX + range;\n\t\t\t\t\tfloat yRange = 0.9f;\n\t\t\t\t\t\n\t\t\t\t\t// Construct box in front of you\n\t\t\t\t\tfloat closeX = facingComp.facingRight ? myX + minX : myX - minX;\n\t\t\t\t\tfloat farX = facingComp.facingRight ? myX + maxX : myX - maxX;\n\t\t\t\t\tfloat top = myY + yRange;\n\t\t\t\t\tfloat bottom = myY - yRange;\n\t\t\t\t\t\n\t\t\t\t\tDebugRender.setType(ShapeType.Line);\n\t\t\t\t\tDebugRender.setColor(Color.CYAN);\n\t\t\t\t\tDebugRender.rect(facingComp.facingRight ? closeX : farX, bottom, Math.abs(farX - closeX), top - bottom, 1.0f);\n\t\t\t\t\t\n\t\t\t\t\tRectangle kick = new Rectangle(Math.min(closeX, farX), bottom, Math.abs(closeX - farX), top - bottom);\n\t\t\t\t\tRectangle enemy = new Rectangle(Mappers.body.get(other).getAABB());\n\t\t\t\t\tenemy.x = otherX - enemy.width * 0.5f;\n\t\t\t\t\tenemy.y = otherY - enemy.height * 0.5f;\n\t\t\t\t\t\n\t\t\t\t\treturn kick.overlaps(enemy);\n//\t\t\t\t\treturn (((facingComp.facingRight && otherX >= closeX && otherX <= farX) || (!facingComp.facingRight && otherX >= farX && otherX <= closeX)) && otherY <= top && otherY >= bottom);\n\t\t\t\t}",
"public void checkValid(ObjectEntity object) {\n if (object == null) {\n throw new SgtBackendRequirementException(\"No se ha especificado un tipo de objeto\");\n }\n\n if (object.getRepository() == null) {\n throw new SgtBackendRequirementException(\"No hay ninguna entidad asociada\");\n }\n\n if (!objectEntityRepository.existsById(object.getCode())) {\n throw new SgtBackendRequirementException(\"La entidad objeto \" + object.getCode() + \" no existe\");\n }\n }",
"public boolean isValidEntity(Entity entity, IGame game, \n boolean useValidNonInfantryCheck) {\n\n return (entity != null) && (entity.getOwnerId() == playerId)\n && entity.isSelectableThisTurn()\n // This next bit enforces the \"A players Infantry/Protos\n // move after that players other units\" options.\n && !(useValidNonInfantryCheck &&\n (game.getPhase() == IGame.Phase.PHASE_MOVEMENT)\n && (((entity instanceof Infantry) && \n game.getOptions().booleanOption(\"inf_move_later\")) \n || \n ((entity instanceof Protomech) && \n game.getOptions().booleanOption(\"protos_move_later\"))) \n && game.checkForValidNonInfantryAndOrProtomechs(playerId));\n }",
"public void setWorld(@Nullable World worldIn)\n {\n this.world = worldIn;\n\n if (worldIn == null)\n {\n this.field_78734_h = null;\n }\n }",
"public boolean hasWorldid() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasWorldid() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean meets(Player player) {\n\t\tfor (String perm : permissions) {\n\t\t\tif (!player.hasPermission(perm)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tboolean isInWorld = worlds.size() == 0;\n\t\tfor (String world : worlds) {\n\t\t\tif (player.getLocation().getWorld().getName().equalsIgnoreCase(world)) {\n\t\t\t\tisInWorld = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!isInWorld) return false;\n\t\t\n\t\tBendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);\n\t\tif (bPlayer == null && elements.size() > 0) return false;\n\t\t\n\t\tfor (Element element : elements) {\n\t\t\tif (element instanceof SubElement) {\n\t\t\t\tif (!bPlayer.hasSubElement((SubElement) element)) {\n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t} else if (!bPlayer.hasElement(element)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private void CheckWorldCollision() {\n\t\tfor(WorldObj obj : World.CurrentWorld.SpawnedObjects) {\n\t\t\tif(bounds.overlaps(obj.bounds))\n\t\t\t\tobj.OnCollision(this);\n\t\t\tif(MapRenderer.CurrentRenderer.ItemAnimation != null) {\n\t\t\t\tif(obj.ai != null) {\n\t\t\t\t\tif(dir == LEFT)\n\t\t\t\t\tAttackBounds.set(pos.x+(dir*1.35f)+0.5f,pos.y,1.35f,1);\n\t\t\t\t\telse\n\t\t\t\t\t\tAttackBounds.set(pos.x+0.5f,pos.y,1.35f,1);\n\t\t\t\t\tif(obj.healthBarTimer > 0.4f)\n\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\tif(!Terrain.CurrentTerrain.isSolid((int)(pos.x+0.5f+(0.3f*dir)), (int)(pos.y+0.5f)))\n\t\t\t\t\tobj.ai.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\tHitTimer = 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(obj.damageable) {\n\t\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\t\tobj.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public final EObject entryRuleWorld() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleWorld = null;\n\n\n try {\n // InternalBoundingBox.g:64:46: (iv_ruleWorld= ruleWorld EOF )\n // InternalBoundingBox.g:65:2: iv_ruleWorld= ruleWorld EOF\n {\n newCompositeNode(grammarAccess.getWorldRule()); \n pushFollow(FOLLOW_1);\n iv_ruleWorld=ruleWorld();\n\n state._fsp--;\n\n current =iv_ruleWorld; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"@Override\n public boolean isValidEntity(Entity entity, IGame game, \n boolean useValidNonInfantryCheck) {\n return super.isValidEntity(entity, game, useValidNonInfantryCheck)\n && (entity.getId() == entityId);\n }",
"public static boolean isValid(Location l)\n\t{\n\t\treturn l != null || Maze.isInBounds(l);\n\t}",
"public boolean updateWorldState()\n {\n\t WorldState worldState;\n\t while(true)\n {\n if (currentWorldState == null)\n {\n LOGGER.info(String.format(\"[%s, null]: Requesting worldState for first time\", clientId));\n }\n else\n {\n LOGGER.info(String.format(\"[%s, %s]: Requesting next worldState\", clientId, currentWorldState.getWorldStateClock()));\n }\n\n try\n {\n do\n {\n worldState = makeRequest(PlayerEndpoints.worldStatePlayerEndpoint, WorldState.class);\n sleep(50);\n } while (worldState == null || (currentWorldState != null && worldState.getWorldStateClock() <= currentWorldState.getWorldStateClock()));\n // only accept newer world states\n }\n catch (NullPointerException ex)\n {\n throw ex;\n }\n catch(ResourceAccessException reaEx)\n {\n if (currentWorldState == null)\n {\n LOGGER.info(String.format(\"[%s, null]: Requesting worldState failed because server unavailable, retrying in 1s\", clientId));\n }\n else\n {\n LOGGER.info(String.format(\"[%s, %s]: Requesting worldState failed because server unavailable, retrying in 1s\", clientId, currentWorldState.getWorldStateClock()));\n }\n sleep(1000);\n continue;\n }\n break;\n }\n if (currentWorldState == null)\n {\n LOGGER.info(String.format(\"[%s, null]: Got worldState [%s]\", clientId, worldState.getWorldStateClock()));\n }\n else\n {\n LOGGER.info(String.format(\"[%s, %s]: Got worldState [%s]\", clientId, currentWorldState.getWorldStateClock(), worldState.getWorldStateClock()));\n }\n this.currentWorldState = worldState;\n\n Optional<Unit> playerUnit = worldState.findPlayerUnit(clientId);\n if(playerUnit.isPresent())\n {\n this.clientUnit = playerUnit.get();\n return true;\n }\n\n return false;\n }",
"public boolean hasWorldid() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasWorldid() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"private boolean canSetOnFire(EntityPlayer player, World world) {\n if (player.dimension == -1) {\n return true;\n }\n\n int x = (int) player.posX;\n int y = (int) player.posY;\n int z = (int) player.posZ;\n\n for (int i = -5; i <= 5; i++) {\n for (int j = -5; j <= 5; j++) {\n for (int k = -5; k <= 5; k++) {\n if (world.getBlock(x + i, y + j, z + k).getMaterial() == Material.lava) {\n return true;\n }\n }\n }\n }\n\n return false;\n }",
"public boolean isWorldNameNew(String name){\n for(int i = 0; i < worlds.size(); i++){\n if(worlds.get(i).getName().equals(name)){\n return false;\n }\n }\n return true;\n }",
"@Override\n public boolean isLocationValid(XYCoord coords)\n {\n return master.isLocationValid(coords);\n }",
"@Override\n public boolean isValid() {\n if(width < 0){\n return false;\n }\n\n if(height < 0){\n return false;\n }\n\n //no null objects\n if(origin == null){\n return false;\n }\n\n if(color == null){\n return false;\n }\n\n //if texture doesn't exist, sprite is not buildable\n if(!Gdx.files.internal(texture).exists()){\n Gdx.app.log(TAG, \"Texture cannot be found: \" + texture);\n return false;\n }\n\n return true;\n }",
"@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isMinecraftEntity(final Object obj) {\n \t\treturn getEntityClass().isAssignableFrom(obj.getClass());\n \t}",
"@Override\n public boolean isValid(int playerId, IGame game) {\n boolean retVal = false;\n for (int index = 0; (index < entityIds.length) && !retVal; index++) {\n if ((game.getEntity(entityIds[index]) != null)\n && (playerId == game.getEntity(entityIds[index])\n .getOwnerId())) {\n retVal = true;\n }\n }\n return retVal;\n }",
"public boolean isPositionValid(){\n\t\t//check overlapping with walls\n\t\tfor(Wall wall : Game.gameField.getWalls()){\n\t\t\tif(wall.overlaps(center))\n\t\t\t\treturn false;\n\t\t}\n\t\t//check overlapping with other balls\n\t\tfor(Ball ball : Game.gameField.getBalls()){\n\t\t\tif(ball == this)\n\t\t\t\tcontinue;\n\t\t\tif(ball.getCenterPoint().distance(center) < RADIUS * 2)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn GameField.FIELD.contains(center);\n\t}",
"@Model\n private boolean isValidPosition(double position){\n\t if (this.superWorld == null) return (!Double.isNaN(position));\n\t else return Helper.isValidDouble(position);\n }",
"private boolean isValidCoordinate(int x, int y) {\n return x >= 0 && x < gameState.mapSize\n && y >= 0 && y < gameState.mapSize;\n }",
"public boolean isProjectileAlive(World world, Entity entity) {\n // return true iff the entity has all of the following components\n return world.hasComponent(entity, ProjectileComponent.class)\n && world.hasComponent(entity, PositionComponent.class)\n && world.hasComponent(entity, MovementComponent.class)\n && world.hasComponent(entity, CollisionComponent.class)\n && world.hasComponent(entity, SpriteComponent.class)\n && world.hasComponent(entity, MassComponent.class)\n && world.hasComponent(entity, GravityComponent.class)\n && world.hasComponent(entity, RectangleComponent.class);\n }",
"public boolean canPlaceEntity() {\n boolean blocked = this.mapCoordinatesForEntityToPlace.stream().anyMatch(c -> c.placeableState == PlaceableState.BLOCKED);\n if (blocked) return false;\n\n return this.mapCoordinatesForEntityToPlace.stream().anyMatch(c -> c.placeableState == PlaceableState.PLACEABLE);\n }",
"public abstract World create(World world);",
"@Override\n public boolean canDo(World world, EntityPlayer player) {\n return getTimer(player, COOLDOWN_TIMER) == 0;\n }",
"public Boolean isValid(IMDBBaseEntity entity) {\n return entity !=null;\n }",
"public boolean blockIsNotSafe(World world, double x, double y, double z) {\r\n if (world.getBlockAt((int) Math.floor(x), (int) Math.floor(y),(int) Math.floor(z)).getType() != Material.AIR \r\n || world.getBlockAt((int) Math.floor(x),(int) Math.floor(y + 1), (int) Math.floor(z)).getType() != Material.AIR)\r\n return true;\r\n \r\n if ((world.getBlockAt((int) Math.floor(x), (int) Math.floor(y - 1),(int) Math.floor(z)).getType() == Material.LAVA))\r\n return true;\r\n \r\n if ((world.getBlockAt((int) Math.floor(x), (int) Math.floor(y - 1),(int) Math.floor(z)).getType() == Material.STATIONARY_LAVA))\r\n return true;\r\n \r\n if ((world.getBlockAt((int) Math.floor(x), (int) Math.floor(y - 1),(int) Math.floor(z)).getType() == Material.FIRE))\r\n return true;\r\n \r\n if ((world.getBlockAt((int) Math.floor(x), (int) Math.floor(y),(int) Math.floor(z)).getType() == Material.FIRE))\r\n return true;\r\n \r\n if (blockIsAboveAir(world, x, y, z))\r\n return true;\r\n\r\n return false;\r\n }",
"public Integer isAlive(int row, int col, Integer[][] world) {\n int aliveNeighbors = countAlive(findNeighbors(row, col, world));\n if (aliveNeighbors < 2 || aliveNeighbors > 3) {\n return 0;\n } else if (aliveNeighbors == 2) {\n return world[row][col];\n } else {\n return 1;\n }\n }",
"public boolean canBuild(Location location, Player player) {\n if (!location.getWorld().getEnvironment().equals(Environment.NORMAL)) {\n // If theyre not in the overworld, they cant build\n return false;\n } else if (landIsClaimed(location)) {\n if(isOwner(location,player)) {\n return true;\n } else if(landPermissionCode(location).equals(\"p\")) {\n return true;\n } else if(landPermissionCode(location).equals(\"c\")) {\n String owner_uuid=REDIS.get(\"chunk\" + location.getChunk().getX() + \",\" + location.getChunk().getZ() + \"owner\");\n String owner_clan=REDIS.get(\"clan:\"+owner_uuid);\n String player_clan=REDIS.get(\"clan:\"+player.getUniqueId().toString());\n if(owner_clan.equals(player_clan)) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return true;\n }\n }",
"public boolean validPosition(Player p, double x, double y) {\n\n\t\tTile tile = getTile(p, x + p.BOUNDING_BOX_X, y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x, y + p.BOUNDING_BOX_Y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x - p.BOUNDING_BOX_X, y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x, y - p.BOUNDING_BOX_Y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public static void verify() throws IllegalStateException{\n\t\tif (Blocks.dragon_egg.getClass() != BlockDragonEggCustom.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - Dragon Egg class mismatch: \"+Blocks.dragon_egg.getClass().getName());\n\t\t}\n\n\t\tif (Blocks.end_portal.getClass() != BlockEndPortalCustom.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - End Portal class mismatch: \"+Blocks.end_portal.getClass().getName());\n\t\t}\n\n\t\tif (Blocks.end_portal_frame.getClass() != BlockEndPortalFrameCustom.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - End Portal Frame class mismatch: \"+Blocks.end_portal_frame.getClass().getName());\n\t\t}\n\t\t\n\t\tif (BiomeGenBase.sky.getClass() != BiomeGenHardcoreEnd.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - End biome class mismatch: \"+BiomeGenBase.sky.getClass().getName());\n\t\t}\n\t\t\n\t\tif (getWorldProviderType(1) != WorldProviderHardcoreEnd.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - End world provider class mismatch: \"+getWorldProviderType(1).getName());\n\t\t}\n\t\t\n\t\tif (EntityList.stringToClassMapping.get(\"Enderman\") != EntityMobEnderman.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - Enderman class mismatch: \"+((Class)EntityList.stringToClassMapping.get(\"Enderman\")).getName());\n\t\t}\n\t\t\n\t\tif (EntityList.stringToClassMapping.get(\"Silverfish\") != EntityMobSilverfish.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - Silverfish class mismatch: \"+((Class)EntityList.stringToClassMapping.get(\"Silverfish\")).getName());\n\t\t}\n\t\t\n\t\tif (EntityList.stringToClassMapping.get(\"EnderCrystal\") != EntityBlockEnderCrystal.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - Ender Crystal class mismatch: \"+((Class)EntityList.stringToClassMapping.get(\"EnderCrystal\")).getName());\n\t\t}\n\t}",
"public void isIntersects(WorldObject worldObject) {\n Area areaFromThisObject = new Area(this.getShape());\n Area areaFromWorldObject = new Area(worldObject.getShape());\n areaFromThisObject.intersect(areaFromWorldObject);\n this.collided = !areaFromThisObject.isEmpty();\n }",
"boolean isLegal(Square from) {\r\n return get(from).side() == _turn;\r\n }",
"@Raw\n protected void setSuperWorld(World world) throws IllegalArgumentException{\n \tif(world == null || isValidSuperWorld(world))\t\tthis.superWorld = world;\n \telse throw new IllegalArgumentException(\"Isn't a valid world @setSuperWorld()\");\n }",
"public boolean overlapAnyEntity(){\n \treturn this.getSuperWorld().getEntities().stream().anyMatch(T ->this.overlap(T));\n }",
"public boolean isValid(int playerId, Entity entity, IGame game) {\n return (playerId == this.playerId) && isValidEntity(entity, game);\n }",
"public boolean check() {\n return StuffUtils.equal(structure, SpigotUtils.structBetweenTwoLocations(pos1, pos2, material));\n }",
"void process(GameData gameData, Map<String, Entity> world, Entity entity);",
"public boolean inRegion(Location loc)\n {\n if (!loc.getWorld().getName().equals(world.getName()) || !setup)\n return false;\n \n int x = loc.getBlockX();\n int y = loc.getBlockY();\n int z = loc.getBlockZ();\n \n // Check the lobby first.\n if (lobbySetup)\n {\n if ((x >= l1.getBlockX() && x <= l2.getBlockX()) && \n (z >= l1.getBlockZ() && z <= l2.getBlockZ()) && \n (y >= l1.getBlockY() && y <= l2.getBlockY()))\n return true;\n }\n \n // Returns false if the location is outside of the region.\n return ((x >= p1.getBlockX() && x <= p2.getBlockX()) && \n (z >= p1.getBlockZ() && z <= p2.getBlockZ()) && \n (y >= p1.getBlockY() && y <= p2.getBlockY()));\n }",
"boolean wouldBeValidHome(IGeneticMob geneticMob, Vec3 coords, Block block, int metadata, TileEntity te);",
"public boolean apply(BlockPos pos, ServerLevel world);",
"@Override\n protected String isSpecificMissionValid() {\n if (!Ants.getWorld().getEnemyHills().contains(hill))\n return \"Enemy hill \" + hill + \" is no longer there\";\n return partialMission.isValid();\n }",
"@Override\n public boolean isValidEntity(Entity entity, IGame game, \n boolean useValidNonInfantryCheck) {\n // The entity must be in the mask, and pass\n // the requirements of the parent class.\n return ((GameTurn.getClassCode(entity) & mask) != 0)\n && super.isValidEntity(entity, game, \n useValidNonInfantryCheck);\n }",
"public static boolean hasOccupant(World worldIn, NPCHouse npch)\n\t{\n\t\tList<Entity> inHouse = new ArrayList();\n\t\tList<Entity> allEntities = worldIn.loadedEntityList;\n\t\tfor (Entity ent : allEntities)\n\t\t{\n\t\t\tif (BlockHelper.isInside(worldIn, ent.getPosition(), npch))\n\t\t\t{\n\t\t\t\tinHouse.add(ent);\n\t\t\t}\n\t\t}\n\t\tfor (Entity inside : inHouse)\n\t\t{\n\t\t\tif ( inside instanceof EntityNPC)\n\t\t\t{\n\t\t\t\tEntityNPC temp = (EntityNPC) inside;\n\t\t\t\tif ( npch.isEqual(temp.getNPCHouse()))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Check\n\tpublic void checkIfVariableDefinitionsAreValid(VariableDefinition anEntity) {\n\t\tif (anEntity.getName() != null) {\n\t\t\tString tempName = anEntity.getName().getName();\n\t\t\tif (tempName != null) {\n\t\t\t\tif (tempName.contains(\".\")) {\n\t\t\t\t\terror(\"Variable definitions may not be fully or partly qualified. Please put the variable in the according packagedef to qualify it!\",\n\t\t\t\t\t\t\tnull);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) {\n\t\tint var5 = par1World.getBlockId(par2, par3 - 1, par4);\n\t\t\n\t\tif (var5 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tBlock block = Block.blocksList[var5];\n\t\treturn Block.sand.blockID == var5 || block.isOpaqueCube() == true;\n\t}",
"private boolean verifyBounds() {\r\n\t if((x>RobotController.BOUNDS_X || y>RobotController.BOUNDS_Y)\r\n\t || x<0 || y<0){\r\n\t return false;\r\n\t }\r\n\t return true;\r\n\t }",
"public WorldRegion(GameWorldEntity entity) {\n gameWorldEntities.add(entity);\n }",
"public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }",
"public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }",
"private void checkLegal(int glId)\n {\n if (glId == GL2.GL_POLYGON_MODE || glId == GL2.GL_COLOR_MATERIAL_PARAMETER)\n return;\n if (GLState.TEXTURE_GROUP <= glId && glId < GLState.TEXTURE_GROUP + GLState.TEXTURE_GROUP_SIZE)\n return;\n throw new IllegalArgumentException(\"GLStateComponentII: unknown glId: \" + glId);\n }",
"public boolean isCityValid() throws BusinessRuleException {\n\t\tif ((\"EUR\".equalsIgnoreCase(Version.CURRENT_REGION))) {\n\t\t\tif (txtCity.getText().trim().length() > 0)\n\t\t return true;\n\t\t} else if (!addressPanelType.trim().equalsIgnoreCase(SHIPPING_ADDRESS_PANEL) \n\t\t\t\t|| txtCity.getText().trim().length() > 0) {\n\t\t\treturn true;\n\t\t}\n\t\ttxtCity.requestFocus();\n\t\tthrow new BusinessRuleException(RESOURCE.getString(\"Town / City: This field is required.\"));\n\t}",
"public boolean areValidCoordinates(int x, int y) {\n return (x >= 0 && x < WIDTH && y >= 0 && y < HEIGHT);\n }",
"public boolean apply(World world, BlockPos rootPos);",
"public static boolean validateTown( String town ) throws InvalidRouteException, IllegalArgumentException{\n\t\tif (town.length() == 1&&isLetter(town.charAt(0))) return true;\n\t\tthrow new InvalidRouteException(\"The town name '\"+town+\"' is invalid\");\n\t}"
]
| [
"0.7879068",
"0.7244029",
"0.71465343",
"0.6958503",
"0.6474537",
"0.6418813",
"0.61854005",
"0.59898376",
"0.5983627",
"0.58699846",
"0.58449984",
"0.5825734",
"0.57242036",
"0.57159257",
"0.5708263",
"0.56794465",
"0.5648174",
"0.56434244",
"0.55797446",
"0.5572633",
"0.55543244",
"0.5537325",
"0.54982644",
"0.5461536",
"0.5448264",
"0.54435974",
"0.53917015",
"0.53903615",
"0.5374179",
"0.5341506",
"0.5336741",
"0.53280926",
"0.5319432",
"0.5317379",
"0.5314039",
"0.5314039",
"0.53139186",
"0.5302749",
"0.5297818",
"0.52913904",
"0.5285017",
"0.5283789",
"0.52598834",
"0.5259025",
"0.5250067",
"0.52479297",
"0.52472454",
"0.5246309",
"0.5246309",
"0.52307177",
"0.52240044",
"0.52225864",
"0.5217109",
"0.5192913",
"0.5192677",
"0.51767546",
"0.51767546",
"0.51692784",
"0.5164398",
"0.5137607",
"0.5134664",
"0.5122689",
"0.5118166",
"0.5107669",
"0.5094769",
"0.50801265",
"0.5077772",
"0.50693697",
"0.50681627",
"0.50677294",
"0.5049452",
"0.50450253",
"0.50448716",
"0.50358784",
"0.50168204",
"0.49914324",
"0.49878895",
"0.49866438",
"0.49841958",
"0.49574462",
"0.49520227",
"0.49481258",
"0.49396324",
"0.4932547",
"0.49090907",
"0.4905945",
"0.4903065",
"0.4888954",
"0.48885173",
"0.48846573",
"0.48787695",
"0.48785007",
"0.48738343",
"0.48716494",
"0.48716494",
"0.4869247",
"0.4858328",
"0.48483682",
"0.48367676",
"0.4832802"
]
| 0.6938941 | 4 |
Returns whether the entity is terminated. | @Basic @Raw
public boolean isTerminated(){
return this.isTerminated;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Basic\r\n\t@Raw\r\n\tpublic boolean isTerminated(){\r\n\t\treturn isTerminated;\r\n\t}",
"public boolean isTerminated() {\n \n \t\tfinal Thread executingThread = this.environment.getExecutingThread();\n \t\tif (executingThread.getState() == Thread.State.TERMINATED) {\n \t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}",
"public boolean isTerminated() {\r\n\t\treturn fTerminated;\r\n\t}",
"public boolean terminate() {\n return (msgType == MessageType.QUIT);\n }",
"public boolean isDestroyed(){\n\t\treturn entState == EntState.Destroyed;\n\t}",
"public boolean isEnded(){\n\t\treturn ended;\n\t}",
"public boolean hasEnded() {\n\t\treturn ended;\n\t}",
"public boolean isTerminated() {\n lock.lock();\n try {\n if (state == State.RUNNING) {\n return false;\n }\n\n for (SerialExecutor executor : serialExecutorMap.values()) {\n if (!executor.isEmpty()) {\n return false;\n }\n }\n return executor.isTerminated();\n } finally {\n lock.unlock();\n }\n }",
"boolean isTerminated();",
"public boolean hasEnded() {\n return mEnded;\n }",
"public boolean hasEnded(){\r\n\t\treturn state == GameState.FINISHED;\r\n\t}",
"public boolean isEndState()\n {\n return !this.safe || (this.e.size() == 0) || (this.d.size() == 0);\n }",
"public boolean isTerminado() {\n\t\treturn LocalDate.now().isAfter(fechaFinalizacion);\n\t}",
"public boolean isDestroyed() {\n return currentState == State.FINISHED;\n }",
"public boolean isComplete()\n {\n return getStatus() == STATUS_COMPLETE;\n }",
"public boolean isTerminada() {\n\n\t\tif (terminada) {\n\t\t\t\n\t\t\tfor (Partida.Observer o : observers) {\n\n\t\t\t\to.partidaTerminada(tablero, ganador);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn terminada;\n\t}",
"public Boolean isDeleteOnTermination() {\n return this.deleteOnTermination;\n }",
"public Boolean hasEntity() {\n \n return hasEntity_;\n \n }",
"public abstract boolean isEnded();",
"boolean checkEndGame() throws RemoteException;",
"public boolean isDone(){\r\n\t\tif(worker.getState()==Thread.State.TERMINATED) return true;\r\n\t\treturn false;\r\n\t}",
"protected boolean isFinished() {\r\n if (state == STATE_SUCCESS) {\r\n // Success\r\n return true;\r\n }\r\n if (state == STATE_FAILURE) {\r\n // Failure\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean isFinished() {\r\n\t\treturn this.finished;\r\n\t}",
"protected boolean isFinished() {\n \t//ends \n \treturn isTimedOut();\n }",
"public boolean isDestroyed()\n\t\t{\n\t\t\treturn destroyed;\n\t\t}",
"public boolean isFinished() {\n\t\treturn (finished);\n\t}",
"@Override\r\n\tpublic boolean terminate() {\n\t\tString METHOD_NAME = \"::terminate::\";\r\n\t\tlogger.debug(CLASS_NAME + METHOD_NAME + \"Inside...\");\r\n\t\treturn false;\r\n\t}",
"protected boolean isFinished() {\r\n\t \treturn (timeSinceInitialized() > .25) && (Math.abs(RobotMap.armarm_talon.getClosedLoopError()) < ARM_END_COMMAND_DIFFERENCE_VALUE); //TODO:\r\n\t }",
"protected boolean isFinished() {\n return this.isTimedOut();\n }",
"public Boolean isEnd() {\n\t\t// keep running\n\t\tif (currentNo == -1) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// car production for this production line is done\n\t\telse if (currentNo >= expectedNo) {\n//\t\t\tSystem.out.println(\"isEnd of car Production line is \");\n//\t\t\tSystem.out.print(currentNo >= expectedNo);\n\n\t\t\treturn true;\n\t\t} else {\n//\t\t\tSystem.out.println(\"isEnd of car Production line is \");\n//\t\t\tSystem.out.print(currentNo >= expectedNo);\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public boolean ended() {\r\n\t\tif (System.nanoTime() >= timeKeyB) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic boolean isFinished() {\n\t\treturn (this.timeRemaining == 0);\n\t}",
"public boolean isFinished() {\n\t\treturn finished;\n\t}",
"public boolean isFinished() {\n\t\treturn finished;\n\t}",
"private boolean transactionCanBeEnded(Transaction tx) {\n return tx != null && !(tx.getStatus() != null && tx.getStatus().isOneOf(TransactionStatus.COMMITTED, TransactionStatus.ROLLED_BACK));\n }",
"public boolean getEnd()\n\t{\n\t\treturn getBooleanIOValue(\"End\", true);\n\t}",
"public boolean isDestroyed(){\n return destroyed;\n }",
"public boolean isExited() {\n return this.applicationState.checkFlag().equals(Flag.IS_EXITED);\n }",
"public boolean end() {\n\t\ttry {\n\t\t\tbyte[] buffer = \"END\".getBytes();\n\t\t\toos.writeObject(buffer);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n return isTimedOut();\n }",
"protected boolean isFinished() {\n\t\treturn isTimedOut();\n\t}",
"protected boolean isFinished() {\n return finished;\n }",
"public boolean hasDied() {\n return !isAlive();\n }",
"public boolean isDone()\n {\n return (this.elapsed >= this.duration);\n }",
"protected boolean isFinished() {\n return Robot.m_elevator.onTarget();\n }",
"public boolean isFinished() {\n return finished;\n }",
"boolean isDestroyed() {\n return destroyed;\n }",
"public boolean isFinished(){\n return this.finished;\n }",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn (System.currentTimeMillis() > Endtime);\n\t}",
"protected boolean isFinished() {\r\n return isTimedOut();\r\n }",
"public final boolean isFinished() {\n \t\tfor (StoppingCondition condition : stoppingConditions) {\n \t\t\tif (condition.isCompleted()) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}",
"protected boolean isFinished() {\n long tEnd = System.currentTimeMillis();\n long tDelta = tEnd - tStart;\n double elapsedSeconds = tDelta / 1000.0;\n if (elapsedSeconds > 0.2) {\n \t System.out.println(\"End Fire\");\n \t return true;\n }\n else if(elapsedSeconds > 0.15) {\n \t System.out.println(\"end Fire\");\n Robot.m_Cannon.set(-1);\n }\n else if(elapsedSeconds > 0.05) {\n \t System.out.println(\"mid Fire\");\n Robot.m_Cannon.stop();\n }\n return false;\n }",
"protected boolean isFinished() {\n\t\treturn pid.onTarget();\n\t}",
"public boolean getEnd(){\n\t\treturn this.isEnd;\n\t}",
"public boolean isExit() {\n return exit;\n }",
"public boolean isFinished() {\r\n\t\t\treturn tIsFinished;\r\n\t\t}",
"public boolean hasExited() {\n return this.exited;\n }",
"public boolean wasFinished()\n {\n return this.isFinished;\n }",
"public boolean isEnd() {\n\t\t\treturn this == END_STREAM;\n\t\t}",
"protected boolean isFinished() {\n\t\treturn isFinished;\n\t}",
"public boolean isFinished() {\n\t\tif (getRemaining() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isFinished() {\n\t\tif (gameSituation == UNFINISHED) {\n\t\t\treturn false;\n\t\t} // Of if\n\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isEnded() {\n\t\treturn chronometer.isEnded();\n\t}",
"public boolean isDone(){\n return status;\n }",
"public synchronized boolean isStopped() {\n\t\treturn State.STOPPED.equals(state);\n\t}",
"protected boolean isFinished() {\n\treturn this.isDone;\n }",
"public abstract boolean shouldEnd();",
"@Override\n public boolean isFinished() {\n return System.currentTimeMillis() >= endtime;\n }",
"public boolean isfinished() {\n\t\treturn isFinished;\n\t}",
"public boolean isComplete() {\r\n\t\treturn complete;\r\n\t}",
"public boolean hasExited()\n {\n try\n {\n proc.exitValue();\n return true;\n }\n catch(IllegalThreadStateException ex)\n {\n return false;\n }\n }",
"public Boolean getDeleteOnTermination() {\n return this.deleteOnTermination;\n }",
"public boolean isComplete() {\n return complete;\n }",
"public boolean isComplete() {\n return complete;\n }",
"protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }",
"protected boolean isFinished() {\n\t\tif (!hasPathStarted) {\n\t\t\treturn false;\n\t\t}\n\t\tboolean leftComplete = status.activePointValid && status.isLast;\n\t\tboolean trajectoryComplete = leftComplete;\n\t\tif (trajectoryComplete) {\n\t\t\tSystem.out.println(\"Finished trajectory\");\n\t\t}\n\t\treturn trajectoryComplete || isFinished;\n\t}",
"protected boolean isFinished() {\n\t\treturn Robot.oi.ds.isAutonomous();\n\t}",
"protected boolean isFinished() {\n return Math.abs(pid.getError()) < 0.25;\n }",
"public boolean isDestroyed() {\n\t\treturn isDestroyed;\n\t}",
"public boolean isFinished() {\n return true;\n }",
"public final boolean isFinish() {\n return finish;\n }",
"public boolean isStopped() {\r\n\t\treturn this.stopped;\r\n\t}",
"@Override\n\tpublic boolean isFinished() {\n\t\treturn finished;\n\t}",
"public boolean isShutdown() {\n lock.lock();\n try {\n return state == State.SHUTDOWN;\n } finally {\n lock.unlock();\n }\n }",
"public boolean isEndGameDelay() {\n\t\treturn endGameDelay;\n\t}",
"public final boolean isFinish() {\n return finish;\n }",
"protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }",
"protected boolean isFinished() {\n return isFinished;\n }",
"public Guard isFinishedExecution() {\n if (depth == PSymGlobal.getConfiguration().getMaxStepBound()) {\n return Guard.constTrue();\n } else {\n return allMachinesHalted;\n }\n }",
"public boolean isFinished() {\n return isFinished;\n }",
"@Override\n public boolean isEnding() {\n return false;\n }",
"protected boolean isFinished() {\n \t// wait for a time out\n return false;\n }",
"public boolean getFinished() {\n return finished_;\n }",
"public boolean isClosed() {\n\t\treturn mService == null;\n\t}",
"public boolean isEnd() { return (_dateExpiration - System.currentTimeMillis()) <= 0; }",
"public boolean isStopped() {\n return stopped;\n }",
"public boolean isStopped() {\n return stopped;\n }",
"boolean isServiceStopped()\n\t\t\tthrows USMException;",
"protected boolean isFinished() {\n \tboolean distanceTarget = Robot.driveDistancePID.onRawTarget();\n \t\n \tdouble timeNow = timeSinceInitialized();\n \t\n \treturn (distanceTarget || (timeNow >= expireTime));\n }",
"public boolean isDeadEnd() {\n return getClosedFuses().size() <= 1;\n }"
]
| [
"0.7178544",
"0.7104781",
"0.69930893",
"0.6722163",
"0.6623012",
"0.658331",
"0.6494317",
"0.641274",
"0.63734573",
"0.624531",
"0.6223837",
"0.61658466",
"0.6112654",
"0.6035919",
"0.59651005",
"0.5962247",
"0.59567976",
"0.5920338",
"0.59192866",
"0.5892337",
"0.5880497",
"0.58653826",
"0.5858362",
"0.5855072",
"0.5846731",
"0.5845136",
"0.5843923",
"0.58423775",
"0.58325076",
"0.5828702",
"0.5828133",
"0.5826531",
"0.5813488",
"0.5813488",
"0.5796524",
"0.57723784",
"0.57685727",
"0.5768026",
"0.575597",
"0.5754576",
"0.5754214",
"0.5753054",
"0.5751875",
"0.5747184",
"0.5744742",
"0.5742329",
"0.57418853",
"0.573549",
"0.5734552",
"0.57228374",
"0.57183",
"0.5705899",
"0.5691205",
"0.56844544",
"0.5676479",
"0.5675408",
"0.56721705",
"0.56701857",
"0.5657337",
"0.56500727",
"0.5649332",
"0.56353766",
"0.5633779",
"0.5630681",
"0.563016",
"0.56275743",
"0.5626602",
"0.5621049",
"0.5616325",
"0.56152004",
"0.56110126",
"0.5604946",
"0.5603462",
"0.5603462",
"0.55982375",
"0.55907196",
"0.5586285",
"0.5585071",
"0.55836797",
"0.55829436",
"0.5579318",
"0.55785066",
"0.5565386",
"0.5563902",
"0.5557899",
"0.55497473",
"0.55491465",
"0.5548434",
"0.55472916",
"0.5547082",
"0.5543678",
"0.55386806",
"0.5538657",
"0.5537526",
"0.553471",
"0.5531205",
"0.5531205",
"0.55307573",
"0.5528473",
"0.55230004"
]
| 0.71075827 | 1 |
Method to terminate this entity. | @Raw
public void terminate(){
if (superWorld != null)
this.superWorld.removeEntityFromWorld(this);
this.superWorld = null;
this.isTerminated = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void terminate() {\n\t\tpostEvent(new IpcEvent(SimulationEvents.EVENT_TYPE_TERMINATE, this, null));\n\t}",
"@Override\r\n protected void terminate() {\n forceEntities.release();\r\n forceEntities = null;\r\n\r\n velocityEntities.release();\r\n velocityEntities = null;\r\n\r\n gravityEntities.release();\r\n gravityEntities = null;\r\n }",
"@Override\r\n\tpublic void terminate() {\n\t\r\n\t}",
"public void terminate() {\n }",
"public void terminate() {\n\t}",
"public void terminate() {\n\t}",
"public void terminate() {\n\t}",
"@Override\n public final void terminate() {\n }",
"public void terminate() {\n TerminalAtomics.cancel(this, REQUESTED);\n UNSAFE.putOrderedObject(this, REMOVE, null);\n }",
"protected void terminate(){\r\n\t\tsetTerminate(true);\r\n\t\tHolder holder = this.getDirectHolder();\r\n\t\tsetHolder(null);\r\n\t\tholder.removeItem(this);\r\n\t}",
"@Override\n public void terminate() throws HekateException {\n }",
"public void terminate()\n\t{\n\t\tsynchronized (this) { this.running = false; }\n\t}",
"protected void terminate()\n\t\tthrows Exception\n {\n }",
"public void closeEntity();",
"public void terminate() {\n logger.info(\"terminate not implemented\");\n }",
"public void terminate() {\n terminated = true;\n }",
"public void terminate();",
"public abstract void terminate();",
"public static void terminate() {\n\tStudentDA.terminate();\n }",
"public void terminate() {\n\t\trunning = false;\n\t}",
"public abstract void endDXFEntity();",
"@Override\n public void terminate() throws InterruptedException {\n terminated.countDown();\n }",
"public void terminate(){\n tState.stop();\n tMovement.stop();\n collision.remove(this); \n }",
"public void terminate() {\n if (isTerminated()) {\n throw new BirdCountTerminatedException(this);\n }\n this.endTime = new Date();\n }",
"public void terminate() {\r\n running = false;\r\n }",
"public void terminate() {\n Swap.getSwap().close();\n super.terminate();\n }",
"public void stop() {\n\t\tthis.controller.terminate();\n\t}",
"public void terminate() {\n screen.closeScreen();\n }",
"@Override\n\tprotected void onTermination() throws SimControlException {\n\t\t\n\t}",
"public void terminate() {\n\t\t//terminate probes\n\t\tfor (Entry<String,IProbe> entry :this.probes.entrySet())\n\t\t\tentry.getValue().terminate();\n\t\t//terminate collector\n\t\tthis.collector.terminate();\n\t\tthis.distributorWorker.terminate();\n\t}",
"public void deactivate() {\n\t\tentity.deactivateInstance(this);\n\t}",
"public void terminate() {\n config.closeConnection();\n }",
"public void terminate() {\n this.isDying = true;\n //this.isStaticCollidable = false;\n //this.isDynamicCollidable = false;\n\n this.setProp(ObjectProps.PROP_STATICCOLLIDABLE, false);\n this.setProp(ObjectProps.PROP_DYNAMICCOLLIDABLE, false);\n\n this.action = DYING;\n this.velX = 0;\n this.velY = 5;\n }",
"public synchronized void terminate () {\n shutdown = true;\n }",
"protected void end() {\n \tRobot.conveyor.stop();\n }",
"public void terminate() {\n this.terminated = true;\n executor.interrupt();\n this.handler = null;\n this.out = null;\n this.in = null;\n this.logger = null;\n this.buffer = null;\n }",
"@Override\r\n\tpublic boolean terminate() {\n\t\tString METHOD_NAME = \"::terminate::\";\r\n\t\tlogger.debug(CLASS_NAME + METHOD_NAME + \"Inside...\");\r\n\t\treturn false;\r\n\t}",
"protected void end() {\n Robot.m_Cannon.stop();\n }",
"@PreDestroy\r\n\t@Override\r\n\tpublic void terminate()\r\n\t{\r\n\t\tthis.cleanUpDone = true;\r\n\t\tthis.isRunning = false;\r\n\t\tthis.priceMap.clear();\r\n\t\tthis.priceUpdateBlockingQueue.clear();\r\n\t\tthis.executorService.shutdownNow();\r\n\t\t\r\n\t\tif(logger.isInfoEnabled())\r\n\t\t\tlogger.info(\"Termination of price service has been completed successfully.\");\r\n\t}",
"public void terminate(){\n running = false;\n }",
"public void simulationTerminating() {\n }",
"void entityDestroyed(Entity entity);",
"@Override\n\t\tpublic void endService() {\n\t\t\t\n\t\t}",
"@Override\n public void exit() {\n model.exit();\n }",
"protected void end() {\n\t\tRobot.conveyor.Stop();\n\t}",
"void terminate();",
"void terminate();",
"void terminate();",
"void terminate();",
"void terminate();",
"@Override\n\tpublic void terminateInstances(ITerminateInstancesRequest req) {\n\t\t\n\t}",
"public void termina() {\n\t\tif ( visorEscenario != null )\n\t\t\tvisorEscenario.termina();\n\t}",
"public abstract void endObject();",
"public void terminate() {\n\t\t// Do something more clever here...\n\t\toutput.console(\"AlarmClock exit.\");\n\t}",
"public void decreaseLife() {\n this.terminate();\n }",
"@Override\r\n\tpublic void onTerminate() {\n\t\tsuper.onTerminate();\r\n\t}",
"protected void end() {\n\t\tshooter.stopShooter();\n\t}",
"@Override\n public void terminate()\n {\n SwapPageManager.closeTestFile();\n //\tprintDebug(memoryController.pageReplacementAlgorithm.getAlgorithmName()+\n //\t\t\t\"Total Page Fault: \"+memoryController.pageReplacementAlgorithm.getNumberPageFault());\n\n super.terminate();\n }",
"public void destroy(@Entity int entity) {\n nDestroy(mNativeObject, entity);\n }",
"public final void kill() {\n doKill();\n }",
"public abstract void end();",
"public void stop()\n {\n storage.stop();\n command.stop();\n }",
"public void terminate () {\n\t\t\t\n\t\t\tsynchronized (runningLock) {\n\t\t\t\tif (running == false)\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tinputStream.close ();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println (\"ModemWorker.teminate(): IOException on close().\");\n\t\t\t}\n\t\t}",
"@Override\n public synchronized void term() {\n if (terminated) {\n return;\n }\n\n messageState.closeAll();\n context.term();\n\n terminated = true;\n }",
"public void terminate() {\n\t\tif (socket == null)\n\t\t\tthrow new IllegalStateException();\n\t\ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {}\n\t}",
"protected void end() {\n \tRobot.m_elevator.disable();\n \tRobot.m_elevator.free();\n }",
"public void terminate() throws NotBoundException, RemoteException {\n\t\tRegistry registry = LocateRegistry.getRegistry(registryHost,\n\t\t\t\tregistryPort);\n\t\tJobTracker jobTracker = (JobTracker) registry.lookup(\"JobTracker\");\n\t\tjobTracker.terminate();\n\t}",
"@Override\n public void onTerminate() {\n \tsuper.onTerminate();\n \t\n \tLog.e(\"LIFECYCLE = \", this.getClass().toString() + \".onTerminate\");\n \treturn;\n }",
"protected void end() {\n \tRobot.DRIVE_SUBSYSTEM.stop();\n }",
"protected void end() {\n \n this.getPIDController().disable();\n shooter.setShooterMotor(0.0);\n }",
"@Override\n\tpublic void terminateDatacenters() {\n\t}",
"public void end();",
"public synchronized void shutdown() {\n final String actionDescription = \"shutdown\";\n auditLog.logMessage(actionDescription, GovernanceEngineAuditCode.SERVICE_TERMINATING.getMessageDefinition());\n\n if (instance != null) {\n this.instance.shutdown();\n }\n\n auditLog.logMessage(actionDescription, GovernanceEngineAuditCode.SERVICE_SHUTDOWN.getMessageDefinition());\n }",
"public abstract void notifyEntityEnd();",
"protected void end()\n\t{\n\t\tstop();\n\t}",
"public void quit() {\n\t\tgetter().quit();\r\n\t}",
"public void terminate() throws DebugException {\n\t\tfTerminated = true;\n\t\tfireTerminateEvent();\n\t}",
"protected void end() {\n controller.disable();\n controller.free();\n }",
"@Override\r\n public void onTerminate() {\n \r\n dataManager.closeDb();\r\n selectedBook = null;\r\n super.onTerminate();\r\n }",
"@JRubyMethod\n public IRubyObject terminate() {\n if (running()) {\n samplingThread.interrupt();\n return waitSamplingStop();\n } else {\n return this.getRuntime().getFalse();\n }\n }",
"public void end() {\n\n }",
"public void entityDeactivated() {\r\n \t\t\r\n \t\tif (logger.isDebugEnabled()) {\r\n \t\t\tlogger\r\n \t\t\t.debug(\"entityDeactivated(): ending all activities\");\r\n \t\t}\r\n \t\t\r\n \t\tfor(ActivityHandle handle: activities.keySet()) {\r\n \t\t\ttry {\r\n \t\t\t\tsleeEndpoint.activityEnding(handle);\r\n \t\t\t} catch (UnrecognizedActivityException uae) {\r\n \t\t\t\tlogger.error(\"failed to indicate activity has ended\",\r\n \t\t\t\t\tuae);\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tif (logger.isDebugEnabled()) {\r\n \t\t\tlogger.debug(\"entityDeactivated(): cleaning naming context\");\r\n \t\t}\r\n \t\ttry {\r\n \t\t\tcleanNamingContextBindings();\r\n \t\t} catch (NamingException e) {\r\n \t\t\tlogger.error(\"failed to clean naming context\",e);\r\n \t\t}\r\n \t\t\r\n \t\tif (logger.isDebugEnabled()) {\r\n \t\t\tlogger\r\n \t\t\t.debug(\"entityDeactivated() completed\");\r\n \t\t}\r\n \t}",
"@Override\n public StandardBizResponse terminateSession(\n StandardBizRequest standardBizRequest)\n throws EwalletException {\n return null;\n }",
"TerminateProvisionedProductResult terminateProvisionedProduct(TerminateProvisionedProductRequest terminateProvisionedProductRequest);",
"public void end() {\n\t\tdrivetrain.stopDrive();\n\t}",
"protected void end() {\n \n \n }",
"@Override\n public void kill()\n {\n }",
"public void end() throws Exception;",
"public void stop() {\n mSelf.stop();\n }",
"@Override\n\tpublic void delete(EntityManagerFactory emf, Stop entity) {\n\t\t\n\t}",
"public static void terminate()\r\n\t{\r\n\t\ttry\r\n \t\t{ \t// close the statement\r\n \t\taStatement.close();\r\n\t\t}\r\n\t\tcatch (SQLException e)\r\n\t\t\t{ System.out.println(e);\t}\r\n\t}",
"protected void end() {\n \tdrivemotors.stop();\n }",
"public void terminate() {\n if (!stopped.get()) {\n \tSystem.out.printf(\"Stopping Red5 with args: %s\\n\", Arrays.toString(commandLineArgs));\n // set flag\n stopped.set(true);\n // shutdown\n Shutdown.main(commandLineArgs);\n System.out.println(\"Red5 stopped\");\n }\n }",
"@Override\r\n\tpublic void terminate(TransactionController transactionCtrl) {\n\t\ttransactionCtrl.getDispenseController().allowSelection(false);\r\n\r\n\t}",
"public void entityDeactivating() {}",
"public abstract void terminate(long timeout) throws ClassNotFoundException, IOException, InterruptedException, RemoteReadException;",
"public void simulationTerminated() {\n }",
"public void end() {\n \t\ttry {\n \t\t\tnameServerClient.leave();\n \t\t} catch (Exception e) {\n \t\t\t__.fwdAbort__(e);\n \t\t}\n \t}",
"@Override\n public void onTerminate() {\n Log.i(\"Application\", \"application destory\");\n if (MySocket.getInstance().getConnected()) {\n MySocket.getInstance().stop();\n DataManager manager = DataManager.getInstance();\n manager.setSceneList(manager.getSceneList());\n manager.setEquipmentList(manager.getEquipmentList());\n for (Record record : manager.getCurrentRecords()) {\n if (record.getValues().size() == 0) {\n continue;\n }\n record.setEndTime(new Date());\n manager.addToEquipmentRecordsList(record.getId(), record.clone());\n }\n Log.i(\"Home\", \"destory\");\n Process.killProcess(Process.myPid());\n }\n super.onTerminate();\n }",
"protected void end() {\n \tRobot.driveBase.stopDead();\n }"
]
| [
"0.7586611",
"0.7271982",
"0.72208935",
"0.7202922",
"0.7180061",
"0.7180061",
"0.7180061",
"0.71390945",
"0.7044108",
"0.6941409",
"0.688295",
"0.68828464",
"0.6857221",
"0.6775209",
"0.6761115",
"0.67522186",
"0.6744747",
"0.66913635",
"0.66714966",
"0.66520023",
"0.65994245",
"0.65705067",
"0.65434134",
"0.64533836",
"0.6402016",
"0.6394169",
"0.63449246",
"0.6295908",
"0.6253355",
"0.62478304",
"0.62461257",
"0.6238676",
"0.623689",
"0.6229012",
"0.6209227",
"0.62022877",
"0.61715776",
"0.61641747",
"0.6152292",
"0.61170626",
"0.60900307",
"0.6088233",
"0.60881656",
"0.6081322",
"0.6073015",
"0.6050185",
"0.6050185",
"0.6050185",
"0.6050185",
"0.6050185",
"0.60363406",
"0.6021423",
"0.6009842",
"0.5998879",
"0.5979118",
"0.59609115",
"0.59490186",
"0.5939128",
"0.59014493",
"0.58899355",
"0.58848864",
"0.58775187",
"0.5875918",
"0.58675075",
"0.5858512",
"0.58548117",
"0.5849661",
"0.5845177",
"0.583826",
"0.58200705",
"0.5809837",
"0.5804654",
"0.58037907",
"0.57750225",
"0.5761037",
"0.57606506",
"0.5755678",
"0.57487154",
"0.5743809",
"0.57418144",
"0.5740279",
"0.57392114",
"0.5726844",
"0.57261354",
"0.5725279",
"0.5723552",
"0.5719584",
"0.5707577",
"0.5706067",
"0.57043093",
"0.5695636",
"0.56926596",
"0.56865656",
"0.56807464",
"0.5660771",
"0.5656502",
"0.56534004",
"0.565048",
"0.56493014",
"0.5648867"
]
| 0.75783503 | 1 |
returns the mass of the entity. | @Basic @Raw
public double getMass(){
return this.mass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getMass() {\n return mass;\n }",
"public double getMass() {\n return mass;\n }",
"public double getMass();",
"public float getMass() {\n return mass;\n }",
"public Double getMass() {\n return mass;\n }",
"public double getMass()\n\t{\n\t\treturn this.mass;\n\t}",
"public double getMass() {\n\t\treturn _mass;\n\t}",
"public static long mass () { return mass;}",
"public float getMass () {\n\t\treturn body.getMass();\n\t}",
"public abstract float getMass();",
"public double Mass() {\n return OCCwrapJavaJNI.Units_Dimensions_Mass(swigCPtr, this);\n }",
"public int getAtomicMass()\n\t{\n\t\treturn protons+neutrons;\n\t}",
"public double getMass() { return modules.values().stream().mapToDouble(Module::getMass).sum(); }",
"@Override\n public double getMass() {\n return 0;\n }",
"public int getAtomicMass() {\r\n\t\treturn protons + neutrons;\r\n\t}",
"public double getmass(int position){\n\t\treturn masses.get(position);\n\t}",
"public float getMass() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 16);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 16);\n\t\t}\n\t}",
"public double molarMass(){\n double c = comp.getCarbon()* PhysicalProperties.MOLARMASS_C;\n double h = comp.getHydrogen()* PhysicalProperties.MOLARMASS_H;\n double o = comp.getOxygen()* PhysicalProperties.MOLARMASS_O;\n double s = comp.getSulfur()* PhysicalProperties.MMOLARMASS_S;\n double n = comp.getNitrogen()* PhysicalProperties.MOLARMASS_N;\n return c + h + o + s + n;\n }",
"public double getMolarMass() {\n /* Checks if molar mass has been calculated or not to ensure the code doesn't\n\t\trun and unnessacary times */\n if (molarMass == -1.0) {\n molarMass = molarMassCalc(chemicalFormula);\n return molarMass;\n }\n // Returns molar mass if previously calculated\n else {\n return molarMass;\n }\n }",
"public double getMass(double mz) {\n return ((mz * this.getAbsCharge()) - this.getMass());\n }",
"public static Float getElementMass(String elementName_) {\n\t\t\n\t\tif(elementName_.equals(\"Carbonate\"))\n\t\t\treturn 75f;\n\t\telse if(elementName_.equals(\"Hydroxide\"))\n\t\t\treturn 17f;\n\t\t\t\n\t\tString[] args = new String[2];\n\t\targs[0] = \"SELECT mass FROM elements WHERE name = \\\"\" + elementName_ + \"\\\"\";\n\t\targs[1] = \"mass\";\n\t\tArrayList results = dbConnect(args);\n\n\t\ttry {\n\t\t\treturn Float.valueOf((String)results.get(0)).floatValue();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}",
"public double getMZ() {\n return iMass;\n }",
"public double getMontant() {\n\t\treturn _montant;\n\t}",
"public double getBurntFuelMass();",
"public byte getMass_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 9);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 9);\n\t\t}\n\t}",
"public double getMontant() {\n\t\treturn montant;\n\t}",
"public double getM() {\r\n return m;\r\n }",
"public Vector3 getCenterOfMass() {\n //Does a weighted average of all the centers of mass of the modules\n Vector3 sum = Vector3.zero();\n for(Module module : modules.values())\n sum.addAltering(module.getCenterOfMass().multiply(module.getMass()));\n return sum.multiplyAltering(1.0/modules.values().size());\n }",
"private double getPlanetMass() {\r\n\t\treturn MathUtils.randRange(MIN_PLANET_MASS, MAX_PLANET_MASS);\r\n\t}",
"public double getMassStdev() {\n\t\t\treturn this.massStdev;\n\t\t}",
"private double getFragmentMass(IAtomContainer fragment, double mass)\n {\n \tDouble massFinal = mass;\n \tdouble nlMass = 0.0;\n \tif(fragment.getProperty(\"FragmentMass\") != null && fragment.getProperty(\"FragmentMass\") != \"\")\n \t{\n \t\tif(fragment.getProperty(\"NlMass\") != null && fragment.getProperty(\"NlMass\") != \"\")\n \t\t{\n \t\t\tString[] tempNLMass = fragment.getProperty(\"NlMass\").toString().split(\",\");\n \t\t\tfor (int i = 0; i < tempNLMass.length; i++) {\n\t\t\t\t\tnlMass += Double.parseDouble(tempNLMass[i]);\n\t\t\t\t}\n \t\t}\n \t}\n \tmassFinal = massFinal -nlMass;\n \tfragment.setProperty(\"FragmentMass\", massFinal.toString());\n \treturn massFinal;\n }",
"public double findMass(String atname) {\n return atomicWeight.get(atname);\n }",
"public void setMass(float value) {\n this.mass = value;\n }",
"public MassData getMassData () {\n\t\tbody.getMassData(massData2);\n\t\tmassData.center.set(massData2.center.x, massData2.center.y);\n\t\tmassData.I = massData2.I;\n\t\tmassData.mass = massData2.mass;\n\t\treturn massData;\n\t}",
"public float getExcessMassPerTick_EM(ItemStack itemStack) {\n return 0f;\n }",
"public double mass2() {\n\t\treturn this.m2();\n\t}",
"@JsonIgnore public Mass getProteinContent() {\n return (Mass) getValue(\"proteinContent\");\n }",
"public double masse () {return this.volume()*this.element.masseVolumique();}",
"public void setMass(double amount)\n\t{\n\t\tthis.mass = amount;\n\t}",
"public void setMass(double value) {\n this.mass = value;\n }",
"public final Double getMile() {\n return mile;\n }",
"public final int getMM()\n {\n return mm;\n }",
"public int getCostPerMile() {\n return costPerMile;\n }",
"public final double megabytes()\n\t{\n\t\treturn kilobytes() / 1024.0;\n\t}",
"public int getMps() {\n return (int) (80d * this.getCondition() / 100d);\n }",
"public int getMileage(){\n return mileage;\n }",
"@JsonIgnore public Mass getFatContent() {\n return (Mass) getValue(\"fatContent\");\n }",
"public double getGastoMedio(){\n\t\treturn valorcombustiblemedio ;\n\t}",
"protected double getMPS() {\n\t\t\treturn this.getCost() / this.castPeriod;\n\t\t}",
"public int getMp() \n\t{\n\t\treturn mp;\n\t}",
"public java.lang.Float getM() {\n return m;\n }",
"public int getMM() {\n\t\treturn MM;\n\t}",
"public abstract Vector2 getCentreOfMass();",
"public java.lang.Float getM() {\n return m;\n }",
"public void setMass(Double mass) {\n this.mass = mass;\n }",
"@Override\r\n\tpublic int getMM() {\n\t\treturn MM;\r\n\t}",
"public double getMZ(double neutralmass) {\n return (neutralmass + getMass()) / getAbsCharge();\n }",
"public int getMineActualAmmo() {\r\n\t\t\r\n\t\t// Code kann nur bei Verwendung von eea verwendet werden, sonst muss er geloescht werden!\r\n\t\t// Auch bei Verwendung von eea muss diese Methode erweitert werden.\r\n\r\n\t\tList<Entity> entities = new ArrayList<Entity>();\r\n\r\n\t\tentities = StateBasedEntityManager.getInstance().getEntitiesByState(Tanks.GAMEPLAYSTATE);\r\n\r\n\t\t//TODO\r\n\r\n\t\treturn -1;\r\n\t}",
"public int getMpen(){\n\t\treturn mpen;\n\t}",
"@Override\n\tpublic double getMontant() {\n\t\treturn 0;\n\t}",
"public double getMeatQuantity() {\r\n\t\treturn meatQuantity;\r\n\t}",
"public double getDistanceMoyenne() {\n\t\treturn getDistanceTotale () / 12;\n\t}",
"@Override\r\n\tpublic double getTMB() {\r\n\t\tif (isAdultoJovem()) {\r\n\t\t\treturn 15.3 * anamnese.getPesoUsual() + 679;\r\n\t\t}\r\n\t\tif (isAdulto()) {\r\n\t\t\treturn 11.6 * anamnese.getPesoUsual() + 879;\r\n\t\t}\r\n\t\tif (isIdoso()) {\r\n\t\t\treturn 13.5 * anamnese.getPesoUsual() + 487;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"public double getPercentMutants() {\n\t\tdouble count = (double) getNumMutants();\n\t\tdouble pSize = (double) this.getPopSize();\n\n\t\treturn count*100.0 / pSize;\n\t}",
"public double getMedia()\n {\n return ( suma / cantidad );\n }",
"public int getMontantTotal() {\n\t\treturn montantTotal;\n\t}",
"@ReflectiveMethod(name = \"m\", types = {})\n public float m(){\n return (float) NMSWrapper.getInstance().exec(nmsObject);\n }",
"com.google.protobuf.ByteString\n getMentBytes();",
"public Integer getMemoryMb() {\n return memoryMb;\n }",
"public int getM() {\n return m_;\n }",
"public double getDm() {\n return dm;\n }",
"public double media(){\n double soma=0;\n for (int i = 0; i < lista.size(); i++) {\n soma+=lista.get(i).getMedia();\n }\n return soma/lista.size();\n }",
"public int getMprice() {\r\n return mprice;\r\n }",
"@JsonIgnore public Mass getCholesterolContent() {\n return (Mass) getValue(\"cholesterolContent\");\n }",
"public Mass getProteinContent() throws ClassCastException;",
"public double getPer_month(){\n\t\tdouble amount=this.num_of_commits/12;\n\t\treturn amount;\n\t}",
"public Double megabytesPerSecond()\n\t{\n\t\treturn getValue(DataRateUnit.MEGABYTES_PER_SEC);\n\t}",
"java.lang.String getMent();",
"@Override\n\tpublic int getMileage() {\n\t\treturn mileage;\n\t}",
"public int getNumMP(){\n\t\treturn numMP;\n\t}",
"public BigDecimal getMos() {\r\n return mos;\r\n }",
"public int getM() {\n return m_;\n }",
"private void calculateMediem(){\r\n int mediemNum = accountInTotal/2;\r\n Account mediemAccount = theAccounts.get(mediemNum);\r\n System.out.println(mediemAccount.toString());\r\n }",
"public int getM () {\n\t\treturn M;\n\t}",
"public float getMana()\n {\n return mana;\n }",
"public double getMonto() {\r\n\t\treturn monto;\r\n\t}",
"public Point2D centerOfMass() \n {\n double cx = 0, cy = 0;\n double area = areaUnsigned();\n double factor = 0;\n for (Line2D line : lines) \n {\n factor = line.getP1().getX() * line.getP2().getY() - line.getP2().getX() * line.getP1().getY();\n cx += (line.getP1().getX() + line.getP2().getX()) * factor;\n cy += (line.getP1().getY() + line.getP2().getY()) * factor;\n }\n area *= 6.0d;\n factor = 1 / area;\n cx *= factor;\n cy *= factor;\n return new Point2D.Double(cx, cy);\n }",
"protected double getHPM() {\n\t\t\treturn this.getHealing() / this.getCost();\n\t\t}",
"public double getMana() {\n return classData.getMana(level);\n }",
"@Override\n\tpublic double getMassaInterna()\n\t{\n\t\treturn 0.0;\n\t}",
"@Column(name = \"PROMOTION_AMOUNT\", precision = 10)\n\tpublic BigDecimal getPromotionAmount() {\n\t\treturn promotionAmount == null ? BigDecimal.ZERO : promotionAmount;\n\t}",
"public double sizeMeters() {\n return this.size_meters;\n }",
"public int getMineMaxAmmo() {\r\n\t\t\r\n\t\t// Code kann nur bei Verwendung von eea verwendet werden, sonst muss er geloescht werden!\r\n\t\t// Auch bei Verwendung von eea muss diese Methode erweitert werden.\r\n\r\n\t\tList<Entity> entities = new ArrayList<Entity>();\r\n\r\n\t\tentities = StateBasedEntityManager.getInstance().getEntitiesByState(Tanks.GAMEPLAYSTATE);\r\n\r\n\t\t//TODO\r\n\r\n\t\treturn -1;\r\n\t}",
"public double prom () {\n return this.sum()/this.size();\n }",
"public int getNumeroMastiles() {\r\n return numeroMastiles;\r\n }",
"@JsonIgnore public Mass getTransFatContent() {\n return (Mass) getValue(\"transFatContent\");\n }",
"public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }",
"public BigDecimal getAmmount() {\r\n return ammount;\r\n }",
"public double getMoon()\n {\n double moon = earthWeight * 0.1666;\n return moon;\n }",
"private double calculateInitialMass(int numC, int numH, int numO, int numN\n , int numAg, int numLi, int numNa, int numK, int numCl, int numP, int numS, int numF)\n {\n double CARBON = 12.000000;\n double HYDROGEN = 1.007825;\n double NITROGEN = 14.003074;\n double OXYGEN = 15.994915;\n double SILVER = 106.905090;\n double LITHIUM = 7.016004;\n double SODIUM = 22.989771;\n double POTASSIUM = 38.963707;\n double CHLORIDE = 34.968853;\n double PHOSPHORUS = 30.973761;\n double SULFUR = 31.972071;\n double FLUORIDE = 18.998404;\n return mass = ((CARBON *numC)+(HYDROGEN*numH)+(OXYGEN*numO)+(NITROGEN*numN)+(SILVER*numAg)+\n (LITHIUM*numLi)+(SODIUM*numNa)+(POTASSIUM*numK)+(CHLORIDE*numCl)+(PHOSPHORUS*numP)+\n (SULFUR*numS)+(FLUORIDE*numF));\n }"
]
| [
"0.78964156",
"0.78964156",
"0.78407013",
"0.7832492",
"0.7823329",
"0.77843624",
"0.7735844",
"0.76818776",
"0.765907",
"0.7376819",
"0.71897006",
"0.7022198",
"0.69814646",
"0.6968527",
"0.6945452",
"0.6883031",
"0.68811363",
"0.6773508",
"0.6377453",
"0.6368331",
"0.63105375",
"0.62644964",
"0.61754423",
"0.6119805",
"0.6112612",
"0.60921985",
"0.6077829",
"0.60736716",
"0.6059238",
"0.60124",
"0.59748",
"0.5973117",
"0.5963101",
"0.5942371",
"0.59370714",
"0.5932212",
"0.5929096",
"0.59140295",
"0.58570254",
"0.5807996",
"0.5787041",
"0.57503545",
"0.57372755",
"0.5725627",
"0.57034194",
"0.56987077",
"0.56691825",
"0.5648703",
"0.56459635",
"0.5633555",
"0.56326175",
"0.5624858",
"0.5604502",
"0.55966693",
"0.559588",
"0.55870515",
"0.557963",
"0.5566127",
"0.55593115",
"0.5552024",
"0.5549697",
"0.55383384",
"0.5528636",
"0.55136263",
"0.54996693",
"0.54848754",
"0.5476739",
"0.5474643",
"0.5473491",
"0.5467736",
"0.54622865",
"0.54505354",
"0.5448617",
"0.54452527",
"0.5423779",
"0.54180133",
"0.54133844",
"0.5409425",
"0.53941286",
"0.5383185",
"0.53788424",
"0.5376329",
"0.5374007",
"0.536646",
"0.5342581",
"0.5336155",
"0.53219545",
"0.53215545",
"0.53209215",
"0.53153425",
"0.52969193",
"0.5293314",
"0.5284282",
"0.5281177",
"0.5274124",
"0.527373",
"0.5270117",
"0.526979",
"0.5266795",
"0.5266086"
]
| 0.77459085 | 6 |
This method sets the mass of a entity. | @Raw
protected void setMass(double mass){
this.mass = mass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMass(double amount)\n\t{\n\t\tthis.mass = amount;\n\t}",
"public void setMass(final float mass);",
"public void setMass(float value) {\n this.mass = value;\n }",
"@Override\n\tpublic void setMass(float mass) {\n\t\tthis.mass = mass;\n\t}",
"public void setMass(double value) {\n this.mass = value;\n }",
"public void setMass(Double mass) {\n this.mass = mass;\n }",
"public void setMass(double mass) {\n\t\tthis.mass = mass;\n\t\tthis.parent.updateOrbitersOf(this);\n\t\tthis.menuDirty = true;\n\t}",
"public void setMass(double aMass) {\n iMass = aMass;\n }",
"public void setMass(float mass) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 16, mass);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 16, mass);\n\t\t}\n\t}",
"public void setMass(float mass) {\n this.mass = mass;\n if(collisionShape instanceof MeshCollisionShape && mass != 0){\n throw new IllegalStateException(\"Dynamic rigid body cannot have mesh collision shape!\");\n }\n if (collisionShape != null) {\n collisionShape.calculateLocalInertia(mass, localInertia);\n }\n if (rBody != null) {\n rBody.setMassProps(mass, localInertia);\n if (mass == 0.0f) {\n rBody.setCollisionFlags(rBody.getCollisionFlags() | CollisionFlags.STATIC_OBJECT);\n } else {\n rBody.setCollisionFlags(rBody.getCollisionFlags() & ~CollisionFlags.STATIC_OBJECT);\n }\n }\n }",
"public void setMass(Bounds[] bounds)\n\t{\n\t\tfloat mass = 0;\n\t\tfor (Bounds b : bounds) {\n\t\t\tmass += b.getOvalArea();\n\t\t}\n\t\tthis.mass = mass;\n\t}",
"public void setMass_unit(byte mass_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 9, mass_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 9, mass_unit);\n\t\t}\n\t}",
"public void setMassData (MassData data) {\n\t\tmassData2.center.set(data.center.x, data.center.y);\n\t\tmassData2.I = data.I;\n\t\tmassData2.mass = data.mass;\n\t\tbody.setMassData(massData2);\n\t}",
"public void setVectM(Vector3 momentum, double mass) {\n\t\tvector = momentum;\n\t\tenergy = Math.sqrt(mass * mass + vector.mag2());\n\t}",
"public float getMass() {\n return mass;\n }",
"public double getMass() {\n return mass;\n }",
"public double getMass() {\n return mass;\n }",
"public Double getMass() {\n return mass;\n }",
"@Override\n protected void applyEntityAttributes() {\n super.applyEntityAttributes();\n this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(100.0);\n }",
"private void resetMass() {\n\t\tsetOperation(\"\");\n\t}",
"@Override\n\tpublic void setMontant(double s) {\n\t\t\n\t}",
"public double getMass() {\n\t\treturn _mass;\n\t}",
"public FixedMass(final double x, final double y, final double mass) {\n super(x, y, mass);\n }",
"public abstract float getMass();",
"public double getMass()\n\t{\n\t\treturn this.mass;\n\t}",
"public final void rule__Ingredient__MassAssignment_2_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPantryTextual.g:997:1: ( ( ruleMass ) )\n // InternalPantryTextual.g:998:2: ( ruleMass )\n {\n // InternalPantryTextual.g:998:2: ( ruleMass )\n // InternalPantryTextual.g:999:3: ruleMass\n {\n before(grammarAccess.getIngredientAccess().getMassMassParserRuleCall_2_1_0()); \n pushFollow(FOLLOW_2);\n ruleMass();\n\n state._fsp--;\n\n after(grammarAccess.getIngredientAccess().getMassMassParserRuleCall_2_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void setEm(EntityManager em) {\n\t\tthis.entity = em;\n\t}",
"@Override\n public double getMass() {\n return 0;\n }",
"public double getMass();",
"@Override\n\tpublic void updateMileage(MemberVO mvo) {\n\t\tsql.update(\"updateMileage\", mvo);\n\t}",
"public void setEntity(String parName, Object parVal) throws HibException;",
"public abstract void setMontant(Double unMontant);",
"public void setEntity(Entity entity) {\n\t\tthis.entity = entity;\n\t\tString s = entity.getClass().toString();\n\t\t// trim \"Class \" from the above String\n\t\tentityType = s.substring(s.lastIndexOf(\" \") + 1);\n\t}",
"private void setMM(int MM) {\n\t\tCMN.MM = MM;\n\t}",
"@Override\n\tpublic void set(Medicamento novo) {\n\t\t\n\n\t\t\tcon = ConexaoSingleton.getInstance();\n\t\t\ttry {\n\t\t\t\tpst = con.prepareStatement(\"INSERT INTO Medicamento (nome,mg) VALUES (?,?)\");\n\t\t\t\tpst.setString(1, novo.getDesc());\n\t\t\t\tpst.setDouble(2, novo.getmg());\n\t\t\t\tpst.execute();\n\t\t\t}catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t}",
"public static long mass () { return mass;}",
"public void setPxPyPzM(double px, double py, double pz, double mass) {\n\t\tthis.vector.setXYZ(px, py, pz);\n\t\tthis.energy = Math.sqrt(mass * mass + this.vector.mag2());\n\t}",
"public void setEntity(String entity) {\n\t\tthis.setEntity(entity, false);\n\t}",
"protected void setQuantityOfShares(int quantity){\n\t\tif(quantity < 0){\n\t\t\tthrow new IllegalArgumentException(\"Quantity can't be less than 0: \" + quantity);\n\t\t}\n\t\tsynchronized(this){\n\t\t\tthis.quantityOfShares = quantity;\n\t\t}\n\t}",
"public abstract void setEntityManager(EntityManager em);",
"public void setAmount(long amount);",
"@Basic @Raw\n public double getMass(){\n \treturn this.mass;\n }",
"public void setMprice(int value) {\r\n this.mprice = value;\r\n }",
"protected void updateDefaultMomentMass()\n\t{\n\t\tdouble oldMomentMass = this.defaultMomentMass;\n\t\tthis.defaultMomentMass = (1.0 / 12.0) * getW2PlusH2() * getMass();\n\t\t\n\t\t// If the moment mass changed while the object is rotating, updates the \n\t\t// rotation speed\n\t\tif (oldMomentMass != this.defaultMomentMass && getRotation() != 0)\n\t\t\tresetRotationAxisToOrigin();\n\t}",
"public float getMass () {\n\t\treturn body.getMass();\n\t}",
"public void setSomme(int somme) {\r\n\t\tthis.somme = somme;\r\n\t}",
"protected void func_110147_ax()\n {\n super.applyEntityAttributes();\n this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(16.0D);\n this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.20000000298023224D);\n }",
"public void resetMassData () {\n\t\tbody.resetMassData();\n\t}",
"@NotNull public Builder transFatContent(@NotNull Mass mass) {\n putValue(\"transFatContent\", mass);\n return this;\n }",
"public void setMileage(int mileage){\n this.mileage = mileage;\n }",
"public void set(CoreEntity coreEntity, CoreMorphComponent coreMorphComponent) {\r\n CoreJni.setInCoreMorphComponentManager1(this.agpCptrMorphComponentMgr, this, CoreEntity.getCptr(coreEntity), coreEntity, CoreMorphComponent.getCptr(coreMorphComponent), coreMorphComponent);\r\n }",
"public final void entryRuleMass() throws RecognitionException {\n try {\n // InternalPantryTextual.g:129:1: ( ruleMass EOF )\n // InternalPantryTextual.g:130:1: ruleMass EOF\n {\n before(grammarAccess.getMassRule()); \n pushFollow(FOLLOW_1);\n ruleMass();\n\n state._fsp--;\n\n after(grammarAccess.getMassRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public EdgeNeon setAmount(double value) throws ParameterOutOfRangeException\n {\n\t\tif(value > 100.00 || value < 0.00)\n\t {\n\t throw new ParameterOutOfRangeException(value, 0.00, 100.00);\n\t }\n\n m_Amount = value;\n setProperty(\"amount\", value);\n return this;\n }",
"public void applyForce(E entity,Force force);",
"protected void setItemDamage(Material material, int damage) \r\n\t{\tthis.itemDamage.put(material, damage);\t}",
"public void updateCreatureHealth(Entity entity) {\n HealthAspect aspect = entity.getAspect(HealthAspect.class);\n if (aspect == null) {\n Logger.UNITS.logError(\"Trying to update health of creature \" + entity + \" with no HealthAspect\");\n return;\n }\n changeParameter((Unit) entity, HealthParameterEnum.FATIGUE, 0.01f);\n changeParameter((Unit) entity, HealthParameterEnum.HUNGER, 0.01f);\n }",
"public void setM(java.lang.Float value) {\n this.m = value;\n }",
"public void setEntity(org.openejb.config.ejb11.Entity entity) {\n this._entity = entity;\n }",
"public baconhep.TTau.Builder setM(float value) {\n validate(fields()[3], value);\n this.m = value;\n fieldSetFlags()[3] = true;\n return this; \n }",
"@Override\n\tpublic void setStorageSpace(int amount) {\n\t\tif(network==null)return;\n\t\tnetwork.setBytesLimit(gibibytesToBytes(amount));\n\t\tNetwork.log(\"Set new storage amount\");\n\t}",
"@Override\n public void updateEntity(String entitySetName, OEntity entity) {\n super.updateEntity(entitySetName, entity);\n }",
"public void setEntityId(long entityId);",
"void setDistanceInM(int distanceInM);",
"@Override\n public void setAmount(Asset amount) {\n this.amount = setIfNotNull(amount, \"The amount can't be null.\");\n }",
"public void setModifyMan(Integer modifyMan) {\n this.modifyMan = modifyMan;\n }",
"public abstract void set(M newValue);",
"public void setEntity(EntityBase entity) {\n if (((entity != null) && !entity.equals(this.entity)) ||\n ((this.entity != null) && !this.entity.equals(entity))) {\n reset();\n }\n this.entity = entity;\n }",
"public final void setMile(Double mile) {\n this.mile = mile;\n }",
"void setMonto(double monto);",
"void setMonto(double monto);",
"public void setUsbMassStorageEnabled(boolean enable) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt((enable ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_setUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }",
"public void setAmount(double amount){\n try{\n if(amount>=0.0){\n this.amount=amount;\n }\n else {\n this.amount = 1;\n throw new SupplyOrderException(\"Invalid amount, resetted to 1\");\n }\n } catch(SupplyOrderException soe){\n soe.getMessage();\n }\n }",
"public void setEntityManager(EntityManager em) {\n this.em = em;\n }",
"public void setM_Product_ID (int M_Product_ID);",
"public void setM_Product_ID (int M_Product_ID);",
"public void setMovement(){\n\t\tfloat distance = GameManager.getInstance().getGameCamera().getWidth();\n\t\tfloat durationTime = distance/this.speed;\n\t\t\n\t\tmoveX = new MoveByModifier(durationTime, -(this.xInicial-this.xFinal), 0);\n\t\t\n\t\tthis.registerEntityModifier(moveX);\n\t}",
"public final void set(final int myN, final int myM) {\n n = myN;\n m = myM;\n }",
"public void setEntityManager(EntityManager em) {\n\t\tthis.em = em;\n\t}",
"public final void entryRuleMass() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:677:1: ( ruleMass EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:678:1: ruleMass EOF\n {\n before(grammarAccess.getMassRule()); \n pushFollow(FOLLOW_ruleMass_in_entryRuleMass1381);\n ruleMass();\n\n state._fsp--;\n\n after(grammarAccess.getMassRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleMass1388); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"protected abstract void setValue(Entity e,FloatTrait t,float value);",
"@Override\n\t@PersistenceContext(unitName=\"PU-POC\")\t\n\tpublic void setEntityManager(EntityManager entityManager) {\n\t\tsuper.setEntityManager(entityManager);\n\t}",
"@NotNull public Builder proteinContent(@NotNull Mass mass) {\n putValue(\"proteinContent\", mass);\n return this;\n }",
"public void assignMatingProportions() {\n\t\tdouble totalAverageSpeciesFitness = 0.0;\r\n\r\n\t\t// hold the proportion of offspring each species should generate\r\n\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ttotalAverageSpeciesFitness += s.getAverageAdjustedFitness();\r\n\t\t}\r\n\r\n\t\t// set map values to be a proportion of the total adjusted\r\n\t\t// fitness\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ts.assignProp(totalAverageSpeciesFitness);\r\n\t\t}\r\n\t}",
"public void setStatistic ( Statistic statistic , EntityType entityType , int newValue ) {\n\t\texecute ( handle -> handle.setStatistic ( statistic , entityType , newValue ) );\n\t}",
"public void setEntityHere(Entity setThis) {\n \n entityHere_ = setThis;\n \n }",
"public void setMiterLimit(float limit);",
"public void setNormal(String normal) {\r\n String old = this.normal;\r\n this.normal = normal;\r\n this.changeSupport.firePropertyChange(\"normal\", old, normal );\r\n }",
"public void updateMesto(Mesto mesto) {\n\t\tMesto entity = dao.findById(mesto.getMestoId());\n\t\tif(entity!=null){\n\t\t\tentity.setNazivMesta(mesto.getNazivMesta());\n\t\t\tentity.setZip(mesto.getZip());\n\t\t\tentity.setOkrug(mesto.getOkrug());\n\t\t\tentity.setOpstina(mesto.getOpstina());\n\t\t}\n\t}",
"void setIncome(double amount);",
"public void setMontantTotal(int montantTotal_) {\n\t\tmontantTotal = montantTotal_;\n\t}",
"void setExpenses(double amount);",
"@Override\r\n\tpublic void updateMenmberMode(MenmberMode menmberMode) {\n\t\tMenmberMode m = getMenmberModeById(menmberMode.getM_id());\r\n\t\tm.setCombinationSet(menmberMode.getCombinationSet());\r\n\t\tm.setM_description(menmberMode.getM_description());\r\n\t\tm.setM_id(menmberMode.getM_id());\r\n\t\tm.setM_isOverlay(menmberMode.getM_isOverlay());\r\n\t\tm.setM_name(menmberMode.getM_name());\r\n\t\tm.setMemberSet(menmberMode.getMemberSet());\r\n\t\tgetHibernateTemplate().update(m);\r\n\t}",
"public void setMana(float mana)\n {\n if ( mana > getMaxMana() )\n {\n this.mana = getMaxMana();\n }\n else if (mana < 0.0f)\n {\n this.mana = 0.0f;\n }\n else\n {\n this.mana = mana;\n }\n }",
"public void setAmmount(int ammount) {\r\n this.ammount = ammount;\r\n }",
"private void setHealth(double healthPercentage) {\n eliteMob.setHealth(this.maxHealth * healthPercentage);\n }",
"@NotNull public Builder saturatedFatContent(@NotNull Mass mass) {\n putValue(\"saturatedFatContent\", mass);\n return this;\n }",
"public final void setEntity(final String cEntity) {\n\t\tthis.entity = cEntity;\n\t}",
"@NotNull public Builder cholesterolContent(@NotNull Mass mass) {\n putValue(\"cholesterolContent\", mass);\n return this;\n }",
"@NotNull public Builder fatContent(@NotNull Mass mass) {\n putValue(\"fatContent\", mass);\n return this;\n }",
"public void setMemArtId(Number value) {\n setAttributeInternal(MEMARTID, value);\n }"
]
| [
"0.7564462",
"0.7258923",
"0.72561973",
"0.7164192",
"0.7125739",
"0.7013926",
"0.68930125",
"0.6855046",
"0.6768455",
"0.6753955",
"0.61450154",
"0.60190016",
"0.5919258",
"0.5786624",
"0.5768658",
"0.57000077",
"0.57000077",
"0.56552863",
"0.55966884",
"0.55762935",
"0.5524544",
"0.54725426",
"0.5421537",
"0.53979385",
"0.5388106",
"0.5359647",
"0.5351087",
"0.5347814",
"0.5309924",
"0.52925915",
"0.5287434",
"0.5261405",
"0.5247601",
"0.5239892",
"0.52391905",
"0.52183217",
"0.5198049",
"0.5184077",
"0.51592237",
"0.5156157",
"0.51387435",
"0.5130247",
"0.51299006",
"0.5127553",
"0.5110244",
"0.5094735",
"0.50872403",
"0.5076309",
"0.50754535",
"0.5064334",
"0.5061811",
"0.50482154",
"0.5039071",
"0.5036834",
"0.50282574",
"0.50236076",
"0.5015234",
"0.5013476",
"0.50018406",
"0.49962327",
"0.4991484",
"0.49750936",
"0.49748287",
"0.49744928",
"0.49655244",
"0.4956374",
"0.49532592",
"0.4938339",
"0.493617",
"0.493617",
"0.4929999",
"0.4927689",
"0.49234524",
"0.49212584",
"0.49212584",
"0.4919818",
"0.49180067",
"0.49166837",
"0.4908815",
"0.4903206",
"0.48996255",
"0.48969063",
"0.4895588",
"0.4892922",
"0.48898405",
"0.48873633",
"0.4865393",
"0.486295",
"0.48591194",
"0.48528415",
"0.48468134",
"0.48325983",
"0.48301515",
"0.48249036",
"0.4824777",
"0.48207912",
"0.4819517",
"0.48182443",
"0.4817893",
"0.48171037"
]
| 0.7196635 | 3 |
returns in String form which type of Entity this is. | @Basic @Immutable
public String getTypeName() {
return typeName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getTypeAsString();",
"public EntityType getEntity_type() {\n return this.entity_type;\n }",
"public String entityType();",
"public EntityType getType()\n {\n return m_type;\n }",
"public String getTypeString() {\r\n return Prediction.getTypeString(type);\r\n }",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"public String getEntityType() {\n return this.entityType;\n }",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"public String getType() {\n return (String) getObject(\"type\");\n }",
"public String getType() {\r\n return this.getClass().getName();\r\n }",
"public String obtenirType() {\n\t\treturn this.type;\n\t}",
"private String entityType(){\n Type t = getClass().getGenericSuperclass();\n ParameterizedType pt = (ParameterizedType)t;\n Class<T> type = (Class)pt.getActualTypeArguments()[0];\n return type.getName();\n }",
"public JPAEntityType getEntityType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public final String getType() {\n return this.getClass().getName();\n }",
"public String getTypeName() {\r\n return typeId.getSQLTypeName();\r\n }",
"String getType() {\n return type;\n }",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"public EntityType getType ( ) {\n\t\treturn extract ( handle -> handle.getType ( ) );\n\t}",
"public String type();",
"public String toString() {\n return type;\n }",
"public String getTypeName() {\n return type.name();\n }",
"public String getType()\n \t{\n \t\treturn this.type;\n \t}",
"public String toString() {\n return type.toString();\n }",
"public String getName() {\n return type.toString();\n }",
"@XmlElement(name = \"entitytype\")\n public String getEntityType() {\n return entityType;\n }",
"public String printEntityType(String name) {\n\t\tint type = _parser.getEntityType(name);\n\n\t\tswitch (type) {\n\t\tcase XmlParser.ENTITY_INTERNAL:\n\t\t\treturn \"ENTITY_INTERNAL\";\n\n\t\tcase XmlParser.ENTITY_NDATA:\n\t\t\treturn \"ENTITY_NDATA\";\n\n\t\tcase XmlParser.ENTITY_TEXT:\n\t\t\treturn \"ENTITY_TEXT\";\n\n\t\tcase XmlParser.ENTITY_UNDECLARED:\n\t\t\treturn \"ENTITY_DECLARED\";\n\n\t\tdefault:\n\t\t\treturn \"Unknown entity type\";\n\t\t}\n\t}",
"public String getType() {\n\t\treturn TYPE_NAME;\n\t}",
"public final String type() {\n return type;\n }",
"public String getType() {\n\t\treturn ELM_NAME;\n\t}",
"public static String getType() {\n\t\treturn type;\n\t}",
"String getType() {\r\n return this.type;\r\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\r\n {\r\n return type;\r\n }"
]
| [
"0.75009507",
"0.7487037",
"0.7410784",
"0.7210744",
"0.71676356",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71434283",
"0.71178335",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.70703834",
"0.7011205",
"0.7003412",
"0.6964604",
"0.6946701",
"0.69388515",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6927789",
"0.6926878",
"0.692293",
"0.68606174",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.684734",
"0.6840263",
"0.6835213",
"0.68239444",
"0.68086773",
"0.6807934",
"0.68054175",
"0.6787792",
"0.6783912",
"0.6779171",
"0.67633677",
"0.6749549",
"0.67451656",
"0.6741773",
"0.6715425",
"0.6709719",
"0.6709332"
]
| 0.0 | -1 |
A Method which resolves and directs collisions to its respective proper collison methods. | public void collide(Entity entity) throws IllegalArgumentException{
if (this instanceof Ship && entity instanceof Ship) this.defaultCollide(entity);
else if (this instanceof MinorPlanet && entity instanceof MinorPlanet) this.defaultCollide(entity);
else if (entity instanceof Bullet) {
Bullet bullet = (Bullet) entity;
if (bullet.getBulletSource() == this) bullet.bulletCollideOwnShip((Ship) this);
else bullet.bulletCollideSomethingElse(this);
}
else if (this instanceof Bullet) {
Bullet bullet = (Bullet) this;
if (bullet.getBulletSource() == entity) bullet.bulletCollideOwnShip((Ship) entity);
else bullet.bulletCollideSomethingElse(entity);
}
else if ((this instanceof Ship && entity instanceof Asteroid) || (entity instanceof Ship && this instanceof Asteroid)){
Ship ship = null;
if (this instanceof Ship){
ship = (Ship) this;
} else {
ship = (Ship) entity;
}
ship.terminate();
}
else if ((this instanceof Ship && entity instanceof Planetoid) || (entity instanceof Ship && this instanceof Planetoid)){
Ship ship = null;
if (this instanceof Ship){
ship = (Ship) this;
} else {
ship = (Ship) entity;
}
World world = ship.getSuperWorld();
double xnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth());
double ynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight());
ship.setPosition(xnew, ynew);
while (! this.overlapAnyEntity()){
xnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth());
ynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight());
ship.setPosition(xnew, ynew);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void collideWith(Entity entity);",
"public abstract void processCollisions();",
"public void checkCollision() {}",
"@Override\n\tpublic void doCollision(CollisionResult c) {\n\t\t\n\t}",
"public abstract void collided(Collision c);",
"@Override\n\tpublic void onCollision(Entity collidedEntity)\n\t{\n\t\t\n\t}",
"@Override\n\tpublic void collide(Entity e) {\n\n\t}",
"public abstract void onCollision();",
"public void handleCollision(Collision c);",
"public abstract void collide(InteractiveObject obj);",
"public void unitCollision() {\n\t}",
"@Override\n\tpublic boolean checkCollision() {\n\t\treturn true;\n\t}",
"public abstract void collision(SpaceThing thing);",
"private void collisionsCheck() {\n\t\tif(this.fence.collisionTest(\n\t\t\t\tthis.spider.getMovementVector())) \n\t\t{\n\t\t\t// we actually hit something!\n\t\t\t// call collision handlers\n\t\t\tthis.spider.collisionHandler();\n\t\t\tthis.fence.collisionHandler();\n\t\t\t// vibrate!\n\t\t\tvibrator.vibrate(Customization.VIBRATION_PERIOD);\n\t\t\t// lose one life\n\t\t\tthis.data.lostLife();\n\t\t}\n\t}",
"protected void collidesCallback(){\n\t\tphxService.collidingCallback(this);\n\t}",
"CollisionRule getCollisionRule();",
"public interface Collidable {\r\n\r\n /**\r\n * Return the \"collision shape\" of the object.\r\n * @return getter for the shape of the collidable.\r\n */\r\n Rectangle getCollisionRectangle();\r\n /**\r\n * Notify the object that we collided with it at collisionPoint with\r\n * given velocity.\r\n * The return is the new velocity expected after the hit (based on\r\n * the force the object inflicted on us).\r\n * @param hitter the hitting ball.\r\n * @param collisionPoint the point where the collision occurs.\r\n * @param currentVelocity the current velocity of the ball.\r\n * @return new velocity of ball, according to the previous data.\r\n */\r\n Velocity hit(Ball hitter, Point collisionPoint, Velocity currentVelocity);\r\n}",
"public void collision(Collidable collider);",
"public abstract boolean collisionWith(CollisionObject obj);",
"public void collisionDetection(){\r\n\t\tif( this.isActiv() ){\r\n\t\t\tif( this.isCollided() ){\r\n\t\t\t\tthis.onCollision();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void checkCastleCollisions() {\n\t\t\n\t}",
"@Override\n\tpublic void collision(SimpleObject s) {\n\t\t\n\t}",
"private void circleCollison() {\n\t\t\n\t}",
"public interface Collideable {\r\n\t/**\r\n\t * On collision Handler\r\n\t * \r\n\t * @param c\r\n\t * - the other partitipant in the collision\r\n\t */\r\n\tpublic void onCollision(Collideable c);\r\n\r\n\t/**\r\n\t * tests Collision with another Collideable\r\n\t * \r\n\t * @param c\r\n\t * @return\r\n\t */\r\n\tpublic boolean isCollidingWidth(Collideable c);\r\n\r\n}",
"public static void checkCollisions() {\n\t \n\t\tfor (Ball b1 : Panel.balls) {\n\t\t\tfor (Ball b2 : Panel.balls) {\n\t\t\t\tif (b1.Bounds().intersects(b2.Bounds()) && !b1.equals(b2)) {\t\t\t//checking for collision and no equals comparisions\n\t\t\t\t\tint vX = b1.getxVelocity();\n\t\t\t\t\tint vY = b1.getyVelocity();\n\t\t\t\t\tb1.setxVelocity(b2.getxVelocity());\t\t\t\t\t\t\t\t//reversing velocities of each Ball object\n\t\t\t\t\tb1.setyVelocity(b2.getyVelocity());\n\t\t\t\t\tb2.setxVelocity(vX);\n\t\t\t\t\tb2.setyVelocity(vY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void processCollisions(){\n\t\tSet<String> allCollisionKeys = new HashSet<String>();\n \n\t\t// prepare a list of collisions to handle\n\t\tList<CollisionData> collisions = new ArrayList<CollisionData>();\n \n\t\tSet<Integer> types = collisionsTypes.keySet();\n \n\t\t// obtain every type for collision\n\t\tfor(Integer type : types){\n\t\t\t// obtain for each type the type it collides with\n\t\t\tList<Integer> collidesWithTypes = collisionsTypes.get(type);\n \n\t\t\tfor(Integer collidingType : collidesWithTypes){\n\t\t\t\t// if the pair was already treated ignore it else treat it\n\t\t\t\tif( !allCollisionKeys.contains(getKey(type, collidingType)) ){\n\t\t\t\t\t// obtain all object of type\n\t\t\t\t\tList<CollidableObject> collidableForType = collidables.get(type);\n\t\t\t\t\t// obtain all object of collidingtype\n\t\t\t\t\tList<CollidableObject> collidableForCollidingType = collidables.get(collidingType);\n \n\t\t\t\t\tfor( CollidableObject collidable : collidableForType ){\n\t\t\t\t\t\tfor( CollidableObject collidesWith : collidableForCollidingType ){\n\t\t\t\t\t\t\tif(collidable.isCollidingWith(collidesWith)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tCollisionData cd = new CollisionData();\n\t\t\t\t\t\t\t\tcd.handler = collisionHandlers.get(getKey(type, collidingType));\n\t\t\t\t\t\t\t\tcd.object1 = collidable;\n\t\t\t\t\t\t\t\tcd.object2 = collidesWith;\n \n\t\t\t\t\t\t\t\tcollisions.add(cd);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \n\t\t\t\t\tallCollisionKeys.add(getKey(type, collidingType));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n \n\t\tfor(CollisionData cd : collisions){\n\t\t\tcd.handler.performCollision(cd.object1, cd.object2);\n \n\t\t}\n\t\t\n//\t System.out.println(\"unsorted map\");\n//\t for (String key : collisionHandlers.keySet()) {\n//\t System.out.println(\"key/value: \" + key + \"/\"+collisionHandlers.get(key));\n//\t }\n\t}",
"public void applyEntityCollision(Entity entityIn) {\n }",
"public void handleCollision(ISprite collisionSprite, Collision collisionType);",
"private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg.size + this.size)/2;\n deltaA = this.distance(thg);\n \n if( \n Math.abs(deltaA[0]) <= collisionRange\n &&\n Math.abs(deltaA[1]) <= collisionRange\n ){\n if(deltaA[0] > deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == 1) {\n dA[0] = 0;\n }\n }\n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == -1) {\n dA[1] = 0;\n }\n }\n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n if(dA[0] != 0) {\n dA[1] = dA[0];\n }\n if(dA[1] != 0) {\n dA[0] = dA[1];\n }\n }\n }\n \n if(deltaA[0] < deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == -1) {\n dA[0] = 0;\n }\n } \n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == 1) {\n dA[1] = 0;\n }\n } \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = dA[0];\n }\n }\n \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = -dA[0];\n }\n }\n }\n }\n }\n }",
"void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }",
"private void collideWithBall() {\n die();\n }",
"@Override\n\tprotected void collideEnd(Node node) {\n\n\t}",
"public void collideWith(Rigidbody obj) {\n\t\t\r\n\t}",
"public interface Collidable {\r\n\t\r\n\t/** @return {@link Rectangle} representing the Collidables bounding box. */\r\n\tpublic Rectangle getBounds();\r\n\t\r\n\t/** Should be called if a collision has occured between this Collidable and another. Typically collision involves a comparison\r\n\t * between this object and others bounding boxes.\r\n\t * @param collider Reference to the other Collider this object has collided with. */\r\n\tpublic void collision(Collidable collider);\r\n\r\n}",
"public abstract boolean collide(int x, int y, int z, int dim, Entity entity);",
"public abstract void collided(CircleCollider col);",
"public void updateOptimalCollisionArea();",
"void checkCollision(Entity other);",
"@Override\r\n public void collideEffect(Spatial s) {\n }",
"public boolean collidesWith(ICollider other);",
"private void fireball2Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY());\r\n\t\tGObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tGObject bottomRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(fireball2);\r\n\t\t\tfireball2 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"public void checkCollision()\r\n\t{\r\n\t\t//for Bullets against Avatar and Enemy\r\n\t\tfor(int bulletIndex = 0; bulletIndex < bullets.size(); bulletIndex++)\r\n\t\t{\r\n\t\t\tBullet b = bullets.get(bulletIndex);\r\n\t\t\tif (b instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tboolean collided = false;\r\n\t\t\t\tfor (int enemyIndex = 0; enemyIndex < enemy.size(); enemyIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy e = enemy.get(enemyIndex);\r\n\t\t\t\t\tif(((AvatarBullet) b).collidedWith(e))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\t\tenemy.remove(enemyIndex);\r\n\t\t\t\t\t\tenemyIndex --;\r\n\t\t\t\t\t\tcollided = true;\r\n\t\t\t\t\t\tint score = getScore()+1;\r\n\t\t\t\t\t\tsetScore(score);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (b instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tif (((EnemyBullet) b).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\tint health = Avatar.getLives()-1;\r\n\t\t\t\t\tavatar.setLives(health);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int platformIndex = 0; platformIndex < platforms.size(); platformIndex++)\r\n\t\t{\r\n\t\t\tPlatforms p = platforms.get(platformIndex);\r\n\t\t\tif (p instanceof Platforms)\r\n\t\t\t{\r\n\t\t\t\t//boolean collided = false;\r\n\t\t\t\t//Avatar a = avatar.get(enemyIndex);\r\n\t\t\t\tif(((Platforms) p).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void setCollisionRule(CollisionRule collisionRule);",
"protected void onCollision(Actor other) {\r\n\r\n\t}",
"private CollisionLogic() {}",
"public void checkPlayerCollisions() {\n\t\t//Iterate over the players\n\t\tfor (PlayerFish player : getPlayers()) {\n\t\t\t//Get collidables parallel.\n\t\t\tcollidables.parallelStream()\n\t\t\t\n\t\t\t//We only want the collidables we actually collide with\n\t\t\t.filter(collidable -> player != collidable && player.doesCollides(collidable))\n\t\t\t\n\t\t\t//We want to do the for each sequentially, otherwise we get parallelism issues\n\t\t\t.sequential()\n\t\t\t\n\t\t\t//Iterate over the elements\n\t\t\t.forEach(collidable -> {\n\t\t\t\tplayer.onCollide(collidable);\n\t\t\t\tcollidable.onCollide(player);\n\t\t\t});\n\t\t}\n\t}",
"public static void collide (Planet p1, Planet p2, double dist, Vector vec){\n \n double cosVal = vec.xComponent/dist;\n double sinVal = vec.yComponent/dist;\n \n double P1CalcVelX = (2*p2.mass/(p1.mass+p2.mass)) * p2.xVel;\n double P1CalcVelY = (2*p2.mass/(p1.mass+p2.mass)) * p2.yVel;\n \n double xVelChangeP1 = Math.abs(cosVal * P1CalcVelX) + Math.abs(cosVal * P1CalcVelY);\n double yVelChangeP1 = Math.abs(sinVal * P1CalcVelX) + Math.abs(sinVal * P1CalcVelY);\n \n \n if (p1.xCoor < p2.xCoor){\n xVelChangeP1 = -xVelChangeP1;\n }\n \n if (p1.yCoor < p2.yCoor){\n yVelChangeP1 = -yVelChangeP1; \n }\n \n double P2CalcVelX = (2*p1.mass/(p1.mass+p2.mass)) * p1.xVel;\n double P2CalcVelY = (2*p1.mass/(p1.mass+p2.mass)) * p1.yVel;\n \n double xVelChangeP2 = Math.abs(cosVal * P2CalcVelX) + Math.abs(cosVal * P2CalcVelY);\n double yVelChangeP2 = Math.abs(sinVal * P2CalcVelX) + Math.abs(sinVal * P2CalcVelY);\n\n if (p2.xCoor < p1.xCoor){\n xVelChangeP2 = -xVelChangeP2;\n }\n\n if (p2.yCoor < p1.yCoor){\n yVelChangeP2 = -yVelChangeP2; \n }\n \n p1.changeVel(xVelChangeP1, yVelChangeP1);\n p2.changeVel(xVelChangeP2, yVelChangeP2);\n\n }",
"abstract public void performCollision(Ball ball);",
"@Override\n public void checkCollision( Sprite obj )\n {\n\n }",
"private void fireball1Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball1.getX() - 1, fireball1.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball1.getX() - 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tGObject topRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY());\r\n\t\tGObject bottomRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tif(topLeft == player || bottomLeft == player || topRight == player || bottomRight == player) {\r\n\t\t\tremove(fireball1);\r\n\t\t\tfireball1 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"protected void collideOne(Mob m1, Entity m2, int dir) {\r\n // Calibrate bounding box\r\n float[] a = new float[6];\r\n a[0] = m1.getPos().x + m1.getDX() - m1.getLenX()/2;\r\n a[1] = m1.getPos().y + m1.getDY() - m1.getLenY()/2;\r\n a[2] = m1.getPos().z + m1.getDZ() - m1.getLenZ()/2;\r\n a[3] = m1.getPos().x + m1.getDX() + m1.getLenX()/2;\r\n a[4] = m1.getPos().y + m1.getDY() + m1.getLenY()/2;\r\n a[5] = m1.getPos().z + m1.getDZ() + m1.getLenZ()/2;\r\n float[] b = new float[6];\r\n b[0] = m2.getPos().x - m2.getLenX()/2;\r\n b[1] = m2.getPos().y - m2.getLenY()/2;\r\n b[2] = m2.getPos().z - m2.getLenZ()/2;\r\n b[3] = m2.getPos().x + m2.getLenX()/2;\r\n b[4] = m2.getPos().y + m2.getLenY()/2;\r\n b[5] = m2.getPos().z + m2.getLenZ()/2;\r\n // Collision detection\r\n boolean collide =\r\n overlap(a, b) || overlap(b, a);\r\n ;\r\n // Post-Collision adjustments\r\n if(collide) {\r\n if(dir == 3) {\r\n m1.setDX(m1.getDX() + (b[3] - a[0]) + 0.01f);\r\n } else if(dir == 1) {\r\n m1.setDX(m1.getDX() - (a[3] - b[0]) - 0.01f);\r\n } else if(dir == 0) {\r\n m1.setDZ(m1.getDZ() + (b[5] - a[2]) + 0.01f);\r\n } else if(dir == 2) {\r\n m1.setDZ(m1.getDZ() - (a[5] - b[2]) - 0.01f);\r\n }\r\n }\r\n }",
"private void handleCollisions() {\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tcheckInvaderDeath(a);\n\t\t\t\tcheckPlayerDeath(a);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (Shot s : enemyShotList) {\n\t\t\t\n\t\t\tif (s.detectDownwardCollision(player.getX(), player.getY())) {\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcollectPowerUp(armorPiercing);\n\t\tcollectPowerUp(explosive);\n\t}",
"@Override\n public void checkCollision( Sprite obj )\n {\n \n }",
"void collisionHappened(int position);",
"public void collide(DynamicCollEvent dce, int collRole) {\n if (collRole == DynamicCollEvent.COLL_AFFECTED) {\n BasicGameObject invoker = dce.getInvoker();\n if (invoker instanceof Monster) { /* Do nothing */ }\n if (invoker instanceof Player) {\n Player player = (Player) invoker;\n boolean harmedPlayer = (\n dce.getInvokerCollType() == DynamicCollEvent.COLL_LEFT ||\n dce.getInvokerCollType() == DynamicCollEvent.COLL_RIGHT ||\n dce.getInvokerCollType() == DynamicCollEvent.COLL_TOP ||\n dce.getInvokerCollType() == DynamicCollEvent.COLL_TOPLEFT ||\n dce.getInvokerCollType() == DynamicCollEvent.COLL_TOPRIGHT\n );\n boolean harmedByPlayer = (\n dce.getInvokerCollType() == DynamicCollEvent.COLL_BOTTOM ||\n dce.getInvokerCollType() == DynamicCollEvent.COLL_BOTTOMLEFT ||\n dce.getInvokerCollType() == DynamicCollEvent.COLL_BOTTOMRIGHT\n );\n\n if (harmedPlayer) {\n player.decreaseHealth(10); // This monster scores 10 hitpoints. ;)\n collLeftRight = true; // This way, we will turn around in advanceCycle.\n } else if (harmedByPlayer) {\n player.setVelocity(player.getVelX(), -20);\n this.getReferrer().getSndFX().play(SoundFX.SND_MONSTERSQUISH);\n this.decreaseHealth(100);\n referrer.getPlayer().increasePoints(5);\n } else {\n System.out.println(\"Undefined collision between Monster and Player. ERROR 30\");\n }\n }\n this.newX = dce.getAffectedNewX();\n this.newY = dce.getAffectedNewY();\n } else {\n this.newX = dce.getInvokerNewX();\n this.newY = dce.getInvokerNewY();\n }\n\n if (DEBUG) {\n if (this == this.getReferrer().getObjects()[9]) {\n System.out.println(\"DET F�RSTE MONSTERET HAR CRASHET MED PLAYER!!!\");\n }\n }\n }",
"@Override\n\tpublic void onCollision(Model collisionModel, ColBox collisionColbox) {\n\n\t}",
"@Override\r\n\tpublic void handleCollision(Contact contact) {\n\t}",
"public interface CollisionListener {\n public void collEnter(ACollider col,GameObject owner);\n public void collExit(ACollider col,GameObject owner);\n public void collStay(ACollider col,GameObject owner);\n}",
"public void checkCollision(){\r\n\r\n\t\t\t\tsmile.updateVelocity();\r\n\r\n\t\t\t\tsmile.updatePosition();\r\n\r\n\t\t\t\tif (smile.updateVelocity() > 0){\r\n\r\n\t\t\t\t\tfor (int k = 0; k < arrayPlat.size(); k++){\r\n\r\n\t\t\t\t\t\tif (smile.getNode().intersects(arrayPlat.get(k).getX(), arrayPlat.get(k).getY(), Constants.PLATFORM_WIDTH, Constants.PLATFORM_HEIGHT)){\r\n\r\n\t\t\t\t\t\t\tsmile.setVelocity(Constants.REBOUND_VELOCITY);\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t}",
"public void detectCollisions(){\n\t\tfor(int i = 0; i < pScene.getNumOf(); i++){\n\t\t\tEntity a = pScene.getObject(i);\n\t\t\tif (!a.isAlive())\n\t\t\t\tcontinue;\n\t\t\tfor(int j = i + 1; j < pScene.getNumOf(); j++){\n\t\t\t\tEntity b = pScene.getObject(j);\n\t\t\t\tif(a.intersects(b)&&(!(a.getStatic()&&b.getStatic()))){\n\t\t\t\t\tsManifolds.add(new Manifold(a,b)); // For regular objects\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void checkCollision()\n {\n if(isTouching(Rocket.class))\n {\n removeTouching(Rocket.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Fire.class))\n {\n removeTouching(Fire.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Sword.class))\n { \n removeTouching(Sword.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n notifyObservers(-20);\n }\n \n else if(isTouching(Star.class))\n { \n removeTouching(Star.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n count++;\n boost();\n }\n }",
"private void collision() {\n\t\tfor(int i = 0; i < brownMeteors.length; i++) {\n\t\t\tif( distance(brownMeteors[i].getLayoutX() + ENTITIES_SIZE/2, brownMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(brownMeteors[i]);\n\t\t\t\t\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter; \n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t//player vs grey Meteor\n\t\tfor(int i = 0; i < greyMeteors.length; i++) {\n\t\t\tif( distance(greyMeteors[i].getLayoutX() + ENTITIES_SIZE/2, greyMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(greyMeteors[i]);\n\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter;\n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//laser vs brown Meteor\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < brownMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(brownMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(brownMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < greyMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(greyMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(greyMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t}",
"private void collide(String typeOfCollision, Entity first, Entity second) {\n switch (typeOfCollision) {\n\n case \"playerWithWall\":\n intersectPlayerWithWall(first);\n break;\n\n case \"playerWithHazard\":\n intersectPlayerWithWall(first);\n break;\n\n case \"bulletWithWall\":\n room.getEntityManager().removeEntity(first);\n ((WeaponComponent) player.getComponent(ComponentType.WEAPON)).getBullets().removeEntity(first);\n break;\n\n case \"enemyWithWall\":\n intersectEnemyWithWall(first, second);\n break;\n\n case \"enemyWithBullet\":\n intersectBulletWithEnemy(first, second);\n break;\n\n case \"enemyWithEnemy\":\n intersectEnemyWithWall(first, second);\n break;\n\n case \"enemyWithPlayer\":\n NinjaEntity ninja = (NinjaEntity) second;\n ninja.setIsHit(true);\n break;\n\n case \"itemWithPlayer\":\n itemIntersectsPlayer(first);\n break;\n\n case \"swordWithEnemy\":\n intersectSwordWithEnemy(first, second);\n break;\n }\n }",
"@Override\n\tpublic void dispatch(final Vector2D normal, final Object2D other) {\n\t\tother.collide(normal, this);\n\t}",
"@Override\n\tpublic boolean collides(Vector3 v) {\n\t\treturn false;\n\t}",
"public void collide(StaticCollEvent sce) {\n int cType = sce.getInvCollType();\n\n if (cType == StaticCollEvent.COLL_BOTTOM) {\n collBottom = true;\n this.newY = sce.getInvokerNewY();\n }\n if (cType == StaticCollEvent.COLL_BOTTOMLEFT || cType == StaticCollEvent.COLL_BOTTOMRIGHT) {\n collLeftRight = true;\n this.newX = sce.getInvokerNewX();\n this.newY = sce.getInvokerNewY();\n }\n if (cType == StaticCollEvent.COLL_LEFT || cType == StaticCollEvent.COLL_RIGHT) {\n this.velX = -this.velX; // Turn around.\n }\n if (collBottom || collLeftRight) {\n if (action == FALLING) {\n this.action = WALKING;\n this.velX = monsterSpeed;\n }\n } else {\n this.action = FALLING;\n this.newX = sce.getInvokerNewX();\n this.newY = sce.getInvokerNewY();\n }\n }",
"private void handleCollisions(Sprite sprite1, Sprite sprite2){\n\t\tif(!sprite1.isActive() || !sprite2.isActive()) return;\n\n\t\tif(sprite1.equals(sprite2)){\n\t\t\treturn;\n\t\t}\n\n\t\tBounds boundsSprite1 = renderSprite(sprite1).getChildren().get(0).getBoundsInParent();\n\t\tBounds boundsSprite2 = (renderSprite(sprite2).getChildren().get(0).getBoundsInParent());\n\n\t\tif(boundsSprite1.intersects(boundsSprite2)) {\n\t\t\tcollisionHandler.handleCollide(sprite1, sprite2);\n\t\t}\n\n\t}",
"@Override\r\n\tpublic void Collision(Entity e)\r\n\t{\r\n\t\tthis.isAlive = false;\r\n\t}",
"Velocity hit(Ball hitter, Point collisionPoint, Velocity currentVelocity);",
"@Override\n void onCollide(Actor other, Contact contact) {\n }",
"public void checkCollisions(ArrayList<Collidable> other);",
"public interface OptimalCollidable extends Collidable{\n\t/**\n\t * Returns the optimal collision area. This single circle should wrap\n\t * around all the other collision areas that this object has.\n\t * \n\t * @version v1.00\n\t * @since v2.00\n\t * @return\n\t */\n\tpublic CollisionArea_SingleCirc getOptimalCollisionArea();\n\t\n\t/**\n\t * Updates the positioning of the optimal collision area, should be called\n\t * after the position update of the Sprite.\n\t */\n\tpublic void updateOptimalCollisionArea();\n}",
"@NonNull JavaBoundingBox[] collision();",
"public interface CollisionHandler\n{\n public boolean hasCollision(Board board);\n public String getDescription();\n}",
"void onNoCollision();",
"@Override\n public void onCollide(int actorA, int actorB, Collision.Manifold m){\n if(mInertia.has(actorA) && mInertia.has(actorB)){\n bounce(actorA, actorB, m);\n float correction = m.penetration[0] / (mInertia.get(actorA).invMass + mInertia.get(actorB).invMass) * 0.5f;\n mPhysics2D.get(actorA).p.mulAdd(m.normal, -mInertia.get(actorA).invMass * correction);\n mPhysics2D.get(actorB).p.mulAdd(m.normal, mInertia.get(actorB).invMass * correction);\n\n }else{ // Non Newtonian objects just get simple position correction\n Vector2 correction = new Vector2(m.normal).scl(m.penetration[0] * 0.5f);\n mPhysics2D.get(actorA).p.sub(correction);\n mPhysics2D.get(actorB).p.add(correction);\n }\n }",
"private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}",
"boolean collideWithVehicles(Vehicle v);",
"public void sideCheck() {\n /*Be careful when creating tiles, especially ones that allow Sonic's bottom and middle sensors to intersect \n the same tile*/\n mLCollide = false;\n mRCollide = false;\n if(grounded) {\n if(groundSpeed > 0) {\n sideCollision(middleRight);\n }\n else if(groundSpeed < 0) {\n sideCollision(middleLeft);\n } \n }\n else if(!grounded) {\n if(xSpeed < 0) {\n sideCollision(middleLeft);\n }\n else if(xSpeed > 0) {\n sideCollision(middleRight);\n }\n }\n }",
"public int check4CollisionWithBlue(Player player)\n {\n int number_of_collisions = 0;\n int x_cord = getMidPoint(player.x_cordinate);\n int y_cord = getMidPoint(player.y_cordinate);\n int blux1 = getMidPoint(getBlue_player1().x_cordinate);//blue_player1.x_cordinate;\n int blux2 = getMidPoint(getBlue_player2().x_cordinate);\n int blux3 = getMidPoint(getBlue_player3().x_cordinate);//blue_player3.x_cordinate;\n int blux4 = getMidPoint(getBlue_player4().x_cordinate);//blue_player4.x_cordinate;\n int bluy1 = getMidPoint(getBlue_player1().y_cordinate);//blue_player1.y_cordinate;\n int bluy2 = getMidPoint(getBlue_player2().y_cordinate);//blue_player2.y_cordinate;\n int bluy3 = getMidPoint(getBlue_player3().y_cordinate);//blue_player3.y_cordinate;\n int bluy4 = getMidPoint(getBlue_player4().y_cordinate);//blue_player4.y_cordinate;\n number_of_collisions += collisionDetection(x_cord, y_cord, blux1, bluy1);\n number_of_collisions += collisionDetection(x_cord, y_cord, blux2, bluy2);\n number_of_collisions += collisionDetection(x_cord, y_cord, blux3, bluy3);\n number_of_collisions += collisionDetection(x_cord, y_cord, blux4, bluy4);\n return number_of_collisions;\n }",
"@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}",
"public void noCollision(){\r\n this.collidingEntity2=null;\r\n this.collidingEntity=null;\r\n collidedTop=false;\r\n collide=false;\r\n }",
"@Override\n public Map<Class<? extends Collidable>, CollisionAction> getCollideActions() {\n Map<Class<? extends Collidable>, CollisionAction> collisionActionMap =\n new HashMap<Class<? extends Collidable>, CollisionAction>();\n \n collisionActionMap.put(Floor.class, new FloorCollision());\n \n collisionActionMap.put(Player.class, new PlayerCollision());\n\n return collisionActionMap;\n }",
"@Override\n protected void onCollide(AbstractCollidableSprite target) {\n super.onCollide(target);\n this.getController().onCollide(target);\n\n // Hard code, not good!\n if(target instanceof Bomb){\n Vector2D oldCenterPos = getOldCenterPos();\n Vector2D curCenterPos = getCurCenterPos();\n// if(oldCenterPos.getX() <= 0 || oldCenterPos.getY() <= 0 || oldCenterPos.equals(curCenterPos)){\n// Vector2D newPos = this.getSpritePos().applyDir(this.getCurDirection(), -1);\n// this.setSpritePos(newPos);\n// CollideDetector.setDirtyFlag(true);\n// } else {\n// // Center better be stable before & after collision.\n// // Vector2D newCenterPos = oldCenterPos.advance(curCenterPos, 1);\n//\n// DIRECTIONS moveDir = Utilities.calculateDir(oldCenterPos, curCenterPos);\n// this.setSpritePos(this.getSpritePos().applyDir(moveDir, -1));\n//\n// CollideDetector.setDirtyFlag(true);\n// }\n\n double half_dist = oldCenterPos.dist(curCenterPos)/2;\n\n Vector2D targetCenterPos = target.getCurCenterPos();\n // Move the sprite away\n DIRECTIONS moveDir = Utilities.calculateDir(targetCenterPos, curCenterPos);\n Vector2D newPos = this.getSpritePos().applyDir(moveDir, half_dist > 1? half_dist:1);\n this.setSpritePos(newPos);\n CollideDetector.setDirtyFlag(true);\n }\n }",
"@Override\r\n\tpublic boolean collides (Entity other)\r\n\t{\r\n\t\tif (other == owner || other instanceof Missile)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn super.collides(other);\r\n\t}",
"private static void checkCollisions() {\n ArrayList<Entity> bulletsArray = bullets.entities;\n ArrayList<Entity> enemiesArray = enemies.entities;\n for (int i = 0; i < bulletsArray.size(); ++i) {\n for (int j = 0; j < enemiesArray.size(); ++j) {\n if (j < 0) {\n continue;\n }\n if (i < 0) {\n break;\n }\n Entity currentBullet = bulletsArray.get(i);\n Entity currentEnemy = enemiesArray.get(j);\n if (Collision.boxBoxOverlap(currentBullet, currentEnemy)) {\n ++player.hiScore;\n if (currentBullet.collided(currentEnemy)) {\n --i;\n }\n if (currentEnemy.collided(currentBullet)) {\n --j;\n }\n }\n }\n }\n textHiScore.setString(\"HISCORE:\" + player.hiScore);\n\n // Check players with bonuses\n ArrayList<Entity> bonusArray = bonus.entities;\n for (int i = 0; i < bonusArray.size(); ++i) {\n Entity currentBonus = bonusArray.get(i);\n if (Collision.boxBoxOverlap(player, currentBonus)) {\n if (currentBonus.collided(player)) {\n --i;\n player.collided(currentBonus);\n }\n }\n }\n }",
"void collisions(){\n float tmp;\n \n if (dist(redX, redY, yelX, yelY) < 30 ){ // Red and Yellow\n tmp = yelDX; yelDX = redDX; redDX = tmp;\n tmp= yelDY; yelDY = redDY; redDY = tmp;\n }\n \n if (dist(redX, redY, bluX, bluY) < 30){ // Red and Blue\n tmp = bluDX; bluDX = redDX; redDX = tmp;\n tmp = bluDY; bluDY = redDY; redDY = tmp;\n }\n \n if (dist(bluX, bluY, yelX, yelY) < 30){ // Blue and Yellow\n tmp = yelDX; yelDX = bluDX; bluDX = tmp;\n tmp = yelDY; yelDY = bluDY; bluDY = tmp;\n }\n if (dist(cueX, cueY, redX, redY) < 30){ // Cue and Red\n tmp = redDX; redDX = cueDX; cueDX = tmp;\n tmp = redDY; redDY = cueDY; cueDY = tmp;\n }\n if (dist(cueX, cueY, bluX, bluY) < 30){ // Cue and Blue\n tmp = bluDX; bluDX = cueDX; cueDX = tmp;\n tmp = bluDY; bluDY = cueDY; cueDY = tmp;\n }\n if (dist(cueX, cueY, yelX, yelY) < 30){ // Cue and Yellow\n tmp = yelDX; yelDX = cueDX; cueDX = tmp;\n tmp = yelDY; yelDY = cueDY; cueDY = tmp;\n }\n}",
"public void collide(){\n hp -= 10;\n resetPos();\n //canMove = false;\n }",
"private void checkForAndResolveCollisions(List<Platform> platforms) {\n\n CollisionType collisionType;\n\n // Consider each platform for collision\n for (Platform platform : platforms) {\n collisionType =\n CollisionDetector.determineAndResolveCollision(this, platform);\n\n switch (collisionType) {\n case Top:\n velocity.y = -0.5f * velocity.y;\n break;\n case Bottom:\n velocity.y = -0.5f * velocity.y;\n break;\n case Left:\n velocity.x = -0.5f * velocity.x;\n break;\n case Right:\n velocity.x = -0.5f * velocity.x;\n break;\n case None:\n break;\n }\n }\n }",
"private void testCollisions () \n\t{\n\t r1.set(level.bird.position.x, level.bird.position.y,\n\t \t\t level.bird.bounds.width+.03f, level.bird.bounds.height);\n\t \n\t // Test collision: Pipes\n\t for (Pipe pipe : level.pipes) \n\t {\n\t \t r2.set(pipe.position.x, pipe.position.y, pipe.bounds.width,\n\t \t\t\t pipe.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithPipe(pipe);\n\t }\n\t \n\t // Test collision: GoldCoins\n\t for (GoldCoin goldcoin : level.goldcoins)\n\t {\n\t \t if (goldcoin.collected) continue;\n\t \t r2.set(goldcoin.position.x, goldcoin.position.y,\n\t \t\t\t goldcoin.bounds.width, goldcoin.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoldCoin(goldcoin);\n\t \t break;\n\t }\n\t \n\t // Test collision: Dp\n\t for (DoublePoint doublepoint : level.doublepoints) \n\t {\n\t \t if (doublepoint.collected) continue;\n\t \t r2.set(doublepoint.position.x, doublepoint.position.y,\n\t \t\t\t doublepoint.bounds.width, doublepoint.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithDoublePoint(doublepoint);\n\t \t break;\n\t }\n\t \n\t // Test collision: Goal\n\t for (Goal goal : level.goals)\n\t {\n\t \t r2.set(goal.position.x, goal.position.y,\n\t \t\t\t goal.bounds.width, goal.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoal(goal);\n\t \t break;\n\t }\n\t \n\t // Test collision: Brick\n\t for (Brick brick : level.bricks) \n\t {\n\t \t r2.set(brick.position.x, brick.position.y, brick.bounds.width,\n\t \t\t\t brick.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithBrick(brick);\n\t }\n\t }",
"Rectangle getCollisionBox();",
"private boolean collides(GameObject gameObject1) {\n return collides(gameObject1, 0.5);\n }",
"private void checkCollisions() {\n float x = pacman.getPos().x;\n float y = pacman.getPos().y;\n\n GameEntity e;\n for (Iterator<GameEntity> i = entities.iterator(); i.hasNext(); ) {\n e = i.next();\n // auf kollision mit spielfigur pruefen\n if (Math.sqrt((x - e.getPos().x) * (x - e.getPos().x) + (y - e.getPos().y) * (y - e.getPos().y)) < 0.5f)\n if (e.collide(this, pacman))\n i.remove();\n }\n }",
"public void collide(GameEntity ge)\n\t{\n\t\tge.collide(this);\n\t}",
"public T caseCollision(Collision object) {\r\n\t\treturn null;\r\n\t}",
"public boolean doesCollide()\n {\n return doesCollide;\n }",
"String getCollisionAvoidanceFactor();",
"protected void collideAll(Mob cur, List<Entity> entityList, int dir) {\r\n for(Entity e : entityList) {\r\n if(cur != e && !(e instanceof Floor)) {\r\n collideOne(cur, e, dir);\r\n }\r\n }\r\n }",
"@Override\n\tpublic boolean hasCollide(Entity e) {\n\t\treturn rect.intersects(e.getRectangle());\n\t}",
"public void collision(Ball b){\n float cir_center_X = b.getCenterX();\r\n float cir_center_Y = b.getCenterY();\r\n \r\n // aabb half extent\r\n float extent_X = (this.p4[0]-this.p1[0])/2; //half width\r\n float extent_Y = (this.p3[1]-this.p4[1])/2; // half height\r\n // rec center \r\n float rec_center_X = this.p1[0]+extent_X;\r\n float rec_center_Y = this.p1[1]+extent_Y;\r\n \r\n // difference between center : vector D = Vector Cir_center-Rec-center\r\n float d_X =cir_center_X-rec_center_X;\r\n float d_Y = cir_center_Y-rec_center_Y;\r\n \r\n //\r\n float p_X =Support_Lib.clamp(d_X,-extent_X,extent_X);\r\n float p_Y =Support_Lib.clamp(d_Y,-extent_Y,extent_Y);\r\n \r\n\r\n \r\n float closest_point_X = rec_center_X +p_X;\r\n float closest_point_Y = rec_center_Y +p_Y; \r\n \r\n \r\n d_X = closest_point_X -cir_center_X;\r\n d_Y = closest_point_Y -cir_center_Y;\r\n \r\n \r\n \r\n float length = (float)Math.sqrt((d_X*d_X)+(d_Y*d_Y));\r\n \r\n if(length+0.001 <=b.getRadius()){\r\n\r\n \r\n float ratio =(closest_point_X-rec_center_X)/(extent_X*2);\r\n b.accelartion(ratio);\r\n b.updateVelocity(Support_Lib.direction(d_X,d_Y));\r\n \r\n }\r\n \r\n \r\n }"
]
| [
"0.723625",
"0.720029",
"0.70841175",
"0.70819265",
"0.69301283",
"0.6924352",
"0.6901298",
"0.6833454",
"0.67843664",
"0.6728315",
"0.6727389",
"0.6672184",
"0.6670692",
"0.6670371",
"0.66656655",
"0.6664614",
"0.6654345",
"0.6635477",
"0.6567854",
"0.6565391",
"0.65489197",
"0.65456045",
"0.6528976",
"0.6470492",
"0.6411043",
"0.63960624",
"0.639149",
"0.6366439",
"0.6299699",
"0.627496",
"0.62724686",
"0.62676316",
"0.6263919",
"0.62518233",
"0.62445074",
"0.6235149",
"0.62178296",
"0.6216164",
"0.6214989",
"0.62120134",
"0.6200926",
"0.61824363",
"0.61748105",
"0.6151591",
"0.6143743",
"0.6135764",
"0.6110431",
"0.61063683",
"0.61022455",
"0.6101615",
"0.6085065",
"0.6076019",
"0.60758203",
"0.60737467",
"0.6043497",
"0.60343754",
"0.6025706",
"0.6018215",
"0.5981236",
"0.59792894",
"0.59533226",
"0.59386265",
"0.5921096",
"0.59189093",
"0.59180695",
"0.591225",
"0.59086674",
"0.5905764",
"0.59032553",
"0.5882328",
"0.5858685",
"0.58562905",
"0.58556354",
"0.5854347",
"0.58543146",
"0.58451974",
"0.582383",
"0.58186114",
"0.58120644",
"0.5810439",
"0.5802975",
"0.57983255",
"0.5796206",
"0.5788547",
"0.5782248",
"0.5775687",
"0.57650006",
"0.575686",
"0.57559717",
"0.5751732",
"0.57473814",
"0.5744189",
"0.574231",
"0.57416254",
"0.57398695",
"0.57359064",
"0.57296646",
"0.5723311",
"0.57199025",
"0.5715437"
]
| 0.636837 | 27 |
Return the shortest time in which the given entity will collide with the boundaries of its world. | public double getTimeCollisionBoundary() {
double[] velocity = this.velocity.getVelocity();
if (this.superWorld == null) return Double.POSITIVE_INFINITY;
if (velocity[0] == 0 && velocity[1] == 0) return Double.POSITIVE_INFINITY;
double radius = this.getRadius();
if (this instanceof Planetoid) { Planetoid planetoid = (Planetoid) this; radius = planetoid.getRadius();}
double edgeY;
double edgeX;
double mY = 0;
double mX = 0;
if (velocity[0] > 0){
edgeX = position[0] + radius;
mX = this.superWorld.getWorldWidth();
}
else edgeX = position[0] - radius;
if (velocity[1] > 0){
edgeY = position[1] + radius;
mY = this.superWorld.getWorldHeight();
}
else edgeY = position[1] - radius;
double tX = Double.POSITIVE_INFINITY;
double tY = Double.POSITIVE_INFINITY;
if (velocity[0] != 0){
tX = (mX-edgeX)/velocity[0];
}
if (velocity[1] != 0){
tY = (mY-edgeY)/velocity[1];
}
//Return the smallest value
return Math.min(tX, tY);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getTimeFirstCollisionBoundary() {\n\t\tif (getWorld() == null) return Double.POSITIVE_INFINITY;\n\t\tdouble xTime = Double.POSITIVE_INFINITY;\n\t\tdouble yTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getXVelocity() > 0)\n\t\t\txTime = (getWorld().getWidth() - getXCoordinate() - getRadius()) / getXVelocity();\n\t\tif (this.getXVelocity() < 0)\n\t\t\txTime = - ( getXCoordinate() - getRadius()) / getXVelocity();\n\t\tif (this.getXVelocity() == 0)\n\t\t\txTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getYVelocity() > 0)\n\t\t\tyTime = (getWorld().getHeight() - getYCoordinate() -getRadius()) / getYVelocity();\n\t\tif (this.getYVelocity() < 0)\n\t\t\tyTime = - ( getYCoordinate() - getRadius()) / getYVelocity();\n\t\tif (this.getYVelocity() == 0)\n\t\t\tyTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\treturn Math.min(xTime, yTime);\t\n\t}",
"public long getBestSolutionTime();",
"public static double getSpeed(Entity entity) {\r\n\t\treturn new Vec3d(mc.player.posX, mc.player.posY, mc.player.posZ).distanceTo(new Vec3d(mc.player.lastTickPosX, mc.player.lastTickPosY, mc.player.lastTickPosZ));\r\n\t}",
"abstract public double timeUntilCollision(Ball ball);",
"public double[] getCollisionPosition(Entity entity) throws IllegalArgumentException{\n \n \tif (entity == null) throw new IllegalArgumentException(\"getCollisionPosition called with a non-existing circular object!\");\n\t\tif (this.overlap(entity)) throw new IllegalArgumentException(\"These two circular objects overlap!\");\n\t\tdouble timeToCollision = getTimeToCollision(entity);\n\t\t\t\n\t\tif (timeToCollision == Double.POSITIVE_INFINITY) return null;\n\t\t\n\t\tdouble[] positionThisShip = this.getPosition();\n\t\tdouble[] velocityThisShip = this.getVelocity();\n\t\tdouble[] positionShip2 = entity.getPosition();\n\t\tdouble[] velocityShip2 = entity.getVelocity();\n\t\t\n\t\tdouble xPositionCollisionThisShip = positionThisShip[0] + velocityThisShip[0] * timeToCollision;\n\t\tdouble yPositionCollisionThisShip = positionThisShip[1] + velocityThisShip[1] * timeToCollision;\n\t\t\n\t\tdouble xPositionCollisionShip2 = positionShip2[0] + velocityShip2[0] * timeToCollision;\n\t\tdouble yPositionCollisionShip2 = positionShip2[1] + velocityShip2[1] * timeToCollision;\n\t\t\n\t\tdouble slope = Math.atan2(yPositionCollisionShip2 - yPositionCollisionThisShip, xPositionCollisionShip2 - xPositionCollisionThisShip);\n\t\t\n\t\t\n\t\treturn new double[] {xPositionCollisionThisShip + Math.cos(slope) * this.getRadius(), yPositionCollisionThisShip + Math.sin(slope) * this.getRadius()};\n\t}",
"public float getTime() {\n return Math.abs(endTime - startTime) / 1000000f;\n }",
"private void intersectPlayerWithWall(Entity entity){\n player.setXVelocity(0);\n player.setYVelocity(0);\n\n //sets the x and y pos to be the correct wall placment, will need to know where the wall is relative to the player to do this\n\n int wallCenterYPos = (entity.getY() + (entity.getHeight() / 2));\n int playerCenterYPos = (player.getY() + (player.getHeight() / 2));\n int wallCenterXPos = (entity.getX() + (entity.getWidth() / 2));\n int playerCenterXPos = (player.getX() + (player.getWidth() / 2));\n\n //uses Minkowski sum\n\n float wy = (entity.getWidth() + player.getWidth()) * (wallCenterYPos - playerCenterYPos);\n float hx = (entity.getHeight() + player.getHeight()) * (wallCenterXPos - playerCenterXPos);\n\n if (wy > hx) {\n if (wy > -hx) {\n //bottom of player hitting wall\n //push the player off the wall so the collision ends\n player.setY(entity.getY() - player.getHeight());\n return;\n\n } else {\n //left of wall\n //push the player off the wall so the collision ends\n player.setX(entity.getX() + entity.getWidth());\n return;\n }\n } else {\n if (wy > -hx) {\n //right of wall\n //push the player off the wall so the collision ends\n player.setX(entity.getX() - player.getWidth());\n return;\n } else {\n //top of player hitting wall\n //push the player off the wall so the collision ends\n player.setY(entity.getY() + entity.getHeight());\n return;\n }\n\n }\n }",
"public double[] getPositionCollisionBoundary(){\n\t\tif (!Helper.isValidDouble(this.getTimeCollisionBoundary()) || this.superWorld == null) return null;\n\t\tdouble[] pos = new double[2];\n\t\tpos[0] = this.getPosition()[0] + (this.getVelocity()[0] * this.getTimeCollisionBoundary());\n\t\tpos[1] = this.getPosition()[1] + (this.getVelocity()[1] * this.getTimeCollisionBoundary());\n\t\t\n\t\tif (pos[0] + this.getRadius() >= this.superWorld.getWorldHeight()) pos[0]+= this.getRadius();\n\t\telse if (pos[0] - this.getRadius() >= this.superWorld.getWorldHeight()) pos[0]-= this.getRadius();\n\t\telse if (pos[1] + this.getRadius() >= this.superWorld.getWorldHeight()) pos[1]+= this.getRadius();\n\t\telse\tpos[1] -= this.getRadius();\n\t\t\t\n\t\t\n\t\treturn pos;\n\t}",
"public static int getMinDistanceTime(Asteroid a, Asteroid b) {\n\n\t\tdouble minDistance = -1;\n\t\tint minDistTime = Integer.MAX_VALUE;\n\t\tfor(int t = 0; t < 20*365; t++){\n\t\t\tdouble distance = Point.distance(a.orbit.positionAt((long)t - a.epoch),b.orbit.positionAt((long)t - b.epoch));\n\t\t\tif(distance < minDistance){\n\t\t\t\tminDistance = distance;\n\t\t\t\tminDistTime = t;\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn minDistTime;\n\t}",
"private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg.size + this.size)/2;\n deltaA = this.distance(thg);\n \n if( \n Math.abs(deltaA[0]) <= collisionRange\n &&\n Math.abs(deltaA[1]) <= collisionRange\n ){\n if(deltaA[0] > deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == 1) {\n dA[0] = 0;\n }\n }\n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == -1) {\n dA[1] = 0;\n }\n }\n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n if(dA[0] != 0) {\n dA[1] = dA[0];\n }\n if(dA[1] != 0) {\n dA[0] = dA[1];\n }\n }\n }\n \n if(deltaA[0] < deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == -1) {\n dA[0] = 0;\n }\n } \n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == 1) {\n dA[1] = 0;\n }\n } \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = dA[0];\n }\n }\n \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = -dA[0];\n }\n }\n }\n }\n }\n }",
"public double[] getCollisionPosition(Entity otherEntity) throws IllegalArgumentException {\n\t\tif (otherEntity == null) \n\t\t\tthrow new IllegalArgumentException(\"Invalid argument object (null).\");\n\t\t\n\n\t\tif ( this.overlap(otherEntity) ) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif ( this.getTimeToCollision(otherEntity) == Double.POSITIVE_INFINITY)\n\t\t\treturn null;\n\n\t\tdouble collisionXSelf = this.getXCoordinate() + this.getTimeToCollision(otherEntity) * this.getXVelocity();\n\t\tdouble collisionYSelf = this.getYCoordinate() + this.getTimeToCollision(otherEntity) * this.getYVelocity();\n\n\t\tdouble collisionXOther = otherEntity.getXCoordinate() + otherEntity.getTimeToCollision(this) * otherEntity.getXVelocity();\n\t\tdouble collisionYOther = otherEntity.getYCoordinate() + otherEntity.getTimeToCollision(this) * otherEntity.getYVelocity();\n\t\t\n\t\tdouble collisionX;\n\t\tdouble collisionY;\n\t\t\n\t\tif (this.getXCoordinate() > otherEntity.getXCoordinate()) {\n\t\t\tcollisionX = collisionXSelf - Math.cos(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t\tcollisionY = collisionYSelf - Math.sin(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\tcollisionX = collisionXSelf + Math.cos(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t\tcollisionY = collisionYSelf + Math.sin(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t}\n\t\t\n\t\tdouble[] collision = {collisionX, collisionY};\n\t\treturn collision;\n\t\t\n\t}",
"public long getTime(){\r\n\t\treturn world.getWorldTime();\r\n\t}",
"public void checkCollisionTile(Entity entity) {\n\t\t\tint entityLeftX = entity.worldX + entity.collisionArea.x;\n\t\t\tint entityRightX = entity.worldX + entity.collisionArea.x + entity.collisionArea.width;\n\t\t\tint entityUpY = entity.worldY + entity.collisionArea.y;\n\t\t\tint entityDownY = entity.worldY + entity.collisionArea.y + entity.collisionArea.height;\n\t\t\t\n\t\t\tint entityLeftCol = entityLeftX/gamePanel.unitSize;\n\t\t\tint entityRightCol = entityRightX/gamePanel.unitSize;\n\t\t\tint entityUpRow = entityUpY/gamePanel.unitSize;\n\t\t\tint entityDownRow = entityDownY/gamePanel.unitSize;\n\t\t\t\n\t\t\tint point1;\n\t\t\tint point2;\n\t\t\t//This point is used for diagonal movement\n\t\t\tint point3;\n\t\t\t\n\t\t\tswitch(entity.direction) {\n\t\t\t\t//Lateral and longitudinal movements\n\t\t\t\tcase \"up\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t//Diagonal Movements\n\t\t\t\tcase \"upleft\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"upright\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"downleft\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"downright\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"public CollisionArea_SingleCirc getOptimalCollisionArea();",
"public int getTimeToComplete() {\n // one level is ten minutes long\n int totalTime = numberOfLevels * 10;\n if (is3D) {\n // if it's 3d then it take twice as long because its harder\n totalTime = totalTime * 2;\n }\n \n return totalTime;\n }",
"public long getWorldTime()\n {\n return worldTime;\n }",
"static Vector getEntityPosition(Entity entity, Object nmsEntity) {\n if(entity instanceof Hanging) {\n Object blockPosition = ReflectUtils.getField(nmsEntity, \"blockPosition\");\n return MathUtils.moveToCenterOfBlock(ReflectUtils.blockPositionToVector(blockPosition));\n } else {\n return entity.getLocation().toVector();\n }\n }",
"public void updateOptimalCollisionArea();",
"public void applyEntityCollision(Entity entityIn) {\n }",
"double getSolverTimeLimitSeconds();",
"public abstract void collideWith(Entity entity);",
"void checkCollision(Entity other);",
"public double getDistanceBetweenCenter(Entity entity) throws IllegalArgumentException{\n if(this == entity) throw new IllegalArgumentException(\"this == entity\");\n else{\n double diffx = Math.abs(entity.getPosition()[0] - this.getPosition()[0]);\n double diffy = Math.abs(entity.getPosition()[1] - this.getPosition()[1]);\n double diff = Math.sqrt(Helper.square(diffx) + Helper.square(diffy));\n return diff;\n }\n }",
"private static void suffocateInSpace(World world, LivingEntity entity){\n\n\t\tboolean isInSpace = entity.getPosY() >= 300\n\t\t\t\t|| world.getDimension().getType() == DimensionHelper.PANDORA\n\t\t\t\t|| world.getDimension().getType() == DimensionHelper.ARRAKIS\n\t\t\t\t|| world.getDimension().getType() == DimensionHelper.LUNA;\n\t\tif (isInSpace){\n\t\t\tboolean wearingSpaceHelmet = entity.getItemStackFromSlot(EquipmentSlotType.HEAD).getItem() instanceof SpaceHelmet || (ModularArmor.getModuleLevel(entity, \"spacehelmet\") == 1);\n\t\t\tboolean isCreative = entity instanceof PlayerEntity && ((PlayerEntity) entity).isCreative();\n\t\t\tif (!wearingSpaceHelmet && !isCreative && !(entity instanceof BreathesInSpace)) {\n\t\t\t\tentity.setAir(entity.getAir() - 5);\n\t\t\t\tif (entity.getAir() <= -20) {\n\t\t\t\t\tentity.setAir(0);\n\t\t\t\t\tentity.attackEntityFrom(DamageSource.DROWN, 4);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public TimeBounds getTimeBounds() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeBounds);\n\t\treturn fieldTimeBounds;\n\t}",
"public abstract boolean collide(int x, int y, int z, int dim, Entity entity);",
"public int getScopeTime()\n{\n // If scope time not explicitly set, get time prior to given time\n if(_scopeTime==null) {\n List <Integer> keyFrames = getKeyFrameTimes();\n int index = Collections.binarySearch(keyFrames, getTime());\n if(index<0) index = -index - 2; else index--;\n return index>=0? keyFrames.get(index) : 0;\n }\n \n // Return scope time\n return _scopeTime;\n}",
"public void collideBoundary() {\n\t\tif (getWorld() == null) return;\n\t\tif (getXCoordinate() < 1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getXCoordinate() > getWorld().getWidth()-1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getYCoordinate() < 1.01 * getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t\tif (getYCoordinate() > getWorld().getHeight()-1.01*getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t}",
"CollisionRule getCollisionRule();",
"public void checkWorldCollisions(Bounds bounds) {\n final boolean atRightBorder = getShape().getLayoutX() >= (bounds.getMaxX() - RADIUS);\n final boolean atLeftBorder = getShape().getLayoutX() <= RADIUS;\n final boolean atBottomBorder = getShape().getLayoutY() >= (bounds.getMaxY() - RADIUS);\n final boolean atTopBorder = getShape().getLayoutY() <= RADIUS;\n final double padding = 1.00;\n\n if (atRightBorder) {\n getShape().setLayoutX(bounds.getMaxX() - (RADIUS * padding));\n velX *= frictionX;\n velX *= -1;\n }\n if (atLeftBorder) {\n getShape().setLayoutX(RADIUS * padding);\n velX *= frictionX;\n velX *= -1;\n }\n if (atBottomBorder) {\n velY *= -1;\n velY *= frictionY;\n getShape().setLayoutY(bounds.getMaxY() - (RADIUS * padding));\n }\n if (atTopBorder) {\n velY *= -1;\n velY *= frictionY;\n getShape().setLayoutY(RADIUS * padding);\n }\n }",
"public boolean checkWorld(Entity entity) {\r\n return entity.getWorld() == worldFrom;\r\n }",
"public long timeToNearestTransform(long time) { \n Long floor = storage.floorKey(time);\n Long ceiling = storage.ceilingKey(time);\n \n if (floor == null) return (ceiling - time);\n if (ceiling == null) return (time - floor);\n return Math.min(ceiling - time, time - floor);\n }",
"public double count_walk_time(double x, double y){\r\n\t\treturn Math.sqrt(Math.pow(x-this.getPosition()[0],2) + Math.pow(y-this.getPosition()[1],2)) / this.WALK_SPEED;\t\r\n\t}",
"private E3DCollision getClosestCollisionWithWorld(IE3DCollisionDetector collisionDetector, IE3DCollisionDetectableObject sourceObject, E3DVector3F sourceStartPos, E3DVector3F sourceEndPos, E3DWorld world)\r\n\t{\r\n\t\tArrayList triangleList = null;\r\n E3DSector sector = null;\r\n\t\tE3DTriangle triangle = null;\r\n\t\tE3DCollision partialCollision = null;\r\n E3DCollision closestCollision = null;\r\n\t\t\r\n\t\tsector = sourceObject.getSector(); //only check collision with the sector the actor is in\r\n\t\t\t\r\n\t\ttriangleList = sector.getTriangleList(); //TODO: sort by how likely it is\r\n\t\t\r\n\t\tfor(int i=0; i<triangleList.size(); i++)\r\n\t\t{\r\n\t\t\ttriangle = (E3DTriangle)triangleList.get(i);\r\n\t\t\t\r\n partialCollision = collisionDetector.checkForCollisionWithTriangle(sourceObject, sourceStartPos, sourceEndPos, triangle);\r\n\t\t\tif(partialCollision != null)\r\n\t\t\t{\r\n partialCollision.setCollideeBoundingObject(triangle);\r\n \r\n\t\t\t\tif(closestCollision == null)\r\n\t\t\t\t\tclosestCollision = partialCollision;\r\n\t\t\t\telse //see if its closer than the previous collision.. We want the closest collision\r\n\t\t\t\t{\r\n\t\t\t\t\tif(Math.abs(partialCollision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()) < \r\n\t\t\t\t\t Math.abs(closestCollision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tclosestCollision = partialCollision;\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 if(closestCollision != null)\r\n {\r\n closestCollision.setCollideeObject(null); //it did run into the world, but the world can't be notified\r\n closestCollision.setCollisionSector(sector);\r\n closestCollision.setCollisionWorld(world);\r\n\r\n return closestCollision;\r\n }\r\n else\r\n return null;\r\n\t}",
"public abstract float getCollisionRadius();",
"protected void checkEntityCollisions(long time) {\n\t\tRectangle2D.Float pla1 = player1.getLocationAsRect();\n\t\tRectangle2D.Float pla2 = player2.getLocationAsRect();\n\t\tfor(int i = 0; i < ghosts.length; i++)\n\t\t{\n\t\t\tGhost g = ghosts[i];\n\t\t\t\n\t\t\tif(g.isDead())\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tRectangle2D.Float ghRect = g.getLocationAsRect();\n\t\t\t\n\t\t\tif(ghRect.intersects(pla1))\n\t\t\t\tonPlayerCollideWithGhost(time, player1, i);\n\t\t\t\n\t\t\tif(ghRect.intersects(pla2))\n\t\t\t\tonPlayerCollideWithGhost(time, player2, i);\n\t\t}\n\t}",
"@java.lang.Override\n public long getMinigameEndMs() {\n return minigameEndMs_;\n }",
"public float getDistanceToCompensate ( long fps, float attachedAnchorY) {\n float distanceToCompensate = 0;\n if (moveOtherObjects){\n distanceToCompensate =\n (float) (defaultYCoordinateAsPerctangeOfScreen * screen_length) - attachedAnchorY;\n distanceToCompensate /= fps;\n }\n return distanceToCompensate;\n }",
"@Override\r\n public void applyEntityCollision(Entity entity)\r\n {\r\n Vector3 v = Vector3.getNewVector();\r\n Vector3 v1 = Vector3.getNewVector();\r\n\r\n blockBoxes.clear();\r\n\r\n int sizeX = blocks.length;\r\n int sizeY = blocks[0].length;\r\n int sizeZ = blocks[0][0].length;\r\n Set<Double> topY = Sets.newHashSet();\r\n for (int i = 0; i < sizeX; i++)\r\n for (int k = 0; k < sizeY; k++)\r\n for (int j = 0; j < sizeZ; j++)\r\n {\r\n ItemStack stack = blocks[i][k][j];\r\n if (stack == null || stack.getItem() == null) continue;\r\n\r\n Block block = Block.getBlockFromItem(stack.getItem());\r\n AxisAlignedBB box = Matrix3.getAABB(posX + block.getBlockBoundsMinX() - 0.5 + boundMin.x + i,\r\n posY + block.getBlockBoundsMinY() + k,\r\n posZ + block.getBlockBoundsMinZ() - 0.5 + boundMin.z + j,\r\n posX + block.getBlockBoundsMaxX() + 0.5 + boundMin.x + i,\r\n posY + block.getBlockBoundsMaxY() + k,\r\n posZ + block.getBlockBoundsMaxZ() + 0.5 + boundMin.z + j);\r\n blockBoxes.add(box);\r\n topY.add(box.maxY);\r\n }\r\n\r\n v.setToVelocity(entity).subtractFrom(v1.setToVelocity(this));\r\n v1.clear();\r\n Matrix3.doCollision(blockBoxes, entity.getEntityBoundingBox(), entity, 0, v, v1);\r\n for(Double d: topY)\r\n if (entity.posY >= d && entity.posY + entity.motionY <= d && motionY <= 0)\r\n {\r\n double diff = (entity.posY + entity.motionY) - (d + motionY);\r\n double check = Math.max(0.5, Math.abs(entity.motionY + motionY));\r\n if (diff > 0 || diff < -0.5 || Math.abs(diff) > check)\r\n {\r\n entity.motionY = 0;\r\n }\r\n }\r\n\r\n boolean collidedY = false;\r\n if (!v1.isEmpty())\r\n {\r\n if (v1.y >= 0)\r\n {\r\n entity.onGround = true;\r\n entity.fallDistance = 0;\r\n entity.fall(entity.fallDistance, 0);\r\n }\r\n else if (v1.y < 0)\r\n {\r\n boolean below = entity.posY + entity.height - (entity.motionY + motionY) < posY;\r\n if (below)\r\n {\r\n v1.y = 0;\r\n }\r\n }\r\n if (v1.x != 0) entity.motionX = 0;\r\n if (v1.y != 0) entity.motionY = motionY;\r\n if (v1.z != 0) entity.motionZ = 0;\r\n if (v1.y != 0) collidedY = true;\r\n v1.addTo(v.set(entity));\r\n v1.moveEntity(entity);\r\n }\r\n if (entity instanceof EntityPlayer)\r\n {\r\n EntityPlayer player = (EntityPlayer) entity;\r\n if (Math.abs(player.motionY) < 0.1 && !player.capabilities.isFlying)\r\n {\r\n entity.onGround = true;\r\n entity.fallDistance = 0;\r\n }\r\n if (!player.capabilities.isCreativeMode && !player.worldObj.isRemote)\r\n {\r\n EntityPlayerMP entityplayer = (EntityPlayerMP) player;\r\n if (collidedY) entityplayer.playerNetServerHandler.floatingTickCount = 0;\r\n }\r\n }\r\n }",
"public static long getTotalHitTime() {\r\n return _time;\r\n }",
"public int getGameBoundary() {\n\t\treturn gameEngine.getBoundary();\n\t}",
"@Override\n\tpublic void collide(Entity e) {\n\n\t}",
"private Entity findClosestStructureOfPlayer(Coordinate coordinate) {\n // TODO: Optimize\n // Perhaps have a 'satisfying distance' ? ie, whenever it finds one within this distance, stop searching?\n // Do not loop over everything?\n // Move to EntityRepository?\n PredicateBuilder predicateBuilder = Predicate.builder().forPlayer(player).ofType(EntityType.STRUCTURE);\n EntitiesSet allStructuresForPlayer = entityRepository.filter(predicateBuilder.build());\n\n float closestDistanceFoundSoFar = 320000; // Get from Map!? (width * height) -> get rid of magic number\n Entity closestEntityFoundSoFar = null;\n\n for (Entity entity : allStructuresForPlayer) {\n float distance = entity.getCenteredCoordinate().distance(coordinate);\n if (distance < closestDistanceFoundSoFar) {\n closestEntityFoundSoFar = entity;\n closestDistanceFoundSoFar = distance;\n }\n }\n return closestEntityFoundSoFar;\n }",
"private long getGameDuration() {\n return ((System.currentTimeMillis() - startGameTime) / 1000);\n }",
"@Override\n\tpublic void onUpdate()\n\t{\n\t\tthis.lastTickPosX = this.posX;\n\t\tthis.lastTickPosY = this.posY;\n\t\tthis.lastTickPosZ = this.posZ;\n\t\tsuper.onUpdate();\n\n\t\tif (this.throwableShake > 0)\n\t\t{\n\t\t\t--this.throwableShake;\n\t\t}\n\n\t\tif (this.inGround)\n\t\t{\n\t\t\tif (this.worldObj.getBlockState(this.getPosition()).getBlock() == this.inTile)\n\t\t\t{\n\t\t\t\t++this.ticksInGround;\n\n\t\t\t\tif (this.ticksInGround == 1200)\n\t\t\t\t{\n\t\t\t\t\tthis.setDead();\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.inGround = false;\n\t\t\tthis.motionX *= this.rand.nextFloat() * 0.2F;\n\t\t\tthis.motionY *= this.rand.nextFloat() * 0.2F;\n\t\t\tthis.motionZ *= this.rand.nextFloat() * 0.2F;\n\t\t\tthis.ticksInGround = 0;\n\t\t\tthis.ticksInAir = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t++this.ticksInAir;\n\t\t}\n\n\t\tVec3 vec3 = new Vec3(this.posX, this.posY, this.posZ);\n\t\tVec3 vec31 = new Vec3(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n\t\tMovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31);\n\t\tvec3 = new Vec3(this.posX, this.posY, this.posZ);\n\t\tvec31 = new Vec3(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n\n\t\tif (movingobjectposition != null)\n\t\t{\n\t\t\tvec31 = new Vec3(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);\n\t\t}\n\n\t\tif (!this.worldObj.isRemote)\n\t\t{\n\t\t\tEntity entity = null;\n\t\t\tList list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this,\n\t\t\t\t\tthis.getEntityBoundingBox().addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));\n\t\t\tdouble d0 = 0.0D;\n\t\t\tEntityLivingBase entitylivingbase = this.getThrower();\n\n\t\t\tfor (Object obj : list)\n\t\t\t{\n\t\t\t\tEntity entity1 = (Entity) obj;\n\n\t\t\t\tif (entity1.canBeCollidedWith() && ((entity1 != entitylivingbase) || (this.ticksInAir >= 5)))\n\t\t\t\t{\n\t\t\t\t\tfloat f = 0.3F;\n\t\t\t\t\tAxisAlignedBB axisalignedbb = entity1.getEntityBoundingBox().expand(f, f, f);\n\t\t\t\t\tMovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31);\n\n\t\t\t\t\tif (movingobjectposition1 != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble d1 = vec3.distanceTo(movingobjectposition1.hitVec);\n\n\t\t\t\t\t\tif ((d1 < d0) || (d0 == 0.0D))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tentity = entity1;\n\t\t\t\t\t\t\td0 = d1;\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\tif (entity != null)\n\t\t\t{\n\t\t\t\tmovingobjectposition = new MovingObjectPosition(entity);\n\t\t\t}\n\t\t}\n\n\t\tif (movingobjectposition != null)\n\t\t{\n\t\t\tif ((movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)\n\t\t\t\t\t&& (this.worldObj.getBlockState(movingobjectposition.getBlockPos()).getBlock() == Blocks.portal))\n\t\t\t{\n\t\t\t\tthis.inPortal = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.onImpact(movingobjectposition);\n\t\t\t}\n\t\t}\n\n\t\tthis.posX += this.motionX;\n\t\tthis.posY += this.motionY;\n\t\tthis.posZ += this.motionZ;\n\t\tfloat f1 = MathHelper.sqrt_double((this.motionX * this.motionX) + (this.motionZ * this.motionZ));\n\t\tthis.rotationYaw = (float) ((Math.atan2(this.motionX, this.motionZ) * 180.0D) / Math.PI);\n\n\t\tfor (this.rotationPitch = (float) ((Math.atan2(this.motionY, f1) * 180.0D) / Math.PI); (this.rotationPitch\n\t\t\t\t- this.prevRotationPitch) < -180.0F; this.prevRotationPitch -= 360.0F)\n\t\t{\n\t\t}\n\n\t\twhile ((this.rotationPitch - this.prevRotationPitch) >= 180.0F)\n\t\t{\n\t\t\tthis.prevRotationPitch += 360.0F;\n\t\t}\n\n\t\twhile ((this.rotationYaw - this.prevRotationYaw) < -180.0F)\n\t\t{\n\t\t\tthis.prevRotationYaw -= 360.0F;\n\t\t}\n\n\t\twhile ((this.rotationYaw - this.prevRotationYaw) >= 180.0F)\n\t\t{\n\t\t\tthis.prevRotationYaw += 360.0F;\n\t\t}\n\n\t\tthis.rotationPitch = this.prevRotationPitch + ((this.rotationPitch - this.prevRotationPitch) * 0.2F);\n\t\tthis.rotationYaw = this.prevRotationYaw + ((this.rotationYaw - this.prevRotationYaw) * 0.2F);\n\t\tfloat f2 = 0.99F;\n\t\tfloat f3 = this.getGravityVelocity();\n\n\t\tif (this.isInWater())\n\t\t{\n\t\t\tfor (int i = 0; i < 4; ++i)\n\t\t\t{\n\t\t\t\tfloat f4 = 0.25F;\n\t\t\t\tthis.worldObj.spawnParticle(EnumParticleTypes.WATER_BUBBLE, this.posX - (this.motionX * f4), this.posY - (this.motionY * f4),\n\t\t\t\t\t\tthis.posZ - (this.motionZ * f4), this.motionX, this.motionY, this.motionZ);\n\t\t\t}\n\n\t\t\tf2 = 0.8F;\n\t\t}\n\n\t\tthis.motionX *= f2;\n\t\tthis.motionY *= f2;\n\t\tthis.motionZ *= f2;\n\t\tthis.motionY -= f3;\n\t\tthis.setPosition(this.posX, this.posY, this.posZ);\n\t}",
"private boolean isCollision(Date currentStart, Date currentEnd,\n Date otherStart, Date otherEnd)\n {\n return currentStart.compareTo(otherEnd) <= 0\n && otherStart.compareTo(currentEnd) <= 0;\n }",
"public double getMaxTimeDiff()\n\t{\n\t\treturn 0;\n\t}",
"public void onUpdate()\n/* 24: */ {\n/* 25:22 */ super.onUpdate();\n/* 26:23 */ if ((!this.owner.worldObj.isRemote) && \n/* 27:24 */ (this.wolf == null) && (this.owner.ticksExisted % 100 == 0))\n/* 28: */ {\n/* 29:25 */ EntityWolf closestWolf = null;\n/* 30:26 */ double dist = 256.0D;\n/* 31:27 */ List<Entity> list = this.owner.worldObj.getEntitiesWithinAABBExcludingEntity(this.owner, this.owner.boundingBox.expand(5.0D, 1.0D, 5.0D));\n/* 32:28 */ for (Entity e : list) {\n/* 33:29 */ if ((e instanceof EntityWolf))\n/* 34: */ {\n/* 35:30 */ EntityWolf f = (EntityWolf)e;\n/* 36:31 */ if (f.getLeashed())\n/* 37: */ {\n/* 38:32 */ if (f.getLeashedToEntity() == this.owner)\n/* 39: */ {\n/* 40:33 */ closestWolf = f;\n/* 41:34 */ dist = 0.0D;\n/* 42: */ }\n/* 43: */ }\n/* 44:37 */ else if ((f.func_152113_b() == \"\") || (f.func_152113_b().equals(this.owner.func_152113_b())))\n/* 45: */ {\n/* 46:38 */ double currentDist = this.owner.getDistanceSqToEntity(f);\n/* 47:39 */ if (currentDist < dist)\n/* 48: */ {\n/* 49:40 */ closestWolf = f;\n/* 50:41 */ dist = currentDist;\n/* 51: */ }\n/* 52: */ }\n/* 53: */ }\n/* 54: */ }\n/* 55:46 */ if (closestWolf != null)\n/* 56: */ {\n/* 57:47 */ this.wolf = closestWolf;\n/* 58:48 */ this.wolf.setLeashedToEntity(this.owner, true);\n/* 59:49 */ if (!closestWolf.isSitting()) {\n/* 60:51 */ closestWolf.setSitting(false);\n/* 61: */ }\n/* 62: */ }\n/* 63: */ }\n/* 64:56 */ if (this.wolf != null)\n/* 65: */ {\n/* 66:57 */ EntityLivingBase target = this.owner.getAttackTarget();\n/* 67:58 */ if (target != null) {\n/* 68:59 */ this.wolf.setAttackTarget(target);\n/* 69: */ }\n/* 70:62 */ if (!this.wolf.isEntityAlive()) {\n/* 71:63 */ this.wolf = null;\n/* 72:64 */ } else if (this.wolf.getLeashedToEntity() != this.owner) {\n/* 73:65 */ this.wolf = null;\n/* 74: */ }\n/* 75: */ }\n/* 76: */ }",
"public void tick() {\n if (!isActive || !entities[0].canCollide || !entities[1].canCollide) {\n return;\n }\n\n rectangles[0].x = boundaries[0].x - 1;\n rectangles[1].x = boundaries[1].x - 1;\n rectangles[0].y = boundaries[0].y - 1;\n rectangles[1].y = boundaries[1].y - 1;\n\n isCollided = rectangles[0].intersects(rectangles[1]);\n\n if (isCollided && !firedEvent) {\n lastEvent = new EntityEntityCollisionEvent(this);\n onCollide();\n start(lastEvent);\n firedEvent = true;\n }\n if (!isCollided && firedEvent) {\n onCollisionEnd();\n end(lastEvent);\n firedEvent = false;\n }\n if (previouslyCollided != isCollided) {\n setBoundaryColors();\n }\n\n previouslyCollided = isCollided;\n }",
"public long getElapsedTimeMin() {\n return running ? (((System.currentTimeMillis() - startTime) / 1000) / 60 ) % 60 : 0;\n }",
"@Override\n public void move(Entity e) {\n\n if (Collsiontick > 0) {\n Collsiontick--;\n }\n tick++;\n float deltax = x - player.x;\n float deltay = y - player.y;\n float speed = getSpeed();\n if(Math.abs(speed) < 0.1 && Collsiontick/50<=1){\n float theta = (float) (Math.atan(deltay / deltax) + Math.PI);\n xv = (float) ((TOP_SPEED * Math.cos(theta)));\n yv = (float) ((TOP_SPEED * Math.sin(theta)));\n if (deltax < 0) {\n xv = -xv;\n yv = -yv;\n }\n }\n \n xv = Util.doFrictionX(xv, yv, FRICTION);\n yv = Util.doFrictionY(xv, yv, FRICTION);\n \n \n x += xv;\n y += yv;\n\n shape = (Polygon) shape.transform(Transform.createTranslateTransform(xv, yv));\n }",
"public void tick() {\n\t\tif (mainRef.player().getPos()[1] <= lastEnd.getPos()[1] + 2000)\r\n\t\t\tloadNextMap();\r\n\r\n\t\tfor (GameObject go : gameObjects)\r\n\t\t\tgo.tick();\r\n\r\n\t\t// Check Player Collision\r\n\t\t// Top-Left\r\n\t\tPointColObj cTL = new PointColObj(mainRef.player().getPos()[0] + mainRef.player().getCol()[2],\r\n\t\t\t\tmainRef.player().getPos()[1] + mainRef.player().getCol()[3]);\r\n\t\t// Top-Right\r\n\t\tPointColObj cTR = new PointColObj(mainRef.player().getPos()[0] + mainRef.player().getCol()[2],\r\n\t\t\t\tmainRef.player().getPos()[1] + mainRef.player().getCol()[3] + mainRef.player().getCol()[1]);\r\n\t\t// Bottom-Left\r\n\t\tPointColObj cBL = new PointColObj(\r\n\t\t\t\tmainRef.player().getPos()[0] + mainRef.player().getCol()[2] + mainRef.player().getCol()[0],\r\n\t\t\t\tmainRef.player().getPos()[1] + mainRef.player().getCol()[3]);\r\n\t\t// Bottom-Right\r\n\t\tPointColObj cBR = new PointColObj(\r\n\t\t\t\tmainRef.player().getPos()[0] + mainRef.player().getCol()[2] + mainRef.player().getCol()[0],\r\n\t\t\t\tmainRef.player().getPos()[1] + mainRef.player().getCol()[3] + mainRef.player().getCol()[1]);\r\n\r\n\t\t// Inverse Collision, no part of the player's ColBox should be not\r\n\t\t// colliding...\r\n\t\tif (checkCollisionWith(cTL).size() == 0 || checkCollisionWith(cTR).size() == 0\r\n\t\t\t\t|| checkCollisionWith(cBL).size() == 0 || checkCollisionWith(cBR).size() == 0) {\r\n\t\t\t// If it would have left the bounding box of the floor, reverse the\r\n\t\t\t// player's posiiton\r\n\t\t\tmainRef.player().setMoveBack(true);\r\n\t\t} else\r\n\t\t\tmainRef.player().setMoveBack(false);\r\n\r\n\t\t// Check General Collision\r\n\t\tArrayList<GameObject> allCol = checkCollisionWith(mainRef.player());\r\n\t\tfor (GameObject go : allCol) {\r\n\t\t\tif (go instanceof Tile) {\r\n\t\t\t\tTile gameTile = (Tile) go;\r\n\t\t\t\tif (gameTile.getType() == GameObjectRegistry.TILE_WALL\r\n\t\t\t\t\t\t|| gameTile.getType() == GameObjectRegistry.TILE_BASE\r\n\t\t\t\t\t\t|| gameTile.getType() == GameObjectRegistry.TILE_DOOR\r\n\t\t\t\t\t\t|| gameTile.getType() == GameObjectRegistry.TILE_SEWER\r\n\t\t\t\t\t\t|| (gameTile.getType() == GameObjectRegistry.TILE_WATERFALL && gameTile.getVar() == 0)) {\r\n\t\t\t\t\tmainRef.player().setMoveBack(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} else if (go instanceof LineColObjHor || go instanceof LineColObjVert) {\r\n\t\t\t\tmainRef.player().setMoveBack(true);\r\n\t\t\t\tbreak;\r\n\t\t\t} else if (go instanceof SkillDrop) {\r\n\t\t\t\tSkillDrop d = (SkillDrop) go;\r\n\t\t\t\tmainRef.player().getInv()[d.getVariation()]++;\r\n\t\t\t\tremoveGameObject(go);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}",
"private long getDistanceFromSecondMark(){\n long numSecsElapsed = (long)Math.floor(timeElapsed / WorkoutStatic.ONE_SECOND);\n return timeElapsed - numSecsElapsed * WorkoutStatic.ONE_SECOND;\n }",
"@Override\r\n\tpublic double getMinimalCostToReach(Robot robot, long x, long y)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn robot.getEnergyRequiredToReach(new Position(x, y));\r\n\t\t}\r\n\t\tcatch(IllegalBoardException exc)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The given robot is not placed on a board..\");\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tcatch(IllegalStateException exc)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The given robot is terminated.\");\r\n\t\t\treturn -1; \r\n\t\t}\r\n\t}",
"public Time getBestTime()\n\t{\n\t\treturn bestTime;\n\t}",
"public static Location getEntityCenter(Entity entity) {\n\t\treturn entity.getBoundingBox().getCenter().toLocation(entity.getWorld());\n\t}",
"public static double getGMapTravelTimeMin(Location a, Location b, DbHelper db) throws SQLException, ClassNotFoundException, IllegalAccessException, InstantiationException, GeoCodeApiException {\n\t\tdouble distance = Utility.calculateDistanceKm(a, b, db);\n\t\tif (distance<0)\n\t\t\treturn 0;\n\t\treturn distance/50*60;\n\t}",
"public void collideBoundary(){\n\t \tint bulletBouncer = 0;\n\t \tif ((this.getPosition()[0]-(this.getRadius()) <= 0.0 || (this.getPosition()[0]+(this.getRadius()) >= this.superWorld.getWorldWidth()))){\n\t \t\tif (this instanceof Bullet){\n\t \t\t\tbulletBouncer++;\n\t \t}\n\t \t\tthis.velocity.setXYVelocity( this.velocity.getVelocity()[0] * -1);\n\t \t}\n\t \tif ((this.getPosition()[1]-(this.getRadius()) <= 0.0 || (this.getPosition()[1]+(this.getRadius()) >= this.superWorld.getWorldHeight()))){\n\t \t\tif (this instanceof Bullet){\n\t \t\tbulletBouncer++;\n\t \t}\n\t \t\tthis.velocity.setYVelocity(this.velocity.getVelocity()[1] * -1);\n\t \t} \t\n\t \tif (this instanceof Bullet){\n\t \tBullet bullet = (Bullet) this;\n\t \tfor (int i = 0; i < bulletBouncer; i++){\n\t \t\tif (!bullet.isTerminated())\n\t \t\tbullet.bouncesCounter();\n\t \t}\n\t \t}\n\t }",
"public Long getTimeLapsed() {\r\n\t\tif(moodTimestamp == null) \r\n\t\t\treturn null;\r\n\t\telse \r\n\t\t\treturn ((System.currentTimeMillis()/1000) - moodTimestamp.longValue());\r\n\t}",
"public static double distanceFallen(double time){\n return square(time)*(9.8)*(.5);\n }",
"public byte collide(byte inBoundState){\n byte[] poss = collisions[(int)inBoundState].resultingState;\n if(poss.length==1){\n return poss[0];\n }\n else{\n int ndx = rand.nextInt(poss.length - 1);\n return poss[ndx];\n }\n }",
"private EntityCocoon getConsumableCocoon()\n\t{\n\t\tfinal List<Entity> nearbyCocoons = RadixLogic.getAllEntitiesOfTypeWithinDistance(EntityCocoon.class, this, 5);\n\t\tEntityCocoon nearestCocoon = null;\n\t\tdouble lowestDistance = 100D;\n\n\t\tfor (final Entity entity : nearbyCocoons)\n\t\t{\n\t\t\tEntityCocoon cocoon = (EntityCocoon)entity;\n\t\t\tfinal double distanceToCurrentEntity = RadixMath.getDistanceToEntity(this, cocoon);\n\n\t\t\tif (!cocoon.isEaten() && distanceToCurrentEntity < lowestDistance)\n\t\t\t{\n\t\t\t\tlowestDistance = distanceToCurrentEntity;\n\t\t\t\tnearestCocoon = cocoon;\n\t\t\t}\n\t\t}\n\n\t\treturn nearestCocoon;\n\t}",
"public int checkCollisions() {\r\n\t\tArrayList<Comet> comets = Comet.getCometList();\r\n\r\n\t\tfor (int i = 0; i < comets.size(); i++) {\r\n\t\t\tComet tempComet = comets.get(i);\r\n\r\n\t\t\tif (getBounds().intersects(tempComet.getBounds())) {\r\n\t\t\t\tComet.removeComet(tempComet);\r\n\t\t\t\tcol++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn col;\r\n\t}",
"@java.lang.Override\n public long getMinigameEndMs() {\n return minigameEndMs_;\n }",
"public void collide(Entity entity) throws IllegalArgumentException{\n\t \n \tif (this instanceof Ship && entity instanceof Ship) this.defaultCollide(entity);\n \telse if (this instanceof MinorPlanet && entity instanceof MinorPlanet) this.defaultCollide(entity);\n \telse if (entity instanceof Bullet) {\n \t\tBullet bullet = (Bullet) entity;\n \t\tif (bullet.getBulletSource() == this) bullet.bulletCollideOwnShip((Ship) this);\n \t\telse bullet.bulletCollideSomethingElse(this);\n \t\t}\n \t\n \telse if (this instanceof Bullet) {\n \t\tBullet bullet = (Bullet) this;\n \t\tif (bullet.getBulletSource() == entity) bullet.bulletCollideOwnShip((Ship) entity);\n \t\telse bullet.bulletCollideSomethingElse(entity);\n \t\t}\n \t\n \telse if ((this instanceof Ship && entity instanceof Asteroid) || (entity instanceof Ship && this instanceof Asteroid)){\n \t\tShip ship = null;\n \t\tif (this instanceof Ship){\n \t\t\tship = (Ship) this;\n \t\t} else {\n \t\t\tship = (Ship) entity;\n \t\t}\n \t\tship.terminate();\n \t}\n \t\n \telse if ((this instanceof Ship && entity instanceof Planetoid) || (entity instanceof Ship && this instanceof Planetoid)){\n \t\tShip ship = null;\n \t\tif (this instanceof Ship){\n \t\t\tship = (Ship) this;\n \t\t} else {\n \t\t\tship = (Ship) entity;\n \t\t}\n \t\t\n \t\tWorld world = ship.getSuperWorld();\n \t\tdouble xnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth());\n \t\tdouble ynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight());\n \t\tship.setPosition(xnew, ynew);\n \t\t\n \t\twhile (! this.overlapAnyEntity()){\n \t\t\txnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth());\n \t\t\tynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight());\n \t\t\tship.setPosition(xnew, ynew);\n \t\t\t}\n \t}\n\t \t\n \t\n }",
"public static int searchForIntervalBoundary(long time) {\n\n int intakeIndex = 1;\n\n for (int i = theirIntakes.size() - 1; i > 0; i--) {\n if (theirIntakes.get(i).getCreationTime() < time) {\n intakeIndex = i;\n break;\n }\n }\n\n return intakeIndex;\n\n }",
"public double getDistanceBetweenEdge(Entity entity) throws IllegalArgumentException{\n \tif(this == entity) throw new IllegalArgumentException(\"this == entity @ getDistanceBetweenEdge\");\n \treturn getDistanceBetweenCenter(entity) - this.getRadius() - entity.getRadius();\n \t\n }",
"public double getMinTimeBetweenCarArrivals() {\n return minTimeBetweenCarArrivals;\n }",
"private double calcMinTime(List<FogDevice> fogDevices, List<? extends Cloudlet> cloudletList) {\n double minTime = 0;\n double totalLength = 0;\n double totalMips = 0;\n for(Cloudlet cloudlet : cloudletList) {\n totalLength += cloudlet.getCloudletLength();\n }\n for(FogDevice fogDevice : fogDevices) {\n totalMips += fogDevice.getHost().getTotalMips();\n }\n minTime = totalLength / totalMips;\n return minTime;\n }",
"Entity getClosestEnemy(Collection<Entity> attackable, Entity entity, ServerGameModel model) {\n return attackable.stream().min((e1, e2) ->\n Double.compare(util.Util.dist(e1.getX(), e1.getY(), entity.getX(), entity.getY()),\n util.Util.dist(e2.getX(), e2.getY(), entity.getX(), entity.getY()))).get();\n }",
"private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}",
"public double getWorkTime()\n {\n if (cFixedServiceTimed)\n {\n return (mServerConfig.mServiceTime);\n }\n double tBase;\n double tDelta;\n switch (mHoldType)\n {\n case cHoldNormal:\n return (cRandom.normal(mServerConfig.mServiceTime, mServerConfig.mServiceTime * 0.1)); //0.3\n\n case cHoldNegexp:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = 1.0 / (mServerConfig.mServiceTime * 0.50);\n return (tBase + cRandom.negexp(tDelta));\n\n case cHoldPoisson:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = mServerConfig.mServiceTime * 0.50;\n return (tBase + cRandom.poisson(tDelta));\n\n case cHoldUniform:\n return (cRandom.uniform(mServerConfig.mServiceTime * 0.75, mServerConfig.mServiceTime * 1.5));\n }\n return 0.0;\n }",
"private synchronized double getCurrentObstaclePotential(){\n double obstacleField = 0;\n double obstaclePotential = 0;\n double goalPotential = 0;\n\n for(LidarPoint obstacle : obstaclePoints){\n //Generate obstacle positions\n Position obstaclePosition = new Position(-obstacle.getX(), -obstacle.getZ());\n //System.out.println(\"Current: \"+currentPosition);\n //System.out.println(\"Obstacle: \"+obstaclePosition);\n //Calculate distance from obstacle to eliminate out of range o's\n double obstacleDistance = getEuclidean(this.currentPosition, obstaclePosition);\n //System.out.println(\"Distance = \"+obstacleDistance);\n\n if((obstacleDistance < DEFAULT_SENSOR_RANGE) && !(DEFAULT_OBSTACLE_COEFFICIENT == 0)){ // might add obst coeff\n //Calculate field: increases if close to obstacle\n obstacleField += Math.pow(Math.E, -1/(DEFAULT_SENSOR_RANGE-obstacleDistance))/obstacleDistance;\n //System.out.println(\"Obstacle Field: \" + obstacleField);\n }\n }\n\n //Calculate Potentials\n goalPotential = DEFAULT_GOAL_COEFFICIENT * Math.pow(getEuclidean(currentPosition, goalPosition), 2);\n obstaclePotential = DEFAULT_OBSTACLE_COEFFICIENT * obstacleField;\n\n double totalPot = goalPotential + obstaclePotential;\n return totalPot;\n }",
"public long startTimeNanos();",
"private void checkRegTileCollisions(float deltaTime) {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\t//overlap between player and tile\n\t\t\t\n\t\t\t//experiment with these values to get close to perfect collisions *************************\n\t\t\ttry {\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t\n\t\t\t\t\t//check y - collisions\n\t\t\t\t\tif(player.position.y > tile.position.y + (tile.bounds.height / 2) && player.position.x - (player.bounds.width / 2) + correctionFactor < tile.position.x + (tile.bounds.width / 2) && player.position.x + (player.bounds.width / 2) - correctionFactor > tile.position.x - (tile.bounds.width / 2)) {\n\t\t\t\t\t\tplayer.velocity.y = 0;\n\t\t\t\t\t\tplayer.position.y = tile.position.y + 1;\n\t\t\t\t\t\tif(player.velocity.x > 3) {\n\t\t\t\t\t\t\tplayer.velocity.x -= 0.2f; //prev. optimal was .3\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(player.position.y < tile.position.y - (tile.bounds.height / 2) && player.position.x - (player.bounds.width / 2) + correctionFactor < tile.position.x + (tile.bounds.width / 2) && player.position.x + (player.bounds.width / 2) - correctionFactor > tile.position.x - (tile.bounds.width / 2)) {\n\t\t\t\t\t\tplayer.velocity.y = 0;\n\t\t\t\t\t\tplayer.position.y = tile.position.y - 1;\n\t\t\t\t\t\tif(player.velocity.x > 3) {\n\t\t\t\t\t\t\tplayer.velocity.x -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//check x - collision\n\t\t\t\t\tif(player.position.x > tile.position.x + (tile.bounds.width / 2) + correctionFactor && player.position.y - (player.bounds.height / 2) + correctionFactor < tile.position.y + (tile.bounds.height / 2) && player.position.y + (player.bounds.height / 2) - correctionFactor > tile.position.y - (tile.bounds.height / 2)) {\n\t\t\t\t\t\tplayer.velocity.x = 0;\n\t\t\t\t\t\txColliding = true;\n\t\t\t\t\t\tplayer.position.x = tile.position.x + 1; //animate possibly\n\t\t\t\t\t\tif(player.velocity.y > 0) {\n\t\t\t\t\t\t\t//player.velocity.y -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(player.position.x < tile.position.x - (tile.bounds.width / 2) - correctionFactor && player.position.y - (player.bounds.height / 2) + correctionFactor < tile.position.y + (tile.bounds.height / 2) && player.position.y + (player.bounds.height / 2) - correctionFactor > tile.position.y - (tile.bounds.height / 2)) {\n\t\t\t\t\t\tplayer.velocity.x = 0;\n\t\t\t\t\t\txColliding = true;\n\t\t\t\t\t\tplayer.position.x = tile.position.x - 1; //animate possibly\n\t\t\t\t\t\tif(player.velocity.y > 0) {\n\t\t\t\t\t\t\t//player.velocity.y -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t} catch (Exception e) {}\n\t\t}\n\t\trecheckTileCollisions(); //fix frame-skipping \n\t}",
"public double inRangeOfCharacter(Character character, MovingEntity entity, int radius){\r\n double characterX = character.getX();\r\n double characterY = character.getY();\r\n\r\n double entityX = entity.getX();\r\n double entityY = entity.getY();\r\n\r\n double deltaX = characterX - entityX;\r\n double deltaY = characterY - entityY;\r\n\r\n double distanceSquared = Math.pow(deltaX, 2) + Math.pow(deltaY, 2);\r\n double radiusSquared = Math.pow(radius, 2); \r\n\r\n if(distanceSquared <= radiusSquared) {\r\n return distanceSquared;\r\n }\r\n\r\n return -1;\r\n\r\n }",
"public double getCircleTime();",
"public abstract float getWidth(EntityLivingBase target);",
"public int getMinFloor();",
"double getFullTime();",
"MinmaxEntity getStart();",
"private double getEndRotationMomentumOnCollisionWith(AdvancedPhysicDrawnObject other)\n\t{\n\t\treturn (getRotationMomentum() * (this.currentMomentMass - \n\t\t\t\tother.currentMomentMass) + 2 * this.currentMomentMass * other.getRotationMomentum()) / \n\t\t\t\t(this.currentMomentMass + other.currentMomentMass);\n\t}",
"public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }",
"public int adjustedAge(Entity entity) {\n if (lastTargeted.containsKey(entity.getUniqueId())) {\n return entity.getTicksLived() - lastTargeted.get(entity.getUniqueId());\n } else {\n return entity.getTicksLived();\n }\n }",
"public double getBlockDelay()\n {\n if (mBlockedTime == 0)\n {\n return 0.0;\n }\n\n double tBlockDelay = mBlockedTime - time();\n mBlockedTime = 0;\n if (tBlockDelay <= 0)\n {\n return 0.0;\n }\n mBlockedMessage.add(mName + \" GC blocked from \" + time() + \" + until \" + (time() + tBlockDelay));\n return tBlockDelay;\n }",
"public static Player nearestPlayer(Entity entity, double radius) {\n Player player = null;\n double shortest = (radius * radius) + 1;\n double distSq;\n for (Player p : entity.getWorld().getPlayers()) {\n if (p.isDead() || !p.getGameMode().equals(GameMode.SURVIVAL)) continue;\n if (!entity.getWorld().equals(p.getWorld())) continue;\n distSq = entity.getLocation().distanceSquared(p.getLocation()); //3D distance\n if (distSq < shortest) {\n player = p;\n shortest = distSq;\n }\n }\n return player;\n }",
"public long getMinTime()\n {\n return times[0];\n }",
"private int calculateLatestStartViolation(Game game, int time) {\n if (time > game.getLatestStart()) {\n return time - game.getLatestStart();\n }\n return 0;\n }",
"boolean collideWithVehicles(Vehicle v);",
"public final long getNearCacheTime() {\n\t\treturn m_nearCacheTime;\n\t}",
"public Double getBestTime() {\n return bestTime;\n }",
"private void CheckWorldCollision() {\n\t\tfor(WorldObj obj : World.CurrentWorld.SpawnedObjects) {\n\t\t\tif(bounds.overlaps(obj.bounds))\n\t\t\t\tobj.OnCollision(this);\n\t\t\tif(MapRenderer.CurrentRenderer.ItemAnimation != null) {\n\t\t\t\tif(obj.ai != null) {\n\t\t\t\t\tif(dir == LEFT)\n\t\t\t\t\tAttackBounds.set(pos.x+(dir*1.35f)+0.5f,pos.y,1.35f,1);\n\t\t\t\t\telse\n\t\t\t\t\t\tAttackBounds.set(pos.x+0.5f,pos.y,1.35f,1);\n\t\t\t\t\tif(obj.healthBarTimer > 0.4f)\n\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\tif(!Terrain.CurrentTerrain.isSolid((int)(pos.x+0.5f+(0.3f*dir)), (int)(pos.y+0.5f)))\n\t\t\t\t\tobj.ai.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\tHitTimer = 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(obj.damageable) {\n\t\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\t\tobj.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testOverboundsInside() {\n Coordinate a, b, c, d;\n a = new Coordinate2D(2, 2, 0);\n b = new Coordinate2D(3, 3, 0);\n c = new Coordinate2D(2, 0, 0);\n d = new Coordinate2D(4, 2, 0);\n\n int actual, expected;\n\n expected = 0;\n actual = hex.getDistanceOverBoundary(a);\n assertEquals(expected, actual);\n\n expected = 0;\n actual = hex.getDistanceOverBoundary(b);\n assertEquals(expected, actual);\n\n expected = 0;\n actual = hex.getDistanceOverBoundary(c);\n assertEquals(expected, actual);\n\n expected = 0;\n actual = hex.getDistanceOverBoundary(d);\n assertEquals(expected, actual);\n }",
"public void testContinuity() {\n double endtime = 2 * racetrack.getPerimeter() / racetrack.getVelocity();\n double rotationEpsilon = 0.000000001;\n double bounds = velocity * dt + rotationEpsilon;\n continuity(racetrack, 0, endtime, dt, bounds);\n }",
"@Override\n\tpublic long getTimeLapsed(long start, long end) {\n\t\tlong difference=(end - start);\n\t\treturn difference;\t}",
"public static long getElapsedTime() {\n long time = System.currentTimeMillis() - START_TIME;\n // long time = System.nanoTime() / 1000000;\n return time;\n }",
"public boolean CheckTimeInLevel(){\n \n Long comparetime = ((System.nanoTime() - StartTimeInLevel)/1000000000);\n \n return (comparetime>TILData.critpoints.get((int)speed));\n // stop tetris because this subject is an outlier for this level\n \n \n }",
"public float getMaxTimeSeconds() { return getMaxTime()/1000f; }",
"Rectangle getCollisionBox();"
]
| [
"0.7005157",
"0.5429021",
"0.53298783",
"0.5285322",
"0.5271097",
"0.51907206",
"0.5107394",
"0.5078434",
"0.5066215",
"0.50583047",
"0.5044788",
"0.5018856",
"0.49438167",
"0.49156576",
"0.48840287",
"0.48689052",
"0.4848054",
"0.4840203",
"0.4808922",
"0.48067486",
"0.47940093",
"0.47501856",
"0.473072",
"0.46727404",
"0.46719873",
"0.46711993",
"0.46394187",
"0.46252266",
"0.46210256",
"0.4616065",
"0.4615471",
"0.4596844",
"0.45924252",
"0.45897788",
"0.45876464",
"0.45768917",
"0.45741475",
"0.45727518",
"0.45641848",
"0.45595178",
"0.45530805",
"0.4548577",
"0.45482934",
"0.45478353",
"0.454317",
"0.4533395",
"0.4527626",
"0.4520805",
"0.45175827",
"0.4516567",
"0.45111433",
"0.451057",
"0.45092967",
"0.44955817",
"0.44917426",
"0.44894534",
"0.44889408",
"0.44881776",
"0.44853765",
"0.4481723",
"0.44770417",
"0.44766915",
"0.44606128",
"0.44577184",
"0.4436895",
"0.44358307",
"0.44298983",
"0.44232488",
"0.4422759",
"0.44178316",
"0.441262",
"0.44121814",
"0.4412128",
"0.44073534",
"0.44053504",
"0.44049218",
"0.44041076",
"0.4401282",
"0.44006917",
"0.43875727",
"0.43874055",
"0.43857628",
"0.4381693",
"0.43765515",
"0.43741417",
"0.43721598",
"0.43696874",
"0.4364421",
"0.43633315",
"0.43628532",
"0.43588296",
"0.43576637",
"0.43542272",
"0.43489593",
"0.4348954",
"0.43489382",
"0.4342449",
"0.43408152",
"0.43389088",
"0.43360463"
]
| 0.70539135 | 0 |
Return the first position at which the given entity will collide with the boundaries of its world. | public double[] getPositionCollisionBoundary(){
if (!Helper.isValidDouble(this.getTimeCollisionBoundary()) || this.superWorld == null) return null;
double[] pos = new double[2];
pos[0] = this.getPosition()[0] + (this.getVelocity()[0] * this.getTimeCollisionBoundary());
pos[1] = this.getPosition()[1] + (this.getVelocity()[1] * this.getTimeCollisionBoundary());
if (pos[0] + this.getRadius() >= this.superWorld.getWorldHeight()) pos[0]+= this.getRadius();
else if (pos[0] - this.getRadius() >= this.superWorld.getWorldHeight()) pos[0]-= this.getRadius();
else if (pos[1] + this.getRadius() >= this.superWorld.getWorldHeight()) pos[1]+= this.getRadius();
else pos[1] -= this.getRadius();
return pos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double[] getCollisionPosition(Entity otherEntity) throws IllegalArgumentException {\n\t\tif (otherEntity == null) \n\t\t\tthrow new IllegalArgumentException(\"Invalid argument object (null).\");\n\t\t\n\n\t\tif ( this.overlap(otherEntity) ) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif ( this.getTimeToCollision(otherEntity) == Double.POSITIVE_INFINITY)\n\t\t\treturn null;\n\n\t\tdouble collisionXSelf = this.getXCoordinate() + this.getTimeToCollision(otherEntity) * this.getXVelocity();\n\t\tdouble collisionYSelf = this.getYCoordinate() + this.getTimeToCollision(otherEntity) * this.getYVelocity();\n\n\t\tdouble collisionXOther = otherEntity.getXCoordinate() + otherEntity.getTimeToCollision(this) * otherEntity.getXVelocity();\n\t\tdouble collisionYOther = otherEntity.getYCoordinate() + otherEntity.getTimeToCollision(this) * otherEntity.getYVelocity();\n\t\t\n\t\tdouble collisionX;\n\t\tdouble collisionY;\n\t\t\n\t\tif (this.getXCoordinate() > otherEntity.getXCoordinate()) {\n\t\t\tcollisionX = collisionXSelf - Math.cos(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t\tcollisionY = collisionYSelf - Math.sin(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\tcollisionX = collisionXSelf + Math.cos(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t\tcollisionY = collisionYSelf + Math.sin(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t}\n\t\t\n\t\tdouble[] collision = {collisionX, collisionY};\n\t\treturn collision;\n\t\t\n\t}",
"public double[] getCollisionPosition(Entity entity) throws IllegalArgumentException{\n \n \tif (entity == null) throw new IllegalArgumentException(\"getCollisionPosition called with a non-existing circular object!\");\n\t\tif (this.overlap(entity)) throw new IllegalArgumentException(\"These two circular objects overlap!\");\n\t\tdouble timeToCollision = getTimeToCollision(entity);\n\t\t\t\n\t\tif (timeToCollision == Double.POSITIVE_INFINITY) return null;\n\t\t\n\t\tdouble[] positionThisShip = this.getPosition();\n\t\tdouble[] velocityThisShip = this.getVelocity();\n\t\tdouble[] positionShip2 = entity.getPosition();\n\t\tdouble[] velocityShip2 = entity.getVelocity();\n\t\t\n\t\tdouble xPositionCollisionThisShip = positionThisShip[0] + velocityThisShip[0] * timeToCollision;\n\t\tdouble yPositionCollisionThisShip = positionThisShip[1] + velocityThisShip[1] * timeToCollision;\n\t\t\n\t\tdouble xPositionCollisionShip2 = positionShip2[0] + velocityShip2[0] * timeToCollision;\n\t\tdouble yPositionCollisionShip2 = positionShip2[1] + velocityShip2[1] * timeToCollision;\n\t\t\n\t\tdouble slope = Math.atan2(yPositionCollisionShip2 - yPositionCollisionThisShip, xPositionCollisionShip2 - xPositionCollisionThisShip);\n\t\t\n\t\t\n\t\treturn new double[] {xPositionCollisionThisShip + Math.cos(slope) * this.getRadius(), yPositionCollisionThisShip + Math.sin(slope) * this.getRadius()};\n\t}",
"static Vector getEntityPosition(Entity entity, Object nmsEntity) {\n if(entity instanceof Hanging) {\n Object blockPosition = ReflectUtils.getField(nmsEntity, \"blockPosition\");\n return MathUtils.moveToCenterOfBlock(ReflectUtils.blockPositionToVector(blockPosition));\n } else {\n return entity.getLocation().toVector();\n }\n }",
"public static Location getEntityCenter(Entity entity) {\n\t\treturn entity.getBoundingBox().getCenter().toLocation(entity.getWorld());\n\t}",
"public Point2D getBombTileCenterPosition(GameObject node) {\n double x;\n double y;\n\n List<Rectangle> intersectingTiles = new ArrayList<>();\n for (Rectangle2D r : gameMatrix) {\n Rectangle currentMatrixTile = new Rectangle(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight());\n\n // check if rectangle of game matrix intersects with player bounds and harvest these in new array\n if (currentMatrixTile.getBoundsInParent().intersects(node.getBoundsInParent())) {\n intersectingTiles.add(currentMatrixTile);\n }\n }\n // if player bounds are completely in one tile\n if (intersectingTiles.size() == 1) {\n Rectangle r = intersectingTiles.get(0);\n x = r.getX() + (r.getWidth() / 2);\n y = r.getY() + (r.getHeight() / 2);\n return new Point2D(x, y);\n }\n // if player bounds are in more than one tile\n else {\n for (int i = 0; i < intersectingTiles.size(); i++) {\n Point2D playerCenterPosition = new Point2D(node.getX() + (node.getFitWidth() / 2), node.getY() + (node.getFitHeight() / 2));\n Rectangle currentTile = intersectingTiles.get(i);\n\n // the center position of the player should only exist in one tile at a time ...\n if (currentTile.contains(playerCenterPosition)) {\n return new Point2D(currentTile.getX() + (currentTile.getWidth() / 2), currentTile.getY() + (currentTile.getHeight() / 2));\n }\n }\n // a mystery\n return null;\n }\n }",
"public Entity getEntityOn(int x, int y) {\n\t\tfor (int s = 0; s < entities.size(); s++) {\n\t\t\tEntity i = entities.get(s);\n\t\t\tif (i.getX() >> 4 == x >> 4 && i.getY() >> 4 == y >> 4)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn null;\n\n\t}",
"public abstract boolean collide(int x, int y, int z, int dim, Entity entity);",
"private GObject getCollidingObject() {\n \tdouble x1 = ball.getX();\n \tdouble y1 = ball.getY();\n \tdouble x2 = x1 + BALL_RADIUS * 2;\n \tdouble y2 = y1 + BALL_RADIUS * 2;\n \n \tif (getElementAt(x1, y1) != null) return getElementAt(x1, y1);\n \tif (getElementAt(x1, y2) != null) return getElementAt(x1, y2);\n \tif (getElementAt(x2, y1) != null) return getElementAt(x2, y1);\n \tif (getElementAt(x2, y2) != null) return getElementAt(x2, y2);\n \n \treturn null;\n }",
"public double getTimeFirstCollisionBoundary() {\n\t\tif (getWorld() == null) return Double.POSITIVE_INFINITY;\n\t\tdouble xTime = Double.POSITIVE_INFINITY;\n\t\tdouble yTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getXVelocity() > 0)\n\t\t\txTime = (getWorld().getWidth() - getXCoordinate() - getRadius()) / getXVelocity();\n\t\tif (this.getXVelocity() < 0)\n\t\t\txTime = - ( getXCoordinate() - getRadius()) / getXVelocity();\n\t\tif (this.getXVelocity() == 0)\n\t\t\txTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getYVelocity() > 0)\n\t\t\tyTime = (getWorld().getHeight() - getYCoordinate() -getRadius()) / getYVelocity();\n\t\tif (this.getYVelocity() < 0)\n\t\t\tyTime = - ( getYCoordinate() - getRadius()) / getYVelocity();\n\t\tif (this.getYVelocity() == 0)\n\t\t\tyTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\treturn Math.min(xTime, yTime);\t\n\t}",
"public Point collisionPoint() {\n return collisionPoint;\n }",
"public double getTimeCollisionBoundary() {\n\t\tdouble[] velocity = this.velocity.getVelocity();\n\t\tif (this.superWorld == null)\treturn Double.POSITIVE_INFINITY;\n\t\tif (velocity[0] == 0 && velocity[1] == 0)\t\treturn Double.POSITIVE_INFINITY;\n\t\t\n\t\tdouble radius = this.getRadius();\n\t\tif (this instanceof Planetoid) { Planetoid planetoid = (Planetoid) this; radius = planetoid.getRadius();}\n\t\t\n\t\tdouble edgeY;\n\t\tdouble edgeX;\n\t\tdouble mY = 0;\n\t\tdouble mX = 0;\n\t\t\n\t\tif (velocity[0] > 0){\n\t\t\tedgeX = position[0] + radius;\n\t\t\tmX = this.superWorld.getWorldWidth();\n\t\t}\n\t\telse edgeX = position[0] - radius;\n\t\tif (velocity[1] > 0){\n\t\t\tedgeY = position[1] + radius;\n\t\t\tmY = this.superWorld.getWorldHeight();\n\t\t}\n\t\telse edgeY = position[1] - radius;\n\t\t\n\t\tdouble tX = Double.POSITIVE_INFINITY;\n\t\tdouble tY = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (velocity[0] != 0){\n\t\t\ttX = (mX-edgeX)/velocity[0];\n\t\t}\n\t\tif (velocity[1] != 0){\n\t\t\ttY = (mY-edgeY)/velocity[1];\n\t\t}\n\t\t\n\t\t//Return the smallest value\n\t\treturn Math.min(tX, tY); \n\t\t\n\t}",
"private void intersectPlayerWithWall(Entity entity){\n player.setXVelocity(0);\n player.setYVelocity(0);\n\n //sets the x and y pos to be the correct wall placment, will need to know where the wall is relative to the player to do this\n\n int wallCenterYPos = (entity.getY() + (entity.getHeight() / 2));\n int playerCenterYPos = (player.getY() + (player.getHeight() / 2));\n int wallCenterXPos = (entity.getX() + (entity.getWidth() / 2));\n int playerCenterXPos = (player.getX() + (player.getWidth() / 2));\n\n //uses Minkowski sum\n\n float wy = (entity.getWidth() + player.getWidth()) * (wallCenterYPos - playerCenterYPos);\n float hx = (entity.getHeight() + player.getHeight()) * (wallCenterXPos - playerCenterXPos);\n\n if (wy > hx) {\n if (wy > -hx) {\n //bottom of player hitting wall\n //push the player off the wall so the collision ends\n player.setY(entity.getY() - player.getHeight());\n return;\n\n } else {\n //left of wall\n //push the player off the wall so the collision ends\n player.setX(entity.getX() + entity.getWidth());\n return;\n }\n } else {\n if (wy > -hx) {\n //right of wall\n //push the player off the wall so the collision ends\n player.setX(entity.getX() - player.getWidth());\n return;\n } else {\n //top of player hitting wall\n //push the player off the wall so the collision ends\n player.setY(entity.getY() + entity.getHeight());\n return;\n }\n\n }\n }",
"public Point collisionPoint() {\r\n return collisionPoint;\r\n\r\n }",
"public abstract void collideWith(Entity entity);",
"Rectangle getCollisionBox();",
"public IEntity getOnTheMapXY(int x, int y) {\r\n\t\t// we check if we are not at the edge of the map\r\n\t\t if(x >= 0 && x < Map.getWidth() && y >= 0 && y < Map.getHeight())\r\n\t\t \treturn this.map[x][y];\r\n\t\t else\r\n\t\t \treturn this.map[0][0];\r\n\t\t \r\n\t}",
"public void applyEntityCollision(Entity entityIn) {\n }",
"Rectangle getCollisionRectangle();",
"Rectangle getCollisionRectangle();",
"public double getDistanceBetweenCenter(Entity entity) throws IllegalArgumentException{\n if(this == entity) throw new IllegalArgumentException(\"this == entity\");\n else{\n double diffx = Math.abs(entity.getPosition()[0] - this.getPosition()[0]);\n double diffy = Math.abs(entity.getPosition()[1] - this.getPosition()[1]);\n double diff = Math.sqrt(Helper.square(diffx) + Helper.square(diffy));\n return diff;\n }\n }",
"public Vec2 \tgetPos(){ \t\t\t\t\treturn bound.getPos();\t\t}",
"void checkCollision(Entity other);",
"Entity getClosestEnemy(Collection<Entity> attackable, Entity entity, ServerGameModel model) {\n return attackable.stream().min((e1, e2) ->\n Double.compare(util.Util.dist(e1.getX(), e1.getY(), entity.getX(), entity.getY()),\n util.Util.dist(e2.getX(), e2.getY(), entity.getX(), entity.getY()))).get();\n }",
"public Vector3d getCurrentCollisionCenter() {\r\n return new Vector3d(collisionCenter.x + currentPosition.x, collisionCenter.y + currentPosition.y, collisionCenter.z + currentPosition.z);\r\n }",
"public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }",
"public Wall getWallOn(int x, int y) {\n\t\tfor (Entity e : entities) {\n\t\t\tif ((e.getX() == x) && (e.getY() == y) && e instanceof Wall) {\n\t\t\t\treturn (Wall) e;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public void collideBoundary() {\n\t\tif (getWorld() == null) return;\n\t\tif (getXCoordinate() < 1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getXCoordinate() > getWorld().getWidth()-1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getYCoordinate() < 1.01 * getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t\tif (getYCoordinate() > getWorld().getHeight()-1.01*getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t}",
"public Vector getWorldPosition(){\n\t\treturn this.absPos;\n\t}",
"private E3DCollision getClosestCollisionWithWorld(IE3DCollisionDetector collisionDetector, IE3DCollisionDetectableObject sourceObject, E3DVector3F sourceStartPos, E3DVector3F sourceEndPos, E3DWorld world)\r\n\t{\r\n\t\tArrayList triangleList = null;\r\n E3DSector sector = null;\r\n\t\tE3DTriangle triangle = null;\r\n\t\tE3DCollision partialCollision = null;\r\n E3DCollision closestCollision = null;\r\n\t\t\r\n\t\tsector = sourceObject.getSector(); //only check collision with the sector the actor is in\r\n\t\t\t\r\n\t\ttriangleList = sector.getTriangleList(); //TODO: sort by how likely it is\r\n\t\t\r\n\t\tfor(int i=0; i<triangleList.size(); i++)\r\n\t\t{\r\n\t\t\ttriangle = (E3DTriangle)triangleList.get(i);\r\n\t\t\t\r\n partialCollision = collisionDetector.checkForCollisionWithTriangle(sourceObject, sourceStartPos, sourceEndPos, triangle);\r\n\t\t\tif(partialCollision != null)\r\n\t\t\t{\r\n partialCollision.setCollideeBoundingObject(triangle);\r\n \r\n\t\t\t\tif(closestCollision == null)\r\n\t\t\t\t\tclosestCollision = partialCollision;\r\n\t\t\t\telse //see if its closer than the previous collision.. We want the closest collision\r\n\t\t\t\t{\r\n\t\t\t\t\tif(Math.abs(partialCollision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()) < \r\n\t\t\t\t\t Math.abs(closestCollision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tclosestCollision = partialCollision;\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 if(closestCollision != null)\r\n {\r\n closestCollision.setCollideeObject(null); //it did run into the world, but the world can't be notified\r\n closestCollision.setCollisionSector(sector);\r\n closestCollision.setCollisionWorld(world);\r\n\r\n return closestCollision;\r\n }\r\n else\r\n return null;\r\n\t}",
"private Worm getFirstWormInRange() {\n\n Set<String> cells = constructFireDirectionLines(currentWorm.weapon.range)\n .stream()\n .flatMap(Collection::stream)\n .map(cell -> String.format(\"%d_%d\", cell.x, cell.y))\n .collect(Collectors.toSet());\n\n for (Worm enemyWorm : opponent.worms) {\n String enemyPosition = String.format(\"%d_%d\", enemyWorm.position.x, enemyWorm.position.y);\n if (cells.contains(enemyPosition) && enemyWorm.health > 0) {\n return enemyWorm;\n }\n }\n\n return null;\n }",
"public Vector3f getPhysicsLocation() {\n return getPhysicsLocation(null);\n }",
"public Character getCharacter(final Entity entity) throws Exception\r\n {\r\n //check each character\r\n for (int index = 0; index < getCharacters().size(); index++)\r\n {\r\n //get the current character\r\n final Character character = getCharacters().get(index);\r\n \r\n //don't check if the character is dead\r\n if (character.isDead())\r\n continue;\r\n \r\n //if the distance is close enough, we have collision with this character\r\n if (character.hasCollision(entity))\r\n return character;\r\n }\r\n \r\n //we didn't find any enemy close enough, return null\r\n return null;\r\n }",
"public boolean overlapAnyEntity(){\n \treturn this.getSuperWorld().getEntities().stream().anyMatch(T ->this.overlap(T));\n }",
"public byte collide(byte inBoundState){\n byte[] poss = collisions[(int)inBoundState].resultingState;\n if(poss.length==1){\n return poss[0];\n }\n else{\n int ndx = rand.nextInt(poss.length - 1);\n return poss[ndx];\n }\n }",
"@NonNull JavaBoundingBox[] collision();",
"public Point getAbsPosition() {\n return Game.getMap().TFMapCoordinateToMapCenter(position);\n }",
"public Vector2 getPosition () {\n\t\tVec2 pos = body.getPosition();\n\t\tposition.set(pos.x, pos.y);\n\t\treturn position;\n\t}",
"private void moveToOutOfBounds(final Entity entity, final Rectangle boundsBox) {\n\t\tTransformPart transformPart = entity.get(TransformPart.class);\r\n\t\tfloat unboundedOverlapY = PolygonUtils.top(boundsBox) - transformPart.getBoundingBox().y;\r\n\t\tTranslatePart translate = entity.get(TranslatePart.class);\r\n\t\tVector2 velocity = translate.getVelocity();\r\n\t\tVector2 outOfBoundsOffset = velocity.scl(unboundedOverlapY / velocity.y);\r\n\t\ttransformPart.setPosition(transformPart.getPosition().add(outOfBoundsOffset));\r\n\t}",
"private Location getSafePosition(Player player) {\n\t\tLocation safeLoc = Util.entityLocationIsSafe(player);\n\t\tif (safeLoc != null) return normalizeDeathpointLocation(safeLoc);\n\t\t\n\t\t//Else, get last known safe location from metadata\n\t\tLocation loc = (Location) player.getMetadata(\"lastSafePosition\").stream()\n\t\t\t\t.filter(value -> value.getOwningPlugin() == plugin)\n\t\t\t\t.findFirst()\n\t\t\t\t//Fallback\n\t\t\t\t.orElseGet(() -> new FixedMetadataValue(plugin, player.getLocation()))\n\t\t\t\t.value();\n\t\treturn normalizeDeathpointLocation(loc);\n\t}",
"protected Entity findPlayerToAttack()\n {\n EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);\n return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;\n }",
"public static Location getTargetedLocation(LivingEntity entity, double range, Collection<Material> transparent) {\r\n\t\tLocation eyeLocation = entity.getEyeLocation();\r\n\t\tVector direction = eyeLocation.getDirection();\r\n\t\tdirection.normalize();\r\n\r\n\t\tLocation loc = eyeLocation.clone();\r\n\t\tfor (double i = 0; i <= range; i++) {\r\n\t\t\tloc = eyeLocation.clone().add(direction.clone().multiply(i));\r\n\t\t\tBlock block = loc.getBlock();\r\n\t\t\tif (transparent.contains(block.getType())) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (!transparent.isEmpty() || EnvironmentUtils.isSolid(block)) {\r\n\t\t\t\treturn loc.subtract(direction);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn loc;\r\n\t}",
"BlockPos getPosTarget() {\n BlockPosDim loc = LocationGpsCard.getPosition(inventory.getStackInSlot(0));\n if (loc != null && loc.getPos() != null) {\n return loc.getPos();\n }\n return this.getBlockPos();\n }",
"Vector2 getPosition();",
"public DoubleSolenoid.Value getPosition() {\n return m_ballholder.get();\n }",
"private Point getSafeTeleportPosition() {\n\t\tRandom number \t= new Random();\n\t\tPoint p\t\t\t= new Point();\n\t\twhile(true) {\n\t\t\tint x\t\t= number.nextInt(rows-1);\t\n\t\t\tint y\t\t= number.nextInt(cols-1);\n\t\t\tp.x\t\t\t= x;\n\t\t\tp.y\t\t\t= y;\n\t\t\t\n\t\t\t//if the point isn't in the array\n\t\t\tif(!occupiedPositions.contains(p)) {\n\t\t\t\t//check the surrounding of the point, need to be a \"safe teleport\"\n\t\t\t\tif(checkSurroundingOfPoint(p)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn p;\n\t}",
"public Coord minCell()\n {\n\t int minX = getGrid().keySet().stream().mapToInt(Coord::getX).min().orElse(0);\n\n\t int minY = getGrid().keySet().stream().mapToInt(Coord::getY).min().orElse(0);\n\n\t return new Coord(minX, minY);\n }",
"@Override\n\tpublic void collide(Entity e) {\n\n\t}",
"public void collide(Entity entity) throws IllegalArgumentException{\n\t \n \tif (this instanceof Ship && entity instanceof Ship) this.defaultCollide(entity);\n \telse if (this instanceof MinorPlanet && entity instanceof MinorPlanet) this.defaultCollide(entity);\n \telse if (entity instanceof Bullet) {\n \t\tBullet bullet = (Bullet) entity;\n \t\tif (bullet.getBulletSource() == this) bullet.bulletCollideOwnShip((Ship) this);\n \t\telse bullet.bulletCollideSomethingElse(this);\n \t\t}\n \t\n \telse if (this instanceof Bullet) {\n \t\tBullet bullet = (Bullet) this;\n \t\tif (bullet.getBulletSource() == entity) bullet.bulletCollideOwnShip((Ship) entity);\n \t\telse bullet.bulletCollideSomethingElse(entity);\n \t\t}\n \t\n \telse if ((this instanceof Ship && entity instanceof Asteroid) || (entity instanceof Ship && this instanceof Asteroid)){\n \t\tShip ship = null;\n \t\tif (this instanceof Ship){\n \t\t\tship = (Ship) this;\n \t\t} else {\n \t\t\tship = (Ship) entity;\n \t\t}\n \t\tship.terminate();\n \t}\n \t\n \telse if ((this instanceof Ship && entity instanceof Planetoid) || (entity instanceof Ship && this instanceof Planetoid)){\n \t\tShip ship = null;\n \t\tif (this instanceof Ship){\n \t\t\tship = (Ship) this;\n \t\t} else {\n \t\t\tship = (Ship) entity;\n \t\t}\n \t\t\n \t\tWorld world = ship.getSuperWorld();\n \t\tdouble xnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth());\n \t\tdouble ynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight());\n \t\tship.setPosition(xnew, ynew);\n \t\t\n \t\twhile (! this.overlapAnyEntity()){\n \t\t\txnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth());\n \t\t\tynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight());\n \t\t\tship.setPosition(xnew, ynew);\n \t\t\t}\n \t}\n\t \t\n \t\n }",
"@Override\n\tpublic Vector2 getPosition() {\n\t\treturn body.getPosition();\n\t}",
"public int getGameBoundary() {\n\t\treturn gameEngine.getBoundary();\n\t}",
"public Coords getFinalCoords() {\n if (getLastStep() != null) {\n return getLastStep().getPosition();\n }\n return getEntity().getPosition();\n }",
"public Vector2F getWorldLocation() {\n\t\treturn new Vector2F(xPos, yPos);\n\t}",
"public void checkCollisionTile(Entity entity) {\n\t\t\tint entityLeftX = entity.worldX + entity.collisionArea.x;\n\t\t\tint entityRightX = entity.worldX + entity.collisionArea.x + entity.collisionArea.width;\n\t\t\tint entityUpY = entity.worldY + entity.collisionArea.y;\n\t\t\tint entityDownY = entity.worldY + entity.collisionArea.y + entity.collisionArea.height;\n\t\t\t\n\t\t\tint entityLeftCol = entityLeftX/gamePanel.unitSize;\n\t\t\tint entityRightCol = entityRightX/gamePanel.unitSize;\n\t\t\tint entityUpRow = entityUpY/gamePanel.unitSize;\n\t\t\tint entityDownRow = entityDownY/gamePanel.unitSize;\n\t\t\t\n\t\t\tint point1;\n\t\t\tint point2;\n\t\t\t//This point is used for diagonal movement\n\t\t\tint point3;\n\t\t\t\n\t\t\tswitch(entity.direction) {\n\t\t\t\t//Lateral and longitudinal movements\n\t\t\t\tcase \"up\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t//Diagonal Movements\n\t\t\t\tcase \"upleft\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"upright\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"downleft\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"downright\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }",
"public WrapperEntity getEntityLookingAt(WrapperEntity entityLooking, float searchRadius){\r\n\t\tdouble smallestDistance = searchRadius*2;\r\n\t\tEntity foundEntity = null;\r\n\t\tEntity mcLooker = entityLooking.entity;\r\n\t\tVec3d mcLookerPos = mcLooker.getPositionVector();\r\n\t\tPoint3d lookerLos = entityLooking.getLineOfSight(searchRadius).add(entityLooking.getPosition());\r\n\t\tVec3d losVector = new Vec3d(lookerLos.x, lookerLos.y, lookerLos.z);\r\n\t\tfor(Entity entity : world.getEntitiesWithinAABBExcludingEntity(mcLooker, mcLooker.getEntityBoundingBox().grow(searchRadius))){\r\n\t\t\tif(!entity.equals(mcLooker.getRidingEntity()) && !(entity instanceof BuilderEntityRenderForwarder)){\r\n\t\t\t\tfloat distance = mcLooker.getDistance(entity);\r\n\t\t\t\tif(distance < smallestDistance){\r\n\t\t\t\t\tsmallestDistance = distance;\r\n\t\t\t\t\tRayTraceResult rayTrace = entity.getEntityBoundingBox().calculateIntercept(mcLookerPos, losVector);\r\n\t\t\t\t\tif(rayTrace != null){\r\n\t\t\t\t\t\tfoundEntity = entity;\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 WrapperEntity.getWrapperFor(foundEntity);\r\n\t}",
"public static Box getBoundingBox(Entity entity)\n\t{\n\t\treturn (new REntity(entity)).getBox().getBox();\n\t}",
"@NotNull\n public Location<World> getCenterBlock() {\n int centerX = getMinChunk().getX() + 16;\n int centerZ = getMinChunk().getZ() + 16;\n return Tungsten.INSTANCE.getIslandWorld().getLocation(centerX * 16, 86, centerZ * 16);\n }",
"public boolean colidesWith(Entity e, boolean player){\n\t\tthis.setBounds((int) x, (int)y, Tile.size, Tile.size);\n\t\tif(player)\n\t\t\te.setBounds((int) (main.getCamOfSetX() + e.getPx()), (int) (main.getCamOfSetY() + e.getPy()), (int)e.getWidth(), (int)e.getHeight());\n\t\telse\n\t\t\te.setBounds((int)e.getX(), (int)e.getY(), (int)e.getWidth(), (int)e.getHeight());\n\t\treturn this.intersects(e);\n\t}",
"public void checkWorldCollisions(Bounds bounds) {\n final boolean atRightBorder = getShape().getLayoutX() >= (bounds.getMaxX() - RADIUS);\n final boolean atLeftBorder = getShape().getLayoutX() <= RADIUS;\n final boolean atBottomBorder = getShape().getLayoutY() >= (bounds.getMaxY() - RADIUS);\n final boolean atTopBorder = getShape().getLayoutY() <= RADIUS;\n final double padding = 1.00;\n\n if (atRightBorder) {\n getShape().setLayoutX(bounds.getMaxX() - (RADIUS * padding));\n velX *= frictionX;\n velX *= -1;\n }\n if (atLeftBorder) {\n getShape().setLayoutX(RADIUS * padding);\n velX *= frictionX;\n velX *= -1;\n }\n if (atBottomBorder) {\n velY *= -1;\n velY *= frictionY;\n getShape().setLayoutY(bounds.getMaxY() - (RADIUS * padding));\n }\n if (atTopBorder) {\n velY *= -1;\n velY *= frictionY;\n getShape().setLayoutY(RADIUS * padding);\n }\n }",
"private Point getEntityPosition(int position, int team) {\n\t\tint xOffset = position * (200);\n\t\tint xPos;\n\t\tif (team == 0) {\n\t\t\txPos = 800 - 100 - xOffset;\n\t\t} else {\n\t\t\txPos = 800 + 100 + xOffset;\n\t\t}\n\n\t\treturn new Point(xPos, 100);\n\t}",
"public Vector2D getPosition ();",
"public static Player nearestPlayer(Entity entity, double radius) {\n Player player = null;\n double shortest = (radius * radius) + 1;\n double distSq;\n for (Player p : entity.getWorld().getPlayers()) {\n if (p.isDead() || !p.getGameMode().equals(GameMode.SURVIVAL)) continue;\n if (!entity.getWorld().equals(p.getWorld())) continue;\n distSq = entity.getLocation().distanceSquared(p.getLocation()); //3D distance\n if (distSq < shortest) {\n player = p;\n shortest = distSq;\n }\n }\n return player;\n }",
"public double inRangeOfCharacter(Character character, MovingEntity entity, int radius){\r\n double characterX = character.getX();\r\n double characterY = character.getY();\r\n\r\n double entityX = entity.getX();\r\n double entityY = entity.getY();\r\n\r\n double deltaX = characterX - entityX;\r\n double deltaY = characterY - entityY;\r\n\r\n double distanceSquared = Math.pow(deltaX, 2) + Math.pow(deltaY, 2);\r\n double radiusSquared = Math.pow(radius, 2); \r\n\r\n if(distanceSquared <= radiusSquared) {\r\n return distanceSquared;\r\n }\r\n\r\n return -1;\r\n\r\n }",
"public Rect getBound() {\n return new Rect((int) (x - radius), (int) (y - radius), (int) (x + radius), (int) (y + radius));\n }",
"@Override\n\tpublic boolean hasCollide(Entity e) {\n\t\treturn rect.intersects(e.getRectangle());\n\t}",
"private Entity findClosestStructureOfPlayer(Coordinate coordinate) {\n // TODO: Optimize\n // Perhaps have a 'satisfying distance' ? ie, whenever it finds one within this distance, stop searching?\n // Do not loop over everything?\n // Move to EntityRepository?\n PredicateBuilder predicateBuilder = Predicate.builder().forPlayer(player).ofType(EntityType.STRUCTURE);\n EntitiesSet allStructuresForPlayer = entityRepository.filter(predicateBuilder.build());\n\n float closestDistanceFoundSoFar = 320000; // Get from Map!? (width * height) -> get rid of magic number\n Entity closestEntityFoundSoFar = null;\n\n for (Entity entity : allStructuresForPlayer) {\n float distance = entity.getCenteredCoordinate().distance(coordinate);\n if (distance < closestDistanceFoundSoFar) {\n closestEntityFoundSoFar = entity;\n closestDistanceFoundSoFar = distance;\n }\n }\n return closestEntityFoundSoFar;\n }",
"public Coordinate getPosition();",
"public int checkCollisionObject(Entity entity, boolean yick) {\n\t\t\tint index = 999;\n\t\t\tfor(int i = 0; i < gamePanel.objectManager.length; i++) {\n\t\t\t\tif(gamePanel.objectManager[i] != null) {\n\t\t\t\t\t//Uses the entity's collision area\n\t\t\t\t\tentity.collisionArea.x = entity.worldX + entity.collisionArea.x;\n\t\t\t\t\tentity.collisionArea.y = entity.worldY + entity.collisionArea.y;\n\t\t\t\t\t//Uses the object's collision area\n\t\t\t\t\tgamePanel.objectManager[i].collisionArea.x = gamePanel.objectManager[i].worldX + gamePanel.objectManager[i].collisionArea.x;\n\t\t\t\t\tgamePanel.objectManager[i].collisionArea.y = gamePanel.objectManager[i].worldY + gamePanel.objectManager[i].collisionArea.y;\n\t\t\t\t\t\n\t\t\t\t\tswitch(entity.direction) {\n\t\t\t\t\tcase \"up\":\n\t\t\t\t\t\tentity.collisionArea.y -= entity.speed;\n\t\t\t\t\t\tif(entity.collisionArea.intersects(gamePanel.objectManager[i].collisionArea)) {\n\t\t\t\t\t\t\tif(gamePanel.objectManager[i].collision == true) {\n\t\t\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(yick == true) {\n\t\t\t\t\t\t\t\tindex = i;\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\tcase \"down\":\n\t\t\t\t\t\tentity.collisionArea.y += entity.speed;\n\t\t\t\t\t\tif(entity.collisionArea.intersects(gamePanel.objectManager[i].collisionArea)) {\n\t\t\t\t\t\t\tif(gamePanel.objectManager[i].collision == true) {\n\t\t\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(yick == true) {\n\t\t\t\t\t\t\t\tindex = i;\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\tcase \"left\":\n\t\t\t\t\t\tentity.collisionArea.x -= entity.speed;\n\t\t\t\t\t\tif(entity.collisionArea.intersects(gamePanel.objectManager[i].collisionArea)) {\n\t\t\t\t\t\t\tif(gamePanel.objectManager[i].collision == true) {\n\t\t\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(yick == true) {\n\t\t\t\t\t\t\t\tindex = i;\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\tcase \"right\":\n\t\t\t\t\t\tentity.collisionArea.x += entity.speed;\n\t\t\t\t\t\tif(entity.collisionArea.intersects(gamePanel.objectManager[i].collisionArea)) {\n\t\t\t\t\t\t\tif(gamePanel.objectManager[i].collision == true) {\n\t\t\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(yick == true) {\n\t\t\t\t\t\t\t\tindex = i;\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\tcase \"upleft\":\n\t\t\t\t\t\tentity.collisionArea.x -= entity.speed;\n\t\t\t\t\t\tentity.collisionArea.y -= entity.speed;\n\t\t\t\t\t\tif(entity.collisionArea.intersects(gamePanel.objectManager[i].collisionArea)) {\n\t\t\t\t\t\t\tif(gamePanel.objectManager[i].collision == true) {\n\t\t\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(yick == true) {\n\t\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"upright\":\n\t\t\t\t\t\tentity.collisionArea.x += entity.speed;\n\t\t\t\t\t\tentity.collisionArea.y -= entity.speed;\n\t\t\t\t\t\tif(entity.collisionArea.intersects(gamePanel.objectManager[i].collisionArea)) {\n\t\t\t\t\t\t\tif(gamePanel.objectManager[i].collision == true) {\n\t\t\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(yick == true) {\n\t\t\t\t\t\t\t\tindex = i;\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\tcase \"downleft\":\n\t\t\t\t\t\tentity.collisionArea.x -= entity.speed;\n\t\t\t\t\t\tentity.collisionArea.y += entity.speed;\n\t\t\t\t\t\tif(entity.collisionArea.intersects(gamePanel.objectManager[i].collisionArea)) {\n\t\t\t\t\t\t\tif(gamePanel.objectManager[i].collision == true) {\n\t\t\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(yick == true) {\n\t\t\t\t\t\t\t\tindex = i;\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\tcase \"downright\":\n\t\t\t\t\t\tentity.collisionArea.x += entity.speed;\n\t\t\t\t\t\tentity.collisionArea.y += entity.speed;\n\t\t\t\t\t\tif(entity.collisionArea.intersects(gamePanel.objectManager[i].collisionArea)) {\n\t\t\t\t\t\t\tif(gamePanel.objectManager[i].collision == true) {\n\t\t\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(yick == true) {\n\t\t\t\t\t\t\t\tindex = i;\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\t\n\t\t\t\t\t//Updates the new x and y with the old default x and y value so it does not get added on continuously\n\t\t\t\t\tentity.collisionArea.x = entity.collisionAreaX;\n\t\t\t\t\tentity.collisionArea.y = entity.collisionAreaY;\n\t\t\t\t\tgamePanel.objectManager[i].collisionArea.x = gamePanel.objectManager[i].collisionAreaX;\n\t\t\t\t\tgamePanel.objectManager[i].collisionArea.y = gamePanel.objectManager[i].collisionAreaY;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn index;\n\t\t}",
"public Coords getFromCenterIntersectionPoint(final Coords otherPoint)\r\n {\r\n final Line line = new Line(getCenter(), otherPoint);\r\n final List<Line> edgeLines = getEdgeLines();\r\n Coords point;\r\n for(final Line edge : edgeLines)\r\n {\r\n point = line.intersection(edge);\r\n if(point != null)\r\n {\r\n return point;\r\n }\r\n }\r\n return null;\r\n }",
"private EntityLivingBase findPlayerToAttack() {\n EntityPlayer player = entity.worldObj.getClosestVulnerablePlayerToEntity(entity, aggroRange);\n if ( player != null && !player.capabilities.isCreativeMode && entity.canEntityBeSeen(player) )\n \treturn player;\n\n EntityLivingBase target = entity.getLastAttacker();\n if ( isTargetValid(target) && entity.canEntityBeSeen(target) )\n \treturn target;\n\n \treturn null;\n }",
"private Vec2 calculatePos() {\n\t\tNetTransformComponent transform = actor.getEntity().getNetTransform();\n\t\tif (transform != null) {\n\t\t\tVec2 screenPos = scene.getCamera()\n\t\t\t\t\t.getScreenCoordinates(Vec3.add(transform.getPosition(), new Vec3(-2.0f, 3.25f, 0.0f)));\n\t\t\tVec2 result = new Vec2(screenPos.getX(), screenPos.getY());\n\t\t\treturn result;\n\t\t}\n\n\t\treturn new Vec2(0.0f, 0.0f);\n\t}",
"Object getPosition();",
"private Bounds getTextureBounds() {\n\t\tfinal float boundsWidth = 2 * OFFSET_X;\n\t\tfinal float boundsHeight = 2 * OFFSET_Y;\n\t\t\n\t\t//Get the center point of the player, then subtract by offset\n\t\tfinal float x = (activePlayer.getX() + activePlayer.getWidth() / 2f) \n\t\t\t\t/ activePlayer.getScaleX() - OFFSET_X;\n\t\tfinal float y = (activePlayer.getY() - activePlayer.getHeight() / 2f) \n\t\t\t\t/ activePlayer.getScaleY() + OFFSET_Y + 1;\n\t\t\n\t\treturn new Bounds(x, y, boundsWidth, boundsHeight);\n\t}",
"public abstract Vec2 startPosition();",
"@Override\r\n public void applyEntityCollision(Entity entity)\r\n {\r\n Vector3 v = Vector3.getNewVector();\r\n Vector3 v1 = Vector3.getNewVector();\r\n\r\n blockBoxes.clear();\r\n\r\n int sizeX = blocks.length;\r\n int sizeY = blocks[0].length;\r\n int sizeZ = blocks[0][0].length;\r\n Set<Double> topY = Sets.newHashSet();\r\n for (int i = 0; i < sizeX; i++)\r\n for (int k = 0; k < sizeY; k++)\r\n for (int j = 0; j < sizeZ; j++)\r\n {\r\n ItemStack stack = blocks[i][k][j];\r\n if (stack == null || stack.getItem() == null) continue;\r\n\r\n Block block = Block.getBlockFromItem(stack.getItem());\r\n AxisAlignedBB box = Matrix3.getAABB(posX + block.getBlockBoundsMinX() - 0.5 + boundMin.x + i,\r\n posY + block.getBlockBoundsMinY() + k,\r\n posZ + block.getBlockBoundsMinZ() - 0.5 + boundMin.z + j,\r\n posX + block.getBlockBoundsMaxX() + 0.5 + boundMin.x + i,\r\n posY + block.getBlockBoundsMaxY() + k,\r\n posZ + block.getBlockBoundsMaxZ() + 0.5 + boundMin.z + j);\r\n blockBoxes.add(box);\r\n topY.add(box.maxY);\r\n }\r\n\r\n v.setToVelocity(entity).subtractFrom(v1.setToVelocity(this));\r\n v1.clear();\r\n Matrix3.doCollision(blockBoxes, entity.getEntityBoundingBox(), entity, 0, v, v1);\r\n for(Double d: topY)\r\n if (entity.posY >= d && entity.posY + entity.motionY <= d && motionY <= 0)\r\n {\r\n double diff = (entity.posY + entity.motionY) - (d + motionY);\r\n double check = Math.max(0.5, Math.abs(entity.motionY + motionY));\r\n if (diff > 0 || diff < -0.5 || Math.abs(diff) > check)\r\n {\r\n entity.motionY = 0;\r\n }\r\n }\r\n\r\n boolean collidedY = false;\r\n if (!v1.isEmpty())\r\n {\r\n if (v1.y >= 0)\r\n {\r\n entity.onGround = true;\r\n entity.fallDistance = 0;\r\n entity.fall(entity.fallDistance, 0);\r\n }\r\n else if (v1.y < 0)\r\n {\r\n boolean below = entity.posY + entity.height - (entity.motionY + motionY) < posY;\r\n if (below)\r\n {\r\n v1.y = 0;\r\n }\r\n }\r\n if (v1.x != 0) entity.motionX = 0;\r\n if (v1.y != 0) entity.motionY = motionY;\r\n if (v1.z != 0) entity.motionZ = 0;\r\n if (v1.y != 0) collidedY = true;\r\n v1.addTo(v.set(entity));\r\n v1.moveEntity(entity);\r\n }\r\n if (entity instanceof EntityPlayer)\r\n {\r\n EntityPlayer player = (EntityPlayer) entity;\r\n if (Math.abs(player.motionY) < 0.1 && !player.capabilities.isFlying)\r\n {\r\n entity.onGround = true;\r\n entity.fallDistance = 0;\r\n }\r\n if (!player.capabilities.isCreativeMode && !player.worldObj.isRemote)\r\n {\r\n EntityPlayerMP entityplayer = (EntityPlayerMP) player;\r\n if (collidedY) entityplayer.playerNetServerHandler.floatingTickCount = 0;\r\n }\r\n }\r\n }",
"public Rectangle getCollisionRectangle() {\r\n return new Rectangle(this.rectangle.getUpperLeft(), this.rectangle.getWidth(), this.rectangle.getHeight());\r\n }",
"public static Location getTargetedLocation(LivingEntity entity, double range) {\r\n\t\treturn getTargetedLocation(entity, range, new ArrayList<Material>());\r\n\t}",
"public Entity getEntity(Position position) {\n Entity entity = board.getElement(position);\n if (entity != null) {\n return entity.clone();\n }\n return null;\n }",
"Tile getPosition();",
"public Vector3f getOccluderPosition();",
"private GComponent getComponentAt(Point point)\n {\n // Create a reverse list iterator\n ListIterator<GComponent> it = this.components.listIterator(this.components.size());\n while (it.hasPrevious())\n {\n GComponent component = it.previous();\n \n // If this component is a the specified position, then return it\n if (component.getBounds().contains(point))\n return component;\n }\n \n // Nothing found, so return null\n return null;\n }",
"public Point3d getBlockHit(Point3d position, Point3d delta){\r\n\t\tVec3d start = new Vec3d(position.x, position.y, position.z);\r\n\t\tRayTraceResult trace = world.rayTraceBlocks(start, start.add(delta.x, delta.y, delta.z), false, true, false);\r\n\t\tif(trace != null){\r\n\t\t\tBlockPos pos = trace.getBlockPos();\r\n\t\t\tif(pos != null){\r\n\t\t\t\t return new Point3d(pos.getX(), pos.getY(), pos.getZ());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"CollisionRule getCollisionRule();",
"Vector getPos();",
"public int getCollisionType(int x, int y) {\t\r\n\t\tbyte map_no = l();\r\n\t\tint index = x*15+y;\r\n\t\tif (index >= left_map_width*15) {\r\n\t\t\tmap_no = r();\r\n\t\t\tindex -= left_map_width*15;\r\n\t\t}\r\n\t\t//If it's out of bounds, it is not traversable.\r\n\t\tif(x < 0 || x >= levelWidth() ||\r\n\t\t y < 0 || y >= levelHeight() ||\r\n\t\t index >= collision[map_no].length )\r\n\t\t\treturn 1;\r\n\t\treturn collision[map_no][index];\r\n\t}",
"public BoundsLatLon getTileBounds(int x, int y)\n {\n return boundsCalculator.getTileBounds(x, y);\n }",
"public Vector2 getPosition();",
"public GameObject getObstacle() {\n \tif (selection != null) {\n \tjava.lang.Object data = selection.getBody().getUserData();\n \ttry {\n \t\treturn (GameObject)data;\n \t} catch (Exception e) {\n \t}\n }\n return null;\n }",
"public BE getBukkitEntity() {\n if (!bukkitEntity.isValid()) {\n final BE foundEntity = (BE) EntityUtils.findBy(getKey(), chunk);\n if (foundEntity != null) {\n this.bukkitEntity = foundEntity;\n }\n }\n return bukkitEntity;\n }",
"Point getPosition();",
"Point getPosition();",
"public Entity findEntityBoat(int direction, Class<? extends WCEntityBoat> entC) {\r\n int tempX = xCoord, tempZ = zCoord;\r\n switch (direction-2) {\r\n case 0:\r\n tempZ -= 3;\r\n break;\r\n case 1:\r\n tempZ += 3;\r\n break;\r\n case 2:\r\n tempX -= 3;\r\n break;\r\n case 3:\r\n tempX += 3;\r\n break;\r\n }\r\n \r\n AxisAlignedBB bounds = AxisAlignedBB.getBoundingBox(tempX - 1, yCoord - 2, tempZ - 1, 1 + tempX, yCoord + 2, 1 + tempZ);\r\n \r\n List list = worldObj.getEntitiesWithinAABB(entC, bounds);\r\n \r\n for (int a = 0; a < list.size(); a++) {\r\n Entity e = (Entity) list.get(a);\r\n if (e instanceof WCEntityBoat) {\r\n \tSystem.out.println(\"Boat Get\");\r\n return e;\r\n }\r\n }\r\n \r\n return null;\r\n }",
"PVector _getCenter() {\n PVector cen = new PVector(_hitboxCenter.x, _hitboxCenter.y);\n cen.rotate(_rotVector.heading() - _front);\n cen.x += _x;\n cen.y += _y;\n return cen;\n }",
"private GameWorld.Position randomAvatarPosition(GameWorld world) {\n int xVal = world.getRand().nextInt(world.WIDTH - 1);\n int yVal = world.getRand().nextInt(world.HEIGHT - 1);\n if (world.getNumOfSq() > 0) {\n while (!(world.world[xVal][yVal].equals(Tileset.FLOOR))) {\n xVal = world.getRand().nextInt(world.WIDTH - 1);\n yVal = world.getRand().nextInt(world.HEIGHT - 1);\n }\n System.out.println(yVal);\n System.out.println(\"therethere\");\n world.avatarPosition = new GameWorld.Position(xVal, yVal);\n return world.avatarPosition;\n }\n return new GameWorld.Position(xVal, yVal);\n }",
"private int getFirstAttackerAt(float x, float y) {\n\t\tint index = -1; // Start assuming no attacker intersects the point\n\t\tRectangle temp = new Rectangle();\n\t\tfor(int i = 0; i < ATTACKER_ARRAY_SIZE; i++) {\n\t\t\tif(mAttackers[i].isAlive()){\n\t\t\t\tAttacker a = mAttackers[i];\n\t\t\t\t// Populate the temporary rectangle with the attacker's parameters\n\t\t\t\ttemp.set(a.getX(), a.getY(), a.getWidth(), a.getHeight());\n\n\t\t\t\t// See if (x, y) lies within the rectangle described by a.x, a.y, a.width, a.height\n\t\t\t\tif(temp.contains(x, y)) {\n\t\t\t\t\t// Within this block, the point should lie within the rectangle -- Attacker has been tapped\n\t\t\t\t\tindex = i;\n\t\t\t\t\treturn index; // Loop exits here with index value OR never arrives here at all (-1)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn index; // This return value is -1, since execution should only arrive here when testing fails all attackers\n\t}",
"public static Dimension getPos()\n {\n Dimension pos = new Dimension( cX, cY );\n next();\n return pos;\n }",
"public Rectangle2D.Double getCollisionBox() {\n\t\treturn this.collisionBox;\n\t}",
"private int getIndex(Entity entity){\n int currentIndex = 0;\n\n for(QuadTree node: this.getNodes()){\n\n /*PhysicsComponent bp = (PhysicsComponent)entity.getProperty(PhysicsComponent.ID);\n if( node.getBounds().contains(bp.getBounds())){\n return currentIndex;\n }*/\n currentIndex++;\n }\n return -1; // Subnode not found (part of the root then)\n }",
"private E3DCollision getClosestCollisionWithCollisionDetectableObject(IE3DCollisionDetector collisionDetector, boolean useBoundingObjectsIfPossible,\r\n boolean notifyAllObjectsCollided, IE3DCollisionDetectableObject sourceObject, \r\n E3DVector3F sourceStartPos, E3DVector3F sourceEndPos, IE3DCollisionDetectableObject possibleCollidee, E3DWorld world)\r\n {\r\n E3DCollision collision = null, closestCollision = null;\r\n if(useBoundingObjectsIfPossible && possibleCollidee.getBoundingObject() != null)\r\n {\r\n collision = collisionDetector.checkForCollisionWithBoundingObject(sourceObject, sourceStartPos, sourceEndPos, possibleCollidee.getBoundingObject());\r\n if(collision != null)\r\n {\r\n collision.setCollideeObject(possibleCollidee); \r\n collision.setCollideeBoundingObject(possibleCollidee.getBoundingObject());\r\n collision.setCollisionSector(possibleCollidee.getSector());\r\n collision.setCollisionWorld(world);\r\n }\r\n }\r\n else\r\n {\r\n ArrayList triangleList = possibleCollidee.getTriangleList();\r\n E3DTriangle triangle = null;\r\n for(int i=0; i<triangleList.size(); i++)\r\n {\r\n triangle = (E3DTriangle)triangleList.get(i);\r\n \r\n //put the detectable's triangles into worldspace coords\r\n scratchTriangle.setVertexPosA(possibleCollidee.getOrientation().getWorldVector(triangle.getVertexPosA()));\r\n scratchTriangle.setVertexPosB(possibleCollidee.getOrientation().getWorldVector(triangle.getVertexPosB()));\r\n scratchTriangle.setVertexPosC(possibleCollidee.getOrientation().getWorldVector(triangle.getVertexPosC()));\r\n \r\n collision = collisionDetector.checkForCollisionWithTriangle(sourceObject, sourceStartPos, sourceEndPos, scratchTriangle);\r\n if(collision != null)\r\n {\r\n collision.setCollideeObject(possibleCollidee); \r\n collision.setCollideeBoundingObject(triangle);\r\n collision.setCollisionSector(possibleCollidee.getSector());\r\n collision.setCollisionWorld(world);\r\n\r\n if(closestCollision == null)\r\n closestCollision = collision;\r\n else\r\n {\r\n if(Math.abs(collision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()) < \r\n Math.abs(closestCollision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()))\r\n closestCollision = collision;\r\n }\r\n }\r\n }\r\n collision = closestCollision;\r\n }\r\n \r\n //Only notify one time if necessary for the closest collision (before it was notifying for every triangle it hit, UGH!)\r\n if(collision != null && notifyAllObjectsCollided && collision.getCollideeObject() != null) //notify the object this one collided with.\r\n notifyCollidedObject(sourceObject, collision);\r\n\r\n return collision;\r\n }",
"public double GetPositionRaw()\n {\n double position = GetPosition();\n\n if (position == -1)\n {\n double CurrentDistance = GetDistance();\n\n // we aren't close to a position, so get the range\n for (int i = 1; i < (Positions.length); i++)\n {\n if (Utilities.isBetween(CurrentDistance, Positions[i - 1],\n Positions[i]))\n {\n // scale the position from inches to the ratio between\n // positions\n position = Utilities.scaleToRange(CurrentDistance,\n Positions[i - 1], Positions[i], i - 1, i);\n break;\n }\n\n }\n }\n\n return position;\n }"
]
| [
"0.67058855",
"0.6622497",
"0.65319127",
"0.621248",
"0.6109031",
"0.6073427",
"0.585202",
"0.58333325",
"0.58200717",
"0.5805759",
"0.5793666",
"0.5774901",
"0.5708396",
"0.56925195",
"0.5687605",
"0.55979854",
"0.55392456",
"0.5519982",
"0.5519982",
"0.54904354",
"0.5462019",
"0.5404959",
"0.5400832",
"0.5376406",
"0.53704584",
"0.5368973",
"0.5356109",
"0.5353982",
"0.53475255",
"0.5345277",
"0.53116983",
"0.5308754",
"0.52869236",
"0.5284716",
"0.52776587",
"0.52526957",
"0.5247566",
"0.5243697",
"0.5217012",
"0.5215818",
"0.5213156",
"0.52124006",
"0.52060395",
"0.5203317",
"0.5199207",
"0.51945436",
"0.5190467",
"0.5185684",
"0.51803935",
"0.5172911",
"0.5167891",
"0.51603204",
"0.5159828",
"0.5155063",
"0.51542205",
"0.5145925",
"0.51419854",
"0.5139185",
"0.51385784",
"0.5112803",
"0.5095927",
"0.5086141",
"0.5085074",
"0.5082707",
"0.5075774",
"0.5072601",
"0.5070162",
"0.5068629",
"0.5065742",
"0.50656426",
"0.50655293",
"0.50652015",
"0.50608176",
"0.5059478",
"0.505228",
"0.505119",
"0.50294626",
"0.5028787",
"0.50235116",
"0.50226045",
"0.5016727",
"0.5016138",
"0.50155365",
"0.50064605",
"0.50046974",
"0.5002891",
"0.50007284",
"0.49951828",
"0.49903566",
"0.49812853",
"0.49812853",
"0.4980477",
"0.496743",
"0.49656403",
"0.49610025",
"0.49608567",
"0.49604017",
"0.49574092",
"0.4956024",
"0.49473763"
]
| 0.6273406 | 3 |
Method that deals with collisions between entities and boundaries. | public void collideBoundary(){
int bulletBouncer = 0;
if ((this.getPosition()[0]-(this.getRadius()) <= 0.0 || (this.getPosition()[0]+(this.getRadius()) >= this.superWorld.getWorldWidth()))){
if (this instanceof Bullet){
bulletBouncer++;
}
this.velocity.setXYVelocity( this.velocity.getVelocity()[0] * -1);
}
if ((this.getPosition()[1]-(this.getRadius()) <= 0.0 || (this.getPosition()[1]+(this.getRadius()) >= this.superWorld.getWorldHeight()))){
if (this instanceof Bullet){
bulletBouncer++;
}
this.velocity.setYVelocity(this.velocity.getVelocity()[1] * -1);
}
if (this instanceof Bullet){
Bullet bullet = (Bullet) this;
for (int i = 0; i < bulletBouncer; i++){
if (!bullet.isTerminated())
bullet.bouncesCounter();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void applyEntityCollision(Entity entityIn) {\n }",
"public abstract void collideWith(Entity entity);",
"public abstract boolean collide(int x, int y, int z, int dim, Entity entity);",
"@Override\n\tpublic void collide(Entity e) {\n\n\t}",
"void checkCollision(Entity other);",
"@Override\n\tpublic void onCollision(Entity collidedEntity)\n\t{\n\t\t\n\t}",
"public void tick() {\n if (!isActive || !entities[0].canCollide || !entities[1].canCollide) {\n return;\n }\n\n rectangles[0].x = boundaries[0].x - 1;\n rectangles[1].x = boundaries[1].x - 1;\n rectangles[0].y = boundaries[0].y - 1;\n rectangles[1].y = boundaries[1].y - 1;\n\n isCollided = rectangles[0].intersects(rectangles[1]);\n\n if (isCollided && !firedEvent) {\n lastEvent = new EntityEntityCollisionEvent(this);\n onCollide();\n start(lastEvent);\n firedEvent = true;\n }\n if (!isCollided && firedEvent) {\n onCollisionEnd();\n end(lastEvent);\n firedEvent = false;\n }\n if (previouslyCollided != isCollided) {\n setBoundaryColors();\n }\n\n previouslyCollided = isCollided;\n }",
"public abstract void processCollisions();",
"private void CheckWorldCollision() {\n\t\tfor(WorldObj obj : World.CurrentWorld.SpawnedObjects) {\n\t\t\tif(bounds.overlaps(obj.bounds))\n\t\t\t\tobj.OnCollision(this);\n\t\t\tif(MapRenderer.CurrentRenderer.ItemAnimation != null) {\n\t\t\t\tif(obj.ai != null) {\n\t\t\t\t\tif(dir == LEFT)\n\t\t\t\t\tAttackBounds.set(pos.x+(dir*1.35f)+0.5f,pos.y,1.35f,1);\n\t\t\t\t\telse\n\t\t\t\t\t\tAttackBounds.set(pos.x+0.5f,pos.y,1.35f,1);\n\t\t\t\t\tif(obj.healthBarTimer > 0.4f)\n\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\tif(!Terrain.CurrentTerrain.isSolid((int)(pos.x+0.5f+(0.3f*dir)), (int)(pos.y+0.5f)))\n\t\t\t\t\tobj.ai.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\tHitTimer = 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(obj.damageable) {\n\t\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\t\tobj.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void detectCollisions(){\n\t\tfor(int i = 0; i < pScene.getNumOf(); i++){\n\t\t\tEntity a = pScene.getObject(i);\n\t\t\tif (!a.isAlive())\n\t\t\t\tcontinue;\n\t\t\tfor(int j = i + 1; j < pScene.getNumOf(); j++){\n\t\t\t\tEntity b = pScene.getObject(j);\n\t\t\t\tif(a.intersects(b)&&(!(a.getStatic()&&b.getStatic()))){\n\t\t\t\t\tsManifolds.add(new Manifold(a,b)); // For regular objects\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void checkWorldCollisions(Bounds bounds) {\n final boolean atRightBorder = getShape().getLayoutX() >= (bounds.getMaxX() - RADIUS);\n final boolean atLeftBorder = getShape().getLayoutX() <= RADIUS;\n final boolean atBottomBorder = getShape().getLayoutY() >= (bounds.getMaxY() - RADIUS);\n final boolean atTopBorder = getShape().getLayoutY() <= RADIUS;\n final double padding = 1.00;\n\n if (atRightBorder) {\n getShape().setLayoutX(bounds.getMaxX() - (RADIUS * padding));\n velX *= frictionX;\n velX *= -1;\n }\n if (atLeftBorder) {\n getShape().setLayoutX(RADIUS * padding);\n velX *= frictionX;\n velX *= -1;\n }\n if (atBottomBorder) {\n velY *= -1;\n velY *= frictionY;\n getShape().setLayoutY(bounds.getMaxY() - (RADIUS * padding));\n }\n if (atTopBorder) {\n velY *= -1;\n velY *= frictionY;\n getShape().setLayoutY(RADIUS * padding);\n }\n }",
"public static void checkCollisions() {\n\t \n\t\tfor (Ball b1 : Panel.balls) {\n\t\t\tfor (Ball b2 : Panel.balls) {\n\t\t\t\tif (b1.Bounds().intersects(b2.Bounds()) && !b1.equals(b2)) {\t\t\t//checking for collision and no equals comparisions\n\t\t\t\t\tint vX = b1.getxVelocity();\n\t\t\t\t\tint vY = b1.getyVelocity();\n\t\t\t\t\tb1.setxVelocity(b2.getxVelocity());\t\t\t\t\t\t\t\t//reversing velocities of each Ball object\n\t\t\t\t\tb1.setyVelocity(b2.getyVelocity());\n\t\t\t\t\tb2.setxVelocity(vX);\n\t\t\t\t\tb2.setyVelocity(vY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void collisionDetection(){\r\n\t\tif( this.isActiv() ){\r\n\t\t\tif( this.isCollided() ){\r\n\t\t\t\tthis.onCollision();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void Collision(Entity e)\r\n\t{\r\n\t\tthis.isAlive = false;\r\n\t}",
"private void handleCollisions() {\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tcheckInvaderDeath(a);\n\t\t\t\tcheckPlayerDeath(a);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (Shot s : enemyShotList) {\n\t\t\t\n\t\t\tif (s.detectDownwardCollision(player.getX(), player.getY())) {\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcollectPowerUp(armorPiercing);\n\t\tcollectPowerUp(explosive);\n\t}",
"private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg.size + this.size)/2;\n deltaA = this.distance(thg);\n \n if( \n Math.abs(deltaA[0]) <= collisionRange\n &&\n Math.abs(deltaA[1]) <= collisionRange\n ){\n if(deltaA[0] > deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == 1) {\n dA[0] = 0;\n }\n }\n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == -1) {\n dA[1] = 0;\n }\n }\n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n if(dA[0] != 0) {\n dA[1] = dA[0];\n }\n if(dA[1] != 0) {\n dA[0] = dA[1];\n }\n }\n }\n \n if(deltaA[0] < deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == -1) {\n dA[0] = 0;\n }\n } \n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == 1) {\n dA[1] = 0;\n }\n } \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = dA[0];\n }\n }\n \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = -dA[0];\n }\n }\n }\n }\n }\n }",
"public EntityEntityCollision(EntityBoundary boundary1, EntityBoundary boundary2) {\n boundaries = new EntityBoundary[]{boundary1, boundary2};\n rectangles = new Rectangle[]{boundaries[0].asRectangle(), boundaries[1].asRectangle()};\n rectangles[0].width += 2;\n rectangles[1].width += 2;\n rectangles[0].height += 2;\n rectangles[1].height += 2;\n entities = new Entity[]{boundaries[0].parent, boundaries[1].parent};\n }",
"private void testCollisions () \n\t{\n\t r1.set(level.bird.position.x, level.bird.position.y,\n\t \t\t level.bird.bounds.width+.03f, level.bird.bounds.height);\n\t \n\t // Test collision: Pipes\n\t for (Pipe pipe : level.pipes) \n\t {\n\t \t r2.set(pipe.position.x, pipe.position.y, pipe.bounds.width,\n\t \t\t\t pipe.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithPipe(pipe);\n\t }\n\t \n\t // Test collision: GoldCoins\n\t for (GoldCoin goldcoin : level.goldcoins)\n\t {\n\t \t if (goldcoin.collected) continue;\n\t \t r2.set(goldcoin.position.x, goldcoin.position.y,\n\t \t\t\t goldcoin.bounds.width, goldcoin.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoldCoin(goldcoin);\n\t \t break;\n\t }\n\t \n\t // Test collision: Dp\n\t for (DoublePoint doublepoint : level.doublepoints) \n\t {\n\t \t if (doublepoint.collected) continue;\n\t \t r2.set(doublepoint.position.x, doublepoint.position.y,\n\t \t\t\t doublepoint.bounds.width, doublepoint.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithDoublePoint(doublepoint);\n\t \t break;\n\t }\n\t \n\t // Test collision: Goal\n\t for (Goal goal : level.goals)\n\t {\n\t \t r2.set(goal.position.x, goal.position.y,\n\t \t\t\t goal.bounds.width, goal.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoal(goal);\n\t \t break;\n\t }\n\t \n\t // Test collision: Brick\n\t for (Brick brick : level.bricks) \n\t {\n\t \t r2.set(brick.position.x, brick.position.y, brick.bounds.width,\n\t \t\t\t brick.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithBrick(brick);\n\t }\n\t }",
"public void collideWith(Rigidbody obj) {\n\t\t\r\n\t}",
"public abstract void collide(InteractiveObject obj);",
"@Override\n\tpublic boolean checkCollision() {\n\t\treturn true;\n\t}",
"private void checkCollisions() {\n float x = pacman.getPos().x;\n float y = pacman.getPos().y;\n\n GameEntity e;\n for (Iterator<GameEntity> i = entities.iterator(); i.hasNext(); ) {\n e = i.next();\n // auf kollision mit spielfigur pruefen\n if (Math.sqrt((x - e.getPos().x) * (x - e.getPos().x) + (y - e.getPos().y) * (y - e.getPos().y)) < 0.5f)\n if (e.collide(this, pacman))\n i.remove();\n }\n }",
"public void checkCollision()\r\n\t{\r\n\t\t//for Bullets against Avatar and Enemy\r\n\t\tfor(int bulletIndex = 0; bulletIndex < bullets.size(); bulletIndex++)\r\n\t\t{\r\n\t\t\tBullet b = bullets.get(bulletIndex);\r\n\t\t\tif (b instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tboolean collided = false;\r\n\t\t\t\tfor (int enemyIndex = 0; enemyIndex < enemy.size(); enemyIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy e = enemy.get(enemyIndex);\r\n\t\t\t\t\tif(((AvatarBullet) b).collidedWith(e))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\t\tenemy.remove(enemyIndex);\r\n\t\t\t\t\t\tenemyIndex --;\r\n\t\t\t\t\t\tcollided = true;\r\n\t\t\t\t\t\tint score = getScore()+1;\r\n\t\t\t\t\t\tsetScore(score);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (b instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tif (((EnemyBullet) b).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\tint health = Avatar.getLives()-1;\r\n\t\t\t\t\tavatar.setLives(health);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int platformIndex = 0; platformIndex < platforms.size(); platformIndex++)\r\n\t\t{\r\n\t\t\tPlatforms p = platforms.get(platformIndex);\r\n\t\t\tif (p instanceof Platforms)\r\n\t\t\t{\r\n\t\t\t\t//boolean collided = false;\r\n\t\t\t\t//Avatar a = avatar.get(enemyIndex);\r\n\t\t\t\tif(((Platforms) p).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static void checkCollisions() {\n ArrayList<Entity> bulletsArray = bullets.entities;\n ArrayList<Entity> enemiesArray = enemies.entities;\n for (int i = 0; i < bulletsArray.size(); ++i) {\n for (int j = 0; j < enemiesArray.size(); ++j) {\n if (j < 0) {\n continue;\n }\n if (i < 0) {\n break;\n }\n Entity currentBullet = bulletsArray.get(i);\n Entity currentEnemy = enemiesArray.get(j);\n if (Collision.boxBoxOverlap(currentBullet, currentEnemy)) {\n ++player.hiScore;\n if (currentBullet.collided(currentEnemy)) {\n --i;\n }\n if (currentEnemy.collided(currentBullet)) {\n --j;\n }\n }\n }\n }\n textHiScore.setString(\"HISCORE:\" + player.hiScore);\n\n // Check players with bonuses\n ArrayList<Entity> bonusArray = bonus.entities;\n for (int i = 0; i < bonusArray.size(); ++i) {\n Entity currentBonus = bonusArray.get(i);\n if (Collision.boxBoxOverlap(player, currentBonus)) {\n if (currentBonus.collided(player)) {\n --i;\n player.collided(currentBonus);\n }\n }\n }\n }",
"public void collide(Entity entity) throws IllegalArgumentException{\n\t \n \tif (this instanceof Ship && entity instanceof Ship) this.defaultCollide(entity);\n \telse if (this instanceof MinorPlanet && entity instanceof MinorPlanet) this.defaultCollide(entity);\n \telse if (entity instanceof Bullet) {\n \t\tBullet bullet = (Bullet) entity;\n \t\tif (bullet.getBulletSource() == this) bullet.bulletCollideOwnShip((Ship) this);\n \t\telse bullet.bulletCollideSomethingElse(this);\n \t\t}\n \t\n \telse if (this instanceof Bullet) {\n \t\tBullet bullet = (Bullet) this;\n \t\tif (bullet.getBulletSource() == entity) bullet.bulletCollideOwnShip((Ship) entity);\n \t\telse bullet.bulletCollideSomethingElse(entity);\n \t\t}\n \t\n \telse if ((this instanceof Ship && entity instanceof Asteroid) || (entity instanceof Ship && this instanceof Asteroid)){\n \t\tShip ship = null;\n \t\tif (this instanceof Ship){\n \t\t\tship = (Ship) this;\n \t\t} else {\n \t\t\tship = (Ship) entity;\n \t\t}\n \t\tship.terminate();\n \t}\n \t\n \telse if ((this instanceof Ship && entity instanceof Planetoid) || (entity instanceof Ship && this instanceof Planetoid)){\n \t\tShip ship = null;\n \t\tif (this instanceof Ship){\n \t\t\tship = (Ship) this;\n \t\t} else {\n \t\t\tship = (Ship) entity;\n \t\t}\n \t\t\n \t\tWorld world = ship.getSuperWorld();\n \t\tdouble xnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth());\n \t\tdouble ynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight());\n \t\tship.setPosition(xnew, ynew);\n \t\t\n \t\twhile (! this.overlapAnyEntity()){\n \t\t\txnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth());\n \t\t\tynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight());\n \t\t\tship.setPosition(xnew, ynew);\n \t\t\t}\n \t}\n\t \t\n \t\n }",
"public void checkCollisions(List<Entity> listOfCloseObjects){\n\n for(Entity first : listOfCloseObjects){\n for(Entity second : listOfCloseObjects){\n if(first!=second) {\n\n String typeOfCollision = \"\";\n\n //check for a collision between the bounding boxes\n if (first.getBoundingBox().intersects(second.getBoundingBox())) {\n if(first.getEntityType().equals(EntityType.WALL) && second.getEntityType().equals(EntityType.PLAYER)) {\n typeOfCollision = \"playerWithWall\";\n }\n else if(first.getEntityType().equals(EntityType.FLOOR_HAZARD) && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"playerWithHazard\";\n }\n else if(first.getEntityType().equals(EntityType.MELEE_WEAPON) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"swordWithEnemy\";\n }\n else if(first instanceof Bullet && second.getEntityType().equals(EntityType.WALL)){\n typeOfCollision = \"bulletWithWall\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.WALL)){\n typeOfCollision = \"enemyWithWall\";\n }\n else if((first.getEntityType().equals(EntityType.DEFAULT_BULLET) || first.getEntityType().equals(EntityType.SHOTGUN_BULLET) || first.getEntityType().equals(EntityType.FAST_BULLET)) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"enemyWithBullet\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"enemyWithEnemy\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"enemyWithPlayer\";\n }\n else if((first.getEntityType().equals(EntityType.SWORD) || first.getEntityType().equals(EntityType.SHOTGUN) || first.getEntityType().equals(EntityType.PISTOL) || first.getEntityType().equals(EntityType.ASSAULT_RIFLE) ||\n first.getEntityType().equals(EntityType.SHIELD) || first.getEntityType().equals(EntityType.SPEEDBOOST) || first.getEntityType().equals(EntityType.HEART))\n && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"itemWithPlayer\";\n }\n\n if(!typeOfCollision.isEmpty())\n collide(typeOfCollision, first, second);\n }\n }\n }\n }\n\n }",
"@Override\n\tpublic void doCollision(CollisionResult c) {\n\t\t\n\t}",
"public void handleCollision(Collision c);",
"private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}",
"@Override\r\n public void applyEntityCollision(Entity entity)\r\n {\r\n Vector3 v = Vector3.getNewVector();\r\n Vector3 v1 = Vector3.getNewVector();\r\n\r\n blockBoxes.clear();\r\n\r\n int sizeX = blocks.length;\r\n int sizeY = blocks[0].length;\r\n int sizeZ = blocks[0][0].length;\r\n Set<Double> topY = Sets.newHashSet();\r\n for (int i = 0; i < sizeX; i++)\r\n for (int k = 0; k < sizeY; k++)\r\n for (int j = 0; j < sizeZ; j++)\r\n {\r\n ItemStack stack = blocks[i][k][j];\r\n if (stack == null || stack.getItem() == null) continue;\r\n\r\n Block block = Block.getBlockFromItem(stack.getItem());\r\n AxisAlignedBB box = Matrix3.getAABB(posX + block.getBlockBoundsMinX() - 0.5 + boundMin.x + i,\r\n posY + block.getBlockBoundsMinY() + k,\r\n posZ + block.getBlockBoundsMinZ() - 0.5 + boundMin.z + j,\r\n posX + block.getBlockBoundsMaxX() + 0.5 + boundMin.x + i,\r\n posY + block.getBlockBoundsMaxY() + k,\r\n posZ + block.getBlockBoundsMaxZ() + 0.5 + boundMin.z + j);\r\n blockBoxes.add(box);\r\n topY.add(box.maxY);\r\n }\r\n\r\n v.setToVelocity(entity).subtractFrom(v1.setToVelocity(this));\r\n v1.clear();\r\n Matrix3.doCollision(blockBoxes, entity.getEntityBoundingBox(), entity, 0, v, v1);\r\n for(Double d: topY)\r\n if (entity.posY >= d && entity.posY + entity.motionY <= d && motionY <= 0)\r\n {\r\n double diff = (entity.posY + entity.motionY) - (d + motionY);\r\n double check = Math.max(0.5, Math.abs(entity.motionY + motionY));\r\n if (diff > 0 || diff < -0.5 || Math.abs(diff) > check)\r\n {\r\n entity.motionY = 0;\r\n }\r\n }\r\n\r\n boolean collidedY = false;\r\n if (!v1.isEmpty())\r\n {\r\n if (v1.y >= 0)\r\n {\r\n entity.onGround = true;\r\n entity.fallDistance = 0;\r\n entity.fall(entity.fallDistance, 0);\r\n }\r\n else if (v1.y < 0)\r\n {\r\n boolean below = entity.posY + entity.height - (entity.motionY + motionY) < posY;\r\n if (below)\r\n {\r\n v1.y = 0;\r\n }\r\n }\r\n if (v1.x != 0) entity.motionX = 0;\r\n if (v1.y != 0) entity.motionY = motionY;\r\n if (v1.z != 0) entity.motionZ = 0;\r\n if (v1.y != 0) collidedY = true;\r\n v1.addTo(v.set(entity));\r\n v1.moveEntity(entity);\r\n }\r\n if (entity instanceof EntityPlayer)\r\n {\r\n EntityPlayer player = (EntityPlayer) entity;\r\n if (Math.abs(player.motionY) < 0.1 && !player.capabilities.isFlying)\r\n {\r\n entity.onGround = true;\r\n entity.fallDistance = 0;\r\n }\r\n if (!player.capabilities.isCreativeMode && !player.worldObj.isRemote)\r\n {\r\n EntityPlayerMP entityplayer = (EntityPlayerMP) player;\r\n if (collidedY) entityplayer.playerNetServerHandler.floatingTickCount = 0;\r\n }\r\n }\r\n }",
"public abstract boolean collisionWith(CollisionObject obj);",
"@Override\r\n\tpublic void handleCollision(Contact contact) {\n\t}",
"private void collisionsCheck() {\n\t\tif(this.fence.collisionTest(\n\t\t\t\tthis.spider.getMovementVector())) \n\t\t{\n\t\t\t// we actually hit something!\n\t\t\t// call collision handlers\n\t\t\tthis.spider.collisionHandler();\n\t\t\tthis.fence.collisionHandler();\n\t\t\t// vibrate!\n\t\t\tvibrator.vibrate(Customization.VIBRATION_PERIOD);\n\t\t\t// lose one life\n\t\t\tthis.data.lostLife();\n\t\t}\n\t}",
"@Override\r\n public boolean collision(org.dyn4j.dynamics.Body body1, BodyFixture fixture1, org.dyn4j.dynamics.Body body2, BodyFixture fixture2, Penetration penetration) {\r\n return true;\r\n }",
"private void collide(String typeOfCollision, Entity first, Entity second) {\n switch (typeOfCollision) {\n\n case \"playerWithWall\":\n intersectPlayerWithWall(first);\n break;\n\n case \"playerWithHazard\":\n intersectPlayerWithWall(first);\n break;\n\n case \"bulletWithWall\":\n room.getEntityManager().removeEntity(first);\n ((WeaponComponent) player.getComponent(ComponentType.WEAPON)).getBullets().removeEntity(first);\n break;\n\n case \"enemyWithWall\":\n intersectEnemyWithWall(first, second);\n break;\n\n case \"enemyWithBullet\":\n intersectBulletWithEnemy(first, second);\n break;\n\n case \"enemyWithEnemy\":\n intersectEnemyWithWall(first, second);\n break;\n\n case \"enemyWithPlayer\":\n NinjaEntity ninja = (NinjaEntity) second;\n ninja.setIsHit(true);\n break;\n\n case \"itemWithPlayer\":\n itemIntersectsPlayer(first);\n break;\n\n case \"swordWithEnemy\":\n intersectSwordWithEnemy(first, second);\n break;\n }\n }",
"public void noCollision(){\r\n this.collidingEntity2=null;\r\n this.collidingEntity=null;\r\n collidedTop=false;\r\n collide=false;\r\n }",
"private void handleCollisions(Sprite sprite1, Sprite sprite2){\n\t\tif(!sprite1.isActive() || !sprite2.isActive()) return;\n\n\t\tif(sprite1.equals(sprite2)){\n\t\t\treturn;\n\t\t}\n\n\t\tBounds boundsSprite1 = renderSprite(sprite1).getChildren().get(0).getBoundsInParent();\n\t\tBounds boundsSprite2 = (renderSprite(sprite2).getChildren().get(0).getBoundsInParent());\n\n\t\tif(boundsSprite1.intersects(boundsSprite2)) {\n\t\t\tcollisionHandler.handleCollide(sprite1, sprite2);\n\t\t}\n\n\t}",
"public void processCollisions(){\n\t\tSet<String> allCollisionKeys = new HashSet<String>();\n \n\t\t// prepare a list of collisions to handle\n\t\tList<CollisionData> collisions = new ArrayList<CollisionData>();\n \n\t\tSet<Integer> types = collisionsTypes.keySet();\n \n\t\t// obtain every type for collision\n\t\tfor(Integer type : types){\n\t\t\t// obtain for each type the type it collides with\n\t\t\tList<Integer> collidesWithTypes = collisionsTypes.get(type);\n \n\t\t\tfor(Integer collidingType : collidesWithTypes){\n\t\t\t\t// if the pair was already treated ignore it else treat it\n\t\t\t\tif( !allCollisionKeys.contains(getKey(type, collidingType)) ){\n\t\t\t\t\t// obtain all object of type\n\t\t\t\t\tList<CollidableObject> collidableForType = collidables.get(type);\n\t\t\t\t\t// obtain all object of collidingtype\n\t\t\t\t\tList<CollidableObject> collidableForCollidingType = collidables.get(collidingType);\n \n\t\t\t\t\tfor( CollidableObject collidable : collidableForType ){\n\t\t\t\t\t\tfor( CollidableObject collidesWith : collidableForCollidingType ){\n\t\t\t\t\t\t\tif(collidable.isCollidingWith(collidesWith)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tCollisionData cd = new CollisionData();\n\t\t\t\t\t\t\t\tcd.handler = collisionHandlers.get(getKey(type, collidingType));\n\t\t\t\t\t\t\t\tcd.object1 = collidable;\n\t\t\t\t\t\t\t\tcd.object2 = collidesWith;\n \n\t\t\t\t\t\t\t\tcollisions.add(cd);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \n\t\t\t\t\tallCollisionKeys.add(getKey(type, collidingType));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n \n\t\tfor(CollisionData cd : collisions){\n\t\t\tcd.handler.performCollision(cd.object1, cd.object2);\n \n\t\t}\n\t\t\n//\t System.out.println(\"unsorted map\");\n//\t for (String key : collisionHandlers.keySet()) {\n//\t System.out.println(\"key/value: \" + key + \"/\"+collisionHandlers.get(key));\n//\t }\n\t}",
"public void checkCollision() {}",
"public void updateOptimalCollisionArea();",
"private void fireball2Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY());\r\n\t\tGObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tGObject bottomRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(fireball2);\r\n\t\t\tfireball2 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"void collisionHappened(int position);",
"private void checkCollisions() {\n int x1 = 0;\n int x2 = 0;\n for(CollisionBox e : cols) {\n for(CollisionBox f : cols) {\n if(\n x2 > x1 && // Skip checking collisions twice\n// (\n// e != f || // The entities are not the same entity\n// ( // One of the entities's parent object is not the bullet of the other's (aka ignore player bullets colliding with player)\n// // And also check they're not both from the same entity (two bullets colliding both going in the same direction from the same entity)\n// f.getParent() != null && // The first entity has a parent and\n// e.getParent() != null && // The second entity has a parent and\n// f.getParent().getParent() != null && // The first entity's parent has a parent and\n// e.getParent().getParent() != null && // The second entity's parent has a parent and\n// f.getParent().getParent() != e.getParent() && // The first entity's parent's parent is not the second entity's parent\n// e.getParent().getParent() != f.getParent() &&// The second entity's parent's parent is not the first entity's parent\n// f.getParent().getParent() != e.getParent().getParent() // The first and second entities' parents' parents are not the same\n// )\n// ) &&\n SAT.isColliding(e, f) // The entities are colliding\n ) { // Collide the Entities\n Entity ep = e.getParent();\n Entity fp = f.getParent();\n ep.collide(fp);\n fp.collide(ep);\n }\n x2++;\n }\n x1++;\n x2 = 0;\n }\n }",
"public void checkCollision(Box box){\r\n if(collidingEntity2!=null && collidingEntity2!=box){\r\n return;\r\n }\r\n FloatRect x = box.getRect ();\r\n\r\n if (rect1==null || x==null){\r\n return;\r\n }\r\n\r\n FloatRect ins = rect1.intersection (x);\r\n\r\n if(ins!=null) {\r\n this.collidingEntity2= box;\r\n collide=true;\r\n checkTopCollision (x);\r\n if(collidedTop==false) {\r\n checkRightCollision (x);\r\n checkLeftCollision (x);\r\n }\r\n } else {\r\n noCollision ();\r\n }\r\n }",
"private void collision() {\n\t\tfor(int i = 0; i < brownMeteors.length; i++) {\n\t\t\tif( distance(brownMeteors[i].getLayoutX() + ENTITIES_SIZE/2, brownMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(brownMeteors[i]);\n\t\t\t\t\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter; \n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t//player vs grey Meteor\n\t\tfor(int i = 0; i < greyMeteors.length; i++) {\n\t\t\tif( distance(greyMeteors[i].getLayoutX() + ENTITIES_SIZE/2, greyMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(greyMeteors[i]);\n\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter;\n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//laser vs brown Meteor\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < brownMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(brownMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(brownMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < greyMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(greyMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(greyMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t}",
"@Override\n\tpublic boolean hasCollide(Entity e) {\n\t\treturn rect.intersects(e.getRectangle());\n\t}",
"@Override\r\n public boolean collision(org.dyn4j.dynamics.Body body1, BodyFixture fixture1, org.dyn4j.dynamics.Body body2, BodyFixture fixture2) {\r\n //Default, keep processing this event\r\n\r\n return true;\r\n }",
"public void applyEntityCollision(Entity var1)\n {\n if (this.gotMovement)\n {\n if (var1 instanceof EntitySentry || var1 instanceof EntityTrackingGolem || var1 instanceof EntitySliderHostMimic || var1 instanceof EntitySentryGuardian || var1 instanceof EntitySentryGolem || var1 instanceof EntityBattleSentry || var1 instanceof EntitySlider || var1 instanceof EntityMiniSlider)\n {\n return;\n }\n\n boolean var2 = var1.attackEntityFrom(DamageSource.causeMobDamage(this.slider), 6);\n\n if (var2 && var1 instanceof EntityLiving)\n {\n this.worldObj.playSoundAtEntity(this, \"aeboss.slider.collide\", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));\n\n if (var1 instanceof EntityCreature || var1 instanceof EntityPlayer)\n {\n EntityLiving var3 = (EntityLiving) var1;\n var3.motionY += 0.35D;\n var3.motionX *= 2.0D;\n var3.motionZ *= 2.0D;\n }\n\n this.stop();\n }\n }\n }",
"private void fireball1Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball1.getX() - 1, fireball1.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball1.getX() - 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tGObject topRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY());\r\n\t\tGObject bottomRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tif(topLeft == player || bottomLeft == player || topRight == player || bottomRight == player) {\r\n\t\t\tremove(fireball1);\r\n\t\t\tfireball1 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"public abstract void onCollision();",
"public static void doCollision(org.bukkit.entity.Entity entity, org.bukkit.entity.Entity with) {\n\t\tCommonNMS.getNative(entity).collide(CommonNMS.getNative(with));\n\t}",
"public void collide(CollisionEvent evt) {\n\t\tthis.colliding = true;\n\t\tif(evt.getEntity().getType().equals(\"PlayerCharacter\") && evt.getDirection().equals(Direction.TOP)){\n\t\t\tthis.addVector2D(new Vector2D(0,2));\n\t\t}\n\t\tif (this.getCollideTypes().contains(evt.getEntity().getType())\n\t\t\t\t&& (evt.getDirection().equals(Direction.BOTTOM))) {\n\t\t}\n\t}",
"public void unitCollision() {\n\t}",
"@Override\r\n\tpublic boolean collides (Entity other)\r\n\t{\r\n\t\tif (other == owner || other instanceof Missile)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn super.collides(other);\r\n\t}",
"public void detectCollisions() {\r\n\r\n for (int pos = 0; pos < this.numberOfBees; pos++) {\r\n if (!beesArray[pos].isInCollisionRisk()) {\r\n int i = beesArray[pos].getI();\r\n int j = beesArray[pos].getJ();\r\n int k = beesArray[pos].getK();\r\n for (int x = (i - offset); x <= (i + offset); x++) {\r\n for (int y = (j - offset); y <= (j + offset); y++) {\r\n for (int z = (k - offset); z <= (k + offset); z++) {\r\n if (x == i && y == j && z == k || (Math.abs(i - j) == 0) || Math.abs(i - j) == 2 * offset) {\r\n continue;\r\n } else if (BeesCollision[x][y][z] != null) {\r\n beesArray[pos].setCollision(true);\r\n if (BeesCollision[x][y][z].size() == 1) {\r\n BeesCollision[x][y][z].getFirst().setCollision(true);\r\n break;\r\n }\r\n }\r\n }\r\n if (beesArray[pos].isInCollisionRisk()) {\r\n break;\r\n }\r\n }\r\n if (beesArray[pos].isInCollisionRisk()) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }",
"private void checkCastleCollisions() {\n\t\t\n\t}",
"@Override\n public void update(float dt) {\n\n\n for (GameObject g : getGameObjectList()) {\n Collider gameObjectCollider = g.getComponent(Collider.class);\n if (g.getSID() instanceof Map.Block ) {\n continue;\n }\n gameObjectCollider.reduceAvoidTime(dt);\n\n for (GameObject h : getGameObjectList()) {\n Collider gameObjectCollider2 = h.getComponent(Collider.class);\n if (g.equals(h)) {\n continue;\n }\n\n if ((gameObjectCollider.bitmask & gameObjectCollider2.layer) != 0) {\n if (gameObjectCollider2.layer == gameObjectCollider.layer){\n continue;\n }\n\n TransformComponent t = g.getComponent(TransformComponent.class);\n Vector2f pos1 = g.getComponent(Position.class).getPosition();\n FloatRect rect1 = new FloatRect(pos1.x, pos1.y, t.getSize().x, t.getSize().y);\n TransformComponent t2 = g.getComponent(TransformComponent.class);\n Vector2f pos2 = h.getComponent(Position.class).getPosition();\n FloatRect rect2 = new FloatRect(pos2.x, pos2.y, t2.getSize().x, t2.getSize().y);\n FloatRect collision = rect2.intersection(rect1);\n if (collision != null) {\n Collider mainCollider = g.getComponent(Collider.class);\n Collider collidingWith = h.getComponent(Collider.class);\n\n\n if (!(mainCollider.checkGameObject(h)||collidingWith.checkGameObject(g)))\n {\n if (mainCollider.events == true && collidingWith.events == true)\n {\n\n\n if ((g.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0)\n {\n g.addComponent(new CollisionEvent());\n\n\n }\n g.getComponent(CollisionEvent.class).getG().add(h);\n if ((h.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0) {\n h.addComponent(new CollisionEvent());\n\n }\n h.getComponent(CollisionEvent.class).getG().add(g);\n\n }\n\n\n if (mainCollider.dieOnPhysics == true) {\n EntityManager.getEntityManagerInstance().removeGameObject(g);\n }\n if (mainCollider.physics == true && collidingWith.physics == true) {\n float resolve = 0;\n float xIntersect = (rect1.left + (rect1.width * 0.5f)) - (rect2.left + (rect2.width * 0.5f));\n float yIntersect = (rect1.top + (rect1.height * 0.5f)) - (rect2.top + (rect2.height * 0.5f));\n if (Math.abs(xIntersect) > Math.abs(yIntersect)) {\n if (xIntersect > 0) {\n resolve = (rect2.left + rect2.width) - rect1.left;\n } else {\n resolve = -((rect1.left + rect1.width) - rect2.left);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(resolve, 0));\n } else {\n if (yIntersect > 0) {\n resolve = (rect2.top + rect2.height) - rect1.top;\n\n } else\n {\n resolve = -((rect1.top + rect1.height) - rect2.top);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(0, resolve));\n }\n }\n }\n\n\n }\n }\n }\n }\n }",
"public void collideBoundary() {\n\t\tif (getWorld() == null) return;\n\t\tif (getXCoordinate() < 1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getXCoordinate() > getWorld().getWidth()-1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getYCoordinate() < 1.01 * getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t\tif (getYCoordinate() > getWorld().getHeight()-1.01*getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t}",
"protected void collideAll(Mob cur, List<Entity> entityList, int dir) {\r\n for(Entity e : entityList) {\r\n if(cur != e && !(e instanceof Floor)) {\r\n collideOne(cur, e, dir);\r\n }\r\n }\r\n }",
"public void checkCollision() {\n\t\tfor(SolidObject i : solidObjects) {\r\n\t\t\tif(getBounds().intersects(i.getBounds())) {\r\n\t\t\t\t//Increments the KillCount\r\n\t\t\t\tif(i.onAttack(damage, flipped)) {\r\n\t\t\t\t\tkillCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void processPlayerCollision() {\n\t\t// This starts by converting the player vertices to global positions.\n\t\tVector3 playerGlobalPosition = player.getGlobalPositionVector();\n\t\tVector3 playerGlobalRotation = player.getGlobalRotationVector();\n\n\t\tVector3 playerVertex1 = new Vector3(player.hitboxPoints[0], player.hitboxPoints[1]);\n\t\tVector3 playerVertex2 = new Vector3(player.hitboxPoints[2], player.hitboxPoints[3]);\n\t\tVector3 playerVertex3 = new Vector3(player.hitboxPoints[4], player.hitboxPoints[5]);\n\t\t// TODO: Confirm this is correct.\n\t\tVector3 playerVertex1Global = new Vector3(playerVertex1.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex1.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\t\tVector3 playerVertex2Global = new Vector3(playerVertex2.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex2.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\t\tVector3 playerVertex3Global = new Vector3(playerVertex3.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex3.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\n\t\tfor (AsteroidsAsteroid a : asteroids) {\n\t\t\t// If any of the vertices collide and the player is alive, lose a life.\n\t\t\tif ((a.collides(playerVertex1Global) || a.collides(playerVertex2Global) || a.collides(playerVertex3Global)) && player.isShowing()) {\n\t\t\t\tloseLife();\n\t\t\t}\n\t\t}\n\t}",
"private void updateTileCollisions(Mob mob) {\n\t\tif (mob instanceof Player) {\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().x, Display.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().y, Display.getHeight() - mob.getHeight() / 2)));\n\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().x, tilemap.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().y, tilemap.getHeight()) - mob.getHeight() / 2));\r\n\t\t}\r\n\r\n\t\tPoint center = mob.getScreenPosition().add(offset);\r\n\r\n\t\tboolean hitGround = false; // used to check for vertical collisions and determine \r\n\t\t// whether or not the mob is in the air\r\n\t\tboolean hitWater = false;\r\n\r\n\t\t//update mob collisions with tiles\r\n\t\tfor (int i = 0; i < tilemap.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < tilemap.grid[0].length; j++) {\r\n\r\n\t\t\t\tif (tilemap.grid[i][j] != null &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x > center.x - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x < center.x + (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y > center.y - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y < center.y + (250)) {\r\n\r\n\t\t\t\t\tRectangle mobRect = mob.getBounds();\r\n\t\t\t\t\tRectangle tileRect = tilemap.grid[i][j].getBounds();\r\n\r\n\t\t\t\t\t// if mob intersects a tile\r\n\t\t\t\t\tif (mobRect.intersects(tileRect)) {\r\n\r\n\t\t\t\t\t\t// get the intersection rectangle\r\n\t\t\t\t\t\tRectangle rect = mobRect.intersection(tileRect);\r\n\r\n\t\t\t\t\t\t// if the mob intersects a water tile, adjust its movement accordingly\r\n\t\t\t\t\t\tif (tilemap.grid[i][j].type == TileMap.WATER) { \r\n\r\n\t\t\t\t\t\t\tmob.gravity = mob.defaultGravity * 0.25f;\r\n\t\t\t\t\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed * 0.35f;\r\n\t\t\t\t\t\t\tmob.moveSpeed = mob.defaultMoveSpeed * 0.7f;\r\n\r\n\t\t\t\t\t\t\tif (!mob.inWater) { \r\n\t\t\t\t\t\t\t\tmob.velocity.x *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.velocity.y *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.inWater = true;\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\thitWater = true;\r\n\t\t\t\t\t\t\tmob.jumping = false;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t// if intersection is vertical (and underneath player)\r\n\t\t\t\t\t\t\tif (rect.getHeight() < rect.getWidth()) {\r\n\r\n\t\t\t\t\t\t\t\t// make sure the intersection isn't really horizontal\r\n\t\t\t\t\t\t\t\tif (j + 1 < tilemap.grid[0].length && \r\n\t\t\t\t\t\t\t\t\t\t(tilemap.grid[i][j+1] == null || \r\n\t\t\t\t\t\t\t\t\t\t!mobRect.intersects(tilemap.grid[i][j+1].getBounds()))) {\r\n\r\n\t\t\t\t\t\t\t\t\t// only when the mob is falling\r\n\t\t\t\t\t\t\t\t\tif (mob.velocity.y <= 0) {\r\n\t\t\t\t\t\t\t\t\t\tmob.velocity.y = 0;\r\n\t\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.inAir = false;\t\r\n\t\t\t\t\t\t\t\t\t\tmob.jumping = false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if intersection is horizontal\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tmob.velocity.x = 0;\r\n\r\n\t\t\t\t\t\t\t\tif (mobRect.getCenterX() < tileRect.getCenterX()) {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tfloat xToCenter = Math.abs((float)(mobRect.getCenterX() - tileRect.getCenterX()));\r\n\t\t\t\t\t\t\tfloat yToCenter = Math.abs((float)(mobRect.getCenterY() - tileRect.getCenterY())); \r\n\r\n\t\t\t\t\t\t\t// Check under the mob to see if it touches a tile. If so, hitGround = true\r\n\t\t\t\t\t\t\tif (yToCenter <= (mobRect.getHeight() / 2 + tileRect.getHeight() / 2) && \r\n\t\t\t\t\t\t\t\t\txToCenter <= (mobRect.getWidth() / 2 + tileRect.getWidth() / 2))\r\n\t\t\t\t\t\t\t\thitGround = true;\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if mob doesn't intersect a tile vertically, they are in the air\r\n\t\tif (!hitGround) {\r\n\t\t\tmob.inAir = true;\r\n\t\t}\r\n\t\t// if the mob is not in the water, restore its default movement parameters\r\n\t\tif (!hitWater) {\r\n\t\t\tmob.gravity = mob.defaultGravity;\r\n\t\t\tmob.moveSpeed = mob.defaultMoveSpeed;\r\n\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed;\r\n\t\t\tmob.inWater = false;\r\n\t\t}\r\n\t}",
"public abstract void collision(SpaceThing thing);",
"@Override\r\n public boolean collision(org.dyn4j.dynamics.Body body1, BodyFixture fixture1, org.dyn4j.dynamics.Body body2, BodyFixture fixture2, Manifold manifold) {\r\n\r\n EntityId one = (EntityId) body1.getUserData();\r\n EntityId two = (EntityId) body2.getUserData();\r\n\r\n if (gravityState.isWormholeFixture(fixture1) || gravityState.isWormholeFixture(fixture2)) {\r\n return gravityState.collide(body1, fixture1, body2, fixture2, manifold, time.getTpf());\r\n }\r\n\r\n if (flagState.isFlag(one) || flagState.isFlag(two)) {\r\n return flagState.collide(body1, fixture1, body2, fixture2, manifold, time.getTpf());\r\n }\r\n\r\n return true; //Default, keep processing this event\r\n }",
"protected void onCollision(Actor other) {\r\n\r\n\t}",
"public void checkEntityOverlap(){\n for(Entity entity:entityList){\n if(entity.getEntityType().equals(\"Sandwich\")) {\n if (player.getPlayerCoordinates() == entity.getEntityCoordinates()) {\n player.eatSandwich();\n entityList.remove(entity);\n }\n }\n }\n }",
"protected void collidesCallback(){\n\t\tphxService.collidingCallback(this);\n\t}",
"public void checkCollision(){\r\n\r\n\t\t\t\tsmile.updateVelocity();\r\n\r\n\t\t\t\tsmile.updatePosition();\r\n\r\n\t\t\t\tif (smile.updateVelocity() > 0){\r\n\r\n\t\t\t\t\tfor (int k = 0; k < arrayPlat.size(); k++){\r\n\r\n\t\t\t\t\t\tif (smile.getNode().intersects(arrayPlat.get(k).getX(), arrayPlat.get(k).getY(), Constants.PLATFORM_WIDTH, Constants.PLATFORM_HEIGHT)){\r\n\r\n\t\t\t\t\t\t\tsmile.setVelocity(Constants.REBOUND_VELOCITY);\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t}",
"public void collisionVS() {\n for (int i = 0; i < enemyBullets.size(); i++) {\n\n enemyBullets.get(i).tick();\n\n if (enemyBullets.get(i).getImgY() >= 750 || enemyBullets.get(i).getImgY() <= 40) {\n\n enemyBullets.get(i).bulletImage.delete();\n enemyBullets.remove(enemyBullets.get(i));\n i--;\n continue;\n }\n\n for (int j = 0; j < spaceShips.size(); j++) {\n\n if (spaceShips.get(j).getHitbox().intersects(enemyBullets.get(i).getHitbox())) {\n\n spaceShips.get(j).hit();\n enemyBullets.get(i).hit();\n enemyBullets.remove(enemyBullets.get(i));\n\n if (spaceShips.get(j).getHp() <= 0) {\n spaceShips.remove(spaceShips.get(j));\n }\n\n //if it collides with one leave the for loop\n i--;\n j = spaceShips.size();\n }\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n\n // SPACESHIPS WITH ENEMIES AND ENEMY BULLETS\n for (int i = 0; i < spaceShips.size(); i++) {\n spaceShips.get(i).tick();\n\n // WITH ENEMIES\n for (int j = 0; j < enemies.size(); j++) {\n if (spaceShips.get(i).getHitbox().intersects(enemies.get(j).getHitbox())) {\n\n spaceShips.get(i).hit();\n enemies.get(j).hit(20);\n enemies.remove(enemies.get(j));\n\n if (spaceShips.get(i).getHp() <= 0) {\n spaceShips.remove(spaceShips.get(i));\n }\n\n //if it collides with one leave the for loop\n j = enemies.size();\n }\n }\n }\n }",
"@Override\n public void checkCollision( Sprite obj )\n {\n \n }",
"public abstract void collided(Collision c);",
"public void collision() {\n for (int i = 0; i < friendlyBullets.size(); i++) {\n\n friendlyBullets.get(i).tick();\n\n if (friendlyBullets.get(i).getImgY() <= 40) {\n friendlyBullets.get(i).bulletImage.delete();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n continue;\n }\n\n for (int j = 0; j < enemies.size(); j++) {\n\n if (friendlyBullets.get(i).getHitbox().intersects(enemies.get(j).getHitbox())) {\n\n friendlyBullets.get(i).hit();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n\n enemies.get(j).hit();\n\n if (enemies.get(j).getHp() <= 0) {\n enemies.remove(enemies.get(j));\n score.setScore(50);\n j--;\n }\n //end this loop\n j = enemies.size();\n }\n }\n\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////\n\n\n // Enemy out of bounds\n for (int i = 0; i < enemies.size(); i++) {\n\n enemies.get(i).tick();\n\n // Out of bounds\n if (enemies.get(i).getEnemyImage().getY() >= 750) {\n enemies.get(i).getEnemyImage().delete();\n enemies.remove(enemies.get(i));\n\n if (enemies.size() > 1) {\n i--;\n }\n }\n }\n\n\n //////////////////////////////////////////////////////////////////////////\n\n //powerUps out of bounds and collision with spaceships\n for (int i = 0; i < powerUps.size(); i++) {\n\n powerUps.get(i).tick();\n\n if (powerUps.get(i).getImgY() >= 745) {\n\n powerUps.get(i).powerUpImage.delete();\n powerUps.remove(powerUps.get(i));\n\n i--;\n continue;\n }\n\n for (int j = 0; j < spaceShips.size(); j++) {\n\n if (spaceShips.get(j).getHitbox().intersects(powerUps.get(i).getHitbox())) {\n\n\n spaceShips.get(j).powerUp(powerUps.get(i).getPowerUpType());\n powerUps.get(i).hit();\n powerUps.remove(powerUps.get(i));\n\n //if it collides with one leave the for loop\n i--;\n j = spaceShips.size();\n }\n }\n\n }\n\n }",
"private boolean detectCollisions(GameState mGaemState,ArrayList<GameObject> objects,SoundEngine se,ParticleSystem ps){\n boolean playerHit = false;\n for (GameObject go1:objects){\n if (go1.checkActive()){\n //the 1st object is active\n //so worth checking\n\n for (GameObject go2:objects){\n if (go2.checkActive()){\n //the 2nd object is active\n //so worth checking\n if (RectF.intersects(go1.getTransform().getCollider(),go2.getTransform().getCollider())){\n\n //switch goes here\n //there has been a collision\n //but does it matter?\n switch (go1.getTag() + \" with \" + go2.getTag()){\n case \"Player with Alien Laser\":\n playerHit = true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player with Alien\":\n playerHit =true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player Laser with Alien\":\n mGaemState.increaseScore();\n //respawn the alien\n ps.emitParticles(new PointF(go2.getTransform().getLocation().x,go2.getTransform().getLocation().y));\n go2.setInactive();\n go2.spawn(objects.get(Level.PLAYER_INDEX).getTransform());\n go1.setInactive();\n se.playAlienExplode();\n\n break;\n\n default:\n break;\n }\n\n }\n }\n }\n }\n }\n return playerHit;\n }",
"public void handleCollision(ISprite collisionSprite, Collision collisionType);",
"@Override protected boolean drag_collide(float newX, float newY, Entity e){\n\n\n boolean collides=\n e.collideLine(x, y, newX, newY) ||\n e.collideLine(x + thirdWidth, y, newX+thirdWidth, newY) ||\n e.collideLine(x, y+height, newX, newY+height) ||\n e.collideLine(x + thirdWidth, y+height, newX+thirdWidth, newY+height) ||\n\n e.collideLine(2*thirdWidth + x, y, 2*thirdWidth + newX, newY) ||\n e.collideLine(2*thirdWidth + x + thirdWidth, y, 2*thirdWidth + newX+thirdWidth, newY) ||\n e.collideLine(2*thirdWidth + x, y+height, 2*thirdWidth + newX, newY+height) ||\n e.collideLine(2*thirdWidth + x + thirdWidth, y+height, 2*thirdWidth + newX+thirdWidth, newY+height)\n ;\n return collides;\n }",
"private void checkPlayerCollisions() {\r\n\t\tGObject left = getElementAt(player.getX() - 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tGObject right = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tif(dragon1 != null && (left == dragon1 || right == dragon1)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t\tif(dragon2 != null && (left == dragon2 || right == dragon2)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}",
"@NonNull JavaBoundingBox[] collision();",
"private void handleObjectCollision() {\n \tGObject obstacle = getCollidingObject();\n \t\n \tif (obstacle == null) return;\n \tif (obstacle == message) return;\n \t\n\t\tvy = -vy;\n\t\t\n\t\tSystem.out.println(\"ball x: \" + ball.getX() + \" - \" + (ball.getX() + BALL_RADIUS * 2) );\n\t\tSystem.out.println(\"paddle x: \" + paddleXPosition + \" - \" + (paddleXPosition + PADDLE_WIDTH) );\n\t\tif (obstacle == paddle) {\n\t\t\tpaddleCollisionCount++;\n\t\t\t\n\t\t\t// if we're hitting the paddle's side, we need to also bounce horizontally\n\t\t\tif (ball.getX() >= (paddleXPosition + PADDLE_WIDTH) || \n\t\t\t\t(ball.getX() + BALL_RADIUS * 2) <= paddleXPosition ) {\n\t\t\t\tvx = -vx;\t\t\t\t\n\t\t\t}\n\t\t} else {\n \t\t// if the object isn't the paddle, it's a brick\n\t\t\tremove(obstacle);\n\t\t\tnBricksRemaining--;\n\t\t}\n\t\t\n\t\tif (paddleCollisionCount == 7) {\n\t\t\tvx *= 1.1;\n\t\t}\n }",
"public void checkCollisions(){\n for(int i=bodyParts;i>0;i--){\n if((x[0]==x[i])&&(y[0]==y[i])){\n running=false;\n }\n }\n //head with left border\n if(x[0]<0){\n running=false;\n }\n //head with right border\n if(x[0]>screen_width){\n running=false;\n }\n //head with top border\n if(y[0]<0){\n running=false;\n }\n //head with bottom border\n if(y[0]>screen_height){\n running=false;\n }\n if(!running){\n timer.stop();\n }\n }",
"@Override\n\tprotected void collideEnd(Node node) {\n\n\t}",
"public void collision(){\r\n\t\tif(currX < 0 || currX > 1000-width || currY < 0 || currY > 700-height){\r\n\t\t\tinGame=false;\r\n\t\t}\r\n\t\t/*\r\n\t\tI start at 1 because tail[0] will constantly be taking the position\r\n\t\tof the snake's head, so if i start at 0, the game would end immediately.\r\n\t\t*/\r\n\t\tfor(int i=1; i < numOranges; i++){\r\n\t\t\tRectangle currOrangeRect = new Rectangle(tail[i].getXcoords(), tail[i].getYcoords(), OrangeModel.getWidth(), OrangeModel.getHeight());\r\n\t\t\tif(new Rectangle(currX, currY, width, height).intersects(currOrangeRect)){\r\n\t\t\t\tinGame=false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void collision(Collidable collider);",
"private void checkCollision()\n {\n if(isTouching(Rocket.class))\n {\n removeTouching(Rocket.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Fire.class))\n {\n removeTouching(Fire.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Sword.class))\n { \n removeTouching(Sword.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n notifyObservers(-20);\n }\n \n else if(isTouching(Star.class))\n { \n removeTouching(Star.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n count++;\n boost();\n }\n }",
"public void checkCollision(){\n\r\n for(int i = 0; i < enemies.size(); i++){\r\n \r\n // Player and Enemy collision\r\n \r\n if(collide(this.player, enemies.get(i)) && this.player.isVisible() && enemies.get(i).isVisible()){\r\n System.out.println(\"Collide\");\r\n this.player.setHealth(this.player.getHealth() - 100);\r\n }\r\n\r\n // Player and Enemy bullet collision\r\n \r\n for(int j =0; j < enemies.get(i).getBullets().size(); j++){\r\n\r\n if(collide(this.player, enemies.get(i).getBullets().get(j)) && this.player.isVisible() && enemies.get(i).getBullets().get(j).isVisible()){\r\n\r\n enemies.get(i).getBullets().get(j).setVisible(false);\r\n this.player.setHealth(this.player.getHealth() - enemies.get(i).getBullets().get(j).getDamage());\r\n\r\n }\r\n }\r\n\r\n }\r\n //time = DEFAULT_TIME_DELAY;\r\n// }\r\n\r\n\r\n\r\n for(int i = 0; i < player.getBullets().size(); i++){\r\n\r\n\r\n // Player bullet and enemy collision\r\n\r\n for(int j = 0; j < enemies.size(); j++) {\r\n if (collide(enemies.get(j), player.getBullets().get(i)) && enemies.get(j).isVisible() && player.getBullets().get(i).isVisible()) {\r\n\r\n if (enemies.get(j).getHealth() < 0) {\r\n enemies.get(j).setVisible(false);\r\n score.addScore(100);\r\n }\r\n\r\n enemies.get(j).setHealth(enemies.get(j).getHealth() - player.getBullets().get(i).getDamage());\r\n // enemies.get(j).setColor(Color.RED);\r\n player.getBullets().get(i).setVisible(false);\r\n\r\n\r\n }\r\n }\r\n\r\n\r\n // Boss collision & player bullet collision\r\n\r\n if(collide(player.getBullets().get(i), this.boss1) && player.getBullets().get(i).isVisible() && boss1.isVisible()){\r\n\r\n if(boss1.getHealth() < 0){\r\n boss1.setVisible(false);\r\n score.addScore(1000);\r\n state = STATE.WIN;\r\n }\r\n this.boss1.setHealth(this.boss1.getHealth() - player.getBullets().get(i).getDamage());\r\n // this.boss1.setHealth(0);\r\n player.getBullets().get(i).setVisible(false);\r\n\r\n }\r\n\r\n }\r\n\r\n // Bullet vs Bullet Collision\r\n\r\n for(int k = 0 ; k < player.getBullets().size(); k++){\r\n\r\n if(player.getBullets().get(k).isVisible()) {\r\n for (int i = 0; i < enemies.size(); i++) {\r\n\r\n if(enemies.get(i).isVisible()) {\r\n for (int j = 0; j < enemies.get(i).getBullets().size(); j++) {\r\n\r\n if (collide(player.getBullets().get(k), enemies.get(i).getBullets().get(j)) && enemies.get(i).getBullets().get(j ).isVisible()) {\r\n\r\n\r\n System.out.println(\"bullets colliding\");\r\n\r\n player.getBullets().get(k).setVisible(false);\r\n enemies.get(i).getBullets().get(j).setColor(Color.yellow);\r\n enemies.get(i).getBullets().get(j).deflect(this.player.getX() + this.player.getW()/2, this.player.getY() + this.player.getH()/2);\r\n\r\n player.getBullets().add(enemies.get(i).getBullets().get(j));\r\n\r\n enemies.get(i).getBullets().remove(enemies.get(i).getBullets().get(j)); //removes bullet\r\n\r\n\r\n k++;\r\n j--;\r\n //enemies.get(i).getBullets().get(j).setVisible(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n for(int i = 0; i < boss1.getBullets().size(); i++) {\r\n\r\n\r\n if (collide(player.getBullets().get(k), boss1.getBullets().get(i)) && boss1.getBullets().get(i).isVisible()) {\r\n\r\n System.out.println(\"boss bullets colliding\");\r\n player.getBullets().get(k).setVisible(false);\r\n boss1.getBullets().get(i).setColor(Color.yellow);\r\n boss1.getBullets().get(i).deflect(this.player.getX() + this.player.getW()/2, this.player.getY() + this.player.getH()/2);\r\n player.getBullets().add(boss1.getBullets().get(i));\r\n boss1.getBullets().remove(boss1.getBullets().get(i));\r\n k++;\r\n i--;\r\n\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Boss bullet and player collision\r\n\r\n for(Bullet b : boss1.getBullets() ){\r\n\r\n\r\n if(collide(player, b) && player.isVisible() && b.isVisible()){\r\n b.setVisible(false);\r\n player.setHealth(player.getHealth() - b.getDamage());\r\n }\r\n }\r\n\r\n\r\n // Power up collision\r\n\r\n for(PowerUp p : powerUps){\r\n\r\n if(collide(player, p) && p.isVisible()){\r\n\r\n p.executeEffect(this.player);\r\n p.setVisible(false);\r\n }\r\n }\r\n\r\n\r\n\r\n // Deleting out of bound bullets\r\n for(int i = 0; i < player.getBullets().size(); i++){\r\n if(player.getBullets().get(i).getY() < 0 || player.getBullets().get(i).getY() > GameWorld.SCREEN_H ||\r\n player.getBullets().get(i).getX()< 0 || player.getBullets().get(i).getX() > GameWorld.SCREEN_W) {\r\n\r\n player.getBullets().remove(player.getBullets().get(i));\r\n }\r\n }\r\n\r\n }",
"@Override\n public void checkCollision( Sprite obj )\n {\n\n }",
"public void addToCollision(Entity en) {\n\t\tList<Rectangle> hitboxes = en.getHitboxes();\n\t\tfor (Rectangle hitbox: hitboxes) {\n\t\t\thitboxCollision.put(en, hitbox);\n\t\t\tareaCollision.add(hitbox);\n\t\t}\n\t}",
"void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }",
"@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}",
"private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \n }",
"@Override\n\tpublic void collision(SimpleObject s) {\n\t\t\n\t}",
"protected boolean checkCollision(final Entity a, final Entity b) {\n // Calculate center point of the entities in both axis.\n int centerAX = a.getPositionX() + a.getWidth() / 2;\n int centerAY = a.getPositionY() + a.getHeight() / 2;\n int centerBX = b.getPositionX() + b.getWidth() / 2;\n int centerBY = b.getPositionY() + b.getHeight() / 2;\n // Calculate maximum distance without collision.\n int maxDistanceX = a.getWidth() / 2 + b.getWidth() / 2;\n int maxDistanceY = a.getHeight() / 2 + b.getHeight() / 2;\n // Calculates distance.\n int distanceX = Math.abs(centerAX - centerBX);\n int distanceY = Math.abs(centerAY - centerBY);\n\n return distanceX < maxDistanceX && distanceY < maxDistanceY;\n }",
"protected void collideOne(Mob m1, Entity m2, int dir) {\r\n // Calibrate bounding box\r\n float[] a = new float[6];\r\n a[0] = m1.getPos().x + m1.getDX() - m1.getLenX()/2;\r\n a[1] = m1.getPos().y + m1.getDY() - m1.getLenY()/2;\r\n a[2] = m1.getPos().z + m1.getDZ() - m1.getLenZ()/2;\r\n a[3] = m1.getPos().x + m1.getDX() + m1.getLenX()/2;\r\n a[4] = m1.getPos().y + m1.getDY() + m1.getLenY()/2;\r\n a[5] = m1.getPos().z + m1.getDZ() + m1.getLenZ()/2;\r\n float[] b = new float[6];\r\n b[0] = m2.getPos().x - m2.getLenX()/2;\r\n b[1] = m2.getPos().y - m2.getLenY()/2;\r\n b[2] = m2.getPos().z - m2.getLenZ()/2;\r\n b[3] = m2.getPos().x + m2.getLenX()/2;\r\n b[4] = m2.getPos().y + m2.getLenY()/2;\r\n b[5] = m2.getPos().z + m2.getLenZ()/2;\r\n // Collision detection\r\n boolean collide =\r\n overlap(a, b) || overlap(b, a);\r\n ;\r\n // Post-Collision adjustments\r\n if(collide) {\r\n if(dir == 3) {\r\n m1.setDX(m1.getDX() + (b[3] - a[0]) + 0.01f);\r\n } else if(dir == 1) {\r\n m1.setDX(m1.getDX() - (a[3] - b[0]) - 0.01f);\r\n } else if(dir == 0) {\r\n m1.setDZ(m1.getDZ() + (b[5] - a[2]) + 0.01f);\r\n } else if(dir == 2) {\r\n m1.setDZ(m1.getDZ() - (a[5] - b[2]) - 0.01f);\r\n }\r\n }\r\n }",
"public void collide(GameEntity ge)\n\t{\n\t\tge.collide(this);\n\t}",
"public boolean collision(Object a, Object b) {\n if (Rect.intersects(a.getRect(), b.getRect())) { //if the two objects hitboxes colide\n return true;\n }\n return false;\n }",
"public void collide(Entity wall) {\n\t\tthis.setCurrentAnimation(\"running collided_\" + orientation, FRAME_DURATION);\n\t\tthis.enableBoundingBox();\n\t}",
"CollisionRule getCollisionRule();",
"public void checkPlayerCollisions() {\n\t\t//Iterate over the players\n\t\tfor (PlayerFish player : getPlayers()) {\n\t\t\t//Get collidables parallel.\n\t\t\tcollidables.parallelStream()\n\t\t\t\n\t\t\t//We only want the collidables we actually collide with\n\t\t\t.filter(collidable -> player != collidable && player.doesCollides(collidable))\n\t\t\t\n\t\t\t//We want to do the for each sequentially, otherwise we get parallelism issues\n\t\t\t.sequential()\n\t\t\t\n\t\t\t//Iterate over the elements\n\t\t\t.forEach(collidable -> {\n\t\t\t\tplayer.onCollide(collidable);\n\t\t\t\tcollidable.onCollide(player);\n\t\t\t});\n\t\t}\n\t}",
"private void collideWithBall() {\n die();\n }",
"void setCollisionRule(CollisionRule collisionRule);",
"boolean collideWithVehicles(Vehicle v);"
]
| [
"0.7896268",
"0.78719276",
"0.7418993",
"0.7366563",
"0.72106284",
"0.7172774",
"0.71200186",
"0.70948935",
"0.7093819",
"0.7059763",
"0.7025855",
"0.6949578",
"0.69285166",
"0.6924437",
"0.6908813",
"0.69057655",
"0.6893375",
"0.68691605",
"0.6847471",
"0.6835448",
"0.67972875",
"0.67956203",
"0.6791984",
"0.6790548",
"0.6785701",
"0.67500216",
"0.6739903",
"0.6736342",
"0.67290574",
"0.6728372",
"0.6719578",
"0.6714465",
"0.6707728",
"0.6690583",
"0.6683278",
"0.6666998",
"0.66661566",
"0.6645031",
"0.661814",
"0.6613338",
"0.6609216",
"0.6604622",
"0.65997",
"0.6594477",
"0.65874785",
"0.6581325",
"0.6572235",
"0.65582144",
"0.65547186",
"0.6550906",
"0.65489143",
"0.65355945",
"0.6534843",
"0.653349",
"0.6530806",
"0.65270454",
"0.65183383",
"0.64916265",
"0.64576215",
"0.6444489",
"0.6438941",
"0.64369094",
"0.64348435",
"0.640625",
"0.6385158",
"0.63815945",
"0.63797706",
"0.6377246",
"0.6374347",
"0.6368944",
"0.63618493",
"0.63509923",
"0.63489956",
"0.6338738",
"0.6336784",
"0.6324112",
"0.63179606",
"0.6313958",
"0.63133216",
"0.63102996",
"0.62975264",
"0.6295946",
"0.6295786",
"0.6291666",
"0.62849927",
"0.6283668",
"0.6280945",
"0.62807626",
"0.62634486",
"0.6255885",
"0.6254513",
"0.6243101",
"0.6233265",
"0.6207863",
"0.6189129",
"0.6188157",
"0.61858463",
"0.61801267",
"0.61719507",
"0.6165729"
]
| 0.6872337 | 17 |
Defensive A method to get the distance between two centers entities. | public double getDistanceBetweenCenter(Entity entity) throws IllegalArgumentException{
if(this == entity) throw new IllegalArgumentException("this == entity");
else{
double diffx = Math.abs(entity.getPosition()[0] - this.getPosition()[0]);
double diffy = Math.abs(entity.getPosition()[1] - this.getPosition()[1]);
double diff = Math.sqrt(Helper.square(diffx) + Helper.square(diffy));
return diff;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float distance(Entity other) {\n return getCenteredCoordinate().distance(other.getCenteredCoordinate());\n }",
"public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t\t\t\t+ (\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t\t, 2 )\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}",
"public static double distancia(Entidade e1,Entidade e2){\r\n\t\tdouble dx = e1.getPosicaoX() - e2.getPosicaoX();\r\n\t\tdouble dy = e1.getPosicaoY() - e2.getPosicaoY();\r\n\t\tdouble d = Math.sqrt(dx*dx + dy*dy);\r\n\t\treturn d;\r\n\t}",
"public int distance(Coord coord1, Coord coord2);",
"private double calculateDistance(Circle point1, Circle point2) {\r\n double x = point1.getCenterX() - point2.getCenterX();\r\n double y = point1.getCenterY() - point2.getCenterY();\r\n\r\n return Math.sqrt(x*x + y*y);\r\n }",
"private double Distance(Point first, Point second){ // distance between two points \n\t\treturn Math.sqrt(Math.pow(second.getY()-first.getY(),2) + Math.pow(second.getX()-first.getX(),2));\n\t}",
"public double getDistanceBetween(Entity otherEntity) throws IllegalArgumentException {\n\t\tif (otherEntity == null) \n\t\t\tthrow new IllegalArgumentException(\"Invalid argument object (null).\");\n\t\t\n\t\tif (otherEntity == this)\n\t\t\treturn 0;\n\t\treturn Math.sqrt( Math.pow(this.getXCoordinate()-otherEntity.getXCoordinate(), 2) + Math.pow(this.getYCoordinate()-otherEntity.getYCoordinate(), 2) ) - (this.getRadius() + otherEntity.getRadius());\n\t}",
"public static double getDistance( GameObject one, GameObject two )\n {\n double deltaX = getDeltaX( one, two );\n double deltaY = getDeltaY( one, two );\n return Math.sqrt( deltaX * deltaX + deltaY * deltaY );\n }",
"public double calculateDistance(LatLng other) {\n return Math.sqrt( (this.x - other.x) * (this.x - other.x) + (this.y - other.y) * (this.y - other.y) );\n }",
"public final double calcDistance( Point a, Point b )\r\n {\r\n return( Math.sqrt( (Math.pow(a.y - b.y, 2)) +\r\n (Math.pow(a.x - b.x, 2)) ) );\r\n }",
"public double calcDist(double lat2, double lon2, ArrayList<Record> cCentres)\n {\n double dist = 0;\n if (lat1==lat2 && lon1==lon2)\n dist = 0;\n else {\n double theta = lon1 - lon2;\n dist = Math.sin(Math.toRadians(lat1)) * Math.sin(Math.toRadians(lat2)) + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) * Math.cos(Math.toRadians(theta));\n dist = Math.acos(dist);\n dist = Math.toDegrees(dist);\n dist = dist * 60 * 1.1515;\n dist = dist * 1.609344; //km\n }\n return (dist);\n }",
"private double getDistance(double initX, double initY, double targetX, double targetY) {\n\t\treturn Math.sqrt(Math.pow((initX - targetX), 2) + Math.pow((initY - targetY), 2));\n\t}",
"private double distance() {\n\t\tdouble dist = 0;\n\t\tdist = Math.sqrt(Math.abs((xOrigin - x) * (xOrigin - x) + (yOrigin - y) * (yOrigin - y)));\n\t\treturn dist;\n\t}",
"public double getDistance(Node start, Node end) {\n\tstartX = start.getX();\n\tstartY = start.getY();\n\tendX = end.getX();\n\tendY = end.getY();\n\n int Xsquared = (startX - endX) * (startX - endX);\n\tint Ysquared = (startY - endY) * (startY - endY);\n\n\treturn Math.sqrt(Xsquared + Ysquared);\n\t\n }",
"public double distance(Point other) {\n\n // Define delta-X and delta-Y.\n double deltaX = this.x - other.x;\n double deltaY = this.y - other.y;\n\n // Calculate distance and return.\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n }",
"static double distance(Point a, Point b) {\n\t\tint xDiff = a.x - b.x;\n\t\tint yDiff = a.y - b.y;\n\t\treturn Math.sqrt((xDiff * xDiff) + (yDiff * yDiff));\n\t}",
"private double dist(Point a,Point b)//to find distance between the new entry to predict and the male or female cluster mean positions.\n { double d;\n d=Math.sqrt( Math.pow((a.ht-b.ht),2) + Math.pow((a.wt-b.wt),2));\n return d;\n }",
"public double distance() {\n \tif (dist == -1) {\n \t\tdist = distance(vertex1, vertex2);\n \t}\n \n \treturn dist;\n }",
"private double distance(Point a, Point b) {\n\t\tDouble xdist = new Double( a.x - b.x );\n\t\tDouble ydist = new Double( a.y - b.y );\n\t\treturn Math.sqrt( Math.pow(xdist, 2.0) + Math.pow(ydist, 2.0) );\n\t}",
"private double distance(Point A, Point B) {\n\t\tdouble dX = A.x - B.x;\n\t\tdouble dY = A.y - B.y;\n\t\treturn Math.sqrt(dX * dX + dY * dY);\n\t}",
"public double calcDistance(GpsCoordinate other)\n\t{\n\t\tdouble lat1 = degToRadian(this.latitude);\n\t\tdouble lng1 = degToRadian(this.longitude);\n\t\tdouble lat2 = degToRadian(other.latitude);\n\t\tdouble lng2 = degToRadian(other.longitude);\n\t\t\n\t\t/*\n\t\t * use haversine Formula to calc the distance\n\t\t * @see: http://en.wikipedia.org/wiki/Haversine_formula\n\t\t */\n\t\tdouble inRootFormula = Math.sqrt(\n\t\t\t\tMath.sin((lat1 - lat2)/2)*Math.sin((lat1 - lat2)/2)+\n\t\t\t\tMath.cos(lat1)*Math.cos(lat2)*Math.sin((lng1-lng2)/2)*Math.sin((lng1-lng2)/2));\n\t\t\n\t\treturn 2* EARTH_RADIUS * Math.asin(inRootFormula);\n\n\t\n\t}",
"double distance(double x1, double y1, double x2, double y2) {\r\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\r\n }",
"static double distance(double x1, double y1, double x2, double y2)\n {\n double x_dist = x2 - x1;\n double y_dist = y2 - y1;\n double dist = Math.sqrt(Math.pow(x_dist, 2) + Math.pow(y_dist, 2));\n return dist;\n }",
"private double calculateDistance(Example first, Example second) {\n\t\tdouble distance = 0;\n\t\tfor (Attribute attribute : first.getAttributes()) {\n\t\t\tdouble diff = first.getValue(attribute) - second.getValue(attribute);\n\t\t\tdistance += diff * diff;\n\t\t}\n\t\treturn Math.sqrt(distance);\n\t}",
"private static int distance(int x, int y, int centerX, int centerY)\n {\n // Pythagorian theorem\n return (int) Math.sqrt(Math.pow((double)(x - centerX), 2) + Math.pow((double)(y - centerY), 2));\n }",
"public double distance(final Coordinates other) {\n\t\treturn Math.sqrt(Math.pow((double) x - other.getX(), 2) + Math.pow((double) y - other.getY(), 2));\n\t}",
"public abstract double getDistance(T o1, T o2) throws Exception;",
"private static double calculateDistance(Position A, Position B) {\n\t\tdouble x = (B.m_dLongitude - A.m_dLongitude) * Math.cos( (A.m_dLatitude + B.m_dLatitude) / 2.0d);\n\t\tdouble y = B.m_dLatitude - A.m_dLatitude;\n\t\treturn Math.sqrt(Math.pow(x, 2.0d) + Math.pow(y, 2.0d)) * 6371;\n\t}",
"double dist(pair p1){\n\t\tdouble dx=(p1.x-centre.x);\n\t\tdouble dy=(p1.y-centre.y);\n\t\tcount++;\n\t\treturn java.lang.Math.sqrt((dx*dx)+(dy*dy));\n\t}",
"private double distance(Position pos1, Position pos2)\r\n {\r\n assert pos1 != null;\r\n assert pos2 != null;\r\n\r\n int x = Math.abs(pos1.column() - pos2.column());\r\n int y = Math.abs(pos1.line() - pos2.line());\r\n\r\n return Math.sqrt(x * x + y * y);\r\n }",
"public static EquationExpression dist(final EquationPoint a,\n\t\t\tfinal EquationPoint b) {\n\t\treturn sqrt(dist2(a, b));\n\t}",
"@Override\n\tpublic double distance(Instance first, Instance second,\n\t\t\tPerformanceStats stats) throws Exception {\n\t\treturn 0;\n\t}",
"public static double dist (ECEF a, ECEF b)\r\n\t{\r\n\t\tdouble distsquared = square (a.x-b.x) + square (a.y-b.y) + square (a.z-b.z);\r\n\t\treturn Math.sqrt(distsquared);\r\n\t}",
"double distanceEcl(Coord other) {\n\t\tint deltaX = x - other.x;\n\t\tint deltaY = y - other.y;\n\t\treturn sqrt(((double)deltaX * deltaX) + ((double)deltaY * deltaY));\n\t}",
"public float getDistance(){\n\t\t\treturn s1.start.supportFinal.dot(normal);\n\t\t}",
"public double computeDistance(cluster c1, cluster c2) {\n\t\tdouble closest = 4000;\n\t\tfor (point p1 : c1.getPoints()) {\n\t\t\tfor (point p2 : c2.getPoints()) {\n\t\t\t\tdouble dist = Math.sqrt(Math.pow( (p1.x() - p2.x()) , 2) + Math.pow( (p1.y() - p2.y()) , 2));\n\t\t\t\tif (dist < closest) {\n\t\t\t\t\tclosest = dist;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn closest;\n\t}",
"private double getDistance(float x, float y, float x1, float y1) {\n double distanceX = Math.abs(x - x1);\n double distanceY = Math.abs(y - y1);\n return Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n }",
"private double distance(double lat1, double lon1, double lat2, double lon2) {\n double theta = lon1 - lon2;\r\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\r\n dist = Math.acos(dist);\r\n dist = rad2deg(dist);\r\n dist = dist * 60 * 1.1515;\r\n dist = dist * 1.609344;\r\n return (dist); // return distance in kilometers\r\n }",
"private double dist(double [] v1, double [] v2){\n \t\tdouble sum=0;\n \t\tfor (int i=0; i<nDimensions; i++){\n \t\t\tdouble d = v1[i]-v2[i];\n \t\t\tsum += d*d;\n \t\t}\n \t\treturn Math.sqrt(sum);\n \t}",
"static private double dist(double[] a, double[] b) {\n\t\treturn new gov.pnnl.jac.geom.distance.Euclidean().distanceBetween(a, b);\n }",
"private static int dist(int x1, int y1, int x2, int y2) {\n\t\treturn (int) Math.sqrt(Math.abs(((x2-x1) * (x2-x1)) + ((y2-y1) * (y2-y1))));\n\t}",
"public static EquationExpression dist(final EquationPoint a, final EquationPoint b) {\n return sqrt(dist2(a,b));\n }",
"public double distance(Point other) {\n double newX = this.x - other.getX();\n double newY = this.y - other.getY();\n return Math.sqrt((newX * newX) + (newY * newY));\n }",
"public double distance(Point a, Point b) {\n\t\tdouble dx = a.x - b.x;\n\t\tdouble dy = a.y - b.y;\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t}",
"private int distance(Point p1, Point p2) {\n return (int) Math.sqrt(Math.pow(p1.getCenterX() - p2.getCenterX(), 2) + Math.pow(p1.getCenterY() - p2.getCenterY(), 2));\n }",
"public double distance(double x1, double y1, double x2, double y2)\n {\n return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow(y2 - y1, 2));\n }",
"public double distanceBetween(Node a, Node b){\n // used to be its own function, now is implemented in the Node class\n return a.getDist(b);\n }",
"private double calculateDistance(int sourceX, int sourceY, int targetX, int targetY){\n int xLength = targetX - sourceX;\n int yLength = targetY - sourceY;\n return Math.sqrt((xLength*xLength)+(yLength*yLength)); \n }",
"public static double GetDistance(double lat1, double lon1, double lat2, double lon2) {\n double radLat1 = rad(lat1);\n double radLat2 = rad(lat2);\n double a = radLat1 - radLat2;\n double b = rad(lon1) - rad(lon2);\n double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +\n Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n s = s * EARTH_RADIUS;//km\n// Log.e(\"s\", \"s=\" + s);\n return s;\n }",
"private double distance(double lat1, double lat2, double lon1, double lon2)\n {\n lon1 = Math.toRadians(lon1);\n lon2 = Math.toRadians(lon2);\n lat1 = Math.toRadians(lat1);\n lat2 = Math.toRadians(lat2);\n\n // Haversine formula\n double dlon = lon2 - lon1;\n double dlat = lat2 - lat1;\n double a = Math.pow(Math.sin(dlat / 2), 2)\n + Math.cos(lat1) * Math.cos(lat2)\n * Math.pow(Math.sin(dlon / 2),2);\n\n double c = 2 * Math.asin(Math.sqrt(a));\n\n // Radius of earth in kilometers. Use 3956\n // for miles\n double r = 6371;\n\n // calculate the result\n return(c * r);\n }",
"public double distanceTo(Point other) {\r\n\t\tdouble distX, distY, totalDist;\r\n\t\tdistX=(other.pX - pX) * (other.pX - pX);\r\n\t\tdistY=(other.pY - pY) * (other.pY - pY);\r\n\t\ttotalDist=Math.sqrt(distX + distY);\r\n\t\t\r\n\t\treturn totalDist;\r\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\r\n\t\t\r\n\t}",
"@Override\r\n public double getOriginDistance()\r\n {\r\n double distance=Math.sqrt(\r\n Math.pow(origin.getYCoordinate(), 2)+Math.pow(origin.getYCoordinate(), 2));\r\n return distance;\r\n }",
"public double ComputeDistance(){ \n\t\tdouble lat1 = this.depAirportCity.getLatDegs() + (double)(this.depAirportCity.getLatMins())/60; \n\t\tdouble lon1 = this.depAirportCity.getLongDegs() + (double)(this.depAirportCity.getLongMins())/60;\n\t\tdouble lat2 = this.arrAirportCity.getLatDegs() + (double)(this.arrAirportCity.getLatMins())/60; \n\t\tdouble lon2 = this.arrAirportCity.getLongDegs() + (double)(this.arrAirportCity.getLongMins())/60;\n\t\t\n\t\tdouble distance = Haversine.getMiles(lat1, lon1, lat2, lon2);\n\t\treturn distance;\n\t}",
"protected double getDistance(Point p1, Point p2) {\n\t\treturn Math.sqrt((p1.getX()-p2.getX())*(p1.getX()-p2.getX()) + (p1.getY()-p2.getY())*(p1.getY()-p2.getY())); \n\t}",
"public abstract double distanceFrom(double x, double y);",
"public double distance(Point other) {\r\n double dx = this.x - other.getX();\r\n double dy = this.y - other.getY();\r\n return Math.sqrt((dx * dx) + (dy * dy));\r\n }",
"@Override\n public double distance(NumberVector o1, NumberVector o2) {\n double dt = Math.abs(o1.doubleValue(0) - o2.doubleValue(0));\n // distance value of earth coordinates in meter\n double dc = getDistance(o1.doubleValue(1), o1.doubleValue(2), o2.doubleValue(1), o2.doubleValue(2));\n return dt + dc;\n }",
"public static double getDistance(Node a, Node b) {\n return Math.abs(a.getX() - b.getX()) + Math.abs(a.getY() - b.getY());\n }",
"private double getDistanceInKM(LatLong latLongA, LatLong latLongB)\n {\n double distance = 500;\n\n double lat;\n double dx;\n double dy;\n\n if(latLongA != null && latLongB != null){\n lat = (latLongA.latitude + latLongB.latitude) / 2 * 0.01745;\n dx = 111.3 * Math.cos(lat) * (latLongA.longitude - latLongB.longitude);\n dy = 111.3 * (latLongA.latitude - latLongB.latitude);\n distance = Math.sqrt(dx * dx + dy * dy);\n }\n\n return distance;\n }",
"public double distance(double x, double y);",
"double getDistance();",
"public static double distance(double lat1, double lon1, double lat2, double lon2) {\n\n\n float[] dist = new float[1];\n Location.distanceBetween(lat1, lon1, lat2, lon2, dist);\n //Log.d(\"*******dist\", \":\" + dist[0]);\n return (dist[0]);\n //\n // double theta = lon1 - lon2;\n // double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2))\n // + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2))\n // * Math.cos(deg2rad(theta));\n // dist = Math.acos(dist);\n // dist = rad2deg(dist);\n // dist = dist * 60; // 60 nautical miles per degree of seperation\n // dist = dist * 1852; // 1852 meters per nautical mile\n // return (dist);\n //\n }",
"public double calculateDistance(MapLocation a, MapLocation b) {\r\n\t\treturn Math.sqrt((double) ( Math.pow((b.x - a.x),2) + Math.pow((b.y - a.y),2) ));\r\n\t}",
"final public static int dist(float lat1, float lon1,\n \t\tfloat lat2, float lon2) {\n \tdouble latSin = Math.sin((lat2-lat1)/2d);\n \tdouble longSin = Math.sin((lon2-lon1)/2d);\n \tdouble a = (latSin * latSin) + (Math.cos(lat1)*Math.cos(lat2)*longSin*longSin);\n \tdouble c = 2d * atan2(Math.sqrt(a),Math.sqrt(1d-a));\n \treturn (int)(PLANET_RADIUS_D * (c + 0.5d));\n }",
"public double distanceTo(Point other) {\n\t\tdouble distX, distY, totalDist;\n\t\tdistX=(other.pX - pX) * (other.pX - pX);\n\t\tdistY=(other.pY - pY) * (other.pY - pY);\n\t\ttotalDist=Math.sqrt(distX + distY);\n\t\t\n\t\treturn totalDist;\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\n\t\t\n\t}",
"static Number160 distance(final Number160 id1, final Number160 id2) {\n return id1.xor(id2);\n }",
"public abstract double calculateDistance(double[] x1, double[] x2);",
"public static float distance(Vec2 start, Vec2 end) {\r\n\t\treturn (float) Math.sqrt((end.x - start.x) * (end.x - start.x) + (end.y - start.y)\r\n\t\t\t\t* (end.y - start.y));\r\n\t}",
"public float getDistance();",
"private double d(Point a, Point b){\n\t\treturn Math.sqrt(Math.pow(b.getX()-a.getX(),2) + Math.pow(a.getY() - b.getY(), 2));\r\n\t}",
"private static double dist(Data d, Centroid c)\r\n \t{\r\n \t\treturn Math.sqrt(Math.pow((c.Y() - d.Y()), 2) + Math.pow((c.X() - d.X()), 2));\r\n \t}",
"public float distanceToFromCentered(Coordinate otherCoordinate) {\n return getCenteredCoordinate().distance(otherCoordinate);\n }",
"@Override\n\tpublic double distance(Instance first, Instance second) {\n\t\treturn 0;\n\t}",
"public static double dist (Vertex a, Vertex b){\n return Math.sqrt((b.y-a.y)*(b.y-a.y) + (b.x-a.x)*(b.x-a.x));\n }",
"public static double distance(City start, City end) {\n \tdouble result = Math.sqrt(Math.pow((end.x() - start.x()), 2) +\n \t\t\t(Math.pow((end.y() - start.y()), 2)));\n \n \treturn result;\n }",
"public static float getDistance(float x1, float y1, float x2, float y2)\r\n\t{\r\n\t\treturn (float) Math.sqrt(getSquareDistance(x1, y1, x2, y2));\r\n\t}",
"private double haversineDist(CityNode a, CityNode b) {\n\n double distLat = Math.toRadians(a.getLat() - b.getLat());\n double distLong = Math.toRadians(a.getLong() - b.getLong());\n\n // Convert latitudes to radians\n double startLat = Math.toRadians(b.getLat());\n double endLat = Math.toRadians(a.getLat());\n\n double calc = Math.pow(Math.sin(distLat / 2), 2)\n + Math.pow(Math.sin(distLong / 2), 2) * Math.cos(startLat) * Math.cos(endLat);\n double calc2 = 2 * Math.asin(Math.sqrt(calc));\n return earthRadius * calc2;\n }",
"public double distance(Point other) {\n return Math.sqrt(((this.x - other.getX()) * (this.x - other.getX()))\n + ((this.y - other.getY()) * (this.y - other.getY())));\n }",
"private double distFrom(double lat1, double lng1, double lat2, double lng2) {\n\t\tdouble dist = Math.pow(lat1 - lat2, 2) + Math.pow(lng1 - lng2, 2);\n\n\t\treturn dist;\n\t}",
"public float distance (Vector2f other)\n {\n return FloatMath.sqrt(distanceSquared(other));\n }",
"public double calcDistance(double lat1, double lon1, double lat2, double lon2) {\n \t//Calculate great-circle distance\n \tdouble radius = 6371000;\t//radius of earth in meters\n \tdouble deltaLat = Math.toRadians(lat2 - lat1);\n \tdouble deltaLong = Math.toRadians(lon2 - lon1);\n\t\n \tlat1 = Math.toRadians(lat1);\n \tlat2 = Math.toRadians(lat2);\n\t\t\n \tdouble a = Math.sin(deltaLat / 2.0) * Math.sin(deltaLat / 2.0) +\n \t\t\tMath.cos(lat1) * Math.cos(lat2) * Math.sin(deltaLong / 2.0) *\n \t\t\tMath.sin(deltaLong / 2.0);\n \tdouble c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1.0 - a));\n\t\n \treturn radius * c;\n }",
"private Integer getDistance(double lat1, double lon1, double lat2, double lon2) {\n Location locationA = new Location(\"Source\");\n locationA.setLatitude(lat1);\n locationA.setLongitude(lon1);\n Location locationB = new Location(\"Destination\");\n locationB.setLatitude(lat2);\n locationB.setLongitude(lon2);\n distance = Math.round(locationA.distanceTo(locationB));\n return distance;\n }",
"private int dist(int city1, int city2){\n\t\treturn this.getGraph().getWeight(city1, city2);\n\t}",
"public static double getDistance(GPSCoordinates point1, GPSCoordinates point2) {\r\n\t\t\r\n\t\treturn EARTH_RADIUS * 2 * Math.atan2( Math.sqrt( getHaversinePart(point1, point2)), Math.sqrt( getHaversinePart(point1, point2) ) );\r\n\t}",
"public int calculateDistance(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2){\n double x1 = l1.data.getxCo();\n double y1 = l1.data.getyCo();\n double x2 = l2.data.getxCo();\n double y2 = l2.data.getyCo();\n double dist = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n return (int) dist;\n }",
"public static double computeDistance(GeoPoint point1, GeoPoint point2) {\n return Math.sqrt(Math.pow(point1.getLatitudeE6()\n - point2.getLatitudeE6(), 2d)\n + Math.pow(point1.getLongitudeE6() - point2.getLongitudeE6(),\n 2d));\n }",
"public int getDistance(LifeForm lf1, LifeForm lf2) throws EnvironmentException\r\n\t{\r\n\t\tint lf1Row = getLifeFormRow(lf1); //row of first lifeform\r\n\t\tint lf1Col = getLifeFormCol(lf1); //column of first lifeform\r\n\t\tint lf2Row = getLifeFormRow(lf2); //row of second lifeform\r\n\t\tint lf2Col = getLifeFormCol(lf2); //column of second lifeform\r\n\t\t\r\n\t\t//call getDistance(int row1, int col1, int row2, int col2) with LifeForm coordinates\r\n\t\treturn getDistance(lf1Row, lf1Col, lf2Row, lf2Col);\r\n\t}",
"private double findDistance(int[] pos1, int[] pos2) {\n return sqrt((pos1[0]-pos2[0])*(pos1[0]-pos2[0])+\n (pos1[1]-pos2[1])*(pos1[1]-pos2[1]));\n }",
"double distance(Point p1,Point p2){\n\t\tdouble dx = p1.x - p2.x;\n\t\tdouble dy = p1.y - p2.y;\n\t\treturn Math.sqrt(dx*dx+dy*dy);\n\t}",
"static double distance(Point p1, Point p2) {\n\t\treturn Math.sqrt((p2.x - p1.x)*(p2.x - p1.x) + (p2.y - p1.y)*(p2.y - p1.y));\n\t}",
"public static double getDistance(GPSPosition first, GPSPosition second) {\n\t\tdouble distance = 0;\n\t\t\n\t\tdouble latitude_distance_in_radians = \n\t\t\t\tMath.toRadians(second.getLatitude() - first.getLatitude());\n\t\tdouble longitude_distance_in_radians = \n\t\t\t\tMath.toRadians(second.getLongitude() - first.getLongitude());\n\t\t// harvesin(d / R) = harvesin(lat1 - lat2) + cos(lat1) * cos(lat2) * harvesin(lng1 - lng2);\n\t\t// harvesin(angle) = sin(angle / 2) ^ 2;\n\t\t// d = 2 * R * arcsin(sqrt(harvesin));\n\t\tdouble harvesin_diff_lat = Math.pow(Math.sin(latitude_distance_in_radians / 2), 2);\n\t\tdouble harvesin_diff_lng = Math.pow(Math.sin(longitude_distance_in_radians / 2), 2);\n\t\tdouble cos_lat1 = Math.cos(Math.toRadians(first.getLatitude()));\n\t\tdouble cos_lat2 = Math.cos(Math.toRadians(second.getLatitude()));\n\t\tdouble harvesin = harvesin_diff_lat + cos_lat1 * cos_lat2 * harvesin_diff_lng;\n\n\t\tdistance = 2 * kEarthRadius * Math.atan2(Math.sqrt(harvesin), Math.sqrt(1 - harvesin));\n\t\treturn distance;\n\t}",
"default double euclideanDistance(double[] a, double[] b) {\n checkLengthOfArrays(a, b);\n double sum = 0.0;\n for (int i = 0; i < a.length; i++) {\n final double d = a[i] - b[i];\n sum += d * d;\n }\n return Math.sqrt(sum);\n }",
"public double getDistance(final DataPoint point1, final DataPoint point2) {\n return NTree.getDistance(point1, point2);\n }",
"private double distance(Double[] e1, Double[] e2) {\n if(e1.length != e2.length)\n throw new IllegalArgumentException(\"e1 and e2 lie in two different dimensional spaces.\");\n\n double sum = 0.0;\n for(int i = 0; i < e1.length; ++i)\n sum += Math.pow(e1[i] - e2[i], 2);\n return Math.sqrt(sum);\n }",
"public static double eucleidian(InputSpacePoint a, InputSpacePoint b) {\n double sum =0.0;\n for(String s : a.getKeysAsCollection()) {\n sum += Math.pow(a.getValue(s)-b.getValue(s), 2);\n }\n return Math.sqrt(sum);\n }",
"private static double distance(double lat1, double lat2, double lon1, double lon2,\n\t double el1, double el2) {\n\n\t final int R = 6371; // Radius of the earth\n\n\t Double latDistance = deg2rad(lat2 - lat1);\n\t Double lonDistance = deg2rad(lon2 - lon1);\n\t Double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n\t + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2))\n\t * Math.sin(lonDistance / 2) * Math.sin(lonDistance / 2);\n\t Double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\t double distance = R * c * 1000; // convert to meters\n\n\t double height = el1 - el2;\n\t distance = Math.pow(distance, 2) + Math.pow(height, 2);\n\t return Math.sqrt(distance);\n\t}",
"private double calcDistance(RenderedImage other) {\n\t\t// Calculate the signature for that image.\n\t\tColor[][] sigOther = calcSignature(other);\n\t\t// There are several ways to calculate distances between two vectors,\n\t\t// we will calculate the sum of the distances between the RGB values of\n\t\t// pixels in the same positions.\n\t\tdouble dist = 0;\n\t\tfor (int x = 0; x < 5; x++)\n\t\t\tfor (int y = 0; y < 5; y++) {\n\t\t\t\tint r1 = signature[x][y].getRed();\n\t\t\t\tint g1 = signature[x][y].getGreen();\n\t\t\t\tint b1 = signature[x][y].getBlue();\n\t\t\t\tint r2 = sigOther[x][y].getRed();\n\t\t\t\tint g2 = sigOther[x][y].getGreen();\n\t\t\t\tint b2 = sigOther[x][y].getBlue();\n\t\t\t\tdouble tempDist = Math.sqrt((r1 - r2) * (r1 - r2) + (g1 - g2)\n\t\t\t\t\t\t* (g1 - g2) + (b1 - b2) * (b1 - b2));\n\t\t\t\tdist += tempDist;\n\t\t\t}\n\t\treturn dist;\n\t}",
"private static double getDistance(final WayNodeOSM a, final WayNodeOSM b) {\n \t\tdouble latA = a.getLatitude()/180*Math.PI;\n \t\tdouble latB = b.getLatitude()/180*Math.PI;\n \t\tdouble lonDif = (b.getLongitude() - a.getLongitude())/180*Math.PI;\n \t\treturn (Math.acos((Math.sin(latA) * Math.sin(latB)) + (Math.cos(latA) * Math.cos(latB) * Math.cos(lonDif))) * 6367500);\n \t}",
"public static int dist(Location loc1, Location loc2)\n\t{\n\t\treturn Math.abs(loc1.x - loc2.x) + Math.abs(loc1.y - loc2.y);\n\t}",
"private double haversineDist(CityNode a, CityNode b) {\n\n double distLat = Math.toRadians(a.getLat() - b.getLat());\n double distLong = Math.toRadians(a.getLong() - b.getLong());\n\n // Convert latitudes to radians\n double startLat = Math.toRadians(b.getLat());\n double endLat = Math.toRadians(a.getLat());\n\n double calc = Math.pow(Math.sin(distLat / 2), 2)\n + Math.pow(Math.sin(distLong / 2), 2) * Math.cos(startLat) * Math.cos(endLat);\n double calc2 = 2 * Math.asin(Math.sqrt(calc));\n return 3959 * calc2;\n }"
]
| [
"0.75885284",
"0.73033196",
"0.71155506",
"0.7047637",
"0.69731474",
"0.69445646",
"0.6895842",
"0.6886741",
"0.6850703",
"0.68497145",
"0.68284494",
"0.6759335",
"0.6740292",
"0.67345107",
"0.6705429",
"0.6685436",
"0.668281",
"0.66814953",
"0.66811234",
"0.66088456",
"0.65895617",
"0.6588507",
"0.65725464",
"0.6558289",
"0.6553163",
"0.6552666",
"0.65512663",
"0.6543306",
"0.6536937",
"0.652019",
"0.6514434",
"0.650599",
"0.6490257",
"0.6488503",
"0.64875937",
"0.64854985",
"0.64849746",
"0.64783067",
"0.64678204",
"0.64617896",
"0.64507955",
"0.6445613",
"0.6442443",
"0.64386415",
"0.6438501",
"0.64369214",
"0.64350915",
"0.6435026",
"0.64247876",
"0.64173377",
"0.6397539",
"0.639408",
"0.63917804",
"0.6385848",
"0.63849455",
"0.6384518",
"0.6383876",
"0.63799655",
"0.6377896",
"0.63741064",
"0.6366794",
"0.6349923",
"0.63483346",
"0.63478446",
"0.63337123",
"0.6331968",
"0.6329732",
"0.6326079",
"0.6324475",
"0.6324066",
"0.63232225",
"0.6310666",
"0.6307365",
"0.63064295",
"0.62896854",
"0.628449",
"0.62822807",
"0.6269053",
"0.626709",
"0.62604326",
"0.62564087",
"0.625054",
"0.62481487",
"0.62403387",
"0.62338674",
"0.6227567",
"0.6222155",
"0.62192476",
"0.6215036",
"0.6213829",
"0.6212981",
"0.62108123",
"0.6208846",
"0.62087405",
"0.6202938",
"0.61941886",
"0.619224",
"0.61744225",
"0.6173356",
"0.61693805"
]
| 0.71881884 | 2 |
A method to get the distance between two edges entities. | public double getDistanceBetweenEdge(Entity entity) throws IllegalArgumentException{
if(this == entity) throw new IllegalArgumentException("this == entity @ getDistanceBetweenEdge");
return getDistanceBetweenCenter(entity) - this.getRadius() - entity.getRadius();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static double distancia(Entidade e1,Entidade e2){\r\n\t\tdouble dx = e1.getPosicaoX() - e2.getPosicaoX();\r\n\t\tdouble dy = e1.getPosicaoY() - e2.getPosicaoY();\r\n\t\tdouble d = Math.sqrt(dx*dx + dy*dy);\r\n\t\treturn d;\r\n\t}",
"public double distance() {\n \tif (dist == -1) {\n \t\tdist = distance(vertex1, vertex2);\n \t}\n \n \treturn dist;\n }",
"public float distance(Entity other) {\n return getCenteredCoordinate().distance(other.getCenteredCoordinate());\n }",
"public static double getDistance(Node a, Node b) {\n return Math.abs(a.getX() - b.getX()) + Math.abs(a.getY() - b.getY());\n }",
"public static double dist (Vertex a, Vertex b){\n return Math.sqrt((b.y-a.y)*(b.y-a.y) + (b.x-a.x)*(b.x-a.x));\n }",
"public double getDistance(Node start, Node end) {\n\tstartX = start.getX();\n\tstartY = start.getY();\n\tendX = end.getX();\n\tendY = end.getY();\n\n int Xsquared = (startX - endX) * (startX - endX);\n\tint Ysquared = (startY - endY) * (startY - endY);\n\n\treturn Math.sqrt(Xsquared + Ysquared);\n\t\n }",
"public double getDistanceBetween(Entity otherEntity) throws IllegalArgumentException {\n\t\tif (otherEntity == null) \n\t\t\tthrow new IllegalArgumentException(\"Invalid argument object (null).\");\n\t\t\n\t\tif (otherEntity == this)\n\t\t\treturn 0;\n\t\treturn Math.sqrt( Math.pow(this.getXCoordinate()-otherEntity.getXCoordinate(), 2) + Math.pow(this.getYCoordinate()-otherEntity.getYCoordinate(), 2) ) - (this.getRadius() + otherEntity.getRadius());\n\t}",
"public double distanceBetween(Node a, Node b){\n // used to be its own function, now is implemented in the Node class\n return a.getDist(b);\n }",
"public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t\t\t\t+ (\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t\t, 2 )\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}",
"Integer distance(PathFindingNode a, PathFindingNode b);",
"public static double getDistance( GameObject one, GameObject two )\n {\n double deltaX = getDeltaX( one, two );\n double deltaY = getDeltaY( one, two );\n return Math.sqrt( deltaX * deltaX + deltaY * deltaY );\n }",
"@Override\r\n\tpublic int getDistance(E src, E dst) {\r\n\t\treturn graphForWarshall.getDistance(src, dst);\r\n\t}",
"public double distance(V a, V b);",
"public static double getDist(int id1, int id2) {\n\t\tArrayList<Double> gA1 = geneAttributes.get(id1);\n\t\tArrayList<Double> gA2 = geneAttributes.get(id2);\n\t\tdouble dist = 0;\n\t\tfor(int i=0;i<gA1.size();i++) {\n\t\t\tdist += ( (gA1.get(i) - gA2.get(i)) * (gA1.get(i) - gA2.get(i)) );\n\t\t}\n\t\tdist = Math.sqrt(dist);\n\t\treturn dist;\n\t}",
"private double distance(Double[] e1, Double[] e2) {\n if(e1.length != e2.length)\n throw new IllegalArgumentException(\"e1 and e2 lie in two different dimensional spaces.\");\n\n double sum = 0.0;\n for(int i = 0; i < e1.length; ++i)\n sum += Math.pow(e1[i] - e2[i], 2);\n return Math.sqrt(sum);\n }",
"public abstract double getDistance(T o1, T o2) throws Exception;",
"public double findEvolutionaryDistance(String label1, String label2) {\n PhyloTreeNode node1 = findTreeNodeByLabel(label1);\n PhyloTreeNode node2 = findTreeNodeByLabel(label2);\n if(node1 == null || node2 == null) {\n return java.lang.Double.POSITIVE_INFINITY;\n }\n PhyloTreeNode ancestor = findLeastCommonAncestor(node1, node2);\n return (findEvolutionaryDistanceHelper(ancestor, node1) + findEvolutionaryDistanceHelper(ancestor, node2));\n }",
"public double distance(final Coordinates other) {\n\t\treturn Math.sqrt(Math.pow((double) x - other.getX(), 2) + Math.pow((double) y - other.getY(), 2));\n\t}",
"public int distance(Coord coord1, Coord coord2);",
"private double calculateDistance(Example first, Example second) {\n\t\tdouble distance = 0;\n\t\tfor (Attribute attribute : first.getAttributes()) {\n\t\t\tdouble diff = first.getValue(attribute) - second.getValue(attribute);\n\t\t\tdistance += diff * diff;\n\t\t}\n\t\treturn Math.sqrt(distance);\n\t}",
"static Number160 distance(final Number160 id1, final Number160 id2) {\n return id1.xor(id2);\n }",
"public static double dist (ECEF a, ECEF b)\r\n\t{\r\n\t\tdouble distsquared = square (a.x-b.x) + square (a.y-b.y) + square (a.z-b.z);\r\n\t\treturn Math.sqrt(distsquared);\r\n\t}",
"public static double euclideanDistance(Prototype one, Prototype two)\r\n {\r\n return d(one, two);\r\n }",
"public double calcDistance(GpsCoordinate other)\n\t{\n\t\tdouble lat1 = degToRadian(this.latitude);\n\t\tdouble lng1 = degToRadian(this.longitude);\n\t\tdouble lat2 = degToRadian(other.latitude);\n\t\tdouble lng2 = degToRadian(other.longitude);\n\t\t\n\t\t/*\n\t\t * use haversine Formula to calc the distance\n\t\t * @see: http://en.wikipedia.org/wiki/Haversine_formula\n\t\t */\n\t\tdouble inRootFormula = Math.sqrt(\n\t\t\t\tMath.sin((lat1 - lat2)/2)*Math.sin((lat1 - lat2)/2)+\n\t\t\t\tMath.cos(lat1)*Math.cos(lat2)*Math.sin((lng1-lng2)/2)*Math.sin((lng1-lng2)/2));\n\t\t\n\t\treturn 2* EARTH_RADIUS * Math.asin(inRootFormula);\n\n\t\n\t}",
"public double distance(InputDatum datum, InputDatum datum2) throws MetricException;",
"public double distance(Point other) {\n\n // Define delta-X and delta-Y.\n double deltaX = this.x - other.x;\n double deltaY = this.y - other.y;\n\n // Calculate distance and return.\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n }",
"public static Double computeEdges(Point p1, Point p2) {\n\t\treturn Math.sqrt(Math.pow(Math.abs(p1.getX() - p2.getX()), 2) + Math.pow(Math.abs(p1.getY() - p2.getY()), 2));\n\t}",
"public double getEdge(int node1, int node2)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2))\n\t{\n\t\tNode s=(Node) getNodes().get(node1);\n\t\tif(s.getEdgesOf().containsKey(node2))\n\t\t{\n \t\t\t\t\n\t\treturn s.getEdgesOf().get(node2).get_weight();\n\t\t\t\t\t\t\n\t\t}\n\t}\n\t \n\t return -1;\n\n}",
"public float distance (Vector2f other)\n {\n return FloatMath.sqrt(distanceSquared(other));\n }",
"double distanceEcl(Coord other) {\n\t\tint deltaX = x - other.x;\n\t\tint deltaY = y - other.y;\n\t\treturn sqrt(((double)deltaX * deltaX) + ((double)deltaY * deltaY));\n\t}",
"public int getNeighbourDistance(Vertex v1, Vertex v2){\n for(Edge edge: edges){\n if(v1 == edge.getSource() && v2 == edge.getDestination())\n return edge.getWeight();\n if(v1 == edge.getDestination() && v2 == edge.getSource())\n return edge.getWeight();\n }\n return -1;\n }",
"public double distance(AndroidDoveFlockModel otherDove)\n {\n return (Math.sqrt(Math.pow(otherDove.getX()-getX(),2) +\n Math.pow(otherDove.getY()-getY(),2)));\n }",
"public int euclideanDistance(DataValue<T> value1, DataValue<T> value2)\r\n\t{\n\t\tint difference = value1.difference(value2);\r\n\t\tdifference = difference * difference;\t\r\n\t\treturn (int) Math.sqrt(difference);\r\n\t}",
"public double calculateDistance(LatLng other) {\n return Math.sqrt( (this.x - other.x) * (this.x - other.x) + (this.y - other.y) * (this.y - other.y) );\n }",
"private int dist(int city1, int city2){\n\t\treturn this.getGraph().getWeight(city1, city2);\n\t}",
"private double Distance(Point first, Point second){ // distance between two points \n\t\treturn Math.sqrt(Math.pow(second.getY()-first.getY(),2) + Math.pow(second.getX()-first.getX(),2));\n\t}",
"public static EquationExpression dist(final EquationPoint a,\n\t\t\tfinal EquationPoint b) {\n\t\treturn sqrt(dist2(a, b));\n\t}",
"double getDistance();",
"public double getEuclideanDistanceTo(Position other) {\n\n double sum = 0;\n //POEY comment: values.length = the number of extraction functions\n //find different values of every object's values in each function (round-robin tournament event itself)\n for (int i = 0; i < values.length; i++) {\n double value = values[i];\n double otherValue = other.values[i];\n double diff = value - otherValue;\n sum += (diff * diff);\n }\n\n return Math.sqrt(sum);\n \n }",
"private double calcDistance(RenderedImage other) {\n\t\t// Calculate the signature for that image.\n\t\tColor[][] sigOther = calcSignature(other);\n\t\t// There are several ways to calculate distances between two vectors,\n\t\t// we will calculate the sum of the distances between the RGB values of\n\t\t// pixels in the same positions.\n\t\tdouble dist = 0;\n\t\tfor (int x = 0; x < 5; x++)\n\t\t\tfor (int y = 0; y < 5; y++) {\n\t\t\t\tint r1 = signature[x][y].getRed();\n\t\t\t\tint g1 = signature[x][y].getGreen();\n\t\t\t\tint b1 = signature[x][y].getBlue();\n\t\t\t\tint r2 = sigOther[x][y].getRed();\n\t\t\t\tint g2 = sigOther[x][y].getGreen();\n\t\t\t\tint b2 = sigOther[x][y].getBlue();\n\t\t\t\tdouble tempDist = Math.sqrt((r1 - r2) * (r1 - r2) + (g1 - g2)\n\t\t\t\t\t\t* (g1 - g2) + (b1 - b2) * (b1 - b2));\n\t\t\t\tdist += tempDist;\n\t\t\t}\n\t\treturn dist;\n\t}",
"public static double distance(Prototype one, Prototype two)\r\n {\r\n return d(one, two);\r\n }",
"private static double getDistance(final WayNodeOSM a, final WayNodeOSM b) {\n \t\tdouble latA = a.getLatitude()/180*Math.PI;\n \t\tdouble latB = b.getLatitude()/180*Math.PI;\n \t\tdouble lonDif = (b.getLongitude() - a.getLongitude())/180*Math.PI;\n \t\treturn (Math.acos((Math.sin(latA) * Math.sin(latB)) + (Math.cos(latA) * Math.cos(latB) * Math.cos(lonDif))) * 6367500);\n \t}",
"public int getDistance(LifeForm lf1, LifeForm lf2) throws EnvironmentException\r\n\t{\r\n\t\tint lf1Row = getLifeFormRow(lf1); //row of first lifeform\r\n\t\tint lf1Col = getLifeFormCol(lf1); //column of first lifeform\r\n\t\tint lf2Row = getLifeFormRow(lf2); //row of second lifeform\r\n\t\tint lf2Col = getLifeFormCol(lf2); //column of second lifeform\r\n\t\t\r\n\t\t//call getDistance(int row1, int col1, int row2, int col2) with LifeForm coordinates\r\n\t\treturn getDistance(lf1Row, lf1Col, lf2Row, lf2Col);\r\n\t}",
"public float getDistance();",
"public int compareTo(Edge other){\n return this.weight - other.weight;\n }",
"public static float distance(Vec2 start, Vec2 end) {\r\n\t\treturn (float) Math.sqrt((end.x - start.x) * (end.x - start.x) + (end.y - start.y)\r\n\t\t\t\t* (end.y - start.y));\r\n\t}",
"double distance(double x1, double y1, double x2, double y2) {\r\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\r\n }",
"public double distance(Point other) {\r\n double dx = this.x - other.getX();\r\n double dy = this.y - other.getY();\r\n return Math.sqrt((dx * dx) + (dy * dy));\r\n }",
"public double getDistance()\n {\n return Math.abs(getDifference());\n }",
"public static EquationExpression dist(final EquationPoint a, final EquationPoint b) {\n return sqrt(dist2(a,b));\n }",
"public synchronized double getDistance(String from, String to) {\n\t\treturn (new DijkstraShortestPath<String, SumoEdge>(graph, from, to)).getPathLength();\n\t}",
"public double distance(DocumentVector other) {\n\t\tdouble dis = 0;\n\t\t\n\t\tint n = Math.min(this.getAttCount(), other.getAttCount());\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdouble deviate = this.getValueAsReal(i) - other.getValueAsReal(i);\n\t\t\tdis += deviate * deviate;\n\t\t}\n\t\treturn Math.sqrt(dis);\n\t}",
"static private double dist(double[] a, double[] b) {\n\t\treturn new gov.pnnl.jac.geom.distance.Euclidean().distanceBetween(a, b);\n }",
"public double distanceBetweenNodes(Node from, Node to) {\n double dx = from.getX() - to.getX();\n double dy = from.getY() - to.getY();\n \n if (to.isObstacle()) { \n return Double.MAX_VALUE / 2;\n }\n else {\n return Math.sqrt((dx * dx) + (dy * dy));\n }\n }",
"static double distance(double x1, double y1, double x2, double y2)\n {\n double x_dist = x2 - x1;\n double y_dist = y2 - y1;\n double dist = Math.sqrt(Math.pow(x_dist, 2) + Math.pow(y_dist, 2));\n return dist;\n }",
"public static double distance(Vertex v1, Vertex v2)\n\t{\n\t\treturn Math.sqrt(Math.pow((v2.x - v1.x), 2) + Math.pow((v2.y - v1.y), 2));\n\t}",
"private double dist(double [] v1, double [] v2){\n \t\tdouble sum=0;\n \t\tfor (int i=0; i<nDimensions; i++){\n \t\t\tdouble d = v1[i]-v2[i];\n \t\t\tsum += d*d;\n \t\t}\n \t\treturn Math.sqrt(sum);\n \t}",
"private int distance(Field origin, Field destination) {\n int horizontalLength = Math.abs(destination.getY() - origin.getY());\n int verticalLength = Math.abs(destination.getX() - origin.getX());\n return (horizontalLength + verticalLength)/2;\n }",
"public double distance(double x, double y);",
"public static float calculateDistance(Vec2 vecA, Vec2 vecB) {\n\t\treturn (float) Math.sqrt(\n\t\t\t\tMath.pow(vecA.x - vecB.x, 2)\n\t\t\t\t+\n\t\t\t\tMath.pow(vecA.y - vecB.y, 2)\n\t\t\t\t);\n\t}",
"public final double calcDistance( Point a, Point b )\r\n {\r\n return( Math.sqrt( (Math.pow(a.y - b.y, 2)) +\r\n (Math.pow(a.x - b.x, 2)) ) );\r\n }",
"public int calculateDistance(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2){\n double x1 = l1.data.getxCo();\n double y1 = l1.data.getyCo();\n double x2 = l2.data.getxCo();\n double y2 = l2.data.getyCo();\n double dist = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n return (int) dist;\n }",
"private double distance(Position pos1, Position pos2)\r\n {\r\n assert pos1 != null;\r\n assert pos2 != null;\r\n\r\n int x = Math.abs(pos1.column() - pos2.column());\r\n int y = Math.abs(pos1.line() - pos2.line());\r\n\r\n return Math.sqrt(x * x + y * y);\r\n }",
"public static double getDistance(GPSCoordinates point1, GPSCoordinates point2) {\r\n\t\t\r\n\t\treturn EARTH_RADIUS * 2 * Math.atan2( Math.sqrt( getHaversinePart(point1, point2)), Math.sqrt( getHaversinePart(point1, point2) ) );\r\n\t}",
"public static EquationExpression dist2(final EquationPoint a,\n\t\t\tfinal EquationPoint b) {\n\t\tEquationExpression x = diff(a.getXExpression(), b.getXExpression());\n\t\tEquationExpression y = diff(a.getYExpression(), b.getYExpression());\n\t\treturn sum(times(x, x), times(y, y));\n\t}",
"@Override\r\n\tpublic double calculateDistance(Object obj1, Object obj2) {\r\n\t\treturn Math.abs(((String)obj1).split(\" \").length - \r\n\t\t\t\t((String)obj1).split(\" \").length);\r\n\t}",
"public static EquationExpression dist2(final EquationPoint a, final EquationPoint b) {\n EquationExpression x = diff(a.getXExpression(), b.getXExpression());\n EquationExpression y = diff(a.getYExpression(), b.getYExpression());\n return sum(times(x,x), times(y,y));\n }",
"public double distance(Point other) {\n double newX = this.x - other.getX();\n double newY = this.y - other.getY();\n return Math.sqrt((newX * newX) + (newY * newY));\n }",
"public double distance(Node b) {\n return distance(b.getCords());\n }",
"default double euclideanDistance(double[] a, double[] b) {\n checkLengthOfArrays(a, b);\n double sum = 0.0;\n for (int i = 0; i < a.length; i++) {\n final double d = a[i] - b[i];\n sum += d * d;\n }\n return Math.sqrt(sum);\n }",
"private Integer getDistance(double lat1, double lon1, double lat2, double lon2) {\n Location locationA = new Location(\"Source\");\n locationA.setLatitude(lat1);\n locationA.setLongitude(lon1);\n Location locationB = new Location(\"Destination\");\n locationB.setLatitude(lat2);\n locationB.setLongitude(lon2);\n distance = Math.round(locationA.distanceTo(locationB));\n return distance;\n }",
"public double distance(double[] vector1, double[] vector2) throws MetricException;",
"private double distance(Point a, Point b) {\n\t\tDouble xdist = new Double( a.x - b.x );\n\t\tDouble ydist = new Double( a.y - b.y );\n\t\treturn Math.sqrt( Math.pow(xdist, 2.0) + Math.pow(ydist, 2.0) );\n\t}",
"public double distance(double x1, double y1, double x2, double y2)\n {\n return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow(y2 - y1, 2));\n }",
"public double getDistance(final DataPoint point1, final DataPoint point2) {\n return NTree.getDistance(point1, point2);\n }",
"public int getDistance(int row1, int col1, int row2, int col2) throws EnvironmentException\r\n\t{\r\n\t\tif(row1 < rows && row2 < rows && col1 < columns && col2 < columns &&\r\n\t\t\t\trow1 >= 0 && row2 >= 0 && col1 >= 0 && col2 >= 0)\r\n\t\t{\r\n\t\t\t//if same row, return the absolute value of column difference times 5\r\n\t\t\tif(row1 == row2)\r\n\t\t\t{\r\n\t\t\t\treturn Math.abs(col1-col2)*5;\r\n\t\t\t}\r\n\t\t\t//if same col, return the absolute value of row difference times 5\r\n\t\t\telse if(col1 == col2)\r\n\t\t\t{\r\n\t\t\t\treturn Math.abs(row1-row2)*5;\r\n\t\t\t}\r\n\t\t\t//if different rows and columns, use Pythagorean Theorem to compute distance\r\n\t\t\treturn (int)Math.sqrt(Math.pow((row1-row2)*5, 2)+Math.pow((col1-col2)*5, 2));\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new EnvironmentException();\r\n\t\t}\r\n\t}",
"public double distance(Area start, Area end, boolean force) {\n List<EntityID> pathGraph = a_star.getShortestGraphPath(start, end, force);\n if (pathGraph.isEmpty())\n return Double.MAX_VALUE;\n double distance = 0;\n for (int i = 0; i < pathGraph.size() - 1; i++) {\n int j = i + 1;\n EntityID nodeID1 = pathGraph.get(i);\n EntityID nodeID2 = pathGraph.get(j);\n Node node1 = graph.getNode(nodeID1);\n Node node2 = graph.getNode(nodeID2);\n distance += Util.distance(node1.getPosition(), node2.getPosition());\n }\n return distance;\n }",
"private double distance(Point A, Point B) {\n\t\tdouble dX = A.x - B.x;\n\t\tdouble dY = A.y - B.y;\n\t\treturn Math.sqrt(dX * dX + dY * dY);\n\t}",
"public double distanceTo(Point other) {\r\n\t\tdouble distX, distY, totalDist;\r\n\t\tdistX=(other.pX - pX) * (other.pX - pX);\r\n\t\tdistY=(other.pY - pY) * (other.pY - pY);\r\n\t\ttotalDist=Math.sqrt(distX + distY);\r\n\t\t\r\n\t\treturn totalDist;\r\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\r\n\t\t\r\n\t}",
"public double distance(DataInstance d1, DataInstance d2, List<Attribute> attributeList);",
"static int distance(int a, int b) {\n return depth[a] + depth[b] - 2 * depth[leastCommonAncestor(a, b)];\n }",
"public Dimension2D getDistance() {\n\t\treturn distance;\n\t}",
"public static int distanceBetweenNodes(Node node, int d1, int d2){\n ArrayList<Integer> al1= nodeToRootPath(node,d1);\n ArrayList<Integer> al2=nodeToRootPath(node,d2);\n\n if(al1.size()==0 || al2.size()==0)\n return -1;\n int l1=al1.size()-1;\n int l2=al2.size()-1;\n\n while(l1>=0 && l2>=0)\n {\n if(al1.get(l1)==al2.get(l2))\n {\n l1--;l2--;continue;\n }\n else break;\n }\n return l1+l2+2;\n }",
"public static double getDistance(GPSPosition first, GPSPosition second) {\n\t\tdouble distance = 0;\n\t\t\n\t\tdouble latitude_distance_in_radians = \n\t\t\t\tMath.toRadians(second.getLatitude() - first.getLatitude());\n\t\tdouble longitude_distance_in_radians = \n\t\t\t\tMath.toRadians(second.getLongitude() - first.getLongitude());\n\t\t// harvesin(d / R) = harvesin(lat1 - lat2) + cos(lat1) * cos(lat2) * harvesin(lng1 - lng2);\n\t\t// harvesin(angle) = sin(angle / 2) ^ 2;\n\t\t// d = 2 * R * arcsin(sqrt(harvesin));\n\t\tdouble harvesin_diff_lat = Math.pow(Math.sin(latitude_distance_in_radians / 2), 2);\n\t\tdouble harvesin_diff_lng = Math.pow(Math.sin(longitude_distance_in_radians / 2), 2);\n\t\tdouble cos_lat1 = Math.cos(Math.toRadians(first.getLatitude()));\n\t\tdouble cos_lat2 = Math.cos(Math.toRadians(second.getLatitude()));\n\t\tdouble harvesin = harvesin_diff_lat + cos_lat1 * cos_lat2 * harvesin_diff_lng;\n\n\t\tdistance = 2 * kEarthRadius * Math.atan2(Math.sqrt(harvesin), Math.sqrt(1 - harvesin));\n\t\treturn distance;\n\t}",
"public static float euclideanDistance(PointF firstPoint, PointF secondPoint) {\n return PointF.length(secondPoint.x - firstPoint.x, secondPoint.y - firstPoint.y);\n }",
"public double getEuclideanDistance2D( double x1, double x2, double y1, double y2 )\n {\n double distance;\n double t1 = x1 - y1;\n double t2 = t1 * t1;\n t1 = x2 - y2;\n t2 += ( t1 * t1 );\n distance = Math.sqrt( t2 );\n\n return distance;\n }",
"public double getDistance(double x, double y) {\n double xdist = 0;\n if (x < x1 && x < x2) xdist = Math.min(x1, x2) - x;\n else if (x > x1 && x > x2) xdist = x - Math.max(x1, x2);\n double ydist = 0;\n if (y < y1 && y < y2) ydist = Math.min(y1, y2) - y;\n else if (y > y1 && y > y2) ydist = y - Math.max(y1, y2);\n return Math.sqrt(xdist * xdist + ydist * ydist);\n }",
"static double distance(Point a, Point b) {\n\t\tint xDiff = a.x - b.x;\n\t\tint yDiff = a.y - b.y;\n\t\treturn Math.sqrt((xDiff * xDiff) + (yDiff * yDiff));\n\t}",
"public double distance(Point other) {\n return Math.sqrt(((this.x - other.getX()) * (this.x - other.getX()))\n + ((this.y - other.getY()) * (this.y - other.getY())));\n }",
"public double distanceTo(Point other) {\n\t\tdouble distX, distY, totalDist;\n\t\tdistX=(other.pX - pX) * (other.pX - pX);\n\t\tdistY=(other.pY - pY) * (other.pY - pY);\n\t\ttotalDist=Math.sqrt(distX + distY);\n\t\t\n\t\treturn totalDist;\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\n\t\t\n\t}",
"public static double distance(LinearAdditive space1, LinearAdditive space2) {\n double dist = 0;\n\n assert space1.getDomain() == space2.getDomain();\n\n Domain domain = space1.getDomain();\n\n for (String issue: domain.getIssues()) {\n double weight = space1.getWeight(issue).doubleValue();\n\n double issueDist = 0.0;\n\n for (Value value: domain.getValues(issue)) {\n issueDist += Math.pow(space1.getUtilities().get(issue).getUtility(value).doubleValue() - space2.getUtilities().get(issue).getUtility(value).doubleValue(), 2);\n }\n\n dist += weight * issueDist;\n }\n\n return dist;\n }",
"private double calculateDistance(int sourceX, int sourceY, int targetX, int targetY){\n int xLength = targetX - sourceX;\n int yLength = targetY - sourceY;\n return Math.sqrt((xLength*xLength)+(yLength*yLength)); \n }",
"public double distance(Point a, Point b) {\n\t\tdouble dx = a.x - b.x;\n\t\tdouble dy = a.y - b.y;\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t}",
"private static int dist(int x1, int y1, int x2, int y2) {\n\t\treturn (int) Math.sqrt(Math.abs(((x2-x1) * (x2-x1)) + ((y2-y1) * (y2-y1))));\n\t}",
"public float distance(Vector3 other){\r\n\t\treturn (float)Math.sqrt(Math.pow(this.x-other.x,2) + Math.pow(this.y-other.y,2) + Math.pow(this.z-other.z,2));\r\n\t}",
"@Override\n\tpublic float getDistance(float[] fv1, float[] fv2) {\n\t\tif(settings.getMetric() == 1){\n\t\t\treturn getL1Distance(fv1, fv2);\n\t\t} else { //metric == 2\n\t\t\treturn getL2Distance(fv1, fv2);\n\t\t}\n\t\t\n\t\t\n\t}",
"public int distance(String nounA, String nounB)\n {\n if (nounA == null || nounB == null) throw new NullPointerException();\n if (!(isNoun(nounA) && isNoun(nounB))) throw new IllegalArgumentException();\n return shortestPath.length(synsetHash.get(nounA), synsetHash.get(nounB));\n }",
"public double getDistance(double latitude1, double latitude2, double longitude1, double longitude2) {\n final int EarthRadius = 6371000; // It is in meters scale.\n double latitude_difference = Math.toRadians(latitude2 - latitude1);\n double longitude_difference = Math.toRadians(longitude2 - longitude1);\n double a = (Math.sin(latitude_difference / 2) * Math.sin(latitude_difference / 2))\n + (Math.cos(Math.toRadians(latitude1)) * Math.cos(Math.toRadians(latitude2))\n * Math.sin(longitude_difference / 2) * Math.sin(longitude_difference / 2));\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance = EarthRadius * c;\n return distance;\n }",
"public static int getDistance(Tile from, Tile to) {\n\n\t\tif (!isOrdinal(from, to) && !isCardinal(from, to))\n\t\t\treturn -1;\n\n\t\tint distX = Math.abs(to.getX() - from.getX());\n\t\tint distY = Math.abs(to.getY() - from.getY());\n\n\t\tif (distX == distY)\n\t\t\treturn distX;\n\t\telse if (distX == 0)\n\t\t\treturn distY;\n\t\telse\n\t\t\treturn distX;\n\t}",
"public double distance(DoubleMatrix1D vector1, DoubleMatrix1D vector2) throws MetricException;"
]
| [
"0.7009215",
"0.6997359",
"0.6970626",
"0.69149363",
"0.6903942",
"0.6808647",
"0.6797006",
"0.67274",
"0.66764486",
"0.6619434",
"0.659666",
"0.6545583",
"0.6401389",
"0.639982",
"0.63958347",
"0.634499",
"0.63036567",
"0.6256994",
"0.6243667",
"0.6236818",
"0.62138486",
"0.61972195",
"0.6185491",
"0.6183461",
"0.61813295",
"0.6179934",
"0.61636305",
"0.61490595",
"0.6134536",
"0.61224663",
"0.611692",
"0.61101204",
"0.61077815",
"0.60884935",
"0.6056911",
"0.6053956",
"0.6052655",
"0.6027693",
"0.60256207",
"0.60005915",
"0.59973645",
"0.59871936",
"0.5986463",
"0.5980793",
"0.59762436",
"0.5975466",
"0.5970582",
"0.59694827",
"0.5966029",
"0.59565955",
"0.59443736",
"0.59417754",
"0.59397876",
"0.5923106",
"0.5922648",
"0.59224916",
"0.5920671",
"0.590329",
"0.5898581",
"0.58967185",
"0.5895021",
"0.5893793",
"0.58931935",
"0.5879438",
"0.5877865",
"0.586855",
"0.5867114",
"0.58642596",
"0.58611256",
"0.5860389",
"0.58415025",
"0.5833957",
"0.5828846",
"0.58287275",
"0.582732",
"0.58027893",
"0.5800681",
"0.5782261",
"0.5780741",
"0.57765996",
"0.5762669",
"0.5762102",
"0.57605475",
"0.57605255",
"0.5756731",
"0.574057",
"0.57392514",
"0.5737047",
"0.5725773",
"0.5725758",
"0.57188886",
"0.57185715",
"0.57173496",
"0.5711758",
"0.57088584",
"0.5705985",
"0.57034004",
"0.5697142",
"0.5696604",
"0.5690372"
]
| 0.7290474 | 0 |
Defensive A method to check whether two entity overlap. | public boolean overlap(Entity entity){
if (entity == null) throw new IllegalArgumentException("The second entity does not exist. @overlap");
if (this == entity) return true;
return this.getDistanceBetweenEdge(entity) <= -0.01;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean overlap(Entity otherEntity) throws IllegalArgumentException {\n\t\tif (otherEntity == null) \n\t\t\tthrow new IllegalArgumentException(\"Invalid argument object (null).\");\n\t\tif (this == otherEntity) return true;\n\t\t\n\t\tif ( this.getDistanceBetween(otherEntity) < -0.01)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"boolean overlap(Reservation other);",
"public boolean overlapAnyEntity(){\n \treturn this.getSuperWorld().getEntities().stream().anyMatch(T ->this.overlap(T));\n }",
"@Test\n public void isOverlap_interval1ContainsInterval2OnEnd_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }",
"@Test\n public void isOverlap_interval1BeforeInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(8,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }",
"@Test\n public void isOverlap_interval1OverlapsInterval2OnStart_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(3,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }",
"@Test\n public void isOverlap_interval1AfterInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(-10,-3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }",
"private boolean overlaps(Point2D p0, Point2D p1)\n {\n return Math.abs(p0.getX() - p1.getX()) < 0.001 && Math.abs(p0.getY() - p1.getY()) < 0.001;\n }",
"public boolean doOverlapNew(VIntWritable[] e1, VIntWritable[] e2){\n\t\tSet<VIntWritable> intersection = new HashSet<>(Arrays.asList(e1));\t\t\t\t\n\t\tintersection.retainAll(Arrays.asList(e2));\t\t\n\t\t\n\t\t//System.out.println(\"overlap? \"+ (intersection.isEmpty() ? false : true));\n\t\treturn intersection.isEmpty() ? false : true;\n\t\t\n\t\t//SOLUTION 2: slower O(nlogn) but needs less space\n//\t\tArrays.sort(e1); //O(nlogn)\n//\t\tfor (VIntWritable tmp : e2) { //O(m)\n//\t\t\tif (Arrays.binarySearch(e1, tmp) == -1) //O(logm)\n//\t\t\t\treturn false;\n//\t\t}\n//\t\treturn true;\n\t\t\n\t\t\n\t\t\t\n\t}",
"private boolean isOverlapping( int[] t0, int[] t1)\n {\n if ( t0.length == 1)\n {\n return t0[ 0] >= t1[ 0]; \n }\n else\n {\n return t0[ 1] >= t1[ 0]; \n }\n }",
"@Test\n public void isOverlap_interval1ContainWithinInterval2_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }",
"static boolean doTheseOverlap(RBox b1, RBox b2){\n\t\t\n\t\tif(contains(b1,b2))\n\t\t\treturn true;\n\t\t\n\t\tif(contains(b2,b1))\n\t\t\treturn true;\n\t\t\n\t\tboolean xOverlap=false ;\n\t\tboolean yOverlap=false ;\n\t\t\n\t\tif(b1.xmax==b2.xmin && b2.xmax > b1.xmax)\n\t\t\treturn false;\n\t\t\n\t\tif(b2.xmax==b1.xmin && b1.xmax > b2.xmax)\n\t\t\treturn false;\n\t\t\n\t\tif((b1.xmin<=b2.xmin&&b1.xmax>=b2.xmax)||(b2.xmin<=b1.xmin&&b2.xmax>=b1.xmax))\n\t\t\txOverlap=true;\n\t\t\n\t\tif(!xOverlap)\n\t\tif(b1.xmin >= b2.xmin && b1.xmin <= b2.xmax)\n\t\t\txOverlap=true;\n\t\t\n\t\tif(!xOverlap)\n\t\t if(b1.xmax >= b2.xmin && b1.xmax <= b2.xmax)\n\t\t \txOverlap = true;\n\t\t else{//System.out.println(\"X overlap\");\n\t\t \treturn false;}\n\t\t\n\t\t\n\t\tif((b1.ymin<=b2.ymin&&b1.ymax>=b2.ymax)||(b2.ymin<=b1.ymin&&b2.ymax>=b1.ymax))\n\t\t yOverlap=true;\n\t\t\n\t\tif(!yOverlap)\n\t\tif(b1.ymin>=b2.ymin && b1.ymin<=b2.ymax)\n\t\t\tyOverlap=true;\n\t\t\n\t\tif(!yOverlap)\n\t\t\tif(b1.ymax>=b2.ymin && b1.ymax<=b2.ymax)\n\t\t\t\tyOverlap=true;\n\t\t\telse{\n\t\t\t\t//System.out.println(\"Y overlap\");\n\t\t\t\treturn false;}\n\t\t\n\t\tif(xOverlap&&yOverlap)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}",
"public void checkEntityOverlap(){\n for(Entity entity:entityList){\n if(entity.getEntityType().equals(\"Sandwich\")) {\n if (player.getPlayerCoordinates() == entity.getEntityCoordinates()) {\n player.eatSandwich();\n entityList.remove(entity);\n }\n }\n }\n }",
"@Test\n public void findOverlap() {\n\n int[] A = new int[] {1,3,5,7,10};\n int[] B = new int[] {-2,2,5,6,7,11};\n\n List<Integer> overlap = new ArrayList<Integer>();\n overlap.add(5);\n overlap.add(7);\n\n Assert.assertEquals(overlap,Computation.findOverlap(A,B));\n\n }",
"private boolean overlaps(ThingTimeTriple a, ThingTimeTriple b)\r\n/* 227: */ {\r\n/* 228:189 */ return (a.from < b.to) && (a.to > b.from);\r\n/* 229: */ }",
"protected boolean isOverlapping(ArrayList<Rectangle> first, ArrayList<Rectangle> second) {\n\t\tfor (Rectangle f : first) {\n\t\t\tfor (Rectangle s : second) {\n\t\t\t\tif (f.overlaps(s)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean isCollision(Date currentStart, Date currentEnd,\n Date otherStart, Date otherEnd)\n {\n return currentStart.compareTo(otherEnd) <= 0\n && otherStart.compareTo(currentEnd) <= 0;\n }",
"private boolean isOverlapped(BpmnShape s1, BpmnShape s2){\n\t\t\n\t\ttry{\n\t\t\t//Two tasks\n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Task)\n\t\t\t\treturn this.overlappingTasks(s1,s2);\n\t\t\t\n\t\t\t//Two Events\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Event) {\n\t\t\t\treturn this.overlappingEvents(s1,s2);\n\t\t\t}\n\t\t\t\n\t\t\t//Two Gateways\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingGateways(s1,s2);\n\t\t\t\n\t\t\t//One Task and one Event\n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Event)\n\t\t\t\treturn this.overlappingTaskAndEvent(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Task )\n\t\t\t\treturn this.overlappingTaskAndEvent(s2, s1);\n\t\t\t\n\t\t\t//One Task and one Gateway \n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingTaskAndGateway(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Task )\n\t\t\t\treturn this.overlappingTaskAndGateway(s2, s1);\t\t\n\t\t\t\n\t\t\t//One Event and one Gateway\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingEventAndGateway(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Event)\n\t\t\t\treturn this.overlappingEventAndGateway(s2, s1);\n\t\t}catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\treturn false;\n\t}",
"public abstract boolean overlap(Catcher catcher, FallingObject object);",
"private static boolean areOverlapping( int ix0, int ix1, int len )\n {\n if( ix0<ix1 ){\n return ix0+len>ix1;\n }\n else {\n return ix1+len>ix0;\n }\n }",
"public boolean areOverlapping() {\n return areOverlapping;\n }",
"public boolean checkOverlappingTimes(LocalDateTime startA, LocalDateTime endA,\n LocalDateTime startB, LocalDateTime endB){\n return (endB == null || startA == null || !startA.isAfter(endB))\n && (endA == null || startB == null || !endA.isBefore(startB));\n }",
"private boolean overlapsWith(IRegion range1, IRegion range2) {\n \t\treturn overlapsWith(range1.getOffset(), range1.getLength(), range2.getOffset(), range2.getLength());\n \t}",
"private boolean overlapsWith(int offset1, int length1, int offset2, int length2) {\n \t\tint end= offset2 + length2;\n \t\tint thisEnd= offset1 + length1;\n \n \t\tif (length2 > 0) {\n \t\t\tif (length1 > 0)\n \t\t\t\treturn offset1 < end && offset2 < thisEnd;\n \t\t\treturn offset2 <= offset1 && offset1 < end;\n \t\t}\n \n \t\tif (length1 > 0)\n \t\t\treturn offset1 <= offset2 && offset2 < thisEnd;\n \t\treturn offset1 == offset2;\n \t}",
"boolean isPartiallyOverlapped(int[] x, int[] y) {\n return y[0] <= x[1]; //정렬이 이미 되어 있어서 simplify 할 수 있음\n }",
"static boolean isAABBOverlapping(final Entity a, final Entity b) {\n return !(a.right() <= b.left()\n || b.right() <= a.left()\n || a.bottom() <= b.top()\n || b.bottom() <= a.top());\n }",
"private boolean hasOverlap(int[] i1, int[] i2)\n {\n // Special case of consecutive STEP-BY-STEP intervals\n if(i1[0] <= i2[0] && i2[0] <= i1[1])\n return true;\n if(i2[0] <= i1[0] && i1[0] <= i2[1])\n return true;\n return false;\n }",
"public boolean willOverlap() {\n/* 208 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private boolean overlappingEvents(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX();\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"void checkCollision(Entity other);",
"public boolean doOverlap(Cell a, Cell b) {\n\t\tfloat dx = a.position.x - b.position.x;\n\t\tfloat dy = a.position.y - b.position.y;\n\t\tfloat cellSizeF = (float) cellSize;\n\t\t//cellSizeF = cellSizeF - .2f;\n\t\t//app.println(\"cellSizeF: \" + cellSizeF);\n\n\t\t// simple box check\n\t\tif (app.abs(dx) < cellSizeF && app.abs(dy) < cellSizeF) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean overlap(Circle other) {\r\n\t\t// implementation not shown\r\n\t}",
"private boolean overlappingTaskAndEvent(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"protected boolean hasOverlap(Cluster cluster1, Cluster cluster2) {\n return (cluster1.startTime < cluster2.endTime &&\n cluster2.startTime < cluster1.endTime);\n }",
"private static boolean intersect(\n\t\tDateTime start1, DateTime end1,\n\t\tDateTime start2, DateTime end2)\n\t{\n\t\tif (DateTime.op_LessThanOrEqual(end2, start1) || DateTime.op_LessThanOrEqual(end1, start2))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"private boolean isColliding(Node node1, Node node2){\n\t\tfinal int offset = 2;\n\t\tBounds bounds1 = node1.getBoundsInParent();\n\t\tBounds bounds2 = node2.getBoundsInParent();\n\t\tbounds1 = new BoundingBox(bounds1.getMinX() + offset, bounds1.getMinY() + offset,\n\t\t\t\tbounds1.getWidth() - offset * 2, bounds1.getHeight() - offset * 2);\n\t\tbounds2 = new BoundingBox(bounds2.getMinX() + offset, bounds2.getMinY() + offset,\n\t\t\t\tbounds2.getWidth() - offset * 2, bounds2.getHeight() - offset * 2);\n\t\treturn bounds1.intersects(bounds2);\n\t}",
"private boolean intersects(int from1, int to1, int from2, int to2) {\n\t\treturn from1 <= from2 && to1 >= from2 // (.[..)..] or (.[...]..)\n\t\t\t\t|| from1 >= from2 && from1 <= to2; // [.(..]..) or [..(..)..\n\t}",
"public boolean overlapsWith()\r\n\t{\r\n\t\tboolean alive = false;\r\n\t\tfor (Platforms platform : platforms)\r\n\t\t{\r\n\t\t\tif (getAvatar().getX() == platform.getX() && getAvatar().getY() == platform.getY())\r\n\t\t\t{\r\n\t\t\t\talive = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn alive;\r\n\t}",
"public boolean overlap(float[] a, float[] b) {\r\n return ( (b[0] <= a[0] && a[0] <= b[3]) || (b[0] <= a[3] && a[3] <= b[3]) ) &&\r\n ( (b[1] <= a[1] && a[1] <= b[4]) || (b[1] <= a[4] && a[4] <= b[4]) ) &&\r\n ( (b[2] <= a[2] && a[2] <= b[5]) || (b[2] <= a[5] && a[5] <= b[5]) );\r\n }",
"public boolean overlapsWith (Stick other)\r\n {\r\n return Math.max(getStart(), other.getStart()) < Math.min(\r\n getStop(),\r\n other.getStop());\r\n }",
"public void checkOverlap() {\n\n // Logic that validates overlap.\n if(redCircle.getBoundsInParent().intersects(blueCircle.getBoundsInParent())) {\n title.setText(\"Two circles intersect? Yes\");\n }\n else {\n title.setText(\"Two circles intersect? No\");\n }\n\n // Update fields in red table.\n redCircleCenterXValue.setText(String.valueOf(redCircle.getCenterX()));\n redCircleCenterYValue.setText(String.valueOf(redCircle.getCenterY()));\n redCircleRadiusValue.setText(String.valueOf(redCircle.getRadius()));\n\n // Update fields in blue table.\n blueCircleCenterXValue.setText(String.valueOf(blueCircle.getCenterX()));\n blueCircleCenterYValue.setText(String.valueOf(blueCircle.getCenterY()));\n blueCircleRadiusValue.setText(String.valueOf(blueCircle.getRadius()));\n }",
"public static boolean areInstantsOverlapping(Instant externalStart, Instant externalEnd, Instant calendarStart,\n\t\t\tInstant calendarEnd) {\n\n\t\tif ((externalStart.isAfter(calendarStart) || externalStart.equals(calendarStart))\n\t\t\t\t&& (externalStart.isBefore(calendarEnd))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ((externalEnd.isAfter(calendarStart))\n\t\t\t\t&& (externalEnd.isBefore(calendarEnd) || externalEnd.equals(calendarStart))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ((externalStart.isBefore(calendarStart) || externalStart.equals(calendarStart))\n\t\t\t\t&& (externalEnd.isAfter(calendarEnd) || externalEnd.equals(calendarEnd))) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"protected final boolean overlaps(int low2, int high2) {\n\tif ((high2 < this.low) || (low2 > this.high)) { \n\t return(false);\n\t}\n\treturn(true);\n }",
"private boolean detectOverlapping(Exemplar ex){\n Exemplar cur = m_Exemplars;\n while(cur != null){\n if(ex.overlaps(cur)){\n\treturn true;\n }\n cur = cur.next;\n }\n return false;\n }",
"boolean checkIfValidToCreate(int start, int end) {\n return myMarkerTree.processOverlappingWith(start, end, region->{\n int rStart = region.getStartOffset();\n int rEnd = region.getEndOffset();\n if (rStart < start) {\n if (region.isValid() && start < rEnd && rEnd < end) {\n return false;\n }\n }\n else if (rStart == start) {\n if (rEnd == end) {\n return false;\n }\n }\n else {\n if (rStart > end) {\n return true;\n }\n if (region.isValid() && rStart < end && end < rEnd) {\n return false;\n }\n }\n return true;\n });\n }",
"private static boolean doBoundingBoxesIntersect(Rectangle a, Rectangle b) {\r\n\t return a.getMinX() <= b.getMaxX() \r\n\t && a.getMaxX() >= b.getMinX() \r\n\t && a.getMinY() <= b.getMaxY()\r\n\t && a.getMaxY() >= b.getMinY();\r\n\t}",
"private boolean overlappingEventAndGateway(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX();\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble apothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstWidth > secondX - apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean overlaps(CompositeKey s) {\n\t if (this.key2 == 0 && s.getKey2() == 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (this.key2 == 0) {\n\t\t\treturn (this.key1 < s.getKey2());\n\t\t}\n\t\tif (s.getKey2() == 0) {\n\t\t\treturn !(this.key2 <= s.getKey1());\n\t\t}\n\treturn !(this.key2 <= s.getKey1() || this.key1 >= s.getKey2());\n}",
"public boolean overlaps(Triangle2D t) {\n\t\treturn true;\n\t}",
"public boolean intersects(Range other) {\n if ((length() == 0) || (other.length() == 0)) {\n return false;\n }\n if (this == VLEN || other == VLEN) {\n return true;\n }\n\n int first = Math.max(this.first(), other.first());\n int last = Math.min(this.last(), other.last());\n\n return (first <= last);\n }",
"@Test\r\n public void testBuildingPlaceOverlap(){\r\n BetterHelper h = new BetterHelper();\r\n LoopManiaWorld world = h.testWorld;\r\n \r\n world.loadCard(\"ZombiePitCard\");\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 0, 0));\r\n assertFalse(world.canPlaceBuilding(\"ZombiePitCard\", 1, 1));\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 0, 1));\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 1, 0));\r\n assertFalse(world.canPlaceBuilding(\"ZombiePitCard\", 5, 5));\r\n }",
"protected boolean checkCollision(final Entity a, final Entity b) {\n // Calculate center point of the entities in both axis.\n int centerAX = a.getPositionX() + a.getWidth() / 2;\n int centerAY = a.getPositionY() + a.getHeight() / 2;\n int centerBX = b.getPositionX() + b.getWidth() / 2;\n int centerBY = b.getPositionY() + b.getHeight() / 2;\n // Calculate maximum distance without collision.\n int maxDistanceX = a.getWidth() / 2 + b.getWidth() / 2;\n int maxDistanceY = a.getHeight() / 2 + b.getHeight() / 2;\n // Calculates distance.\n int distanceX = Math.abs(centerAX - centerBX);\n int distanceY = Math.abs(centerAY - centerBY);\n\n return distanceX < maxDistanceX && distanceY < maxDistanceY;\n }",
"public boolean overlap(Event e)\n\t{\n\t\tTimeInterval compare = e.getTI();\n\t\tif ((compare.st.getHour() <= this.st.getHour()) && (this.st.getHour() <= compare.et.getHour()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse if ((this.st.getHour() <= compare.st.getHour()) && (compare.st.getHour() <= this.et.getHour()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isOverlapping(Filter f);",
"public static boolean appointmentOverlap(Timestamp startTimestamp, Timestamp endTimestamp) {\n updateAppointmentList();\n ObservableList<Appointment> appointmentList = AppointmentList.getAppointmentList();\n for (Appointment appointment: appointmentList) {\n Timestamp existingStartTimestamp = appointment.getStartTimestamp();\n Timestamp existingEndTimestamp = appointment.getEndTimestamp();\n // Check various scenarios for where overlap would occur and return true if any occur\n if (startTimestamp.after(existingStartTimestamp) && startTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (endTimestamp.after(existingStartTimestamp) && endTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.after(existingStartTimestamp) && endTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.before(existingStartTimestamp) && endTimestamp.after(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.equals(existingStartTimestamp)) {\n return true;\n }\n if (endTimestamp.equals(existingEndTimestamp)) {\n return true;\n }\n }\n // If none of the above scenarios occur, return false\n return false;\n }",
"public static boolean CheckOverlap(int Customer_ID, LocalDate date, LocalTime start, LocalTime end, int Appointment_ID) {\n\n ObservableList<Appointment> AList = DBAppointments.GetAllAppointment();\n ObservableList<Appointment> FList = AList.filtered(A -> {\n if (A.getAppointment_ID() != Appointment_ID /*&& A.getCustomerid() == Customer_ID*/) {\n return true;\n\n }\n return false;\n });\n\n LocalDateTime ps = LocalDateTime.of(date, start);\n LocalDateTime pe = LocalDateTime.of(date, end);\n for (Appointment a : FList) {\n LocalDateTime as = LocalDateTime.of(a.getDate(), a.getStartTime());\n LocalDateTime ae = LocalDateTime.of(a.getDate(), a.getEndTime());\n\n if ((as.isAfter(ps) || as.isEqual(ps)) && as.isBefore(pe)) {\n return true;\n }\n if (ae.isAfter(ps) && (ae.isBefore(pe) || ae.isEqual(pe))) {\n return true;\n }\n if ((as.isBefore(ps) || as.isEqual(ps)) && (ae.isAfter(pe) || ae.isEqual(pe))) {\n return true;\n }\n }\n\n return false;\n }",
"public abstract void collideWith(Entity entity);",
"public boolean collision(Object a, Object b) {\n if (Rect.intersects(a.getRect(), b.getRect())) { //if the two objects hitboxes colide\n return true;\n }\n return false;\n }",
"private boolean doesBoatOverlap(int startIndexX, int startIndexY, int endIndexX, int endIndexY) {\n boolean overlap = false;\n int startX = Math.min(startIndexX, endIndexX);\n int endX = Math.max(startIndexX, endIndexX);\n int startY = Math.min(startIndexY, endIndexY);\n int endY = Math.max(startIndexY, endIndexY);\n \n for (int i = startX; i <= endX; i++) {\n for (int j = startY; j <= endY; j++) {\n overlap = (grid[i][j].getHasBoat()) ? true : overlap;\n if (overlap) { return overlap; } //returns at first instance of boatOverlapping\n }\n }\n return overlap;\n }",
"static boolean rectanglesOverlap(Rectangle r1, Rectangle r2){\n List<int[]> pointsOfInterest = new ArrayList<int[]>();\n for (int[] i : r1.getPoints())\n for (int[] j : r2.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r2.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n\n // Check if any points in rectangle 2 fall in 1\n //List<int[]> pointsOfInterest = new ArrayList<int[]>();\n pointsOfInterest.clear();\n for (int[] i : r2.getPoints())\n for (int[] j : r1.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r1.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n \n return false;\n }",
"public boolean intersects(Entity other) {\n return other.getBoundary().intersects(this.getBoundary());\n }",
"private boolean overlappingTaskAndGateway(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble apothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstWidth > secondX - apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean overlaps(int i, int j) {\n int start1 = start(i);\n int end1 = end(i);\n int start2 = start(j);\n int end2 = end(j);\n\n return (start1 <= start2 && end1 >= start2)\n ||\n (start1 <= end2 && end1 >= end2);\n }",
"public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }",
"public boolean overlaps (DayPeriod other) {\n\t\tif (getDate().isEqual(other.getDate()))\n\t\t\treturn getStartTime().isBefore(other.getEndTime()) && other.getStartTime().isBefore(getEndTime());\n\t\treturn false;\n\t}",
"private boolean commonEndPoint (Coordinate endPoint_in, Coordinate endPoint_out) {\r\n\t\tif (endPoint_in.equals3D(endPoint_out)) {\r\n\t\t\treturn true;\r\n\t\t} else return false;\t\r\n\t}",
"public boolean ifOverlap(Block b) {\n\t\tint thisR1 = this.getTopLeft().getRow();\n\t\tint thisR2 = this.getBotRight().getRow();\n\t\tint thisC1 = this.getTopLeft().getCol();\n\t\tint thisC2 = this.getBotRight().getCol();\n\t\tint R1 = b.getTopLeft().getRow();\n\t\tint R2 = b.getBotRight().getRow();\n\t\tint C1 = b.getTopLeft().getCol();\n\t\tint C2 = b.getBotRight().getCol();\n\t\tint maxR1 = Math.max(thisR1, R1);\n\t\tint minR2 = Math.min(thisR2, R2);\n\t\tint maxC1 = Math.max(thisC1, C1);\n\t\tint minC2 = Math.min(thisC2, C2);\n\n\t\treturn minR2 >= maxR1 && minC2 >= maxC1;\n\t}",
"private boolean isOverlapped(Image img1, int x1, int y1, Image img2,\r\n\t\t\tint x2, int y2, int distThreshold) {\r\n\t\tint xCenter1 = x1 + img1.getWidth() / 2;\r\n\t\tint yCenter1 = y1 = img1.getHeight() / 2;\r\n\r\n\t\tint xCenter2 = x2 + img2.getWidth() / 2;\r\n\t\tint yCenter2 = y2 = img2.getHeight() / 2;\r\n\r\n\t\tint xCenterDist = Math.abs(xCenter1 - xCenter2);\r\n\t\tint yCenterDist = Math.abs(yCenter1 - yCenter2);\r\n\r\n\t\treturn distThreshold >= xCenterDist + yCenterDist;\r\n\t}",
"public boolean overlaps(Shape2D s)\r\n {\r\n if (isPhasing)\r\n return false;\r\n \r\n return super.overlaps(s);\r\n }",
"@Override\n public boolean contain(int x, int y) {\n return(x>=this.x && y>=this.y && x<=this.x+(int)a && y<=this.y+(int)b);\n }",
"boolean overlap(AbstractNote other) {\n return this.type == other.type &&\n this.octave == other.octave;\n }",
"public static <T extends Comparable<T>> boolean intersect(Range<T> a, Range<T> b) {\n\t\t// Because we're working with a discrete domain, we have to be careful to never use open\n\t\t// lower bounds. Otherwise, the following two inputs would cause a true return value when,\n\t\t// in fact, the intersection contains no elements: (0, 1], [0, 1).\n\t\treturn a.isConnected(b) && !a.intersection(b).isEmpty();\n\t}",
"public boolean overlaps(Circle2D other) {\n return Math.abs(distance(other.getX(), other.getY())) < getRadius() + other.getRadius();\n }",
"public boolean checkCollision(int x, int y){\n return x<=xEnd&&x>=xStart&&y<=yEnd&&y>=yStart;\n }",
"private boolean contains(int from1, int to1, int from2, int to2) {\n\t\treturn from2 >= from1 && to2 <= to1;\n\t}",
"@Override\n\tpublic boolean hasCollide(Entity e) {\n\t\treturn rect.intersects(e.getRectangle());\n\t}",
"private boolean overlappingTasks(BpmnShape s1, BpmnShape s2) {\n\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\t//The coordinates refer to the upper-left corner of the task, adding Width and Height \n\t\t//cause the coordinates to reflect the position of the center of the shape\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondX = s2.getBounds().getX() + secondWidth;\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\t//Second shape is on the upper-left\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\t//Second shape is on the lower-left\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\t//Second shape is on the upper-right\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\t//Second shape is on the lower-shape\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t//completely overlapped shapes\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\t//second shape is on top of the first one\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\t//second shape is on the right\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\t//second shape is on bottom of the first one\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\t//second shape is on the left\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"private Range<Token> intersect(Range<Token> serverRange, AbstractBounds<Token> requestedRange)\n {\n if (serverRange.contains(requestedRange.left) && serverRange.contains(requestedRange.right)) {\n //case 1: serverRange fully encompasses requestedRange\n return new Range<Token>(requestedRange.left, requestedRange.right, partitioner);\n } else if (requestedRange.contains(serverRange.left) && requestedRange.contains(serverRange.right)) {\n //case 2: serverRange is fully encompasses by requestedRange\n //serverRange is already the intersection\n return new Range<Token>(serverRange.left, serverRange.right);\n } else if (serverRange.contains(requestedRange.left) && requestedRange.contains(serverRange.right)) {\n //case 3: serverRange overlaps on the left: sR.left < rR.left < sR.right < rR.right\n return new Range<Token>(requestedRange.left, serverRange.right, partitioner);\n } else if (requestedRange.contains(serverRange.left) && serverRange.contains(requestedRange.right)) {\n //case 4: serverRange overlaps on the right rR.left < sR.left < rR.right < sR.right\n return new Range<Token>(serverRange.left, requestedRange.right, partitioner);\n } else if (!serverRange.contains(requestedRange.left) && !serverRange.contains(requestedRange.right) &&\n !requestedRange.contains(serverRange.left) && !requestedRange.contains(serverRange.right)) {\n //case 5: totally disjoint\n return null;\n } else {\n assert false : \"Failed intersecting serverRange = (\" + serverRange.left + \", \" + serverRange.right + \") and requestedRange = (\" + requestedRange.left + \", \" + requestedRange.right + \")\";\n return null;\n }\n }",
"@Test\r\n public void testReflexivityOverlappingTimePeriods(){\n DateTime startAvailability1 = new DateTime(2021, 7, 9, 10, 30);\r\n DateTime endAvailability1 = new DateTime(2021, 7, 9, 11, 30);\r\n DateTime startAvailability2 = new DateTime(2021, 7, 9, 11, 0);\r\n DateTime endAvailability2 = new DateTime(2021, 7, 9, 12, 0);\r\n Availability availability1 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability1, endAvailability1);\r\n Availability availability2 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability2, endAvailability2);\r\n assertTrue(availability1.overlapsWithTimePeriod(availability2));\r\n assertTrue(availability2.overlapsWithTimePeriod(availability1));\r\n }",
"default boolean overlaps(Interval o) {\n return getEnd() > o.getStart() && o.getEnd() > getStart();\n }",
"public boolean intersects(BoundingBox other) {\r\n\t\treturn !(other.left > getRight()\r\n\t\t\t || other.getRight() < left\r\n\t\t\t || other.top > getBottom()\r\n\t\t\t || other.getBottom() < top);\r\n\t}",
"private boolean isTimeOverlap(Item t) {\n\t\treturn t.getEndDate().equals(event.getEndDate());\n\t}",
"boolean growing(boolean bothDimensions) {\n if (complete()) {\n if (bothDimensions)\n return (start2D.x < stop2D.x) && (start2D.y <= stop2D.y);\n else\n return (start2D.x < stop2D.x) || (start2D.y <= stop2D.y);\n } else\n return true;\n }",
"public boolean collision2(JLabel label1, JLabel label2){\r\n\t//Another way of doing collision detection, the first methond doesnt work sometimes \r\n\t\tif (label1.getHeight()+label1.getY() > label2.getY()){\r\n\t\t\tif (label1.getY() < label2.getY() + label2.getHeight()){\r\n\t\t\t\tif(label1.getWidth()+label1.getX() > label2.getX()){\r\n\t\t\t\t\tif (label1.getX() < label2.getX() + label2.getWidth()){\r\n\t\t\t\t\t\treturn true;\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 false;\r\n\t}",
"public boolean isOverlapped(ArrayList<Schedule> schedules,\n DateTime startTime, DateTime endTime){\n for (int i = 0; i < schedules.size(); i++) {\n Schedule curSchedule = schedules.get(i);\n if (curSchedule == null)\n continue;\n if (!(startTime.isAfter(curSchedule.getEndTime().minusMinutes(1)) ||\n endTime.isBefore(curSchedule.getStartTime().plusMinutes(1))))\n return true;\n }\n return false;\n }",
"@Override\r\n\tpublic boolean overlapCheck(String email) {\n\t\treturn select(\"email\", email).size()==0;\r\n\t}",
"public boolean checkOverlap(LocalTime thisTimeFrom, LocalTime thisTimeTo,\n LocalTime thatTimeFrom, LocalTime thatTimeTo ) {\n\n return compareTimeRangeInclusiveStart(thisTimeFrom, thatTimeFrom, thatTimeTo) ||\n compareTimeRangeInclusiveEnd(thisTimeTo, thatTimeFrom, thatTimeTo) ||\n compareTimeRangeInclusiveStart(thatTimeFrom, thisTimeFrom, thisTimeTo) ||\n compareTimeRangeInclusiveEnd(thatTimeTo, thisTimeFrom, thisTimeTo);\n }",
"public static boolean doPixelsOverlap(int x1, int width1, int x2, int width2){\n\t\treturn\tx1 < x2 + width2 && x1 + width1 > x2;\n\t}",
"public boolean collision(JLabel label1, JLabel label2){\r\n\t\t//top\r\n\t\tif (label1.getY() >= label2.getY()){\r\n\t\t\t//bottom\r\n\t\t\tif (label1.getY() <= label2.getY()){\r\n\t\t\t\t//left\r\n\t\t\t\tif(label1.getX() >= label2.getX()){\r\n\t\t\t\t\t//right\r\n\t\t\t\t\tif (label1.getX() <= label2.getX()){\r\n\t\t\t\t\t\treturn true;\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 false;\r\n\t}",
"@Test (timeout=180000)\n public void testOverlapAndOrphan() throws Exception {\n TableName table =\n TableName.valueOf(\"tableOverlapAndOrphan\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap in the metadata\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"A\"),\n Bytes.toBytes(\"B\"), true, true, false, true, HRegionInfo.DEFAULT_REPLICA_ID);\n TEST_UTIL.getHBaseAdmin().enableTable(table);\n\n HRegionInfo hriOverlap =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A2\"), Bytes.toBytes(\"B\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriOverlap);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriOverlap);\n ServerName server = regionStates.getRegionServerOfRegion(hriOverlap);\n TEST_UTIL.assertRegionOnServer(hriOverlap, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.ORPHAN_HDFS_REGION, ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // fix the problem.\n doFsck(conf, true);\n\n // verify that overlaps are fixed\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"public boolean validateOverlap(ObservableList<Appointment> test){\n LocalDateTime A = startLDT;\n LocalDateTime Z = endLDT;\n\n for(Appointment appt : test){\n if(appt.getId() == selectedRow.getId()){\n continue;\n }\n LocalDateTime S = LocalDateTime.parse(appt.getStart(), formatter);\n LocalDateTime E = LocalDateTime.parse(appt.getEnd(), formatter);\n //case 1 - when the start is in the window\n if((A.isAfter(S) || A.isEqual(S)) && A.isBefore(E)){\n return false;\n }\n //case 2 - when the end is in the window\n if(Z.isAfter(S) && (Z.isBefore(E) || Z.isEqual(E))){\n return false;\n }\n //case 3 - when the start and end are outside of the window\n if(((A.isBefore(S) || A.isEqual(S)) && (Z.isAfter(E) || Z.isEqual(E)))){\n return false;\n }\n }\n return true;\n }",
"@Override\n\tpublic boolean contains(int x, int y) {\n\t\treturn (x > Math.min(x1, x2) && x < Math.max(x1, x2) && y > Math.min(y1, y2) && y < Math.max(y1, y2));\n\t}",
"static boolean contains(RBox b1, RBox b2){\n\t\t\n\t\t\t\n\t\t\tboolean xContainment = false;\n\t\t\tboolean yContainment = false;\n\t\t\t\n\t\t\tif(b1.xmin<=b2.xmin && b1.xmax>=b2.xmax)\n\t\t\t\txContainment = true;\n\t\t\tif(b1.ymin<=b2.ymin && b1.ymax>=b2.ymax)\n\t\t\t\tyContainment = true;\n\t\t\t\n\t\t\tif(xContainment&&yContainment)\n\t\t\t\treturn true;\n\t\t\n\t\t\n\t return false;\n\t\t\t\n\t\t\t\n\t}",
"private boolean collision2() {\n return game.racket2.getBounds2().intersects(getBounds()); // returns true if the two rectangles intersect\r\n }",
"boolean intersect(Segment other) {\n\t\tint o1 = orientation(other.from);\n\t\tint o2 = orientation(other.to);\n\t\tint o3 = other.orientation(from);\n\t\tint o4 = other.orientation(to);\n\t\treturn (o1 != o2 && o3 != o4) // <- General case, special case below\n\t\t\t\t|| (o1 == 0 && inBoundingBox(other.from)) || (o2 == 0 && inBoundingBox(other.to))\n\t\t\t\t|| (o3 == 0 && other.inBoundingBox(from)) || (o4 == 0 && other.inBoundingBox(to));\n\t}",
"public static boolean overlapUPA(XSWildcardDecl wildcard1, XSWildcardDecl wildcard2) {\n/* 1495 */ XSWildcardDecl intersect = wildcard1.performIntersectionWith(wildcard2, wildcard1.fProcessContents);\n/* 1496 */ if (intersect == null || intersect.fType != 3 || intersect.fNamespaceList.length != 0)\n/* */ {\n/* */ \n/* 1499 */ return true;\n/* */ }\n/* */ \n/* 1502 */ return false;\n/* */ }",
"boolean collidedWith(Entity e);",
"default boolean isAdjacent(Interval other) {\n return getStart() == other.getEnd() || getEnd() == other.getStart();\n }",
"public static void test() {\n int[] start = {1, 2, 9, 5, 5};\n int[] end = {4, 5, 12, 9, 12};\n \n MaxOverlapInterval p = new MaxOverlapInterval();\n p.findMaxOverlaps(start, end);\n }",
"public boolean hasEidOverlap(IAnyResource theExistingGoldenResource, IAnyResource theComparingGoldenResource) {\n\t\tList<CanonicalEID> firstEids = this.getExternalEid(theExistingGoldenResource);\n\t\tList<CanonicalEID> secondEids = this.getExternalEid(theComparingGoldenResource);\n\t\tif (firstEids.isEmpty() || secondEids.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.eidMatchExists(firstEids, secondEids);\n\t}"
]
| [
"0.76987976",
"0.7591737",
"0.7368229",
"0.7267188",
"0.725929",
"0.72227496",
"0.7215723",
"0.721205",
"0.71928734",
"0.7140651",
"0.7134548",
"0.7044385",
"0.7015745",
"0.69971925",
"0.6990632",
"0.6935063",
"0.6921581",
"0.68792146",
"0.6871441",
"0.6851502",
"0.68425524",
"0.6784148",
"0.6776859",
"0.6752265",
"0.6739907",
"0.6710887",
"0.66890687",
"0.6616753",
"0.66053253",
"0.6593562",
"0.6574408",
"0.6561749",
"0.65570146",
"0.65518475",
"0.65425307",
"0.6497401",
"0.6495183",
"0.6480592",
"0.6459879",
"0.6455493",
"0.6413924",
"0.641104",
"0.64096767",
"0.639495",
"0.63811404",
"0.63611645",
"0.6359543",
"0.6319678",
"0.63094455",
"0.6300516",
"0.62864405",
"0.6273861",
"0.624625",
"0.6240842",
"0.62407714",
"0.6234533",
"0.62281233",
"0.62211764",
"0.6217092",
"0.6195641",
"0.6184848",
"0.61801934",
"0.61771387",
"0.61558664",
"0.6152181",
"0.6150674",
"0.61338776",
"0.6125784",
"0.61255294",
"0.612381",
"0.6110921",
"0.6105978",
"0.61047727",
"0.610312",
"0.6102109",
"0.61001146",
"0.6097306",
"0.6093566",
"0.6091957",
"0.60890347",
"0.608617",
"0.60670406",
"0.6009643",
"0.60013336",
"0.6000516",
"0.5994684",
"0.5994137",
"0.59910864",
"0.59895754",
"0.5987759",
"0.5984705",
"0.5978614",
"0.59765834",
"0.59706366",
"0.5967858",
"0.59562093",
"0.5955985",
"0.59466994",
"0.5932265",
"0.59154814"
]
| 0.78739053 | 0 |
A method that checks whether or not an entity overlaps with any other entity. | public boolean overlapAnyEntity(){
return this.getSuperWorld().getEntities().stream().anyMatch(T ->this.overlap(T));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean overlap(Entity entity){\n \t\n \tif (entity == null) throw new IllegalArgumentException(\"The second entity does not exist. @overlap\");\n\t\tif (this == entity) return true;\n\t\treturn this.getDistanceBetweenEdge(entity) <= -0.01;\n }",
"public boolean overlap(Entity otherEntity) throws IllegalArgumentException {\n\t\tif (otherEntity == null) \n\t\t\tthrow new IllegalArgumentException(\"Invalid argument object (null).\");\n\t\tif (this == otherEntity) return true;\n\t\t\n\t\tif ( this.getDistanceBetween(otherEntity) < -0.01)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"boolean overlap(Reservation other);",
"public void checkEntityOverlap(){\n for(Entity entity:entityList){\n if(entity.getEntityType().equals(\"Sandwich\")) {\n if (player.getPlayerCoordinates() == entity.getEntityCoordinates()) {\n player.eatSandwich();\n entityList.remove(entity);\n }\n }\n }\n }",
"protected boolean isOverlapping(ArrayList<Rectangle> first, ArrayList<Rectangle> second) {\n\t\tfor (Rectangle f : first) {\n\t\t\tfor (Rectangle s : second) {\n\t\t\t\tif (f.overlaps(s)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean detectOverlapping(Exemplar ex){\n Exemplar cur = m_Exemplars;\n while(cur != null){\n if(ex.overlaps(cur)){\n\treturn true;\n }\n cur = cur.next;\n }\n return false;\n }",
"public boolean intersects(Entity other) {\n return other.getBoundary().intersects(this.getBoundary());\n }",
"public boolean areOverlapping() {\n return areOverlapping;\n }",
"@Test\n public void isOverlap_interval1ContainsInterval2OnEnd_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }",
"public abstract boolean overlap(Catcher catcher, FallingObject object);",
"private boolean overlapsWith(IRegion range1, IRegion range2) {\n \t\treturn overlapsWith(range1.getOffset(), range1.getLength(), range2.getOffset(), range2.getLength());\n \t}",
"private boolean overlaps(Point2D p0, Point2D p1)\n {\n return Math.abs(p0.getX() - p1.getX()) < 0.001 && Math.abs(p0.getY() - p1.getY()) < 0.001;\n }",
"static boolean isAABBOverlapping(final Entity a, final Entity b) {\n return !(a.right() <= b.left()\n || b.right() <= a.left()\n || a.bottom() <= b.top()\n || b.bottom() <= a.top());\n }",
"@Test\n public void isOverlap_interval1OverlapsInterval2OnStart_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(3,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }",
"private boolean isOverlapping( int[] t0, int[] t1)\n {\n if ( t0.length == 1)\n {\n return t0[ 0] >= t1[ 0]; \n }\n else\n {\n return t0[ 1] >= t1[ 0]; \n }\n }",
"private boolean overlaps(ThingTimeTriple a, ThingTimeTriple b)\r\n/* 227: */ {\r\n/* 228:189 */ return (a.from < b.to) && (a.to > b.from);\r\n/* 229: */ }",
"@Override\n\tpublic boolean hasCollide(Entity e) {\n\t\treturn rect.intersects(e.getRectangle());\n\t}",
"@Test\n public void isOverlap_interval1ContainWithinInterval2_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }",
"public boolean doOverlapNew(VIntWritable[] e1, VIntWritable[] e2){\n\t\tSet<VIntWritable> intersection = new HashSet<>(Arrays.asList(e1));\t\t\t\t\n\t\tintersection.retainAll(Arrays.asList(e2));\t\t\n\t\t\n\t\t//System.out.println(\"overlap? \"+ (intersection.isEmpty() ? false : true));\n\t\treturn intersection.isEmpty() ? false : true;\n\t\t\n\t\t//SOLUTION 2: slower O(nlogn) but needs less space\n//\t\tArrays.sort(e1); //O(nlogn)\n//\t\tfor (VIntWritable tmp : e2) { //O(m)\n//\t\t\tif (Arrays.binarySearch(e1, tmp) == -1) //O(logm)\n//\t\t\t\treturn false;\n//\t\t}\n//\t\treturn true;\n\t\t\n\t\t\n\t\t\t\n\t}",
"@Test\n public void isOverlap_interval1BeforeInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(8,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }",
"@Test\n public void isOverlap_interval1AfterInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(-10,-3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }",
"public boolean overlapsWith (Stick other)\r\n {\r\n return Math.max(getStart(), other.getStart()) < Math.min(\r\n getStop(),\r\n other.getStop());\r\n }",
"private boolean isOverlapped(BpmnShape s1, BpmnShape s2){\n\t\t\n\t\ttry{\n\t\t\t//Two tasks\n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Task)\n\t\t\t\treturn this.overlappingTasks(s1,s2);\n\t\t\t\n\t\t\t//Two Events\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Event) {\n\t\t\t\treturn this.overlappingEvents(s1,s2);\n\t\t\t}\n\t\t\t\n\t\t\t//Two Gateways\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingGateways(s1,s2);\n\t\t\t\n\t\t\t//One Task and one Event\n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Event)\n\t\t\t\treturn this.overlappingTaskAndEvent(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Task )\n\t\t\t\treturn this.overlappingTaskAndEvent(s2, s1);\n\t\t\t\n\t\t\t//One Task and one Gateway \n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingTaskAndGateway(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Task )\n\t\t\t\treturn this.overlappingTaskAndGateway(s2, s1);\t\t\n\t\t\t\n\t\t\t//One Event and one Gateway\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingEventAndGateway(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Event)\n\t\t\t\treturn this.overlappingEventAndGateway(s2, s1);\n\t\t}catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\treturn false;\n\t}",
"public static boolean areInstantsOverlapping(Instant externalStart, Instant externalEnd, Instant calendarStart,\n\t\t\tInstant calendarEnd) {\n\n\t\tif ((externalStart.isAfter(calendarStart) || externalStart.equals(calendarStart))\n\t\t\t\t&& (externalStart.isBefore(calendarEnd))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ((externalEnd.isAfter(calendarStart))\n\t\t\t\t&& (externalEnd.isBefore(calendarEnd) || externalEnd.equals(calendarStart))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ((externalStart.isBefore(calendarStart) || externalStart.equals(calendarStart))\n\t\t\t\t&& (externalEnd.isAfter(calendarEnd) || externalEnd.equals(calendarEnd))) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean overlapsWith()\r\n\t{\r\n\t\tboolean alive = false;\r\n\t\tfor (Platforms platform : platforms)\r\n\t\t{\r\n\t\t\tif (getAvatar().getX() == platform.getX() && getAvatar().getY() == platform.getY())\r\n\t\t\t{\r\n\t\t\t\talive = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn alive;\r\n\t}",
"private boolean doesBoatOverlap(int startIndexX, int startIndexY, int endIndexX, int endIndexY) {\n boolean overlap = false;\n int startX = Math.min(startIndexX, endIndexX);\n int endX = Math.max(startIndexX, endIndexX);\n int startY = Math.min(startIndexY, endIndexY);\n int endY = Math.max(startIndexY, endIndexY);\n \n for (int i = startX; i <= endX; i++) {\n for (int j = startY; j <= endY; j++) {\n overlap = (grid[i][j].getHasBoat()) ? true : overlap;\n if (overlap) { return overlap; } //returns at first instance of boatOverlapping\n }\n }\n return overlap;\n }",
"void checkCollision(Entity other);",
"static boolean doTheseOverlap(RBox b1, RBox b2){\n\t\t\n\t\tif(contains(b1,b2))\n\t\t\treturn true;\n\t\t\n\t\tif(contains(b2,b1))\n\t\t\treturn true;\n\t\t\n\t\tboolean xOverlap=false ;\n\t\tboolean yOverlap=false ;\n\t\t\n\t\tif(b1.xmax==b2.xmin && b2.xmax > b1.xmax)\n\t\t\treturn false;\n\t\t\n\t\tif(b2.xmax==b1.xmin && b1.xmax > b2.xmax)\n\t\t\treturn false;\n\t\t\n\t\tif((b1.xmin<=b2.xmin&&b1.xmax>=b2.xmax)||(b2.xmin<=b1.xmin&&b2.xmax>=b1.xmax))\n\t\t\txOverlap=true;\n\t\t\n\t\tif(!xOverlap)\n\t\tif(b1.xmin >= b2.xmin && b1.xmin <= b2.xmax)\n\t\t\txOverlap=true;\n\t\t\n\t\tif(!xOverlap)\n\t\t if(b1.xmax >= b2.xmin && b1.xmax <= b2.xmax)\n\t\t \txOverlap = true;\n\t\t else{//System.out.println(\"X overlap\");\n\t\t \treturn false;}\n\t\t\n\t\t\n\t\tif((b1.ymin<=b2.ymin&&b1.ymax>=b2.ymax)||(b2.ymin<=b1.ymin&&b2.ymax>=b1.ymax))\n\t\t yOverlap=true;\n\t\t\n\t\tif(!yOverlap)\n\t\tif(b1.ymin>=b2.ymin && b1.ymin<=b2.ymax)\n\t\t\tyOverlap=true;\n\t\t\n\t\tif(!yOverlap)\n\t\t\tif(b1.ymax>=b2.ymin && b1.ymax<=b2.ymax)\n\t\t\t\tyOverlap=true;\n\t\t\telse{\n\t\t\t\t//System.out.println(\"Y overlap\");\n\t\t\t\treturn false;}\n\t\t\n\t\tif(xOverlap&&yOverlap)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}",
"public boolean overlap(Event e)\n\t{\n\t\tTimeInterval compare = e.getTI();\n\t\tif ((compare.st.getHour() <= this.st.getHour()) && (this.st.getHour() <= compare.et.getHour()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse if ((this.st.getHour() <= compare.st.getHour()) && (compare.st.getHour() <= this.et.getHour()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public abstract void collideWith(Entity entity);",
"private boolean isCollision(Date currentStart, Date currentEnd,\n Date otherStart, Date otherEnd)\n {\n return currentStart.compareTo(otherEnd) <= 0\n && otherStart.compareTo(currentEnd) <= 0;\n }",
"private static boolean areOverlapping( int ix0, int ix1, int len )\n {\n if( ix0<ix1 ){\n return ix0+len>ix1;\n }\n else {\n return ix1+len>ix0;\n }\n }",
"default boolean overlaps(Interval o) {\n return getEnd() > o.getStart() && o.getEnd() > getStart();\n }",
"public boolean checkOverlappingTimes(LocalDateTime startA, LocalDateTime endA,\n LocalDateTime startB, LocalDateTime endB){\n return (endB == null || startA == null || !startA.isAfter(endB))\n && (endA == null || startB == null || !endA.isBefore(startB));\n }",
"public boolean overlaps(int i, int j) {\n int start1 = start(i);\n int end1 = end(i);\n int start2 = start(j);\n int end2 = end(j);\n\n return (start1 <= start2 && end1 >= start2)\n ||\n (start1 <= end2 && end1 >= end2);\n }",
"public boolean overlaps(Triangle2D t) {\n\t\treturn true;\n\t}",
"public boolean isOverlapping(Filter f);",
"public static boolean appointmentOverlap(Timestamp startTimestamp, Timestamp endTimestamp) {\n updateAppointmentList();\n ObservableList<Appointment> appointmentList = AppointmentList.getAppointmentList();\n for (Appointment appointment: appointmentList) {\n Timestamp existingStartTimestamp = appointment.getStartTimestamp();\n Timestamp existingEndTimestamp = appointment.getEndTimestamp();\n // Check various scenarios for where overlap would occur and return true if any occur\n if (startTimestamp.after(existingStartTimestamp) && startTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (endTimestamp.after(existingStartTimestamp) && endTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.after(existingStartTimestamp) && endTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.before(existingStartTimestamp) && endTimestamp.after(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.equals(existingStartTimestamp)) {\n return true;\n }\n if (endTimestamp.equals(existingEndTimestamp)) {\n return true;\n }\n }\n // If none of the above scenarios occur, return false\n return false;\n }",
"boolean checkIfValidToCreate(int start, int end) {\n return myMarkerTree.processOverlappingWith(start, end, region->{\n int rStart = region.getStartOffset();\n int rEnd = region.getEndOffset();\n if (rStart < start) {\n if (region.isValid() && start < rEnd && rEnd < end) {\n return false;\n }\n }\n else if (rStart == start) {\n if (rEnd == end) {\n return false;\n }\n }\n else {\n if (rStart > end) {\n return true;\n }\n if (region.isValid() && rStart < end && end < rEnd) {\n return false;\n }\n }\n return true;\n });\n }",
"public boolean overlaps (DayPeriod other) {\n\t\tif (getDate().isEqual(other.getDate()))\n\t\t\treturn getStartTime().isBefore(other.getEndTime()) && other.getStartTime().isBefore(getEndTime());\n\t\treturn false;\n\t}",
"public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }",
"private boolean isTimeOverlap(Item t) {\n\t\treturn t.getEndDate().equals(event.getEndDate());\n\t}",
"public boolean overlaps(CompositeKey s) {\n\t if (this.key2 == 0 && s.getKey2() == 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (this.key2 == 0) {\n\t\t\treturn (this.key1 < s.getKey2());\n\t\t}\n\t\tif (s.getKey2() == 0) {\n\t\t\treturn !(this.key2 <= s.getKey1());\n\t\t}\n\treturn !(this.key2 <= s.getKey1() || this.key1 >= s.getKey2());\n}",
"public boolean isOverlapped(ArrayList<Schedule> schedules,\n DateTime startTime, DateTime endTime){\n for (int i = 0; i < schedules.size(); i++) {\n Schedule curSchedule = schedules.get(i);\n if (curSchedule == null)\n continue;\n if (!(startTime.isAfter(curSchedule.getEndTime().minusMinutes(1)) ||\n endTime.isBefore(curSchedule.getStartTime().plusMinutes(1))))\n return true;\n }\n return false;\n }",
"boolean collidedWith(Entity e);",
"private boolean overlapsWith(int offset1, int length1, int offset2, int length2) {\n \t\tint end= offset2 + length2;\n \t\tint thisEnd= offset1 + length1;\n \n \t\tif (length2 > 0) {\n \t\t\tif (length1 > 0)\n \t\t\t\treturn offset1 < end && offset2 < thisEnd;\n \t\t\treturn offset2 <= offset1 && offset1 < end;\n \t\t}\n \n \t\tif (length1 > 0)\n \t\t\treturn offset1 <= offset2 && offset2 < thisEnd;\n \t\treturn offset1 == offset2;\n \t}",
"public boolean intersects(BoundingBox other) {\r\n\t\treturn !(other.left > getRight()\r\n\t\t\t || other.getRight() < left\r\n\t\t\t || other.top > getBottom()\r\n\t\t\t || other.getBottom() < top);\r\n\t}",
"private static boolean doBoundingBoxesIntersect(Rectangle a, Rectangle b) {\r\n\t return a.getMinX() <= b.getMaxX() \r\n\t && a.getMaxX() >= b.getMinX() \r\n\t && a.getMinY() <= b.getMaxY()\r\n\t && a.getMaxY() >= b.getMinY();\r\n\t}",
"public boolean intersects(Range other) {\n if ((length() == 0) || (other.length() == 0)) {\n return false;\n }\n if (this == VLEN || other == VLEN) {\n return true;\n }\n\n int first = Math.max(this.first(), other.first());\n int last = Math.min(this.last(), other.last());\n\n return (first <= last);\n }",
"@Test\n public void findOverlap() {\n\n int[] A = new int[] {1,3,5,7,10};\n int[] B = new int[] {-2,2,5,6,7,11};\n\n List<Integer> overlap = new ArrayList<Integer>();\n overlap.add(5);\n overlap.add(7);\n\n Assert.assertEquals(overlap,Computation.findOverlap(A,B));\n\n }",
"private boolean overlappingEvents(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX();\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean overlap(Circle other) {\r\n\t\t// implementation not shown\r\n\t}",
"private boolean intersects(int from1, int to1, int from2, int to2) {\n\t\treturn from1 <= from2 && to1 >= from2 // (.[..)..] or (.[...]..)\n\t\t\t\t|| from1 >= from2 && from1 <= to2; // [.(..]..) or [..(..)..\n\t}",
"private boolean overlappingTaskAndEvent(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean overlaps(Shape2D s)\r\n {\r\n if (isPhasing)\r\n return false;\r\n \r\n return super.overlaps(s);\r\n }",
"private boolean isColliding(Node node1, Node node2){\n\t\tfinal int offset = 2;\n\t\tBounds bounds1 = node1.getBoundsInParent();\n\t\tBounds bounds2 = node2.getBoundsInParent();\n\t\tbounds1 = new BoundingBox(bounds1.getMinX() + offset, bounds1.getMinY() + offset,\n\t\t\t\tbounds1.getWidth() - offset * 2, bounds1.getHeight() - offset * 2);\n\t\tbounds2 = new BoundingBox(bounds2.getMinX() + offset, bounds2.getMinY() + offset,\n\t\t\t\tbounds2.getWidth() - offset * 2, bounds2.getHeight() - offset * 2);\n\t\treturn bounds1.intersects(bounds2);\n\t}",
"public static boolean CheckOverlap(int Customer_ID, LocalDate date, LocalTime start, LocalTime end, int Appointment_ID) {\n\n ObservableList<Appointment> AList = DBAppointments.GetAllAppointment();\n ObservableList<Appointment> FList = AList.filtered(A -> {\n if (A.getAppointment_ID() != Appointment_ID /*&& A.getCustomerid() == Customer_ID*/) {\n return true;\n\n }\n return false;\n });\n\n LocalDateTime ps = LocalDateTime.of(date, start);\n LocalDateTime pe = LocalDateTime.of(date, end);\n for (Appointment a : FList) {\n LocalDateTime as = LocalDateTime.of(a.getDate(), a.getStartTime());\n LocalDateTime ae = LocalDateTime.of(a.getDate(), a.getEndTime());\n\n if ((as.isAfter(ps) || as.isEqual(ps)) && as.isBefore(pe)) {\n return true;\n }\n if (ae.isAfter(ps) && (ae.isBefore(pe) || ae.isEqual(pe))) {\n return true;\n }\n if ((as.isBefore(ps) || as.isEqual(ps)) && (ae.isAfter(pe) || ae.isEqual(pe))) {\n return true;\n }\n }\n\n return false;\n }",
"protected boolean hasOverlap(Cluster cluster1, Cluster cluster2) {\n return (cluster1.startTime < cluster2.endTime &&\n cluster2.startTime < cluster1.endTime);\n }",
"private static boolean intersect(\n\t\tDateTime start1, DateTime end1,\n\t\tDateTime start2, DateTime end2)\n\t{\n\t\tif (DateTime.op_LessThanOrEqual(end2, start1) || DateTime.op_LessThanOrEqual(end1, start2))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public boolean overlaps(Circle2D other) {\n return Math.abs(distance(other.getX(), other.getY())) < getRadius() + other.getRadius();\n }",
"protected final boolean overlaps(int low2, int high2) {\n\tif ((high2 < this.low) || (low2 > this.high)) { \n\t return(false);\n\t}\n\treturn(true);\n }",
"public abstract boolean intersect(BoundingBox bbox);",
"public boolean canBeMerged(VendorLocations entity) {\n\t\treturn true;\n\t}",
"public boolean collision(Individual otherIndividual)\n\t{\n\t\tRectangle other = otherIndividual.bounds();\n\t\t\n\t\tif(this.bounds().intersects(other))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"@Test (timeout=180000)\n public void testContainedRegionOverlap() throws Exception {\n TableName table =\n TableName.valueOf(\"tableContainedRegionOverlap\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap in the metadata\n HRegionInfo hriOverlap =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A2\"), Bytes.toBytes(\"B\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriOverlap);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriOverlap);\n ServerName server = regionStates.getRegionServerOfRegion(hriOverlap);\n TEST_UTIL.assertRegionOnServer(hriOverlap, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.OVERLAP_IN_REGION_CHAIN });\n assertEquals(2, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n\n // fix the problem.\n doFsck(conf, true);\n\n // verify that overlaps are fixed\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"private boolean hasOverlap(int[] i1, int[] i2)\n {\n // Special case of consecutive STEP-BY-STEP intervals\n if(i1[0] <= i2[0] && i2[0] <= i1[1])\n return true;\n if(i2[0] <= i1[0] && i1[0] <= i2[1])\n return true;\n return false;\n }",
"@Override\r\n\tpublic boolean overlapCheck(String email) {\n\t\treturn select(\"email\", email).size()==0;\r\n\t}",
"public boolean doOverlap(Cell a, Cell b) {\n\t\tfloat dx = a.position.x - b.position.x;\n\t\tfloat dy = a.position.y - b.position.y;\n\t\tfloat cellSizeF = (float) cellSize;\n\t\t//cellSizeF = cellSizeF - .2f;\n\t\t//app.println(\"cellSizeF: \" + cellSizeF);\n\n\t\t// simple box check\n\t\tif (app.abs(dx) < cellSizeF && app.abs(dy) < cellSizeF) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean collides (Entity other)\r\n\t{\r\n\t\tif (other == owner || other instanceof Missile)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn super.collides(other);\r\n\t}",
"public boolean validateOverlap(ObservableList<Appointment> test){\n LocalDateTime A = startLDT;\n LocalDateTime Z = endLDT;\n\n for(Appointment appt : test){\n if(appt.getId() == selectedRow.getId()){\n continue;\n }\n LocalDateTime S = LocalDateTime.parse(appt.getStart(), formatter);\n LocalDateTime E = LocalDateTime.parse(appt.getEnd(), formatter);\n //case 1 - when the start is in the window\n if((A.isAfter(S) || A.isEqual(S)) && A.isBefore(E)){\n return false;\n }\n //case 2 - when the end is in the window\n if(Z.isAfter(S) && (Z.isBefore(E) || Z.isEqual(E))){\n return false;\n }\n //case 3 - when the start and end are outside of the window\n if(((A.isBefore(S) || A.isEqual(S)) && (Z.isAfter(E) || Z.isEqual(E)))){\n return false;\n }\n }\n return true;\n }",
"public boolean collidesWith(GameObject other) {\n me.setBounds((int) x, (int) y, sprite.getWidth(), sprite.getHeight());\n him.setBounds((int) other.x, (int) other.y, other.sprite.getWidth(), other.sprite.getHeight());\n\n return me.intersects(him);\n }",
"public boolean hasEidOverlap(IAnyResource theExistingGoldenResource, IAnyResource theComparingGoldenResource) {\n\t\tList<CanonicalEID> firstEids = this.getExternalEid(theExistingGoldenResource);\n\t\tList<CanonicalEID> secondEids = this.getExternalEid(theComparingGoldenResource);\n\t\tif (firstEids.isEmpty() || secondEids.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.eidMatchExists(firstEids, secondEids);\n\t}",
"@Override\n\tpublic boolean contains(Object entity) {\n\t\treturn false;\n\t}",
"public void checkOverlap() {\n\n // Logic that validates overlap.\n if(redCircle.getBoundsInParent().intersects(blueCircle.getBoundsInParent())) {\n title.setText(\"Two circles intersect? Yes\");\n }\n else {\n title.setText(\"Two circles intersect? No\");\n }\n\n // Update fields in red table.\n redCircleCenterXValue.setText(String.valueOf(redCircle.getCenterX()));\n redCircleCenterYValue.setText(String.valueOf(redCircle.getCenterY()));\n redCircleRadiusValue.setText(String.valueOf(redCircle.getRadius()));\n\n // Update fields in blue table.\n blueCircleCenterXValue.setText(String.valueOf(blueCircle.getCenterX()));\n blueCircleCenterYValue.setText(String.valueOf(blueCircle.getCenterY()));\n blueCircleRadiusValue.setText(String.valueOf(blueCircle.getRadius()));\n }",
"public boolean intersects (UCSCGeneLine first, int start, int end){\n\t\tif (end < first.getTxStart() || start > first.getTxEnd()) return false;\n\t\treturn true;\n\t}",
"public boolean ifOverlap(Block b) {\n\t\tint thisR1 = this.getTopLeft().getRow();\n\t\tint thisR2 = this.getBotRight().getRow();\n\t\tint thisC1 = this.getTopLeft().getCol();\n\t\tint thisC2 = this.getBotRight().getCol();\n\t\tint R1 = b.getTopLeft().getRow();\n\t\tint R2 = b.getBotRight().getRow();\n\t\tint C1 = b.getTopLeft().getCol();\n\t\tint C2 = b.getBotRight().getCol();\n\t\tint maxR1 = Math.max(thisR1, R1);\n\t\tint minR2 = Math.min(thisR2, R2);\n\t\tint maxC1 = Math.max(thisC1, C1);\n\t\tint minC2 = Math.min(thisC2, C2);\n\n\t\treturn minR2 >= maxR1 && minC2 >= maxC1;\n\t}",
"static boolean rectanglesOverlap(Rectangle r1, Rectangle r2){\n List<int[]> pointsOfInterest = new ArrayList<int[]>();\n for (int[] i : r1.getPoints())\n for (int[] j : r2.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r2.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n\n // Check if any points in rectangle 2 fall in 1\n //List<int[]> pointsOfInterest = new ArrayList<int[]>();\n pointsOfInterest.clear();\n for (int[] i : r2.getPoints())\n for (int[] j : r1.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r1.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n \n return false;\n }",
"public boolean canBeMerged(SchoolCourseStudent entity) {\r\n\t\treturn true;\r\n\t}",
"private void checkOverlaps() {\r\n final ArrayList<Vertex> overlaps = new ArrayList<Vertex>(3);\r\n final int count = getOutlineNumber();\r\n boolean firstpass = true;\r\n do {\r\n for (int cc = 0; cc < count; cc++) {\r\n final Outline outline = getOutline(cc);\r\n int vertexCount = outline.getVertexCount();\r\n for(int i=0; i < outline.getVertexCount(); i++) {\r\n final Vertex currentVertex = outline.getVertex(i);\r\n if ( !currentVertex.isOnCurve()) {\r\n final Vertex nextV = outline.getVertex((i+1)%vertexCount);\r\n final Vertex prevV = outline.getVertex((i+vertexCount-1)%vertexCount);\r\n final Vertex overlap;\r\n\r\n // check for overlap even if already set for subdivision\r\n // ensuring both triangular overlaps get divided\r\n // for pref. only check in first pass\r\n // second pass to clear the overlaps array(reduces precision errors)\r\n if( firstpass ) {\r\n overlap = checkTriOverlaps0(prevV, currentVertex, nextV);\r\n } else {\r\n overlap = null;\r\n }\r\n if( overlaps.contains(currentVertex) || overlap != null ) {\r\n overlaps.remove(currentVertex);\r\n\r\n subdivideTriangle(outline, prevV, currentVertex, nextV, i);\r\n i+=3;\r\n vertexCount+=2;\r\n addedVerticeCount+=2;\r\n\r\n if(overlap != null && !overlap.isOnCurve()) {\r\n if(!overlaps.contains(overlap)) {\r\n overlaps.add(overlap);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n firstpass = false;\r\n } while( !overlaps.isEmpty() );\r\n }",
"@Test\r\n public void testBuildingPlaceOverlap(){\r\n BetterHelper h = new BetterHelper();\r\n LoopManiaWorld world = h.testWorld;\r\n \r\n world.loadCard(\"ZombiePitCard\");\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 0, 0));\r\n assertFalse(world.canPlaceBuilding(\"ZombiePitCard\", 1, 1));\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 0, 1));\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 1, 0));\r\n assertFalse(world.canPlaceBuilding(\"ZombiePitCard\", 5, 5));\r\n }",
"@Override\n\tpublic boolean contains(int x, int y) {\n\t\treturn (x > Math.min(x1, x2) && x < Math.max(x1, x2) && y > Math.min(y1, y2) && y < Math.max(y1, y2));\n\t}",
"public boolean willOverlap() {\n/* 208 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"boolean overlaps(MyRectangle2D r) {\r\n\t\t//cordinates of the first corner of the parametar's rectangle\r\n\t\tdouble x1 = r.getX() - (r.getWidth() / 2);\r\n\t\tdouble y1 = r.getY() + (r.getHeight() / 2);\r\n\r\n\t\t//cordinates of the second corner of the parametar's rectangle\r\n\t\tdouble x2 = r.getX() + (r.getWidth() / 2);\r\n\t\tdouble y2 = r.getY() - (r.getHeight() / 2);\r\n\r\n\t\t//cordinates of the third corner of the parametar's rectangle\r\n\t\tdouble x3 = r.getX() - (r.getWidth() / 2);\r\n\t\tdouble y3 = r.getY() - (r.getHeight() / 2);\r\n\r\n\t\t//cordinates of the fourth corner of the parametar's rectangle\r\n\t\tdouble x4 = r.getX() + (r.getWidth() / 2);\r\n\t\tdouble y4 = r.getY() + (r.getHeight() / 2);\r\n\r\n\t\t//checking if calling rectangle has any of the corners inside itself\r\n\t\tboolean corner1Overlaps = this.contains(x1, y1);\r\n\t\tboolean corner2Overlaps = this.contains(x2, y2);\r\n\t\tboolean corner3Overlaps = this.contains(x3, y3);\r\n\t\tboolean corner4Overlaps = this.contains(x4, y4);\r\n\r\n\t\t//if it does contain any of the corners they overlap\r\n\t\treturn corner1Overlaps || corner2Overlaps || corner3Overlaps\r\n\t\t\t\t|| corner4Overlaps ? true : false;\r\n\t}",
"@Override\n public boolean contain(int x, int y) {\n return(x>=this.x && y>=this.y && x<=this.x+(int)a && y<=this.y+(int)b);\n }",
"private boolean overlaps(Exemplar ex) {\n\n if(ex.isEmpty() || isEmpty())\n\treturn false;\n\n for (int i = 0; i < numAttributes(); i++){\n\t \n\tif(i == classIndex()){\n\t continue;\n\t}\n\tif (attribute(i).isNumeric() && \n\t (ex.m_MaxBorder[i] < m_MinBorder[i] || ex.m_MinBorder[i] > m_MaxBorder[i])){\n\t return false;\n\t}\n\tif (attribute(i).isNominal()) {\n\t boolean in = false;\n\t for (int j = 0; j < attribute(i).numValues() + 1; j++){\n\t if(m_Range[i][j] && ex.m_Range[i][j]){\n\t in = true;\n\t break;\n\t }\n\t }\n\t if(!in) return false;\n\t}\n }\n return true;\n }",
"private boolean isOverlapped(Image img1, int x1, int y1, Image img2,\r\n\t\t\tint x2, int y2, int distThreshold) {\r\n\t\tint xCenter1 = x1 + img1.getWidth() / 2;\r\n\t\tint yCenter1 = y1 = img1.getHeight() / 2;\r\n\r\n\t\tint xCenter2 = x2 + img2.getWidth() / 2;\r\n\t\tint yCenter2 = y2 = img2.getHeight() / 2;\r\n\r\n\t\tint xCenterDist = Math.abs(xCenter1 - xCenter2);\r\n\t\tint yCenterDist = Math.abs(yCenter1 - yCenter2);\r\n\r\n\t\treturn distThreshold >= xCenterDist + yCenterDist;\r\n\t}",
"boolean intersect(Segment other) {\n\t\tint o1 = orientation(other.from);\n\t\tint o2 = orientation(other.to);\n\t\tint o3 = other.orientation(from);\n\t\tint o4 = other.orientation(to);\n\t\treturn (o1 != o2 && o3 != o4) // <- General case, special case below\n\t\t\t\t|| (o1 == 0 && inBoundingBox(other.from)) || (o2 == 0 && inBoundingBox(other.to))\n\t\t\t\t|| (o3 == 0 && other.inBoundingBox(from)) || (o4 == 0 && other.inBoundingBox(to));\n\t}",
"public boolean overlapsBlock ( ) {\r\n\t\tif (current_block >= getBlockCount())\r\n\t\t\treturn true;\r\n\r\n\t\tif (circum_area == null)\r\n\t\t\treturn true;\r\n\r\n\t\tCoor start_coor = new Coor((double)ra_start[(int)current_block], -6.0);\r\n\t\tCoor end_coor = new Coor((double)ra_end[(int)current_block], 90.0);\r\n\t\tif (circum_area.overlapsArea(start_coor, end_coor))\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}",
"public static boolean checkOverlap(Bullet aBullet, Enemy e) {\n\t\tRect enemyRect = e.getDstRect();\n\t\t\n\t\tint bulletX = (int) aBullet.getBulletX();\n\t\tint bulletY = (int) aBullet.getBulletY();\n\t\t\n\t\treturn enemyRect.contains(bulletX, bulletY);\n\t}",
"public static <T extends Comparable<T>> boolean intersect(Range<T> a, Range<T> b) {\n\t\t// Because we're working with a discrete domain, we have to be careful to never use open\n\t\t// lower bounds. Otherwise, the following two inputs would cause a true return value when,\n\t\t// in fact, the intersection contains no elements: (0, 1], [0, 1).\n\t\treturn a.isConnected(b) && !a.intersection(b).isEmpty();\n\t}",
"@Test (timeout=180000)\n public void testOverlapAndOrphan() throws Exception {\n TableName table =\n TableName.valueOf(\"tableOverlapAndOrphan\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap in the metadata\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"A\"),\n Bytes.toBytes(\"B\"), true, true, false, true, HRegionInfo.DEFAULT_REPLICA_ID);\n TEST_UTIL.getHBaseAdmin().enableTable(table);\n\n HRegionInfo hriOverlap =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A2\"), Bytes.toBytes(\"B\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriOverlap);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriOverlap);\n ServerName server = regionStates.getRegionServerOfRegion(hriOverlap);\n TEST_UTIL.assertRegionOnServer(hriOverlap, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.ORPHAN_HDFS_REGION, ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // fix the problem.\n doFsck(conf, true);\n\n // verify that overlaps are fixed\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"protected boolean checkCollision(final Entity a, final Entity b) {\n // Calculate center point of the entities in both axis.\n int centerAX = a.getPositionX() + a.getWidth() / 2;\n int centerAY = a.getPositionY() + a.getHeight() / 2;\n int centerBX = b.getPositionX() + b.getWidth() / 2;\n int centerBY = b.getPositionY() + b.getHeight() / 2;\n // Calculate maximum distance without collision.\n int maxDistanceX = a.getWidth() / 2 + b.getWidth() / 2;\n int maxDistanceY = a.getHeight() / 2 + b.getHeight() / 2;\n // Calculates distance.\n int distanceX = Math.abs(centerAX - centerBX);\n int distanceY = Math.abs(centerAY - centerBY);\n\n return distanceX < maxDistanceX && distanceY < maxDistanceY;\n }",
"public void applyEntityCollision(Entity entityIn) {\n }",
"boolean isPartiallyOverlapped(int[] x, int[] y) {\n return y[0] <= x[1]; //정렬이 이미 되어 있어서 simplify 할 수 있음\n }",
"public boolean collision(Object a, Object b) {\n if (Rect.intersects(a.getRect(), b.getRect())) { //if the two objects hitboxes colide\n return true;\n }\n return false;\n }",
"public boolean intersects(BaseGameObject other) {\r\n return (other.getPosx() - this.getPosx())\r\n * (other.getPosx() - this.getPosx())\r\n + (other.getPosy() - this.getPosy())\r\n * (other.getPosy() - this.getPosy())\r\n < (other.bound + this.bound) * (other.bound + this.bound);\r\n }",
"public boolean canMerge(Item other);",
"private boolean contains(int from1, int to1, int from2, int to2) {\n\t\treturn from2 >= from1 && to2 <= to1;\n\t}",
"public abstract boolean collisionWith(CollisionObject obj);",
"public static boolean checkOverlap(Character d, Character e) {\n\t\tRect dRec = d.getDstRect();\n\t\tRect eRec = e.getDstRect();\n\t\t\n\t\tint intX = (int) eRec.exactCenterX();\n\t\tint intY = (int) eRec.exactCenterY();\n\t\t\n\t\treturn dRec.contains(intX,intY);\n\t}"
]
| [
"0.79230666",
"0.7575197",
"0.725206",
"0.7161679",
"0.67878145",
"0.6786093",
"0.6738798",
"0.67319983",
"0.66782004",
"0.66728836",
"0.665247",
"0.66207933",
"0.66023505",
"0.6596589",
"0.65957093",
"0.6544277",
"0.6542842",
"0.65394384",
"0.65383095",
"0.65287054",
"0.6511959",
"0.64959913",
"0.6481058",
"0.6468215",
"0.6459572",
"0.6456573",
"0.64484715",
"0.63814",
"0.6379117",
"0.6360631",
"0.63376915",
"0.63337904",
"0.632241",
"0.63116246",
"0.62982917",
"0.6288228",
"0.6270358",
"0.62531054",
"0.62451017",
"0.6243958",
"0.62324935",
"0.62048125",
"0.62016606",
"0.6196173",
"0.61794406",
"0.61647546",
"0.6161215",
"0.6159838",
"0.6138981",
"0.6133322",
"0.61293876",
"0.6126766",
"0.6119922",
"0.61147547",
"0.6089573",
"0.60867554",
"0.60753417",
"0.60694754",
"0.60675967",
"0.60363233",
"0.6034307",
"0.5998316",
"0.5997604",
"0.5994514",
"0.5988276",
"0.59829307",
"0.59811866",
"0.5968335",
"0.5958453",
"0.5942885",
"0.5933144",
"0.5932904",
"0.5932544",
"0.59131694",
"0.59118813",
"0.5900853",
"0.58911884",
"0.58812255",
"0.58798456",
"0.58675855",
"0.58537126",
"0.58521974",
"0.58514977",
"0.5843233",
"0.58388746",
"0.5837882",
"0.58363265",
"0.58356184",
"0.58078396",
"0.5803087",
"0.57937145",
"0.5783421",
"0.5770955",
"0.57684946",
"0.57593817",
"0.57575315",
"0.57556057",
"0.57402927",
"0.5739196",
"0.5733274"
]
| 0.7788805 | 1 |
A method to get the position where two entities collide. | public double[] getCollisionPosition(Entity entity) throws IllegalArgumentException{
if (entity == null) throw new IllegalArgumentException("getCollisionPosition called with a non-existing circular object!");
if (this.overlap(entity)) throw new IllegalArgumentException("These two circular objects overlap!");
double timeToCollision = getTimeToCollision(entity);
if (timeToCollision == Double.POSITIVE_INFINITY) return null;
double[] positionThisShip = this.getPosition();
double[] velocityThisShip = this.getVelocity();
double[] positionShip2 = entity.getPosition();
double[] velocityShip2 = entity.getVelocity();
double xPositionCollisionThisShip = positionThisShip[0] + velocityThisShip[0] * timeToCollision;
double yPositionCollisionThisShip = positionThisShip[1] + velocityThisShip[1] * timeToCollision;
double xPositionCollisionShip2 = positionShip2[0] + velocityShip2[0] * timeToCollision;
double yPositionCollisionShip2 = positionShip2[1] + velocityShip2[1] * timeToCollision;
double slope = Math.atan2(yPositionCollisionShip2 - yPositionCollisionThisShip, xPositionCollisionShip2 - xPositionCollisionThisShip);
return new double[] {xPositionCollisionThisShip + Math.cos(slope) * this.getRadius(), yPositionCollisionThisShip + Math.sin(slope) * this.getRadius()};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double[] getCollisionPosition(Entity otherEntity) throws IllegalArgumentException {\n\t\tif (otherEntity == null) \n\t\t\tthrow new IllegalArgumentException(\"Invalid argument object (null).\");\n\t\t\n\n\t\tif ( this.overlap(otherEntity) ) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif ( this.getTimeToCollision(otherEntity) == Double.POSITIVE_INFINITY)\n\t\t\treturn null;\n\n\t\tdouble collisionXSelf = this.getXCoordinate() + this.getTimeToCollision(otherEntity) * this.getXVelocity();\n\t\tdouble collisionYSelf = this.getYCoordinate() + this.getTimeToCollision(otherEntity) * this.getYVelocity();\n\n\t\tdouble collisionXOther = otherEntity.getXCoordinate() + otherEntity.getTimeToCollision(this) * otherEntity.getXVelocity();\n\t\tdouble collisionYOther = otherEntity.getYCoordinate() + otherEntity.getTimeToCollision(this) * otherEntity.getYVelocity();\n\t\t\n\t\tdouble collisionX;\n\t\tdouble collisionY;\n\t\t\n\t\tif (this.getXCoordinate() > otherEntity.getXCoordinate()) {\n\t\t\tcollisionX = collisionXSelf - Math.cos(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t\tcollisionY = collisionYSelf - Math.sin(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\tcollisionX = collisionXSelf + Math.cos(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t\tcollisionY = collisionYSelf + Math.sin(Math.atan((collisionYOther - collisionYSelf) / (collisionXOther - collisionXSelf))) * radius;\n\t\t}\n\t\t\n\t\tdouble[] collision = {collisionX, collisionY};\n\t\treturn collision;\n\t\t\n\t}",
"public Point collisionPoint() {\n return collisionPoint;\n }",
"public Point collisionPoint() {\r\n return collisionPoint;\r\n\r\n }",
"Vector2 getPosition();",
"static Vector getEntityPosition(Entity entity, Object nmsEntity) {\n if(entity instanceof Hanging) {\n Object blockPosition = ReflectUtils.getField(nmsEntity, \"blockPosition\");\n return MathUtils.moveToCenterOfBlock(ReflectUtils.blockPositionToVector(blockPosition));\n } else {\n return entity.getLocation().toVector();\n }\n }",
"public abstract void collideWith(Entity entity);",
"private static Position getPositionBetween(Position p1, Position p2)\n {\n int rowDiff = p1.getRow() - p2.getRow();\n int colDiff = p1.getCell() - p2.getCell();\n\n if(Math.abs(rowDiff) != 1 && Math.abs(colDiff) != 1)\n {\n return new Position(p2.getRow() + (rowDiff/2),\n p2.getCell() + (colDiff/2));\n }\n return null;\n }",
"public Vector2 getPosition();",
"@Override\n\tpublic void collide(Entity e) {\n\n\t}",
"@Override\n\t\t\tpublic int compare(Entity o1, Entity o2)\n\t\t\t{\n\t\t\t\treturn (int) (o2.transform.position.y - o1.transform.position.y);\n\t\t\t}",
"private GObject getCollidingObject() {\n \tdouble x1 = ball.getX();\n \tdouble y1 = ball.getY();\n \tdouble x2 = x1 + BALL_RADIUS * 2;\n \tdouble y2 = y1 + BALL_RADIUS * 2;\n \n \tif (getElementAt(x1, y1) != null) return getElementAt(x1, y1);\n \tif (getElementAt(x1, y2) != null) return getElementAt(x1, y2);\n \tif (getElementAt(x2, y1) != null) return getElementAt(x2, y1);\n \tif (getElementAt(x2, y2) != null) return getElementAt(x2, y2);\n \n \treturn null;\n }",
"void checkCollision(Entity other);",
"public Vector2D getPosition ();",
"public abstract boolean collide(int x, int y, int z, int dim, Entity entity);",
"public double[] getPositionCollisionBoundary(){\n\t\tif (!Helper.isValidDouble(this.getTimeCollisionBoundary()) || this.superWorld == null) return null;\n\t\tdouble[] pos = new double[2];\n\t\tpos[0] = this.getPosition()[0] + (this.getVelocity()[0] * this.getTimeCollisionBoundary());\n\t\tpos[1] = this.getPosition()[1] + (this.getVelocity()[1] * this.getTimeCollisionBoundary());\n\t\t\n\t\tif (pos[0] + this.getRadius() >= this.superWorld.getWorldHeight()) pos[0]+= this.getRadius();\n\t\telse if (pos[0] - this.getRadius() >= this.superWorld.getWorldHeight()) pos[0]-= this.getRadius();\n\t\telse if (pos[1] + this.getRadius() >= this.superWorld.getWorldHeight()) pos[1]+= this.getRadius();\n\t\telse\tpos[1] -= this.getRadius();\n\t\t\t\n\t\t\n\t\treturn pos;\n\t}",
"@Override\n public <T extends VectorSprite> boolean collide(T object1, GraphicsObject object2) {\n double xDistance, yDistance;\n\n xDistance = this.getHitCenterX() + object1.getRadius() / 2 - Math.max(object2.getxPos(), Math.min(this.getHitCenterX() + object1.getRadius() / 2, object2.getxPos() + object2.getWidth()));\n yDistance = this.getHitCenterY() + object1.getRadius() / 2 - Math.max(object2.getyPos(), Math.min(this.getHitCenterY() + object1.getRadius() / 2, object2.getyPos() + object2.getHeight()));\n\n return (xDistance * xDistance + yDistance * yDistance) < (object1.getRadius() / 2 * object1.getRadius() / 2);\n }",
"private Vec2 calculatePos() {\n\t\tNetTransformComponent transform = actor.getEntity().getNetTransform();\n\t\tif (transform != null) {\n\t\t\tVec2 screenPos = scene.getCamera()\n\t\t\t\t\t.getScreenCoordinates(Vec3.add(transform.getPosition(), new Vec3(-2.0f, 3.25f, 0.0f)));\n\t\t\tVec2 result = new Vec2(screenPos.getX(), screenPos.getY());\n\t\t\treturn result;\n\t\t}\n\n\t\treturn new Vec2(0.0f, 0.0f);\n\t}",
"protected boolean checkCollision(final Entity a, final Entity b) {\n // Calculate center point of the entities in both axis.\n int centerAX = a.getPositionX() + a.getWidth() / 2;\n int centerAY = a.getPositionY() + a.getHeight() / 2;\n int centerBX = b.getPositionX() + b.getWidth() / 2;\n int centerBY = b.getPositionY() + b.getHeight() / 2;\n // Calculate maximum distance without collision.\n int maxDistanceX = a.getWidth() / 2 + b.getWidth() / 2;\n int maxDistanceY = a.getHeight() / 2 + b.getHeight() / 2;\n // Calculates distance.\n int distanceX = Math.abs(centerAX - centerBX);\n int distanceY = Math.abs(centerAY - centerBY);\n\n return distanceX < maxDistanceX && distanceY < maxDistanceY;\n }",
"void collisionHappened(int position);",
"public boolean collision(Object a, Object b) {\n if (Rect.intersects(a.getRect(), b.getRect())) { //if the two objects hitboxes colide\n return true;\n }\n return false;\n }",
"public Vector2 getPosition () {\n\t\tVec2 pos = body.getPosition();\n\t\tposition.set(pos.x, pos.y);\n\t\treturn position;\n\t}",
"godot.wire.Wire.Vector2 getPosition();",
"public int compare(Entity e0, Entity e1) { // compares 2 entities\r\n\t\t\tif (e1.y < e0.y) return +1; // If the y position of the first entity is less (higher up) than the second entity, then it will be moved up in sorting.\r\n\t\t\tif (e1.y > e0.y) return -1; // If the y position of the first entity is more (lower) than the second entity, then it will be moved down in sorting.\r\n\t\t\treturn 0; // ends the method\r\n\t\t}",
"public String playerCollide(PlayerObject player)\n {\n String collision;\n\n Rect oldPos = player.getRectangle();\n\n\n if (Rect.intersects(rectangle, player.getRectangle()))\n {\n if (isTouchable && isMovable )\n {\n if (Constants.xVelocity > 0) {\n return \"right\";\n }\n\n if (Constants.xVelocity < 0) {\n return \"left\";\n }\n\n if (Constants.yVelocity > 0) {\n return \"bottom\";\n }\n\n if (Constants.yVelocity < 0) {\n return \"top\";\n }\n }\n\n if (isTouchable & !isMovable)\n {\n return \"0\";\n }\n\n }\n\n return \"null\";\n }",
"public double getDistanceBetweenCenter(Entity entity) throws IllegalArgumentException{\n if(this == entity) throw new IllegalArgumentException(\"this == entity\");\n else{\n double diffx = Math.abs(entity.getPosition()[0] - this.getPosition()[0]);\n double diffy = Math.abs(entity.getPosition()[1] - this.getPosition()[1]);\n double diff = Math.sqrt(Helper.square(diffx) + Helper.square(diffy));\n return diff;\n }\n }",
"@NonNull JavaBoundingBox[] collision();",
"@Override\n\tpublic Vector2 getPosition() {\n\t\treturn body.getPosition();\n\t}",
"public static boolean Collides(Vector2 pos1, Vector2 hitbox1, Vector2 pos2, Vector2 hitbox2) {\r\n if (pos1.getX() < pos2.getX() + hitbox2.getX() && pos1.getX() + hitbox1.getX() > pos2.getX()\r\n && pos1.getY() < pos2.getY() + hitbox2.getY() && pos1.getY() + hitbox1.getY() > pos2.getY()) {\r\n return true;\r\n }\r\n return false;\r\n }",
"Object getPosition();",
"public double getTimeCollisionBoundary() {\n\t\tdouble[] velocity = this.velocity.getVelocity();\n\t\tif (this.superWorld == null)\treturn Double.POSITIVE_INFINITY;\n\t\tif (velocity[0] == 0 && velocity[1] == 0)\t\treturn Double.POSITIVE_INFINITY;\n\t\t\n\t\tdouble radius = this.getRadius();\n\t\tif (this instanceof Planetoid) { Planetoid planetoid = (Planetoid) this; radius = planetoid.getRadius();}\n\t\t\n\t\tdouble edgeY;\n\t\tdouble edgeX;\n\t\tdouble mY = 0;\n\t\tdouble mX = 0;\n\t\t\n\t\tif (velocity[0] > 0){\n\t\t\tedgeX = position[0] + radius;\n\t\t\tmX = this.superWorld.getWorldWidth();\n\t\t}\n\t\telse edgeX = position[0] - radius;\n\t\tif (velocity[1] > 0){\n\t\t\tedgeY = position[1] + radius;\n\t\t\tmY = this.superWorld.getWorldHeight();\n\t\t}\n\t\telse edgeY = position[1] - radius;\n\t\t\n\t\tdouble tX = Double.POSITIVE_INFINITY;\n\t\tdouble tY = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (velocity[0] != 0){\n\t\t\ttX = (mX-edgeX)/velocity[0];\n\t\t}\n\t\tif (velocity[1] != 0){\n\t\t\ttY = (mY-edgeY)/velocity[1];\n\t\t}\n\t\t\n\t\t//Return the smallest value\n\t\treturn Math.min(tX, tY); \n\t\t\n\t}",
"public Entity getEntityOn(int x, int y) {\n\t\tfor (int s = 0; s < entities.size(); s++) {\n\t\t\tEntity i = entities.get(s);\n\t\t\tif (i.getX() >> 4 == x >> 4 && i.getY() >> 4 == y >> 4)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn null;\n\n\t}",
"private void intersectPlayerWithWall(Entity entity){\n player.setXVelocity(0);\n player.setYVelocity(0);\n\n //sets the x and y pos to be the correct wall placment, will need to know where the wall is relative to the player to do this\n\n int wallCenterYPos = (entity.getY() + (entity.getHeight() / 2));\n int playerCenterYPos = (player.getY() + (player.getHeight() / 2));\n int wallCenterXPos = (entity.getX() + (entity.getWidth() / 2));\n int playerCenterXPos = (player.getX() + (player.getWidth() / 2));\n\n //uses Minkowski sum\n\n float wy = (entity.getWidth() + player.getWidth()) * (wallCenterYPos - playerCenterYPos);\n float hx = (entity.getHeight() + player.getHeight()) * (wallCenterXPos - playerCenterXPos);\n\n if (wy > hx) {\n if (wy > -hx) {\n //bottom of player hitting wall\n //push the player off the wall so the collision ends\n player.setY(entity.getY() - player.getHeight());\n return;\n\n } else {\n //left of wall\n //push the player off the wall so the collision ends\n player.setX(entity.getX() + entity.getWidth());\n return;\n }\n } else {\n if (wy > -hx) {\n //right of wall\n //push the player off the wall so the collision ends\n player.setX(entity.getX() - player.getWidth());\n return;\n } else {\n //top of player hitting wall\n //push the player off the wall so the collision ends\n player.setY(entity.getY() + entity.getHeight());\n return;\n }\n\n }\n }",
"public EntityEntityCollision(EntityBoundary boundary1, EntityBoundary boundary2) {\n boundaries = new EntityBoundary[]{boundary1, boundary2};\n rectangles = new Rectangle[]{boundaries[0].asRectangle(), boundaries[1].asRectangle()};\n rectangles[0].width += 2;\n rectangles[1].width += 2;\n rectangles[0].height += 2;\n rectangles[1].height += 2;\n entities = new Entity[]{boundaries[0].parent, boundaries[1].parent};\n }",
"private void checkCollisions() {\n int x1 = 0;\n int x2 = 0;\n for(CollisionBox e : cols) {\n for(CollisionBox f : cols) {\n if(\n x2 > x1 && // Skip checking collisions twice\n// (\n// e != f || // The entities are not the same entity\n// ( // One of the entities's parent object is not the bullet of the other's (aka ignore player bullets colliding with player)\n// // And also check they're not both from the same entity (two bullets colliding both going in the same direction from the same entity)\n// f.getParent() != null && // The first entity has a parent and\n// e.getParent() != null && // The second entity has a parent and\n// f.getParent().getParent() != null && // The first entity's parent has a parent and\n// e.getParent().getParent() != null && // The second entity's parent has a parent and\n// f.getParent().getParent() != e.getParent() && // The first entity's parent's parent is not the second entity's parent\n// e.getParent().getParent() != f.getParent() &&// The second entity's parent's parent is not the first entity's parent\n// f.getParent().getParent() != e.getParent().getParent() // The first and second entities' parents' parents are not the same\n// )\n// ) &&\n SAT.isColliding(e, f) // The entities are colliding\n ) { // Collide the Entities\n Entity ep = e.getParent();\n Entity fp = f.getParent();\n ep.collide(fp);\n fp.collide(ep);\n }\n x2++;\n }\n x1++;\n x2 = 0;\n }\n }",
"public abstract Vec2 startPosition();",
"public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t\t\t\t+ (\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t\t, 2 )\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}",
"public Vector2 getPosition() {\n\t\treturn new Vector2(getX(), getY());\n\t}",
"public void applyEntityCollision(Entity entityIn) {\n }",
"public void checkCollision(Box box){\r\n if(collidingEntity2!=null && collidingEntity2!=box){\r\n return;\r\n }\r\n FloatRect x = box.getRect ();\r\n\r\n if (rect1==null || x==null){\r\n return;\r\n }\r\n\r\n FloatRect ins = rect1.intersection (x);\r\n\r\n if(ins!=null) {\r\n this.collidingEntity2= box;\r\n collide=true;\r\n checkTopCollision (x);\r\n if(collidedTop==false) {\r\n checkRightCollision (x);\r\n checkLeftCollision (x);\r\n }\r\n } else {\r\n noCollision ();\r\n }\r\n }",
"@Override\n\tpublic void onCollision(Entity collidedEntity)\n\t{\n\t\t\n\t}",
"public Point2 getPosition() {\r\n return this.position;\r\n }",
"public Vec2 \tgetPos(){ \t\t\t\t\treturn bound.getPos();\t\t}",
"Rectangle getCollisionRectangle();",
"Rectangle getCollisionRectangle();",
"private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg.size + this.size)/2;\n deltaA = this.distance(thg);\n \n if( \n Math.abs(deltaA[0]) <= collisionRange\n &&\n Math.abs(deltaA[1]) <= collisionRange\n ){\n if(deltaA[0] > deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == 1) {\n dA[0] = 0;\n }\n }\n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == -1) {\n dA[1] = 0;\n }\n }\n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n if(dA[0] != 0) {\n dA[1] = dA[0];\n }\n if(dA[1] != 0) {\n dA[0] = dA[1];\n }\n }\n }\n \n if(deltaA[0] < deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == -1) {\n dA[0] = 0;\n }\n } \n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == 1) {\n dA[1] = 0;\n }\n } \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = dA[0];\n }\n }\n \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = -dA[0];\n }\n }\n }\n }\n }\n }",
"public Vector2 getPosition() {\n\t\treturn position;\n\t}",
"Rectangle getCollisionBox();",
"public Vector2 getPosition() {\n\t\treturn pos;\n\t}",
"private Point getEntityPosition(int position, int team) {\n\t\tint xOffset = position * (200);\n\t\tint xPos;\n\t\tif (team == 0) {\n\t\t\txPos = 800 - 100 - xOffset;\n\t\t} else {\n\t\t\txPos = 800 + 100 + xOffset;\n\t\t}\n\n\t\treturn new Point(xPos, 100);\n\t}",
"public final Vector2f getPosition() {\r\n return position;\r\n }",
"public Vector3f getOccluderPosition();",
"Point getPosition();",
"Point getPosition();",
"public float getY(){\n return hitBox.top;\n }",
"public static void collide (Planet p1, Planet p2, double dist, Vector vec){\n \n double cosVal = vec.xComponent/dist;\n double sinVal = vec.yComponent/dist;\n \n double P1CalcVelX = (2*p2.mass/(p1.mass+p2.mass)) * p2.xVel;\n double P1CalcVelY = (2*p2.mass/(p1.mass+p2.mass)) * p2.yVel;\n \n double xVelChangeP1 = Math.abs(cosVal * P1CalcVelX) + Math.abs(cosVal * P1CalcVelY);\n double yVelChangeP1 = Math.abs(sinVal * P1CalcVelX) + Math.abs(sinVal * P1CalcVelY);\n \n \n if (p1.xCoor < p2.xCoor){\n xVelChangeP1 = -xVelChangeP1;\n }\n \n if (p1.yCoor < p2.yCoor){\n yVelChangeP1 = -yVelChangeP1; \n }\n \n double P2CalcVelX = (2*p1.mass/(p1.mass+p2.mass)) * p1.xVel;\n double P2CalcVelY = (2*p1.mass/(p1.mass+p2.mass)) * p1.yVel;\n \n double xVelChangeP2 = Math.abs(cosVal * P2CalcVelX) + Math.abs(cosVal * P2CalcVelY);\n double yVelChangeP2 = Math.abs(sinVal * P2CalcVelX) + Math.abs(sinVal * P2CalcVelY);\n\n if (p2.xCoor < p1.xCoor){\n xVelChangeP2 = -xVelChangeP2;\n }\n\n if (p2.yCoor < p1.yCoor){\n yVelChangeP2 = -yVelChangeP2; \n }\n \n p1.changeVel(xVelChangeP1, yVelChangeP1);\n p2.changeVel(xVelChangeP2, yVelChangeP2);\n\n }",
"Vector getPos();",
"@Override\n public void onCollide(int actorA, int actorB, Collision.Manifold m){\n if(mInertia.has(actorA) && mInertia.has(actorB)){\n bounce(actorA, actorB, m);\n float correction = m.penetration[0] / (mInertia.get(actorA).invMass + mInertia.get(actorB).invMass) * 0.5f;\n mPhysics2D.get(actorA).p.mulAdd(m.normal, -mInertia.get(actorA).invMass * correction);\n mPhysics2D.get(actorB).p.mulAdd(m.normal, mInertia.get(actorB).invMass * correction);\n\n }else{ // Non Newtonian objects just get simple position correction\n Vector2 correction = new Vector2(m.normal).scl(m.penetration[0] * 0.5f);\n mPhysics2D.get(actorA).p.sub(correction);\n mPhysics2D.get(actorB).p.add(correction);\n }\n }",
"public Position3D getIntersect(Line3D other) {\r\n\t\tif (this.isParallel(other)) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tdouble t = (this.d - this.norm.dot(other.getPos())) / this.norm.dot(other.getDir());\r\n\t\treturn other.getLinePoint(t);\r\n\t}",
"public Vector2D getPosition() {\n\t\treturn position;\n\t}",
"protected void checkEntityCollisions(long time) {\n\t\tRectangle2D.Float pla1 = player1.getLocationAsRect();\n\t\tRectangle2D.Float pla2 = player2.getLocationAsRect();\n\t\tfor(int i = 0; i < ghosts.length; i++)\n\t\t{\n\t\t\tGhost g = ghosts[i];\n\t\t\t\n\t\t\tif(g.isDead())\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tRectangle2D.Float ghRect = g.getLocationAsRect();\n\t\t\t\n\t\t\tif(ghRect.intersects(pla1))\n\t\t\t\tonPlayerCollideWithGhost(time, player1, i);\n\t\t\t\n\t\t\tif(ghRect.intersects(pla2))\n\t\t\t\tonPlayerCollideWithGhost(time, player2, i);\n\t\t}\n\t}",
"private void fireball2Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY());\r\n\t\tGObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tGObject bottomRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(fireball2);\r\n\t\t\tfireball2 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"public final Vector2D getPosition() {\n return position;\n }",
"godot.wire.Wire.Vector3 getPosition();",
"public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }",
"private void collide(String typeOfCollision, Entity first, Entity second) {\n switch (typeOfCollision) {\n\n case \"playerWithWall\":\n intersectPlayerWithWall(first);\n break;\n\n case \"playerWithHazard\":\n intersectPlayerWithWall(first);\n break;\n\n case \"bulletWithWall\":\n room.getEntityManager().removeEntity(first);\n ((WeaponComponent) player.getComponent(ComponentType.WEAPON)).getBullets().removeEntity(first);\n break;\n\n case \"enemyWithWall\":\n intersectEnemyWithWall(first, second);\n break;\n\n case \"enemyWithBullet\":\n intersectBulletWithEnemy(first, second);\n break;\n\n case \"enemyWithEnemy\":\n intersectEnemyWithWall(first, second);\n break;\n\n case \"enemyWithPlayer\":\n NinjaEntity ninja = (NinjaEntity) second;\n ninja.setIsHit(true);\n break;\n\n case \"itemWithPlayer\":\n itemIntersectsPlayer(first);\n break;\n\n case \"swordWithEnemy\":\n intersectSwordWithEnemy(first, second);\n break;\n }\n }",
"private boolean collide(Ship s1, Ship s2) {\n if (s1 == null || s2 == null) return false; // no collision if either ship is null\n boolean vert1 = s1.getIsVertical();\n boolean vert2 = s2.getIsVertical();\n if (vert1 && vert2) {\n if (s1.getCol() != s2.getCol()) return false; // 2 vertical ships in different columns\n if (s1.getRow() >= s2.getRow() + s2.getSize()) return false; // s1 is below s2\n if (s2.getRow() >= s1.getRow() + s1.getSize()) return false; // s2 is below s1\n return true; // otherwise they collide\n } else if (!vert1 && !vert2) {\n if (s1.getRow() != s2.getRow()) return false; // 2 holizontal ships in different rows\n if (s1.getCol() >= s2.getCol() + s2.getSize()) return false; // s1 to the right of s2\n if (s2.getCol() >= s1.getCol() + s1.getSize()) return false; // s2 to the right of s1\n return true; // otherwise they collide\n } else {\n if (s1.getRow() >= s2.getRow() + s2.getSize()) return false; // s1 is below s2\n if (s2.getRow() >= s1.getRow() + s1.getSize()) return false; // s2 is below s1\n if (s1.getCol() >= s2.getCol() + s2.getSize()) return false; // s1 to the right of s2\n if (s2.getCol() >= s1.getCol() + s1.getSize()) return false; // s2 to the right of s1\n return true; // otherwise they collide\n }\n }",
"public boolean collidePoint(float mX, float mY){\n return super.shape.contains(mX,mY);\n }",
"public double getXOverlap(double oldx1, double oldx2, double x1, double x2)\r\n {\r\n\r\n if (oldx1 > (this.x + width))\r\n {\r\n if (x1<(this.x + width))\r\n return (this.x + width)-x1;\r\n else\r\n return 0;\r\n }\r\n else\r\n {\r\n if (x2 > this.x)\r\n return this.x - x2;\r\n else\r\n return 0;\r\n\r\n }\r\n }",
"public GameObject getOther(){\n \n return currentCollidingObject;\n \n }",
"public interface Entity {\n /**\n * check whether a collision with another entity happened\n * and perform the relevant action.\n * @param e the other entity\n * @return whether the collision happened\n */\n boolean collidedWith(Entity e);\n\n void draw(Graphics g, DisplayWriter d);\n\n void doLogic(long delta);\n\n void move(long delta);\n\n /**\n * whether or not the entity is out of the currently displayed area.\n * @return true if not visible\n */\n boolean outOfSight();\n}",
"@Override\n\tpublic boolean hasCollide(Entity e) {\n\t\treturn rect.intersects(e.getRectangle());\n\t}",
"public Coordinate getPosition();",
"public void collide(CollisionEvent evt) {\n\t\tthis.colliding = true;\n\t\tif(evt.getEntity().getType().equals(\"PlayerCharacter\") && evt.getDirection().equals(Direction.TOP)){\n\t\t\tthis.addVector2D(new Vector2D(0,2));\n\t\t}\n\t\tif (this.getCollideTypes().contains(evt.getEntity().getType())\n\t\t\t\t&& (evt.getDirection().equals(Direction.BOTTOM))) {\n\t\t}\n\t}",
"public static boolean collision(Bug b1, Bug b2){\n float xDiff = b1.getCenter().x - b2.getCenter().x;\n float yDiff = b1.getCenter().y - b2.getCenter().y;\n float distSqr = xDiff*xDiff + yDiff*yDiff;\n return distSqr < (b1.getRadius() + b2.getRadius()) * (b1.getRadius() + b2.getRadius());\n }",
"protected Entity findPlayerToAttack()\n {\n EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);\n return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;\n }",
"public int verifyPlayerMovement(int x1, int y1, int x2, int y2){\n int deltaX = abs(x2-x1);\n int deltaY = abs(y2-y1);\n \n // already chosen position\n if ((deltaX == 0 && deltaY == 0) && (matrixUserChoices[x1][y1] == 1 || matrixUserChoices[x1][y1] == -1)){\n return -1;\n }\n else if (deltaX == 0 && deltaY == 0){\n return POSITIONATTACK;\n }\n else if (deltaX == 1 && deltaY == 1){\n return AREAATTACK;\n }\n else if (deltaX == 0 && deltaY == canvasNumberOfColumns-1){\n return LINEATTACK;\n }\n else if (deltaY == 0 && deltaX == canvasNumberOfLines-1){\n return COLUMNATTACK;\n }\n if ((deltaX == 0 && deltaY == 0) && (gameMatrix[x1][y1] == 1)){\n return -1;\n }\n else{\n return -1;\n }\n \n // the -1 value means an invalid movement \n }",
"public boolean intersects(BaseGameObject other) {\r\n return (other.getPosx() - this.getPosx())\r\n * (other.getPosx() - this.getPosx())\r\n + (other.getPosy() - this.getPosy())\r\n * (other.getPosy() - this.getPosy())\r\n < (other.bound + this.bound) * (other.bound + this.bound);\r\n }",
"public Vector2f getPosition() { return new Vector2f(centroid_pos); }",
"public void collide(GameEntity ge)\n\t{\n\t\tge.collide(this);\n\t}",
"@Override protected boolean drag_collide(float newX, float newY, Entity e){\n\n\n boolean collides=\n e.collideLine(x, y, newX, newY) ||\n e.collideLine(x + thirdWidth, y, newX+thirdWidth, newY) ||\n e.collideLine(x, y+height, newX, newY+height) ||\n e.collideLine(x + thirdWidth, y+height, newX+thirdWidth, newY+height) ||\n\n e.collideLine(2*thirdWidth + x, y, 2*thirdWidth + newX, newY) ||\n e.collideLine(2*thirdWidth + x + thirdWidth, y, 2*thirdWidth + newX+thirdWidth, newY) ||\n e.collideLine(2*thirdWidth + x, y+height, 2*thirdWidth + newX, newY+height) ||\n e.collideLine(2*thirdWidth + x + thirdWidth, y+height, 2*thirdWidth + newX+thirdWidth, newY+height)\n ;\n return collides;\n }",
"public Point2D getPosition()\n {\n return mPosition;\n }",
"private boolean isColliding(Node node1, Node node2){\n\t\tfinal int offset = 2;\n\t\tBounds bounds1 = node1.getBoundsInParent();\n\t\tBounds bounds2 = node2.getBoundsInParent();\n\t\tbounds1 = new BoundingBox(bounds1.getMinX() + offset, bounds1.getMinY() + offset,\n\t\t\t\tbounds1.getWidth() - offset * 2, bounds1.getHeight() - offset * 2);\n\t\tbounds2 = new BoundingBox(bounds2.getMinX() + offset, bounds2.getMinY() + offset,\n\t\t\t\tbounds2.getWidth() - offset * 2, bounds2.getHeight() - offset * 2);\n\t\treturn bounds1.intersects(bounds2);\n\t}",
"BlockPos getPosTarget() {\n BlockPosDim loc = LocationGpsCard.getPosition(inventory.getStackInSlot(0));\n if (loc != null && loc.getPos() != null) {\n return loc.getPos();\n }\n return this.getBlockPos();\n }",
"PVector _getCenter() {\n PVector cen = new PVector(_hitboxCenter.x, _hitboxCenter.y);\n cen.rotate(_rotVector.heading() - _front);\n cen.x += _x;\n cen.y += _y;\n return cen;\n }",
"public float distance(Entity other) {\n return getCenteredCoordinate().distance(other.getCenteredCoordinate());\n }",
"public abstract void collide(InteractiveObject obj);",
"public static double getDistance( GameObject one, GameObject two )\n {\n double deltaX = getDeltaX( one, two );\n double deltaY = getDeltaY( one, two );\n return Math.sqrt( deltaX * deltaX + deltaY * deltaY );\n }",
"public boolean collision(JLabel label1, JLabel label2){\r\n\t\t//top\r\n\t\tif (label1.getY() >= label2.getY()){\r\n\t\t\t//bottom\r\n\t\t\tif (label1.getY() <= label2.getY()){\r\n\t\t\t\t//left\r\n\t\t\t\tif(label1.getX() >= label2.getX()){\r\n\t\t\t\t\t//right\r\n\t\t\t\t\tif (label1.getX() <= label2.getX()){\r\n\t\t\t\t\t\treturn true;\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 false;\r\n\t}",
"public double getTimeFirstCollisionBoundary() {\n\t\tif (getWorld() == null) return Double.POSITIVE_INFINITY;\n\t\tdouble xTime = Double.POSITIVE_INFINITY;\n\t\tdouble yTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getXVelocity() > 0)\n\t\t\txTime = (getWorld().getWidth() - getXCoordinate() - getRadius()) / getXVelocity();\n\t\tif (this.getXVelocity() < 0)\n\t\t\txTime = - ( getXCoordinate() - getRadius()) / getXVelocity();\n\t\tif (this.getXVelocity() == 0)\n\t\t\txTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getYVelocity() > 0)\n\t\t\tyTime = (getWorld().getHeight() - getYCoordinate() -getRadius()) / getYVelocity();\n\t\tif (this.getYVelocity() < 0)\n\t\t\tyTime = - ( getYCoordinate() - getRadius()) / getYVelocity();\n\t\tif (this.getYVelocity() == 0)\n\t\t\tyTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\treturn Math.min(xTime, yTime);\t\n\t}",
"public boolean collidesWith(double x, double y) {\n\t\tdouble leftBound = owner.getX() + this.offsetX - (width/2);\n\t\tdouble upBound = owner.getY() + this.offsetY - (height/2);\n\t\treturn x <= leftBound + width && x >= leftBound && y <= upBound + height && y >= upBound;\n\t}",
"public int checkCollision(Direction direction, GameObject object) {\n\n Position tempPosition = adjacentPosition(direction, object);\n\n if (object instanceof Player) {\n\n for (int i = 1; i < gameObjects.length; i++) {\n if (!gameObjects[i].getPosition().comparePosition(tempPosition)) {\n continue;\n }\n if (!(gameObjects[i] instanceof SpotX)) {\n return i;\n }\n }\n return -1;\n } else {\n for (int i = 1; i < gameObjects.length; i++) {\n if (!gameObjects[i].getPosition().comparePosition(tempPosition)) {\n continue;\n }\n return i;\n }\n return -1;\n }\n\n }",
"public float getX(){\n return hitBox.left;\n }",
"public static double distancia(Entidade e1,Entidade e2){\r\n\t\tdouble dx = e1.getPosicaoX() - e2.getPosicaoX();\r\n\t\tdouble dy = e1.getPosicaoY() - e2.getPosicaoY();\r\n\t\tdouble d = Math.sqrt(dx*dx + dy*dy);\r\n\t\treturn d;\r\n\t}",
"godot.wire.Wire.Vector2OrBuilder getPositionOrBuilder();",
"public static boolean getCollision()\r\n\t{\r\n\t\treturn collision;\r\n\t}",
"private Vector3f calculateVectorDirectionBetweenEyeAndCenter() {\n\t\tVector3f br = new Vector3f();\n\n\t\tbr.x = player.getPosition().x - camera.getPosition().x;\n\t\tbr.y = player.getPosition().y - camera.getPosition().y;\n\t\tbr.z = player.getPosition().z - camera.getPosition().z;\n\n\t\treturn br;\n\t}",
"public interface Entity {\r\n\r\n /**\r\n * Gets the initial (relative, map) position of the entity.\r\n * \r\n * @return the initial position of the player\r\n */\r\n Pair<Integer, Integer> getInitialPosition();\r\n\r\n /**\r\n * Gets the position of the entity on screen (absolute, pixel).\r\n * \r\n * @return entity current position on screen\r\n */\r\n Pair<Integer, Integer> getPosition();\r\n\r\n /**\r\n * Sets the position of the entity on screen.\r\n * Can be used to change an absolute position (that is grid locked because they're a multiple of a value) \r\n * to a specific position and place an object everywhere you want\r\n * \r\n * Please check {@link TestEntity} for an in-depth explanation of how this works.\r\n * \r\n * @param position defines the entity position on screen\r\n */\r\n void setPosition(Pair<Integer, Integer> position);\r\n\r\n /**\r\n * Gets the hitbox of the entity (a Rectangle if it's solid, null otherwise).\r\n * \r\n * @return the collision box of the entity.\r\n */\r\n Rectangle getCollisionBox();\r\n\r\n /**\r\n * Gets the path of the image that will be used by the view. \r\n * \r\n * @return the path where the image of the entity is located\r\n */\r\n String getImagePath();\r\n\r\n /**\r\n * Sets the path of the image that will be used by the view.\r\n * \r\n * @param path the path where the image of the entity is located\r\n */\r\n void setImagePath(String path);\r\n\r\n /**\r\n * Method that defines if the entity is destroyed or not.\r\n * \r\n * @return true if destroyed, false otherwise\r\n */\r\n boolean isDestroyed();\r\n\r\n /**\r\n * Sets the status of the entity (true if destroyed, false otherwise).\r\n * \r\n * @param destroyed defines if the entity has been destroyed or not\r\n */\r\n void setStatus(boolean destroyed);\r\n\r\n /**\r\n * Gets the entity width.\r\n * \r\n * @return entity width\r\n */\r\n int getWidth();\r\n\r\n /**\r\n * Sets the new entity width.\r\n * \r\n * @param width defines the new entity width\r\n */\r\n void setWidth(int width);\r\n\r\n /**\r\n * Gets the entity height.\r\n * \r\n * @return entity height\r\n */\r\n int getHeight();\r\n\r\n /**\r\n * Sets the new entity height.\r\n * \r\n * @param height defines the new entity width\r\n */\r\n void setHeight(int height);\r\n\r\n /**\r\n * Return the state of the block, if it is solid or not.\r\n * @return true if entity is solid, false otherwise.\r\n */\r\n boolean isSolid();\r\n\r\n /**\r\n * Sets the score value of the entity.\r\n * \r\n * @param scoreValue defines the value that will be given (added) to players score when the entity is destroyed\r\n */\r\n void setScoreValue(int scoreValue);\r\n\r\n /**\r\n * Gets the score value of the entity.\r\n * \r\n * @return a score value that defines the value of the entity\r\n */\r\n int getScoreValue();\r\n}",
"public DoubleSolenoid.Value getPosition() {\n return m_ballholder.get();\n }",
"public void collideWith(Rigidbody obj) {\n\t\t\r\n\t}",
"CollisionRule getCollisionRule();"
]
| [
"0.7144755",
"0.66509634",
"0.6609152",
"0.6350467",
"0.6337829",
"0.62968975",
"0.62066025",
"0.61662793",
"0.61358273",
"0.61194664",
"0.6116108",
"0.6073424",
"0.6015539",
"0.6011781",
"0.59631246",
"0.59631133",
"0.5888672",
"0.5864695",
"0.58354247",
"0.5825329",
"0.58251274",
"0.57896006",
"0.57878065",
"0.5780346",
"0.5780058",
"0.5761662",
"0.5756443",
"0.5738274",
"0.57372594",
"0.57354087",
"0.5724014",
"0.5700668",
"0.5667214",
"0.56466573",
"0.5639435",
"0.56336546",
"0.562994",
"0.5624056",
"0.56232774",
"0.5596708",
"0.55939466",
"0.55911136",
"0.55818695",
"0.55818695",
"0.5581228",
"0.557777",
"0.5572698",
"0.55680424",
"0.55654436",
"0.55633014",
"0.5563075",
"0.5554031",
"0.5554031",
"0.5546346",
"0.55322766",
"0.552652",
"0.55206835",
"0.5520416",
"0.5501587",
"0.55000794",
"0.5493798",
"0.5489171",
"0.5486331",
"0.5484128",
"0.54717994",
"0.5470022",
"0.54516196",
"0.5443638",
"0.5443514",
"0.54394466",
"0.54345524",
"0.5425036",
"0.54244304",
"0.54241335",
"0.54212725",
"0.5419097",
"0.54131496",
"0.5406522",
"0.5403786",
"0.5401845",
"0.5397669",
"0.53957266",
"0.5391383",
"0.5385906",
"0.5382901",
"0.5381421",
"0.5377075",
"0.53736544",
"0.537243",
"0.5368377",
"0.5359415",
"0.53483933",
"0.5347836",
"0.5343931",
"0.5343071",
"0.5340989",
"0.5337969",
"0.5326836",
"0.5323864",
"0.53222644"
]
| 0.6584736 | 3 |
A helper method to get the center of a entity when it traveled over a time. | public double[] getDistanceTraveled(double time){
assert ((time > 0) && Helper.isValidDouble(time));
double pos[] = new double[2];
pos[0] = this.getPosition()[0] + this.getVelocity()[0] * time;
pos[1] = this.getPosition()[1] + this.getVelocity()[1] * time;
return pos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Location getEntityCenter(Entity entity) {\n\t\treturn entity.getBoundingBox().getCenter().toLocation(entity.getWorld());\n\t}",
"Point getCenter();",
"Point getCenter();",
"private int getMidPoint(int cordinate)\n {\n int mid_point = ((cordinate + Player.getWidth_of_box()) / 2);\n return mid_point;\n }",
"private Point getCentreCoordinate(Point t)\n {\n \treturn new Point (t.x + Constants.cell_length /2f, t.y, t.z+Constants.cell_length/2f );\n }",
"PVector _getCenter() {\n PVector cen = new PVector(_hitboxCenter.x, _hitboxCenter.y);\n cen.rotate(_rotVector.heading() - _front);\n cen.x += _x;\n cen.y += _y;\n return cen;\n }",
"public final Vector getCenter() {\n\t\treturn (center == null) ? computeCenter() : center;\n\t}",
"static Vector getEntityPosition(Entity entity, Object nmsEntity) {\n if(entity instanceof Hanging) {\n Object blockPosition = ReflectUtils.getField(nmsEntity, \"blockPosition\");\n return MathUtils.moveToCenterOfBlock(ReflectUtils.blockPositionToVector(blockPosition));\n } else {\n return entity.getLocation().toVector();\n }\n }",
"public Point2D getBombTileCenterPosition(GameObject node) {\n double x;\n double y;\n\n List<Rectangle> intersectingTiles = new ArrayList<>();\n for (Rectangle2D r : gameMatrix) {\n Rectangle currentMatrixTile = new Rectangle(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight());\n\n // check if rectangle of game matrix intersects with player bounds and harvest these in new array\n if (currentMatrixTile.getBoundsInParent().intersects(node.getBoundsInParent())) {\n intersectingTiles.add(currentMatrixTile);\n }\n }\n // if player bounds are completely in one tile\n if (intersectingTiles.size() == 1) {\n Rectangle r = intersectingTiles.get(0);\n x = r.getX() + (r.getWidth() / 2);\n y = r.getY() + (r.getHeight() / 2);\n return new Point2D(x, y);\n }\n // if player bounds are in more than one tile\n else {\n for (int i = 0; i < intersectingTiles.size(); i++) {\n Point2D playerCenterPosition = new Point2D(node.getX() + (node.getFitWidth() / 2), node.getY() + (node.getFitHeight() / 2));\n Rectangle currentTile = intersectingTiles.get(i);\n\n // the center position of the player should only exist in one tile at a time ...\n if (currentTile.contains(playerCenterPosition)) {\n return new Point2D(currentTile.getX() + (currentTile.getWidth() / 2), currentTile.getY() + (currentTile.getHeight() / 2));\n }\n }\n // a mystery\n return null;\n }\n }",
"public Coordinate getCenter() {\n return center;\n }",
"public Vector2f getCenter(Transform t) {\n\t\treturn new Vector2f(center.x * t.scale.x, center.y * t.scale.y).add(t.position);\n\t}",
"private double centerX() {\n return (piece.boundingBox().getWidth() % 2) / 2.0;\n }",
"final public Vector2 getCenter()\n\t{\n\t\treturn center;\n\t}",
"public Vector2 getCenter() {\n return center;\n }",
"public double getCenter() {\n return 0.5 * (lo + hi);\n }",
"public LatLng getCentrePos() {\n double lat = 0;\n double lon = 0;\n for (int i=0; i<newHazards.size(); i++) {\n lat += frags.get(i).getHazard().getLatitude();\n lon += frags.get(i).getHazard().getLongitude();\n }\n return new LatLng(lat / newHazards.size(), lon / newHazards.size());\n }",
"public Point getCenter() {\n return center;\n }",
"public Point getCenter() {\r\n return this.center;\r\n }",
"public EastNorth getCenter() {\n\t\treturn null;\n\t}",
"public void centerOnEntity(Item e)\n {\n xOffset = e.GetX() - refLinks.GetWidth()/2 + e.GetWidth()/2;\n yOffset = e.GetY() - refLinks.GetHeight()/2 + e.GetHeight()/2;\n checkCameraLimits();\n }",
"public Vector3d getCurrentCollisionCenter() {\r\n return new Vector3d(collisionCenter.x + currentPosition.x, collisionCenter.y + currentPosition.y, collisionCenter.z + currentPosition.z);\r\n }",
"public Point getCenter() {\n \treturn new Point(x+width/2,y+height/2);\n }",
"@NotNull\n public Location<World> getCenterBlock() {\n int centerX = getMinChunk().getX() + 16;\n int centerZ = getMinChunk().getZ() + 16;\n return Tungsten.INSTANCE.getIslandWorld().getLocation(centerX * 16, 86, centerZ * 16);\n }",
"public static int getCenter() {\n\t\treturn Center;\n\t}",
"public Point getCenter() {\r\n\t\treturn center;\r\n\t}",
"public Vector2D getArithmeticCenter()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tVector2D center = Vector2D.ZERO;\n\n\t\tfor (Unit unit : this)\n\t\t{\n\t\t\tcenter = center.add(Vector2DMath.toVector(unit.getPosition()));\n\t\t}\n\t\tcenter = center.scale(1.0f / size());\n\n\t\treturn center;\n\t}",
"public Location3D getCenter() {\n\t\treturn new Location3D(world, lowPoint.getBlockX() + getXSize() / 2, lowPoint.getBlockY() + getYSize() / 2, lowPoint.getBlockZ() + getZSize() / 2);\n\t}",
"public Coords getCenter()\r\n {\r\n return new Coords(Math.round(x + width / 2), Math.round(y + height / 2));\r\n }",
"public double getDistanceBetweenCenter(Entity entity) throws IllegalArgumentException{\n if(this == entity) throw new IllegalArgumentException(\"this == entity\");\n else{\n double diffx = Math.abs(entity.getPosition()[0] - this.getPosition()[0]);\n double diffy = Math.abs(entity.getPosition()[1] - this.getPosition()[1]);\n double diff = Math.sqrt(Helper.square(diffx) + Helper.square(diffy));\n return diff;\n }\n }",
"public abstract Vector computeCenter();",
"public PointF getCenter() {\n return center;\n }",
"public MapLocation getEnemySwarmCenter() {\n\t\treturn new MapLocation(centerEnemyX, centerEnemyY);\n\t}",
"public Point centeroid ()\r\n {\r\n return new Point ((v1.getX()+v2.getX()+v3.getX())/3,(v1.getY()+v2.getY()+v3.getY())/3);\r\n }",
"public ImageWorkSpacePt findCurrentCenterPoint() {\n WebPlot plot= getPrimaryPlot();\n\n\n int screenW= plot.getScreenWidth();\n int screenH= plot.getScreenHeight();\n int sw= getScrollWidth();\n int sh= getScrollHeight();\n int cX;\n int cY;\n if (screenW<sw) {\n cX= screenW/2;\n }\n else {\n int scrollX = getScrollX();\n cX= scrollX+sw/2- wcsMarginX;\n }\n\n if (screenH<sh) {\n cY= screenH/2;\n }\n else {\n int scrollY = getScrollY();\n cY= scrollY+sh/2- wcsMarginY;\n }\n\n ScreenPt pt= new ScreenPt(cX,cY);\n\n return plot.getImageWorkSpaceCoords(pt);\n }",
"public Vector3f getCenter() {\r\n return center;\r\n }",
"private math_vector3d TwoPointGetCenterArcPoint(math_vector3d start, math_vector3d end)\n {\n\n\n ObjectPoint center2d = new ObjectPoint((start.X() + end.X()) / 2.0,(start.Y() + end.Y()) / 2.0);\n ObjectPoint orgin2d = new ObjectPoint(this.theOrigin.X(),this.theOrigin.Y());\n\n\n MathVector2D orginTocenter = new MathVector2D(orgin2d, center2d);\n\n orginTocenter = orginTocenter.GetUnit();\n orginTocenter = orginTocenter.multiply(this.theRadius);\n orgin2d.AddVector(orginTocenter);\n\n math_vector3d center = new math_vector3d(orgin2d.x,orgin2d.y,0);\n return center;\n }",
"long getMid();",
"long getMid();",
"public Vector2 getCenter() {\n\t\treturn new Vector2(position.x + size / 4f, position.y + size / 4f);\n\t}",
"public Vector3D getCenter() {\n return center;\n }",
"public int getCenter() {\n\t\t\treturn center;\n\t\t}",
"public double getCenterX() { return centerX.get(); \t}",
"public Point2D.Double getImageCenter();",
"public Point getCenter() {\n return new Point((int) getCenterX(), (int) getCenterY());\n }",
"public Point getCenter() {\n return location.center();\n }",
"public FPointType calculateCenter() {\n fRectBound = getBounds2D();\n FPointType fptCenter = new FPointType();\n fptCenter.x = fRectBound.x + fRectBound.width / 2.0f;\n fptCenter.y = fRectBound.y + fRectBound.height / 2.0f;\n calculate(fptCenter);\n \n rotateRadian = 0.0f;\n \n return fptCenter;\n }",
"private double centerY() {\n return (piece.boundingBox().getHeight() % 2) / 2.0;\n }",
"public Vector2 getCenter() {\n return new Vector2(rectangle.centerX(), rectangle.centerY());\n }",
"public abstract Vector2 getCentreOfMass();",
"public Point getLocation() {\r\n\t\treturn this.center;\r\n\t}",
"public Location getCenter() {\n return new Location(location.getWorld(), (float) getRectangle().getCenterX(), (float) getRectangle().getCenterY());\n }",
"public double[] getCollisionPosition(Entity entity) throws IllegalArgumentException{\n \n \tif (entity == null) throw new IllegalArgumentException(\"getCollisionPosition called with a non-existing circular object!\");\n\t\tif (this.overlap(entity)) throw new IllegalArgumentException(\"These two circular objects overlap!\");\n\t\tdouble timeToCollision = getTimeToCollision(entity);\n\t\t\t\n\t\tif (timeToCollision == Double.POSITIVE_INFINITY) return null;\n\t\t\n\t\tdouble[] positionThisShip = this.getPosition();\n\t\tdouble[] velocityThisShip = this.getVelocity();\n\t\tdouble[] positionShip2 = entity.getPosition();\n\t\tdouble[] velocityShip2 = entity.getVelocity();\n\t\t\n\t\tdouble xPositionCollisionThisShip = positionThisShip[0] + velocityThisShip[0] * timeToCollision;\n\t\tdouble yPositionCollisionThisShip = positionThisShip[1] + velocityThisShip[1] * timeToCollision;\n\t\t\n\t\tdouble xPositionCollisionShip2 = positionShip2[0] + velocityShip2[0] * timeToCollision;\n\t\tdouble yPositionCollisionShip2 = positionShip2[1] + velocityShip2[1] * timeToCollision;\n\t\t\n\t\tdouble slope = Math.atan2(yPositionCollisionShip2 - yPositionCollisionThisShip, xPositionCollisionShip2 - xPositionCollisionThisShip);\n\t\t\n\t\t\n\t\treturn new double[] {xPositionCollisionThisShip + Math.cos(slope) * this.getRadius(), yPositionCollisionThisShip + Math.sin(slope) * this.getRadius()};\n\t}",
"public Vector3D getCentrePosition()\n\t{\n\t\treturn centrePosition;\n\t}",
"public Vec2 getCenter()\n {\n int numTriangles = numPoints - 2;\n\n // Calculate the average midpoint of each composite triangle\n Vec2 averageMidpoint = new Vec2(0, 0);\n float area = 0;\n for (int i=0; i<numTriangles; i++)\n {\n Triangle t = new Triangle(points[0], points[i+1], points[i+2]);\n Vec2 triangleMidpoint = t.getCenter();\n float triangleArea = t.getArea();\n\n averageMidpoint.addX(triangleMidpoint.getX() * triangleArea);\n averageMidpoint.addY(triangleMidpoint.getY() * triangleArea);\n\n area += triangleArea;\n\n// Color color;\n// if (i==0) color = Color.GREEN;\n// else color = Color.ORANGE;\n// SumoGame.ADD_DEBUG_DOT(points[0].getX(), points[0].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+1].getX(), points[i+1].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+2].getX(), points[i+2].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(triangleMidpoint.getX(), triangleMidpoint.getY(), triangleArea/2000, color);\n }\n\n averageMidpoint.div(area);\n\n// SumoGame.ADD_DEBUG_DOT(averageMidpoint.getX(), averageMidpoint.getY(), 20, Color.RED);\n\n return averageMidpoint;\n }",
"public GJPoint2D center();",
"public Point middle() {\r\n Point middlePoint = new Point(((this.end.getX() + this.start.getX()) / 2),\r\n ((this.end.getY() + this.start.getY()) / 2));\r\n return middlePoint;\r\n }",
"public Point2D.Float getCenter() {\r\n\t\treturn center;\r\n\t}",
"public final Point getCenterPointOnScreen() {\n return bot.getManagers().getCalculations().tileToScreen(localRegionX, localRegionY,\n 0.5D, 0.5D, 0);\n }",
"public Point2D getCentre() {\n return new Point2D.Float(centreX, centreY);\n }",
"public Vec3d getCenter() {\n\t\treturn set;\n\t}",
"public Line2D.Double\ncenterAtMidPt()\n{\n\tPoint2D midPt = this.getMidPt();\n\treturn new Line2D.Double(\n\t\tgetX1() - midPt.getX(),\n\t\tgetY1() - midPt.getY(),\n\t\tgetX2() - midPt.getX(),\n\t\tgetY2() - midPt.getY());\n}",
"public Vector3f getSphereCenter() {\n\t\tfloat[] arr = getMinMax();\n\t\t\n\t\treturn new Vector3f((arr[0]+arr[1])/2,(arr[2]+arr[3])/2,(arr[4]+arr[5])/2);\n\t}",
"public Position getMidPoint() {\n return midPoint;\n }",
"public LatLng getCenter() {\n return center;\n }",
"public double[] getCenter() {\n return this.center;\n }",
"public final float exactCenterX() {\n return (left + right) * 0.5f;\n }",
"private Point2D getCenterLatLon(){\n Point2D.Double result = new Point2D.Double();\n Point2D.Double screenCenter = new Point2D.Double();\n screenCenter.x = getWidth()/2; //contentpane width/height\n screenCenter.y = getHeight()/2;\n try{\n transform.inverseTransform(screenCenter,result); //transform to lat/lon using the current transform\n } catch (NoninvertibleTransformException e) {\n throw new RuntimeException(e);\n }\n return result;\n }",
"private Line getMiddleTrajectory() {\n Point startPoint;\n if (movingRight()) {\n startPoint = middleRight();\n } else if (movingLeft()) {\n startPoint = middleLeft();\n } else {\n return null;\n }\n\n return new Line(startPoint, this.velocity);\n }",
"public int getCenterX(){\r\n return centerX;\r\n }",
"private Point middleLeft() {\n return this.topLeft.add(0, this.height / 2).asPoint();\n }",
"protected Vector3D getRefCompCenterRelParent(AbstractShape shape) {\n Vector3D centerPoint;\n if (shape.hasBounds()) {\n centerPoint = shape.getBounds().getCenterPointLocal();\n centerPoint.transform(shape.getLocalMatrix()); //macht den punkt in self space\n } else {\n Vector3D localObjCenter = shape.getCenterPointGlobal();\n localObjCenter.transform(shape.getGlobalInverseMatrix()); //to localobj space\n localObjCenter.transform(shape.getLocalMatrix()); //to parent relative space\n centerPoint = localObjCenter;\n }\n return centerPoint;\n }",
"public static double getCenter(int index) {\n\t\tif (index==0) return -1.0;\n\t\telse return DEFAULT_CENTERS[index-1];\n\t}",
"public Spatial boardCentre() {\r\n return tiles[2][2].tile;\r\n }",
"double[] circleCentre()\n\t{\n\t\tdouble toOriginLength = Math.sqrt(originX*originX + originY*originY);\n\t\tdouble toCentreLength = toOriginLength + radius;\n\t\t\n\t\tdouble[] centrePoint = new double[2];\n\t\t\n\t\tcentrePoint[0] = (toCentreLength * originX)/toOriginLength;\n\t\tcentrePoint[1] = (toCentreLength * originY)/toOriginLength;\n\t\t\n\t\treturn centrePoint;\n\t}",
"public final Point getCenterPointOnScreen() {\n\t\treturn Calculations.tileToScreen(getLocalRegionX(), getLocalRegionY(),\n\t\t\t\t0.5D, 0.5D, 0);\n\t}",
"public Vect3d getCenter (){\r\n Vect3d v = new Vect3d();\r\n v.x = (min.x + max.x) / 2;\r\n v.y = (min.y + max.y) / 2;\r\n v.z = (min.z + max.z) / 2;\r\n return v;\r\n }",
"public Double2D getCentral() {\n\n int width = (int)Math.sqrt(state.numAgents);\n if (Math.sqrt(state.numAgents) / width == 1.0) {\n\n double halfWidth = width / 2.0;\n int x = id / width;\n int y = id % width;\n\n double length = state.simWidth / width;\n double halfLength = length / 2.0;\n\n double dx = ((x - halfWidth) * length + halfLength) + meanLocation.getX();\n double dy = ((y - halfWidth) * length + halfLength) + meanLocation.getY();\n //state.printlnSynchronized(\"Dx = \" + dx + \" dy = \" + dy);\n return new Double2D(dx, dy);\n }else {\n return meanLocation;\n }\n }",
"public double getMeanCenterDifferenceFromStart(){\n double[] meanCenter = getMeanCenter();\n float[] trans = getTranslationVector(center.getX(),center.getY(),BITMAP_SIZE,BITMAP_SIZE,CONSTANT);\n Log.e(\"Points\",\"Actual (X,Y) = \"+\"(\"+((center.getX()*CONSTANT)+trans[0])+\",\"+((center.getY()*CONSTANT)+trans[1])+\")\");\n Log.e(\"Points\",\"Mean (X,Y) = \" + \"(\"+meanCenter[0]+\",\"+meanCenter[1]+\")\");\n double result = Math.sqrt(\n Math.pow(((center.getX()*CONSTANT)+trans[0]) - meanCenter[0],2)+\n Math.pow(((center.getY()*CONSTANT)+trans[1]) - meanCenter[1],2)\n );\n return result;\n }",
"public Coordinate getCenteredCoordinate() {\n return coordinate.add(getHalfSize());\n }",
"public Coord3d getCenter() {\n return new Coord3d((xmin + xmax) / 2, (ymin + ymax) / 2, (zmin + zmax) / 2);\n }",
"public float getCentreX() {\n return centreX;\n }",
"public native vector kbAreaGetCenter(int areaID);",
"public Point getPointMiddle()\n {\n Point temp = new Point();\n temp.x = Math.round((float)(rettangoloX + larghezza/2));\n temp.y = Math.round((float)(rettangoloY + altezza/2)); \n return temp;\n }",
"@Override\n\tpublic void IsAtCentre(boolean b, Time time) {\n\t\t\n\t}",
"public double getTimeFirstCollisionBoundary() {\n\t\tif (getWorld() == null) return Double.POSITIVE_INFINITY;\n\t\tdouble xTime = Double.POSITIVE_INFINITY;\n\t\tdouble yTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getXVelocity() > 0)\n\t\t\txTime = (getWorld().getWidth() - getXCoordinate() - getRadius()) / getXVelocity();\n\t\tif (this.getXVelocity() < 0)\n\t\t\txTime = - ( getXCoordinate() - getRadius()) / getXVelocity();\n\t\tif (this.getXVelocity() == 0)\n\t\t\txTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getYVelocity() > 0)\n\t\t\tyTime = (getWorld().getHeight() - getYCoordinate() -getRadius()) / getYVelocity();\n\t\tif (this.getYVelocity() < 0)\n\t\t\tyTime = - ( getYCoordinate() - getRadius()) / getYVelocity();\n\t\tif (this.getYVelocity() == 0)\n\t\t\tyTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\treturn Math.min(xTime, yTime);\t\n\t}",
"public native vector kbGetMapCenter();",
"public int getCenterX() {\n\t\t\treturn (int) origin.x + halfWidth;\n\t\t}",
"public float getCenterX() {\n return cPosition.getX() + (float) cFishSizeX / 2;\n }",
"public Point2D centerOfMass() \n {\n double cx = 0, cy = 0;\n double area = areaUnsigned();\n double factor = 0;\n for (Line2D line : lines) \n {\n factor = line.getP1().getX() * line.getP2().getY() - line.getP2().getX() * line.getP1().getY();\n cx += (line.getP1().getX() + line.getP2().getX()) * factor;\n cy += (line.getP1().getY() + line.getP2().getY()) * factor;\n }\n area *= 6.0d;\n factor = 1 / area;\n cx *= factor;\n cy *= factor;\n return new Point2D.Double(cx, cy);\n }",
"public Coords getFromCenterIntersectionPoint(final Coords otherPoint)\r\n {\r\n final Line line = new Line(getCenter(), otherPoint);\r\n final List<Line> edgeLines = getEdgeLines();\r\n Coords point;\r\n for(final Line edge : edgeLines)\r\n {\r\n point = line.intersection(edge);\r\n if(point != null)\r\n {\r\n return point;\r\n }\r\n }\r\n return null;\r\n }",
"public double getCenterY() { return centerY.get(); }",
"private static Point areaCentre() {\r\n\t\tvar centreLon = (lonLB + lonUB)/2;\r\n\t\tvar centreLat = (latLB + latUB)/2;\r\n\t\treturn Point.fromLngLat(centreLon, centreLat);\r\n\t}",
"public Point getAbsPosition() {\n return Game.getMap().TFMapCoordinateToMapCenter(position);\n }",
"public void centerMapOnPoint(int targetX, int targetY) {\n\n int scaledWidth = (int) (TileDataRegister.TILE_WIDTH * scale);\n int scaledHeight = (int) (TileDataRegister.TILE_HEIGHT * scale);\n int baseX = (int) (map.getWidth() * TileDataRegister.TILE_WIDTH * scale) / 2;\n\n int x = baseX + (targetY - targetX) * scaledWidth / 2;\n x -= viewPortWidth * 0.5;\n int y = (targetY + targetX) * scaledHeight / 2;\n y -= viewPortHeight * 0.5;\n\n currentXOffset = -x;\n currentYOffset = -y;\n\n gameChanged = true;\n }",
"private float computeCenter_old() {\n\t\tVector3f PA = A.subtract(P);\n\t\tVector3f PB = B.subtract(P);\n\t\tN = PA.cross(PB);\n\t\tif (N.lengthSquared() <= EPSILON*EPSILON) {\n//\t\t\tSystem.out.println(\"A=\"+A+\", B=\"+B+\" P=\"+P+\" -> it is a line\");\n\t\t\treturn 0; //Degenerated to a line\n\t\t}\n\t\t\n\t\t//define orthonormal basis I,J,K\n\t\tN.normalizeLocal();\n\t\tVector3f I = PA.normalize();\n\t\tVector3f J = N.cross(I);\n\t\tVector3f K = N;\n\t\tVector3f IxK = I.cross(K);\n\t\tVector3f JxK = J.cross(K);\n\t\t//project points in the plane PAB\n\t\tVector3f PAxN = PA.cross(N);\n\t\tVector3f PBxN = PB.cross(N);\n\t\tVector2f P2 = new Vector2f(0, 0);\n\t\tVector2f A2 = new Vector2f(PA.dot(JxK)/I.dot(JxK), PA.dot(IxK)/J.dot(IxK));\n\t\tVector2f B2 = new Vector2f(PB.dot(JxK)/I.dot(JxK), PB.dot(IxK)/J.dot(IxK));\n\t\t\n\t\t//compute time t of C=P+tPA°\n\t\tfloat t;\n\t\tif (B2.x == A2.x) {\n\t\t\tt = (B2.y - A2.y) / (A2.x - B2.x);\n\t\t} else {\n\t\t\tt = (B2.x - A2.x) / (A2.y - B2.y);\n\t\t}\n\t\t//compute C\n\t\tVector2f PArot = new Vector2f(A.y-P.y, P.x-A.x);\n\t\tVector2f C2 = P2.addLocal(PArot.multLocal(t));\n\t\t//project back\n\t\tC = new Vector3f(P);\n\t\tC.addScaledLocal(C2.x, I);\n\t\tC.addScaledLocal(C2.y, J);\n\t\t//Debug\n//\t\tSystem.out.println(\"A=\"+A+\", B=\"+B+\" P=\"+P+\" -> I=\"+I+\", J=\"+J+\", K=\"+K+\", P'=\"+P2+\", A'=\"+A2+\", B'=\"+B2+\", t=\"+t+\", C'=\"+C2+\", C=\"+C);\n\t\t//set radius\n\t\treturn C.distance(A);\n\t}",
"public final native LatLng getCenter() /*-{\n return this.getCenter();\n }-*/;",
"public BoardCell getCenterCell() {\n\t\treturn null;\n\t}",
"public XYPoint getSnakeHeadStartLocation();",
"public ViewPosition getCenterPosition() {\n\t\treturn null;\n\t}",
"public Ndimensional getStartPoint();",
"public Point getCentrePoint()\n\t\t{\n\t\t\tif(shape.equals(\"circle\") || shape.equals(\"ellipse\"))\n\t\t\t\treturn new Point((int)((Ellipse2D)obj).getCenterX(),(int)((Ellipse2D)obj).getCenterY());\n\t\t\tif(shape.equals(\"poly\"))\n\t\t\t{\n\t\t\t\tint xtot = 0;\n\t\t\t\tint ytot = 0;\n\t\t\t\tfor(int i=0; i < coords.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif((i % 2) == 0)\n\t\t\t\t\t\txtot += coords[i];\n\t\t\t\t\telse\n\t\t\t\t\t\tytot += coords[i];\n\t\t\t\t}\n\t\t\t\treturn new Point((xtot*2)/coords.length,(ytot*2)/coords.length);\n\t\t\t}else\n\t\t\t{\n\t\t\t\treturn new Point((int)((Rectangle)obj).getCenterX(),(int)((Rectangle)obj).getCenterY());\n\t\t\t}\n\t\t}"
]
| [
"0.6717956",
"0.65796417",
"0.65796417",
"0.6371724",
"0.62740415",
"0.6156717",
"0.61284715",
"0.60724",
"0.60527503",
"0.60520625",
"0.60349673",
"0.60027456",
"0.5951044",
"0.5923008",
"0.5917532",
"0.58972996",
"0.5886919",
"0.58845377",
"0.5879546",
"0.58688825",
"0.5859793",
"0.5839741",
"0.58370316",
"0.58313113",
"0.5830754",
"0.5828712",
"0.5823262",
"0.58151555",
"0.58053905",
"0.580101",
"0.57876235",
"0.57619",
"0.57569844",
"0.5743433",
"0.5731299",
"0.57073444",
"0.56839573",
"0.56839573",
"0.5651064",
"0.564587",
"0.5641527",
"0.5627031",
"0.5613153",
"0.56066066",
"0.55864686",
"0.5583085",
"0.5579171",
"0.5574935",
"0.55660266",
"0.5560595",
"0.55406934",
"0.55380505",
"0.5527406",
"0.5526993",
"0.551827",
"0.55070114",
"0.5494514",
"0.54921323",
"0.54872096",
"0.5476282",
"0.54707766",
"0.54624116",
"0.5453576",
"0.54532295",
"0.5446908",
"0.54451257",
"0.5442625",
"0.5425415",
"0.5423636",
"0.5419827",
"0.5419813",
"0.541026",
"0.53966373",
"0.53860104",
"0.5384911",
"0.53831553",
"0.5383154",
"0.53775495",
"0.5375984",
"0.53753114",
"0.53562975",
"0.5355068",
"0.53422785",
"0.53420556",
"0.53391755",
"0.53379244",
"0.53320247",
"0.53147674",
"0.530403",
"0.53037983",
"0.5298902",
"0.52839935",
"0.528042",
"0.5277169",
"0.527036",
"0.5246548",
"0.5239426",
"0.5235828",
"0.5234236",
"0.52340096",
"0.5230277"
]
| 0.0 | -1 |
ESCRIBIR OAIPMH CON METADATA EN DUBLIN CORE EN CASO DE SER UN GETRECORD O LISTRECORDS | public void escribirOAIPMH_DC(OAIPMHAgrega oaipmh, Writer writer) throws ParseadorException {
try {
Marshaller marshaller = new Marshaller(writer);
marshaller.setEncoding(getProperty("default.encoding"));
marshaller.setNamespaceMapping("oai_dc", "http://www.openarchives.org/OAI/2.0/oai_dc/");
marshaller.setNamespaceMapping("dc", "http://purl.org/dc/elements/1.1/");
marshaller.setSchemaLocation("http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd " +
"http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd");
marshaller.setSuppressXSIType(true);
marshaller.setEncoding(getProperty("default.encoding"));
marshaller.setValidation(false);
marshaller.marshal(oaipmh.getOaipmh());
} catch (MarshalException e) {
throw new ParseadorException(
"Error de parseo al escribir el oaipmh", e);
} catch (ValidationException e) {
throw new ValidacionException(
"Error de validacion al escribir el oaipmh", e);
} catch (IOException e) {
throw new ParseadorException(
"No se pudo abrir el fichero oaipmh para su escritura", e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n public MapList getConnectedPCMDataForSLC(Context context, String[] args) throws Exception {\n\n try {\n Map programMap = (Map) JPO.unpackArgs(args);\n\n String objectId = (String) programMap.get(\"objectId\");\n String strType = (String) programMap.get(\"fromCommand\");\n\n DomainObject domainObj = DomainObject.newInstance(context, objectId);\n StringList slObjSelectStmts = getULSRelationshipConstants();\n\n StringList slSelectRelStmts = new StringList(1);\n slSelectRelStmts.addElement(DomainConstants.SELECT_RELATIONSHIP_ID);\n\n Pattern relationshipPatternForPCMData = new Pattern(TigerConstants.RELATIONSHIP_PSS_CONNECTEDPCMDATA);\n Pattern relationshipPatternForSubProgramProjects = new Pattern(TigerConstants.RELATIONSHIP_PSS_SUBPROGRAMPROJECT);\n\n String strRelPattern = relationshipPatternForPCMData.getPattern() + \",\" + relationshipPatternForSubProgramProjects.getPattern();\n\n Pattern typePatternForPCMData = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n Pattern typePatternForSubProgramProjects = new Pattern(TigerConstants.TYPE_PSS_PROGRAMPROJECT);\n\n String strTypePattern = typePatternForPCMData.getPattern() + \",\" + typePatternForSubProgramProjects.getPattern();\n MapList mlPCMDataList = new MapList();\n if (strType.equals(\"CR\")) {\n Pattern typePostPattern = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n\n MapList mlList = domainObj.getRelatedObjects(context, strRelPattern, // relationship pattern\n strTypePattern, // object pattern\n slObjSelectStmts, // object selects\n slSelectRelStmts, // relationship selects\n false, // to direction\n true, // from direction\n (short) 0, // recursion level\n null, // object where clause\n null, (short) 0, false, // checkHidden\n true, // preventDuplicates\n (short) 1000, // pageSize\n typePostPattern, null, null, null, null);\n\n Iterator i = mlList.iterator();\n StringList slUniqueId = new StringList();\n\n while (i.hasNext()) {\n Map mTempMap = (Map) i.next();\n mTempMap.put(\"level\", \"1\");\n String strObjId = (String) mTempMap.get(DomainConstants.SELECT_ID);\n if (!slUniqueId.contains(strObjId)) {\n slUniqueId.addElement(strObjId);\n mlPCMDataList.add(mTempMap);\n }\n }\n }\n return mlPCMDataList;\n } catch (Exception e) {\n // TIGTK-5405 - 11-04-2017 - VB - START\n logger.error(\"Error in getConnectedPCMDataForSLC: \", e);\n // TIGTK-5405 - 11-04-2017 - VB - END\n throw e;\n }\n }",
"java.util.List<com.sanqing.sca.message.ProtocolDecode.DataObject> \n getDataObjectList();",
"public Object[] getCbo_ReqCd_Add() throws SQLException, Exception {\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tStringBuffer strQuery = new StringBuffer();\r\n\t\tArrayList<HashMap<String, String>> rtList = new ArrayList<HashMap<String, String>>();\r\n\t\tHashMap<String, String>\t\t\t rst\t\t = null;\r\n\t\tObject[]\t\t rtObj\t\t = null;\r\n\r\n\t\tConnectionContext connectionContext = new ConnectionResource();\r\n\t\ttry {\r\n\t\t\tconn = connectionContext.getConnection();\r\n\r\n\t\t\tstrQuery.setLength(0);\r\n\t\t\tstrQuery.append(\"select cm_micode,cm_codename from cmm0020 \\n\");\r\n\t\t\tstrQuery.append(\" where cm_macode='REQUEST' and cm_micode<'10' \\n\");\r\n\t\t\tstrQuery.append(\" and cm_micode<>'****' and cm_closedt is null \\n\");\r\n\t\t\tstrQuery.append(\" order by cm_micode \\n\");\r\n\t\t pstmt = conn.prepareStatement(strQuery.toString());\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\trst = new HashMap<String,String>();\r\n\t\t\trst.put(\"cm_micode\",\"ALL\");\r\n\t\t\trst.put(\"cm_codename\",\"전체\");\r\n\t\t\trtList.add(rst);\r\n\t\t\trst = null;\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\trst = new HashMap<String,String>();\r\n\t\t\t\trst.put(\"cm_micode\",rs.getString(\"cm_micode\"));\r\n\t\t\t\trst.put(\"cm_codename\",rs.getString(\"cm_codename\"));\r\n\t\t\t\trtList.add(rst);\r\n\t\t\t\trst = null;\r\n\t\t\t}\r\n\r\n\t\t\trs.close();\r\n\t\t\tpstmt.close();\r\n\t\t\tconn.close();\r\n\t\t rs = null;\r\n\t\t pstmt = null;\r\n\t\t conn = null;\r\n\r\n\t\t\trtObj = rtList.toArray();\r\n\t\t\trtList.clear();\r\n\t\t\trtList = null;\r\n\r\n\t\t\treturn rtObj;\r\n\r\n\t\t} catch (SQLException sqlexception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\tsqlexception.printStackTrace();\r\n\t\t\tthrow sqlexception;\r\n\t\t} catch (Exception exception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\texception.printStackTrace();\r\n\t\t\tthrow exception;\r\n\t\t}finally{\r\n\t\t\tif (strQuery != null)\tstrQuery = null;\r\n\t\t\tif (rtObj != null)\trtObj = null;\r\n\t\t\tif (rs != null) try{rs.close();}catch (Exception ex){ex.printStackTrace();}\r\n\t\t\tif (pstmt != null) try{pstmt.close();}catch (Exception ex2){ex2.printStackTrace();}\r\n\t\t\tif (conn != null){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tConnectionResource.release(conn);\r\n\t\t\t\t}catch(Exception ex3){\r\n\t\t\t\t\tex3.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }",
"public RecordSet loadAllProcessingDetail(Record inputRecord);",
"public void getRgnlWklyList(I000091OutputBean item, I000091Bean bean){\r\n\t\t\r\n\t\tString errMsg = PDMessageConsants.M00354.replace(PDConstants.ERROR_MESSAGE_1, PDConstants.EXTRACT_PORCD + \" \"+porCd+ \" \"+item.getOcfRgnCd() + \" \"+item.getOcfByrGrpCd())\r\n\t\t\t\t.replace(PDConstants.ERROR_MESSAGE_2, PDConstants.REGIONAL_WEEKLY_OCF_LIMIT_TRN);\r\n\t\tString alloctnFlg = \"1\";\r\n\t\tif(item.getOcfAutoAllctnFlg() != null && (alloctnFlg).equalsIgnoreCase(item.getOcfAutoAllctnFlg())){\r\n\t\t\tString queryString = \"\";\t\r\n\t\t\t\r\n\t\t\t/** Extract Regional Weekly Ocf based on Pattern flag */\r\n\t\t\tswitch(bean.getPtrnFlg()){\r\n\t\t\t\tcase \"1\":\r\n\t\t\t\t\tqueryString = exctRegnlWklyOcfProcess.getRegnlWklyOcfForPtrn1(item,porCd,ordrTkeBseMnth);\r\n\t\t\t\t\tbreak;\r\n\t\t\r\n\t\t\t\tcase \"2\":\r\n\t\t\t\t\tqueryString = exctRegnlWklyOcfProcess.getRegnlWklyOcfForPtrn2(item,porCd,ordrTkeBseMnth);\r\n\t\t\t\t\tbreak;\r\n\t\t\r\n\t\t\t\tcase \"3\":\r\n\t\t\t\t\tqueryString = exctRegnlWklyOcfProcess.getRegnlWklyOcfForPtrn3(item,porCd,ordrTkeBseMnth);\r\n\t\t\t\t\tbreak;\r\n\t\t\r\n\t\t\t\tcase \"4\":\r\n\t\t\t\t\tqueryString = exctRegnlWklyOcfProcess.getRegnlWklyOcfForPtrn4(item,porCd,ordrTkeBseMnth);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tLOG.error(I000091Constants.errMsg);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\ttry{\r\n\t\t\t\tQuery query = entityManager\r\n\t\t\t\t\t\t.createNativeQuery(queryString);\r\n\t\t\t\t/**ResultSet of Regional Weekly Ocf*/\r\n\t\t\t\tList<Object[]> selectResultSet = query.getResultList();\r\n\t\t\t\t\r\n\t\t\t\tif(selectResultSet != null && !(selectResultSet.isEmpty())){\r\n\t\t\t\t\tisDataExist = true;\r\n\t\t\t\t\tdataLength = dataLength + selectResultSet.size();\r\n\t\t\t\t\tfinalList.addAll(getWklyOcfList(selectResultSet,bean.getByrGrpCd()));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommonutility.setStatus(PDConstants.INTERFACE_UNPROCESSED_STATUS);\r\n\t\t\t\t\tcommonutility.setRemarks(errMsg);\r\n\t\t\t\t\tLOG.error(errMsg);\r\n\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tLOG.error(\"Exception \" +e);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Override\n\tpublic List<PageData> getList(PageData pd) throws Exception {\n\t\tList<PageData> list = new ArrayList<PageData>();\n\t\tList<PageData> allList = new ArrayList<PageData>();\n\t\tList<Integer> qcList = new ArrayList<Integer>();// 校区 去重\n\t\tList<Integer> ssList = new ArrayList<Integer>();// 宿舍楼 去重\n\n\t\tlist = (List<PageData>) dao\n\t\t\t\t.findForList(\"SummaryStatMapper.getList\", pd);\n\n\t\tdouble z_maxchuang = 0.0;\n\t\tdouble z_nansheng = 0.0;\n\t\tdouble z_nvsheng = 0.0;\n\t\tdouble y_maxchuang = 0.0;\n\t\tdouble y_nansheng = 0.0;\n\t\tdouble y_nvsheng = 0.0;\n\t\tdouble k_maxchuang = 0.0;\n\t\tdouble k_nansheng = 0.0;\n\t\tdouble k_nvsheng = 0.0;\n\t\tdouble rzl = 0.0;\n\n\t\tif (list.size() > 0)\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tString str = list.get(i).getString(\"XIAOQU\");\n\t\t\t\tString old_str = \"\";\n\t\t\t\tif (i != list.size() - 1) {\n\t\t\t\t\told_str = list.get(i + 1).getString(\"XIAOQU\");\n\t\t\t\t}\n\n\t\t\t\tz_maxchuang = Tools.add(z_maxchuang, Double.parseDouble(list\n\t\t\t\t\t\t.get(i).getString(\"Z_MAXCHUANG\")));\n\n\t\t\t\tz_nansheng = Tools\n\t\t\t\t\t\t.add(z_nansheng,\n\t\t\t\t\t\t\t\tDouble.parseDouble(list.get(i).getString(\n\t\t\t\t\t\t\t\t\t\t\"Z_NANSHENG\")));\n\t\t\t\tz_nvsheng = Tools.add(z_nvsheng,\n\t\t\t\t\t\tDouble.parseDouble(list.get(i).getString(\"Z_NVSHENG\")));\n\t\t\t\ty_maxchuang = Tools.add(y_maxchuang, Double.parseDouble(list\n\t\t\t\t\t\t.get(i).getString(\"Y_MAXCHUANG\")));\n\t\t\t\ty_nansheng = Tools\n\t\t\t\t\t\t.add(y_nansheng,\n\t\t\t\t\t\t\t\tDouble.parseDouble(list.get(i).getString(\n\t\t\t\t\t\t\t\t\t\t\"Y_NANSHENG\")));\n\t\t\t\ty_nvsheng = Tools.add(y_nvsheng,\n\t\t\t\t\t\tDouble.parseDouble(list.get(i).getString(\"Y_NVSHENG\")));\n\t\t\t\tk_maxchuang = Tools.add(k_maxchuang, Double.parseDouble(list\n\t\t\t\t\t\t.get(i).getString(\"K_MAXCHUANG\")));\n\t\t\t\tk_nansheng = Tools\n\t\t\t\t\t\t.add(k_nansheng,\n\t\t\t\t\t\t\t\tDouble.parseDouble(list.get(i).getString(\n\t\t\t\t\t\t\t\t\t\t\"K_NANSHENG\")));\n\t\t\t\tk_nvsheng = Tools.add(k_nvsheng,\n\t\t\t\t\t\tDouble.parseDouble(list.get(i).getString(\"K_NVSHENG\")));\n\n\t\t\t\tlist.get(i).put(\"RZL\", list.get(i).getString(\"RZL\") + \"%\");\n\t\t\t\tallList.add(list.get(i));\n\t\t\t\tif (!str.equals(old_str)) {\n\t\t\t\t\tPageData row = new PageData();\n\n\t\t\t\t\trow.put(\"hj_style\", \"bg-warning\");\n\t\t\t\t\trow.put(\"XIAOQU\", \"\");\n\t\t\t\t\trow.put(\"LOU\", \"合计\");\n\t\t\t\t\trow.put(\"CENG\", \"\");\n\t\t\t\t\trow.put(\"Z_MAXCHUANG\", (int) z_maxchuang);\n\t\t\t\t\trow.put(\"Z_NANSHENG\", (int) z_nansheng);\n\t\t\t\t\trow.put(\"Z_NVSHENG\", (int) z_nvsheng);\n\t\t\t\t\trow.put(\"Y_MAXCHUANG\", (int) y_maxchuang);\n\t\t\t\t\trow.put(\"Y_NANSHENG\", (int) y_nansheng);\n\t\t\t\t\trow.put(\"Y_NVSHENG\", (int) y_nvsheng);\n\t\t\t\t\trow.put(\"K_MAXCHUANG\", (int) k_maxchuang);\n\t\t\t\t\trow.put(\"K_NANSHENG\", (int) k_nansheng);\n\t\t\t\t\trow.put(\"K_NVSHENG\", (int) k_nvsheng);\n\t\t\t\t\trzl = y_maxchuang / z_maxchuang * 100;// 合计入住人数统计:已住人数/总人数\n\t\t\t\t\tBigDecimal bg = new BigDecimal(rzl).setScale(2,\n\t\t\t\t\t\t\tBigDecimal.ROUND_HALF_UP);\n\t\t\t\t\trzl = bg.doubleValue();\n\n\t\t\t\t\trow.put(\"RZL\", rzl == 0.0 ? 0 + \"%\" : rzl + \"%\");\n\n\t\t\t\t\tz_maxchuang = 0.0;\n\t\t\t\t\tz_nansheng = 0.0;\n\t\t\t\t\tz_nvsheng = 0.0;\n\t\t\t\t\ty_maxchuang = 0.0;\n\t\t\t\t\ty_nansheng = 0.0;\n\t\t\t\t\ty_nvsheng = 0.0;\n\t\t\t\t\tk_maxchuang = 0.0;\n\t\t\t\t\tk_nansheng = 0.0;\n\t\t\t\t\tk_nvsheng = 0.0;\n\t\t\t\t\trzl = 0.0;\n\t\t\t\t\tallList.add(row);\n\t\t\t\t}\n\t\t\t}\n\n\t\tfor (int i = 0; i < allList.size(); i++) {\n\t\t\tString str = allList.get(i).getString(\"XIAOQU\");\n\t\t\tString strs = \"\";\n\t\t\tString ss = allList.get(i).getString(\"LOU\");\n\t\t\tString ssu = \"\";\n\t\t\tif (i > 0) {\n\t\t\t\tstrs = allList.get(i - 1).getString(\"XIAOQU\");\n\t\t\t\tssu = allList.get(i - 1).getString(\"LOU\");\n\t\t\t}\n\t\t\tif (str.equals(strs)) {\n\t\t\t\tqcList.add(i);\n\t\t\t}\n\t\t\tif (ss.equals(ssu)) {\n\t\t\t\tssList.add(i);\n\t\t\t}\n\t\t}\n\n\t\tfor (Integer in : qcList) {\n\t\t\tallList.get(in).put(\"XIAOQU\", \"\");\n\t\t}\n\t\tfor (Integer in : ssList) {\n\t\t\tallList.get(in).put(\"LOU\", \"\");\n\t\t}\n\t\treturn allList;\n\t}",
"public FSReturnVals ReadNextRecord(FileHandle ofh, RID pivot, TinyRec rec)\n {\n FSReturnVals outcome = FSReturnVals.Fail;\n // should set ip address, port number\n Vector<IP> servers = ofh.getServersForChunk(pivot.getChunkHandle());\n int numServers = servers.size();\n if (ofh == null)\n {\n return FSReturnVals.BadHandle;\n }\n if (rec == null)\n {\n return FSReturnVals.RecDoesNotExist;\n }\n for(int i = 0; i < numServers; i++)\n {\n IP ip = new IP();\n ip.setPort(servers.elementAt(i).getPort());\n ip.setAddress(servers.elementAt(i).getAddress());\n try\n {\n Socket sock = new Socket(ip.getAddress(), ip.getPort());\n ObjectOutputStream serverOutput = new ObjectOutputStream(sock.getOutputStream());\n serverOutput.flush();\n ObjectInputStream serverInput = new ObjectInputStream(sock.getInputStream());\n serverOutput.writeInt(Constants.IsClient);\n \n serverOutput.writeInt(Constants.READ_NEXT_RECORD);\n serverOutput.writeInt(pivot.getChunkHandle().length());\n serverOutput.writeBytes(pivot.getChunkHandle());\n serverOutput.flush();\n serverOutput.writeInt(pivot.index);\n \n int response = serverInput.readInt();\n if (response == Constants.FALSE)\n {\n i--;\n continue;\n }\n else if (response == Constants.NOT_IN_CHUNK)\n {\n i--;\n continue;\n }\n \n //int type = serverOutput.readInt();\n //int command = serverOutput.readInt();\n //if(type == Constants.IsServer && command = Constants.READ_NEXT_RECORD)\n //{\n int sz = serverInput.readInt();\n byte[] data = new byte[sz];\n serverInput.read(data, 0, sz);\n String datastr = new String(data, \"UTF-8\");\n if(data.length > 0)\n {\n int j = serverInput.readInt();\n outcome = intToFSReturnVal(j);\n rec.setPayload(data);\n break;\n }\n else\n {\n i--;\n continue;\n }\n //}\n //else\n //{\n // int j = serverInput.readInt();\n // outcome = intToFSReturnVal(j)\n //}\n \n }\n catch (Exception e)\n {\n outcome = FSReturnVals.Fail;\n System.out.println(\"Unable to append records (ClientREC:65)\");\n }\n }\n \n return outcome;\n }",
"@Override\n public Optional<UniqueRecordList> readRecordList() throws DataConversionException, IOException {\n return readRecordList(recordListFilePath);\n }",
"RecordSet loadAllLayerDetail(Record inputRecord);",
"@SuppressWarnings(\"rawtypes\")\n public MapList getAllCRs(Context context, String[] args) throws Exception {\n long lStartTime = System.nanoTime();\n Pattern relationship_pattern = new Pattern(TigerConstants.RELATIONSHIP_PSS_SUBPROGRAMPROJECT);\n relationship_pattern.addPattern(TigerConstants.RELATIONSHIP_PSS_CONNECTEDPCMDATA);\n\n Pattern type_pattern = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n type_pattern.addPattern(TigerConstants.TYPE_PSS_PROGRAMPROJECT);\n\n Pattern finalType = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n try {\n StringList slselectObjStmts = getSLCTableSelectables(context);\n Map programMap = (Map) JPO.unpackArgs(args);\n String objectId = (String) programMap.get(\"objectId\");\n String strProgProj = (String) programMap.get(\"parentOID\");\n // TIGTK-16801 : 29-08-2018 : START\n boolean bAdminOrPMCMEditAllow = isAdminOrPMCMofRelatedPP(context, strProgProj);\n // TIGTK-16801 : 29-08-2018 : END\n\n BusinessObject busObj = new BusinessObject(objectId);\n\n // TIGTK-13922 START\n MapList mapList = FrameworkUtil.toMapList(busObj.getExpansionIterator(context, relationship_pattern.getPattern(), type_pattern.getPattern(), slselectObjStmts, new StringList(), false,\n true, (short) 0, null, null, (short) 0, false, true, (short) 100, false), (short) 0, finalType, null, null, null);\n // TIGTK-13922 END\n // TIGTK_3961:Sort CR data according to CR state :23/1/2017:Rutuja Ekatpure:Start\n // sort maplist according to CR state\n if (mapList.size() > 0) {\n MapList mlReturn = sortCRListByState(context, mapList);\n long lEndTime = System.nanoTime();\n long output = lEndTime - lStartTime;\n\n logger.debug(\"Total Execution time to Get all CRs in milliseconds: \" + output / 1000000);\n // PCM2.0 Spr4:TIGTK-6894:19/9/2017:START\n\n Iterator<Map<String, String>> itrCR = mlReturn.iterator();\n\n while (itrCR.hasNext()) {\n Map tempMap = itrCR.next();\n String strCRId = (String) tempMap.get(DomainConstants.SELECT_ID);\n MapList mlIA = getImpactAnalysis(context, strCRId);\n\n String strIAId = \"\";\n if (!mlIA.isEmpty()) {\n Map mpIA = (Map) mlIA.get(0);\n strIAId = (String) mpIA.get(DomainConstants.SELECT_ID);\n }\n tempMap.put(\"LatestRevIAObjectId\", strIAId);\n // TIGTK-16801 : 29-08-2018 : START\n tempMap.put(\"bAdminOrPMCMEditAllow\", bAdminOrPMCMEditAllow);\n // TIGTK-16801 : 29-08-2018 : END\n }\n // PCM2.0 Spr4:TIGTK-6894:19/9/2017:END\n return mlReturn;\n } else {\n return mapList;\n }\n // TIGTK_3961:Sort CR data according to CR state :23/1/2017:Rutuja Ekatpure:\n } catch (Exception ex) {\n logger.error(\"Error in getAllCRs: \", ex);\n throw ex;\n }\n\n }",
"@SuppressWarnings(\"all\")\npublic interface I_LBR_DocLine_ICMS \n{\n\n /** TableName=LBR_DocLine_ICMS */\n public static final String Table_Name = \"LBR_DocLine_ICMS\";\n\n /** AD_Table_ID=1000027 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsTaxIncluded */\n public static final String COLUMNNAME_IsTaxIncluded = \"IsTaxIncluded\";\n\n\t/** Set Price includes Tax.\n\t * Tax is included in the price \n\t */\n\tpublic void setIsTaxIncluded (boolean IsTaxIncluded);\n\n\t/** Get Price includes Tax.\n\t * Tax is included in the price \n\t */\n\tpublic boolean isTaxIncluded();\n\n /** Column name LBR_CEST_ID */\n public static final String COLUMNNAME_LBR_CEST_ID = \"LBR_CEST_ID\";\n\n\t/** Set CEST\t */\n\tpublic void setLBR_CEST_ID (int LBR_CEST_ID);\n\n\t/** Get CEST\t */\n\tpublic int getLBR_CEST_ID();\n\n\tpublic I_LBR_CEST getLBR_CEST() throws RuntimeException;\n\n /** Column name LBR_DIFAL_RateICMSInterPart */\n public static final String COLUMNNAME_LBR_DIFAL_RateICMSInterPart = \"LBR_DIFAL_RateICMSInterPart\";\n\n\t/** Set DIFAL Share Rate (%)\t */\n\tpublic void setLBR_DIFAL_RateICMSInterPart (BigDecimal LBR_DIFAL_RateICMSInterPart);\n\n\t/** Get DIFAL Share Rate (%)\t */\n\tpublic BigDecimal getLBR_DIFAL_RateICMSInterPart();\n\n /** Column name LBR_DIFAL_TaxAmtFCPUFDest */\n public static final String COLUMNNAME_LBR_DIFAL_TaxAmtFCPUFDest = \"LBR_DIFAL_TaxAmtFCPUFDest\";\n\n\t/** Set DIFAL Tax Amt of \"Fundo de Combate a Pobreza\"\t */\n\tpublic void setLBR_DIFAL_TaxAmtFCPUFDest (BigDecimal LBR_DIFAL_TaxAmtFCPUFDest);\n\n\t/** Get DIFAL Tax Amt of \"Fundo de Combate a Pobreza\"\t */\n\tpublic BigDecimal getLBR_DIFAL_TaxAmtFCPUFDest();\n\n /** Column name LBR_DIFAL_TaxAmtICMSUFDest */\n public static final String COLUMNNAME_LBR_DIFAL_TaxAmtICMSUFDest = \"LBR_DIFAL_TaxAmtICMSUFDest\";\n\n\t/** Set DIFAL Tax Amt in Receiver UF\t */\n\tpublic void setLBR_DIFAL_TaxAmtICMSUFDest (BigDecimal LBR_DIFAL_TaxAmtICMSUFDest);\n\n\t/** Get DIFAL Tax Amt in Receiver UF\t */\n\tpublic BigDecimal getLBR_DIFAL_TaxAmtICMSUFDest();\n\n /** Column name LBR_DIFAL_TaxAmtICMSUFRemet */\n public static final String COLUMNNAME_LBR_DIFAL_TaxAmtICMSUFRemet = \"LBR_DIFAL_TaxAmtICMSUFRemet\";\n\n\t/** Set DIFAL Tax Amt in Sender UF\t */\n\tpublic void setLBR_DIFAL_TaxAmtICMSUFRemet (BigDecimal LBR_DIFAL_TaxAmtICMSUFRemet);\n\n\t/** Get DIFAL Tax Amt in Sender UF\t */\n\tpublic BigDecimal getLBR_DIFAL_TaxAmtICMSUFRemet();\n\n /** Column name LBR_DIFAL_TaxBaseFCPUFDest */\n public static final String COLUMNNAME_LBR_DIFAL_TaxBaseFCPUFDest = \"LBR_DIFAL_TaxBaseFCPUFDest\";\n\n\t/** Set DIFAL Tax Base Amt of \"Fundo de Combate a Pobreza\"\t */\n\tpublic void setLBR_DIFAL_TaxBaseFCPUFDest (BigDecimal LBR_DIFAL_TaxBaseFCPUFDest);\n\n\t/** Get DIFAL Tax Base Amt of \"Fundo de Combate a Pobreza\"\t */\n\tpublic BigDecimal getLBR_DIFAL_TaxBaseFCPUFDest();\n\n /** Column name LBR_DIFAL_TaxRateFCPUFDest */\n public static final String COLUMNNAME_LBR_DIFAL_TaxRateFCPUFDest = \"LBR_DIFAL_TaxRateFCPUFDest\";\n\n\t/** Set DIFAL Tax Rate of \"Fundo de Combate a Pobreza\"\t */\n\tpublic void setLBR_DIFAL_TaxRateFCPUFDest (BigDecimal LBR_DIFAL_TaxRateFCPUFDest);\n\n\t/** Get DIFAL Tax Rate of \"Fundo de Combate a Pobreza\"\t */\n\tpublic BigDecimal getLBR_DIFAL_TaxRateFCPUFDest();\n\n /** Column name LBR_DIFAL_TaxRateICMSUFDest */\n public static final String COLUMNNAME_LBR_DIFAL_TaxRateICMSUFDest = \"LBR_DIFAL_TaxRateICMSUFDest\";\n\n\t/** Set DIFAL Internal Tax Rate in Receiver UF\t */\n\tpublic void setLBR_DIFAL_TaxRateICMSUFDest (BigDecimal LBR_DIFAL_TaxRateICMSUFDest);\n\n\t/** Get DIFAL Internal Tax Rate in Receiver UF\t */\n\tpublic BigDecimal getLBR_DIFAL_TaxRateICMSUFDest();\n\n /** Column name LBR_DocLine_Details_ID */\n public static final String COLUMNNAME_LBR_DocLine_Details_ID = \"LBR_DocLine_Details_ID\";\n\n\t/** Set Doc Line Details.\n\t * Doc Line Details\n\t */\n\tpublic void setLBR_DocLine_Details_ID (int LBR_DocLine_Details_ID);\n\n\t/** Get Doc Line Details.\n\t * Doc Line Details\n\t */\n\tpublic int getLBR_DocLine_Details_ID();\n\n\tpublic I_LBR_DocLine_Details getLBR_DocLine_Details() throws RuntimeException;\n\n /** Column name LBR_DocLine_ICMS_ID */\n public static final String COLUMNNAME_LBR_DocLine_ICMS_ID = \"LBR_DocLine_ICMS_ID\";\n\n\t/** Set Doc Line ICMS.\n\t * Doc Line ICMS\n\t */\n\tpublic void setLBR_DocLine_ICMS_ID (int LBR_DocLine_ICMS_ID);\n\n\t/** Get Doc Line ICMS.\n\t * Doc Line ICMS\n\t */\n\tpublic int getLBR_DocLine_ICMS_ID();\n\n /** Column name LBR_DocLine_ICMS_UU */\n public static final String COLUMNNAME_LBR_DocLine_ICMS_UU = \"LBR_DocLine_ICMS_UU\";\n\n\t/** Set Doc Line ICMS.\n\t * Doc Line ICMS\n\t */\n\tpublic void setLBR_DocLine_ICMS_UU (String LBR_DocLine_ICMS_UU);\n\n\t/** Get Doc Line ICMS.\n\t * Doc Line ICMS\n\t */\n\tpublic String getLBR_DocLine_ICMS_UU();\n\n /** Column name LBR_ICMS_OwnTaxStatus */\n public static final String COLUMNNAME_LBR_ICMS_OwnTaxStatus = \"LBR_ICMS_OwnTaxStatus\";\n\n\t/** Set Declarant ICMS Tax Status.\n\t * ICMS tax status from the point of view of the declarant\n\t */\n\tpublic void setLBR_ICMS_OwnTaxStatus (String LBR_ICMS_OwnTaxStatus);\n\n\t/** Get Declarant ICMS Tax Status.\n\t * ICMS tax status from the point of view of the declarant\n\t */\n\tpublic String getLBR_ICMS_OwnTaxStatus();\n\n /** Column name LBR_ICMS_TaxAmtOp */\n public static final String COLUMNNAME_LBR_ICMS_TaxAmtOp = \"LBR_ICMS_TaxAmtOp\";\n\n\t/** Set ICMS Tax Operation Amount.\n\t * Identifies the ICMS Tax Operation Amount\n\t */\n\tpublic void setLBR_ICMS_TaxAmtOp (BigDecimal LBR_ICMS_TaxAmtOp);\n\n\t/** Get ICMS Tax Operation Amount.\n\t * Identifies the ICMS Tax Operation Amount\n\t */\n\tpublic BigDecimal getLBR_ICMS_TaxAmtOp();\n\n /** Column name LBR_ICMS_TaxBaseType */\n public static final String COLUMNNAME_LBR_ICMS_TaxBaseType = \"LBR_ICMS_TaxBaseType\";\n\n\t/** Set ICMS Tax Base Type.\n\t * Identifies a ICMS Tax Base Type\n\t */\n\tpublic void setLBR_ICMS_TaxBaseType (String LBR_ICMS_TaxBaseType);\n\n\t/** Get ICMS Tax Base Type.\n\t * Identifies a ICMS Tax Base Type\n\t */\n\tpublic String getLBR_ICMS_TaxBaseType();\n\n /** Column name LBR_ICMS_TaxReliefType */\n public static final String COLUMNNAME_LBR_ICMS_TaxReliefType = \"LBR_ICMS_TaxReliefType\";\n\n\t/** Set ICMS Tax Relief Type.\n\t * Identifies the ICMS Tax Relief Type\n\t */\n\tpublic void setLBR_ICMS_TaxReliefType (String LBR_ICMS_TaxReliefType);\n\n\t/** Get ICMS Tax Relief Type.\n\t * Identifies the ICMS Tax Relief Type\n\t */\n\tpublic String getLBR_ICMS_TaxReliefType();\n\n /** Column name LBR_ICMS_TaxStatusSN */\n public static final String COLUMNNAME_LBR_ICMS_TaxStatusSN = \"LBR_ICMS_TaxStatusSN\";\n\n\t/** Set ICMS Tax Status (Simple).\n\t * Identifies a ICMS Tax Status in a simple taxation\n\t */\n\tpublic void setLBR_ICMS_TaxStatusSN (String LBR_ICMS_TaxStatusSN);\n\n\t/** Get ICMS Tax Status (Simple).\n\t * Identifies a ICMS Tax Status in a simple taxation\n\t */\n\tpublic String getLBR_ICMS_TaxStatusSN();\n\n /** Column name LBR_ICMS_TaxStatusTN */\n public static final String COLUMNNAME_LBR_ICMS_TaxStatusTN = \"LBR_ICMS_TaxStatusTN\";\n\n\t/** Set ICMS Tax Status (Standard Taxation).\n\t * Identifies a ICMS Tax Status in a standard taxation\n\t */\n\tpublic void setLBR_ICMS_TaxStatusTN (String LBR_ICMS_TaxStatusTN);\n\n\t/** Get ICMS Tax Status (Standard Taxation).\n\t * Identifies a ICMS Tax Status in a standard taxation\n\t */\n\tpublic String getLBR_ICMS_TaxStatusTN();\n\n /** Column name LBR_ICMSRegime */\n public static final String COLUMNNAME_LBR_ICMSRegime = \"LBR_ICMSRegime\";\n\n\t/** Set ICMS Regime.\n\t * Identifies a ICMS Regime for taxes\n\t */\n\tpublic void setLBR_ICMSRegime (String LBR_ICMSRegime);\n\n\t/** Get ICMS Regime.\n\t * Identifies a ICMS Regime for taxes\n\t */\n\tpublic String getLBR_ICMSRegime();\n\n /** Column name LBR_ICMSST_IsTaxIncluded */\n public static final String COLUMNNAME_LBR_ICMSST_IsTaxIncluded = \"LBR_ICMSST_IsTaxIncluded\";\n\n\t/** Set Price includes Tax.\n\t * Tax is included in the price \n\t */\n\tpublic void setLBR_ICMSST_IsTaxIncluded (boolean LBR_ICMSST_IsTaxIncluded);\n\n\t/** Get Price includes Tax.\n\t * Tax is included in the price \n\t */\n\tpublic boolean isLBR_ICMSST_IsTaxIncluded();\n\n /** Column name LBR_ICMSST_TaxAdded */\n public static final String COLUMNNAME_LBR_ICMSST_TaxAdded = \"LBR_ICMSST_TaxAdded\";\n\n\t/** Set ICMS-ST Added Amount Margin (%).\n\t * Identifies the ICMS-ST Added Amount Margin in percentage\n\t */\n\tpublic void setLBR_ICMSST_TaxAdded (BigDecimal LBR_ICMSST_TaxAdded);\n\n\t/** Get ICMS-ST Added Amount Margin (%).\n\t * Identifies the ICMS-ST Added Amount Margin in percentage\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxAdded();\n\n /** Column name LBR_ICMSST_TaxAmt */\n public static final String COLUMNNAME_LBR_ICMSST_TaxAmt = \"LBR_ICMSST_TaxAmt\";\n\n\t/** Set ICMS-ST Tax Amount.\n\t * Defines the ICMS-ST Tax Amount\n\t */\n\tpublic void setLBR_ICMSST_TaxAmt (BigDecimal LBR_ICMSST_TaxAmt);\n\n\t/** Get ICMS-ST Tax Amount.\n\t * Defines the ICMS-ST Tax Amount\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxAmt();\n\n /** Column name LBR_ICMSST_TaxAmtUFDes */\n public static final String COLUMNNAME_LBR_ICMSST_TaxAmtUFDes = \"LBR_ICMSST_TaxAmtUFDes\";\n\n\t/** Set ICMS-ST Amount in Receiver UF.\n\t * Identifies the ICMS-ST Amount in Receiver UF\n\t */\n\tpublic void setLBR_ICMSST_TaxAmtUFDes (BigDecimal LBR_ICMSST_TaxAmtUFDes);\n\n\t/** Get ICMS-ST Amount in Receiver UF.\n\t * Identifies the ICMS-ST Amount in Receiver UF\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxAmtUFDes();\n\n /** Column name LBR_ICMSST_TaxAmtUFSen */\n public static final String COLUMNNAME_LBR_ICMSST_TaxAmtUFSen = \"LBR_ICMSST_TaxAmtUFSen\";\n\n\t/** Set ICMS-ST Amount withheld in Sender UF.\n\t * Identifies the ICMS-ST Amount withheld in Sender UF\n\t */\n\tpublic void setLBR_ICMSST_TaxAmtUFSen (BigDecimal LBR_ICMSST_TaxAmtUFSen);\n\n\t/** Get ICMS-ST Amount withheld in Sender UF.\n\t * Identifies the ICMS-ST Amount withheld in Sender UF\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxAmtUFSen();\n\n /** Column name LBR_ICMSST_TaxAmtWhd */\n public static final String COLUMNNAME_LBR_ICMSST_TaxAmtWhd = \"LBR_ICMSST_TaxAmtWhd\";\n\n\t/** Set ICMS-ST Withheld Amount.\n\t * Identifies the ICMS-ST Withheld Amount\n\t */\n\tpublic void setLBR_ICMSST_TaxAmtWhd (BigDecimal LBR_ICMSST_TaxAmtWhd);\n\n\t/** Get ICMS-ST Withheld Amount.\n\t * Identifies the ICMS-ST Withheld Amount\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxAmtWhd();\n\n /** Column name LBR_ICMSST_TaxBAmtUFDes */\n public static final String COLUMNNAME_LBR_ICMSST_TaxBAmtUFDes = \"LBR_ICMSST_TaxBAmtUFDes\";\n\n\t/** Set ICMS-ST Base Amount in Receiver UF.\n\t * Identifies the ICMS-ST Base Amount in Receiver UF\n\t */\n\tpublic void setLBR_ICMSST_TaxBAmtUFDes (BigDecimal LBR_ICMSST_TaxBAmtUFDes);\n\n\t/** Get ICMS-ST Base Amount in Receiver UF.\n\t * Identifies the ICMS-ST Base Amount in Receiver UF\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxBAmtUFDes();\n\n /** Column name LBR_ICMSST_TaxBAmtUFSen */\n public static final String COLUMNNAME_LBR_ICMSST_TaxBAmtUFSen = \"LBR_ICMSST_TaxBAmtUFSen\";\n\n\t/** Set ICMS-ST Base Amount withheld in Sender UF.\n\t * Identifies the ICMS-ST Base Amount withheld in Sender UF\n\t */\n\tpublic void setLBR_ICMSST_TaxBAmtUFSen (BigDecimal LBR_ICMSST_TaxBAmtUFSen);\n\n\t/** Get ICMS-ST Base Amount withheld in Sender UF.\n\t * Identifies the ICMS-ST Base Amount withheld in Sender UF\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxBAmtUFSen();\n\n /** Column name LBR_ICMSST_TaxBAmtWhd */\n public static final String COLUMNNAME_LBR_ICMSST_TaxBAmtWhd = \"LBR_ICMSST_TaxBAmtWhd\";\n\n\t/** Set ICMS-ST Withheld Base Amount.\n\t * Identifies the ICMS-ST Withheld Base Amount\n\t */\n\tpublic void setLBR_ICMSST_TaxBAmtWhd (BigDecimal LBR_ICMSST_TaxBAmtWhd);\n\n\t/** Get ICMS-ST Withheld Base Amount.\n\t * Identifies the ICMS-ST Withheld Base Amount\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxBAmtWhd();\n\n /** Column name LBR_ICMSST_TaxBase */\n public static final String COLUMNNAME_LBR_ICMSST_TaxBase = \"LBR_ICMSST_TaxBase\";\n\n\t/** Set ICMS-ST Tax Base.\n\t * Indicates the ICMS-ST Tax Base\n\t */\n\tpublic void setLBR_ICMSST_TaxBase (BigDecimal LBR_ICMSST_TaxBase);\n\n\t/** Get ICMS-ST Tax Base.\n\t * Indicates the ICMS-ST Tax Base\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxBase();\n\n /** Column name LBR_ICMSST_TaxBaseAmt */\n public static final String COLUMNNAME_LBR_ICMSST_TaxBaseAmt = \"LBR_ICMSST_TaxBaseAmt\";\n\n\t/** Set ICMS-ST Tax Base Amount.\n\t * Defines the ICMS-ST Tax Base Amount\n\t */\n\tpublic void setLBR_ICMSST_TaxBaseAmt (BigDecimal LBR_ICMSST_TaxBaseAmt);\n\n\t/** Get ICMS-ST Tax Base Amount.\n\t * Defines the ICMS-ST Tax Base Amount\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxBaseAmt();\n\n /** Column name LBR_ICMSST_TaxBaseType */\n public static final String COLUMNNAME_LBR_ICMSST_TaxBaseType = \"LBR_ICMSST_TaxBaseType\";\n\n\t/** Set ICMS-ST Tax Base Type.\n\t * Identifies a ICMS-ST Tax Base Type\n\t */\n\tpublic void setLBR_ICMSST_TaxBaseType (String LBR_ICMSST_TaxBaseType);\n\n\t/** Get ICMS-ST Tax Base Type.\n\t * Identifies a ICMS-ST Tax Base Type\n\t */\n\tpublic String getLBR_ICMSST_TaxBaseType();\n\n /** Column name LBR_ICMSST_TaxRate */\n public static final String COLUMNNAME_LBR_ICMSST_TaxRate = \"LBR_ICMSST_TaxRate\";\n\n\t/** Set ICMS-ST Tax Rate.\n\t * Indicates the ICMS-ST Tax Rate\n\t */\n\tpublic void setLBR_ICMSST_TaxRate (BigDecimal LBR_ICMSST_TaxRate);\n\n\t/** Get ICMS-ST Tax Rate.\n\t * Indicates the ICMS-ST Tax Rate\n\t */\n\tpublic BigDecimal getLBR_ICMSST_TaxRate();\n\n /** Column name LBR_ICMSST_TaxUFDue_ID */\n public static final String COLUMNNAME_LBR_ICMSST_TaxUFDue_ID = \"LBR_ICMSST_TaxUFDue_ID\";\n\n\t/** Set ICMS-ST UF Due.\n\t * Identifies the ICMS-ST UF Due\n\t */\n\tpublic void setLBR_ICMSST_TaxUFDue_ID (int LBR_ICMSST_TaxUFDue_ID);\n\n\t/** Get ICMS-ST UF Due.\n\t * Identifies the ICMS-ST UF Due\n\t */\n\tpublic int getLBR_ICMSST_TaxUFDue_ID();\n\n\tpublic org.compiere.model.I_C_Region getLBR_ICMSST_TaxUFDue() throws RuntimeException;\n\n /** Column name LBR_ProductSource */\n public static final String COLUMNNAME_LBR_ProductSource = \"LBR_ProductSource\";\n\n\t/** Set Product Source.\n\t * Identifies a Product Source\n\t */\n\tpublic void setLBR_ProductSource (String LBR_ProductSource);\n\n\t/** Get Product Source.\n\t * Identifies a Product Source\n\t */\n\tpublic String getLBR_ProductSource();\n\n /** Column name LBR_TaxAmt */\n public static final String COLUMNNAME_LBR_TaxAmt = \"LBR_TaxAmt\";\n\n\t/** Set Tax Amount.\n\t * Defines the Tax Amount\n\t */\n\tpublic void setLBR_TaxAmt (BigDecimal LBR_TaxAmt);\n\n\t/** Get Tax Amount.\n\t * Defines the Tax Amount\n\t */\n\tpublic BigDecimal getLBR_TaxAmt();\n\n /** Column name LBR_TaxAmtCredit */\n public static final String COLUMNNAME_LBR_TaxAmtCredit = \"LBR_TaxAmtCredit\";\n\n\t/** Set Tax Amount Credit.\n\t * Identifies the Tax Amount Credit\n\t */\n\tpublic void setLBR_TaxAmtCredit (BigDecimal LBR_TaxAmtCredit);\n\n\t/** Get Tax Amount Credit.\n\t * Identifies the Tax Amount Credit\n\t */\n\tpublic BigDecimal getLBR_TaxAmtCredit();\n\n /** Column name LBR_TaxBase */\n public static final String COLUMNNAME_LBR_TaxBase = \"LBR_TaxBase\";\n\n\t/** Set Tax Base.\n\t * Indicates the Tax Base\n\t */\n\tpublic void setLBR_TaxBase (BigDecimal LBR_TaxBase);\n\n\t/** Get Tax Base.\n\t * Indicates the Tax Base\n\t */\n\tpublic BigDecimal getLBR_TaxBase();\n\n /** Column name LBR_TaxBaseAmt */\n public static final String COLUMNNAME_LBR_TaxBaseAmt = \"LBR_TaxBaseAmt\";\n\n\t/** Set Tax Base Amount.\n\t * Defines the Tax Base Amount\n\t */\n\tpublic void setLBR_TaxBaseAmt (BigDecimal LBR_TaxBaseAmt);\n\n\t/** Get Tax Base Amount.\n\t * Defines the Tax Base Amount\n\t */\n\tpublic BigDecimal getLBR_TaxBaseAmt();\n\n /** Column name LBR_TaxBaseOwnOperation */\n public static final String COLUMNNAME_LBR_TaxBaseOwnOperation = \"LBR_TaxBaseOwnOperation\";\n\n\t/** Set Tax Base Own Operation (%).\n\t * Identifies the Tax Base Own Operation in percentage\n\t */\n\tpublic void setLBR_TaxBaseOwnOperation (BigDecimal LBR_TaxBaseOwnOperation);\n\n\t/** Get Tax Base Own Operation (%).\n\t * Identifies the Tax Base Own Operation in percentage\n\t */\n\tpublic BigDecimal getLBR_TaxBaseOwnOperation();\n\n /** Column name LBR_TaxDeferralAmt */\n public static final String COLUMNNAME_LBR_TaxDeferralAmt = \"LBR_TaxDeferralAmt\";\n\n\t/** Set Tax Deferral Amount.\n\t * Identifies the Tax Deferral Amount\n\t */\n\tpublic void setLBR_TaxDeferralAmt (BigDecimal LBR_TaxDeferralAmt);\n\n\t/** Get Tax Deferral Amount.\n\t * Identifies the Tax Deferral Amount\n\t */\n\tpublic BigDecimal getLBR_TaxDeferralAmt();\n\n /** Column name LBR_TaxDeferralRate */\n public static final String COLUMNNAME_LBR_TaxDeferralRate = \"LBR_TaxDeferralRate\";\n\n\t/** Set Tax Deferral Rate (%).\n\t * Identifies the Tax Deferral Rate (%)\n\t */\n\tpublic void setLBR_TaxDeferralRate (BigDecimal LBR_TaxDeferralRate);\n\n\t/** Get Tax Deferral Rate (%).\n\t * Identifies the Tax Deferral Rate (%)\n\t */\n\tpublic BigDecimal getLBR_TaxDeferralRate();\n\n /** Column name LBR_TaxRate */\n public static final String COLUMNNAME_LBR_TaxRate = \"LBR_TaxRate\";\n\n\t/** Set Tax Rate.\n\t * Indicates the Tax Rate\n\t */\n\tpublic void setLBR_TaxRate (BigDecimal LBR_TaxRate);\n\n\t/** Get Tax Rate.\n\t * Indicates the Tax Rate\n\t */\n\tpublic BigDecimal getLBR_TaxRate();\n\n /** Column name LBR_TaxRateCredit */\n public static final String COLUMNNAME_LBR_TaxRateCredit = \"LBR_TaxRateCredit\";\n\n\t/** Set Tax Rate Credit (%).\n\t * Identifies the Tax Rate Credit in percentage\n\t */\n\tpublic void setLBR_TaxRateCredit (BigDecimal LBR_TaxRateCredit);\n\n\t/** Get Tax Rate Credit (%).\n\t * Identifies the Tax Rate Credit in percentage\n\t */\n\tpublic BigDecimal getLBR_TaxRateCredit();\n\n /** Column name LBR_TaxReliefAmt */\n public static final String COLUMNNAME_LBR_TaxReliefAmt = \"LBR_TaxReliefAmt\";\n\n\t/** Set Tax Relief Amount.\n\t * Identifies the Tax Relief Amount\n\t */\n\tpublic void setLBR_TaxReliefAmt (BigDecimal LBR_TaxReliefAmt);\n\n\t/** Get Tax Relief Amount.\n\t * Identifies the Tax Relief Amount\n\t */\n\tpublic BigDecimal getLBR_TaxReliefAmt();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}",
"public final String[] mo24226W(C7620bi c7620bi) {\n int i = 1;\n AppMethodBeat.m2504i(113302);\n String[] strArr = new String[2];\n String str = c7620bi.field_content;\n if (C5046bo.isNullOrNil(str)) {\n strArr[0] = \"\";\n strArr[1] = \"\";\n AppMethodBeat.m2505o(113302);\n return strArr;\n }\n int i2;\n String str2;\n if (c7620bi.field_isSend == 0) {\n i2 = 1;\n } else {\n i2 = 0;\n }\n if (C1855t.m3896kH(c7620bi.field_talker) && i2 != 0) {\n i2 = C1829bf.m3761ox(str);\n if (i2 != -1) {\n str = str.substring(i2 + 1).trim();\n }\n }\n C5136b Ro = ((C6982j) C1720g.m3528K(C6982j.class)).bOr().mo15261Ro(str);\n if (Ro.dua()) {\n str = Ro.label;\n str2 = Ro.eUu;\n strArr[0] = str;\n strArr[1] = str2;\n } else {\n strArr[0] = Ro.label;\n strArr[1] = \"\";\n }\n if (C5046bo.isNullOrNil(strArr[0]) && C5046bo.isNullOrNil(strArr[1])) {\n C4990ab.m7416i(\"MicroMsg.LocationServer\", \"pull from sever\");\n long j = c7620bi.field_msgId;\n if (!(this.nJC == null || this.nJC.contains(Long.valueOf(j)))) {\n str2 = c7620bi.field_content;\n if (c7620bi.field_isSend != 0) {\n i = 0;\n }\n if (C1855t.m3896kH(c7620bi.field_talker) && i != 0) {\n i = C1829bf.m3761ox(str2);\n if (i != -1) {\n str2 = str2.substring(i + 1).trim();\n }\n }\n Ro = C5136b.apD(str2);\n this.nJC.add(Long.valueOf(j));\n C18657c.agw().mo33924a(Ro.nJu, Ro.nJv, this.nJD, Long.valueOf(c7620bi.field_msgId));\n }\n }\n AppMethodBeat.m2505o(113302);\n return strArr;\n }",
"@Override\r\n\tprotected void parsePacket(byte[] data)\r\n\t\t\tthrows BeCommunicationDecodeException {\r\n\t\ttry {\r\n\t\t\tsuper.parsePacket(data);\r\n\r\n\t\t\tsimpleHiveAp = CacheMgmt.getInstance().getSimpleHiveAp(apMac);\r\n\t\t\tif (simpleHiveAp == null) {\r\n\t\t\t\tthrow new BeCommunicationDecodeException(\"Invalid apMac: (\" + apMac\r\n\t\t\t\t\t\t+ \"), Can't find corresponding data in cache.\");\r\n\t\t\t}\r\n\t\t\tHmDomain owner = CacheMgmt.getInstance().getCacheDomainById(\r\n\t\t\t\t\tsimpleHiveAp.getDomainId());\r\n\t\t\tString apName = simpleHiveAp.getHostname();\r\n\t\t\t\r\n\t\t\tByteBuffer buf = ByteBuffer.wrap(resultData);\r\n\t\t\t\r\n\t\t\tbuf.getShort(); //tlv number\r\n\t\t\tHmTimeStamp timeStamp = new HmTimeStamp(getMessageTimeStamp(), getMessageTimeZone());\r\n\t\t\tint ifIndex = 0;\r\n\t\t\tString ifName = \"\";\r\n\r\n\t\t\twhile (buf.hasRemaining()) {\r\n\r\n\t\t\t\tshort tlvType = buf.getShort();\r\n\t\t\t\tbuf.getShort(); //tlv length\r\n\t\t\t\tbuf.getShort(); //tlv version\r\n\t\t\t\tif (tlvType == TLVTYPE_RADIOINFO) {\r\n\t\t\t\t\tifIndex = buf.getInt();\r\n\t\t\t\t\tbyte len = buf.get();\r\n\t\t\t\t\tifName = AhDecoder.bytes2String(buf, len);\r\n\t\t\t\t} else if (tlvType == TLVTYPE_INTERFERENCESTATS) {\r\n\t\t\t\t\tAhInterferenceStats interferenceStats = new AhInterferenceStats();\r\n\t\t\t\t\tinterferenceStats.setApMac(apMac);\r\n\t\t\t\t\tinterferenceStats.setTimeStamp(timeStamp);\r\n\t\t\t\t\tinterferenceStats.setIfIndex(ifIndex);\r\n\t\t\t\t\tinterferenceStats.setIfName(ifName);\r\n\t\t\t\t\tinterferenceStats.setOwner(owner);\r\n\t\t\t\t\tinterferenceStats.setApName(apName);\r\n\r\n\t\t\t\t\tinterferenceStats.setChannelNumber((short)AhDecoder.byte2int(buf.get()));\r\n\t\t\t\t\tinterferenceStats.setAverageTXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setAverageRXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setAverageInterferenceCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setAverageNoiseFloor(buf.get());\r\n\t\t\t\t\tinterferenceStats.setShortTermTXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setShortTermRXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setShortTermInterferenceCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setShortTermNoiseFloor(buf.get());\r\n\t\t\t\t\tinterferenceStats.setSnapShotTXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setSnapShotRXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setSnapShotInterferenceCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setSnapShotNoiseFloor(buf.get());\r\n\t\t\t\t\tinterferenceStats.setCrcError(buf.get());\r\n\t\t\t\t\tinterferenceStats.setInterferenceCUThreshold(buf.get());\r\n\t\t\t\t\tinterferenceStats.setCrcErrorRateThreshold(buf.get());\r\n\t\t\t\t\tinterferenceStats.setSeverity(buf.get());\r\n\t\t\t\t\t\r\n\t\t\t\t\tinterferenceStatsList.add(interferenceStats);\r\n\t\t\t\t} else if (tlvType == TLVTYPE_ACSPNEIGHBOR) {\r\n\t\t\t\t\tAhACSPNeighbor neighbor = new AhACSPNeighbor();\r\n\t\t\t\t\tneighbor.setApMac(apMac);\r\n\t\t\t\t\tneighbor.setTimeStamp(timeStamp);\r\n\t\t\t\t\tneighbor.setIfIndex(ifIndex);\r\n\t\t\t\t\tneighbor.setOwner(owner);\r\n\r\n\t\t\t\t\tneighbor.setBssid(AhDecoder.bytes2hex(buf, 6).toUpperCase());\r\n\t\t\t\t\tneighbor.setNeighborMac(AhDecoder.bytes2hex(buf, 6).toUpperCase());\r\n\t\t\t\t\tneighbor.setNeighborRadioMac(AhDecoder.bytes2hex(buf, 6).toUpperCase());\r\n\t\t\t\t\tneighbor.setLastSeen(AhDecoder.int2long(buf.getInt()) * 1000);\r\n\t\t\t\t\tneighbor.setChannelNumber(AhDecoder.byte2int(buf.get()));\r\n\t\t\t\t\tneighbor.setTxPower(buf.get());\r\n\t\t\t\t\tneighbor.setRssi(buf.get());\r\n\t\t\t\t\tbyte len = buf.get();\r\n\t\t\t\t\tneighbor.setSsid(AhDecoder.bytes2String(buf, AhDecoder.byte2int(len)));\r\n\r\n\t\t\t\t\tneighborList.add(neighbor);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new BeCommunicationDecodeException(\r\n\t\t\t\t\t\"BeInterferenceMapResultEvent.parsePacket() catch exception\", e);\r\n\t\t}\r\n\t}",
"public HashMap<Integer, HashMap<String, String>> getMessageDataForCollabForText(ArrayList<Integer> interIDs){\n\t HashMap<Integer, HashMap<String, String>> result = new HashMap();\n\t String query = null;\n//\t stmt = getConnection(dbParams).createStatement();\n\t HashMap<String, String> message;\n\t HashMap<String, ArrayList<String>> messageMap;\n\t \n//\t stmt = getConnection(dbParams).createStatement();\n\t int contentTypeID;\n\t String contentType;\n\t int contentSubTypeID;\n\t String contentSubType = null;\n\t int resourceID;\n\t SQLXML attributes;\n\t int actionID;\n\t String actionType;\n\t ArrayList<String> resources;\n\t String resourceName;\n\t String resourceURL;\n\t String text = null;\n\t String messageAttributes = null;\n\t HashMap<String, String> msgAttributes = null;\n\t try{\n\t\t DOMSource domSource;\n\t\t Document document;\n\t\t XPath xpath = XPathFactory.newInstance().newXPath();\n\t\t \n\t\t String expression = \"//name[.='event.action']/following-sibling::*[1][name()='value']\";\n\t \t//loop through each interID\n\t \tfor(int interID : interIDs){\n\n\t \n\t message = new HashMap();\n\t \n\t query = \"Select contentType, contentSubType, resourceID, attributes from Interactions where interID = \"+interID;\n\t System.out.println(query);\n\t rs = stmt.executeQuery(query);\n\t rs.next();\n\t \n\t contentTypeID = rs.getInt(1);\n\t contentSubTypeID = rs.getInt(2);\n\t resourceID = rs.getInt(3);\n\t attributes = rs.getSQLXML(4);\n\t \n\t domSource = attributes.getSource(DOMSource.class);\n\t document = (Document) domSource.getNode();\n\t actionID = Integer.parseInt(xpath.evaluate(expression, document));\n\t \n\t //Get contentType\n\t contentType = getContentType(stmt, contentTypeID);\n\t //Get ContentSubType\n\t if(contentSubTypeID != -1){\n\t \t contentSubType = getContentSubType(stmt, contentSubTypeID);\n\t }\n\t \n\t //Get Action Type\n\t actionType = getActionType(actionID);\n\t //Get Resource Name and URL\n\t resources = getResourceNameAndURL(resourceID);\n\t resourceName = resources.get(0);\n\t resourceURL = resources.get(1);\n\t \n\t //Get Message Table data\n\t query = \"Select text from Messages where interID = \"+interID + \" and text IS NOT NULL\";\n\t System.out.println(query);\n\t rs = stmt.executeQuery(query);\n\t rs.next();\n\t if(rs.getNString(1) != null){\n\t \ttext = rs.getString(1).replaceAll(\"/n\", \" \").replaceAll(\"/r\", \"\");\n\t }\n\t \n\t query = \"select attributes from messages where interId =\"+ interID + \" and attributes IS NOT NULL\";\n\t System.out.println(query);\n\t \trs = stmt.executeQuery(query);\n\t \tif(rs.next()){\n\t \t\tmessageAttributes = rs.getString(1);\t\n\t \t}\n\t \n\t \n\t //Get Attribute Names and Values\n\t \tmsgAttributes = new HashMap();\n\t \tif(messageAttributes != null){\n\t \t\tmsgAttributes = getMessageAttributes(messageAttributes);\n\t \t}\n\t \t\t\n\t ArrayList<String> fileNames = getFileListsForCollab(interID);\n\t //Add all the values\n\t message.put(\"contentType:\", contentType);\n\t \t if(contentSubTypeID != -1){\n\t \t \tmessage.put(\"contentSubType:\", contentSubType); \n\t\t }\n\t \n\t message.put(\"action:\", actionType.toLowerCase());\n\t message.put(\"resourceName:\", resourceName.toLowerCase());\n\t message.put(\"Resource URL:\", resourceURL.toLowerCase());\n\t if(text != null){\n\t \tmessage.put(\"Text Content:\", text.replaceAll(\"\\n\", \"\").replaceAll(\"\\r\", \"\").toLowerCase());\n\t }\n\t \n\t if(msgAttributes.size() > 0){\n\t\t for(String attName : msgAttributes.keySet()){\n\t\t message.put(attName+\":\", msgAttributes.get(attName).toLowerCase());\n\t\t }\t \t\n\t }\n\n\t StringBuffer fileName = new StringBuffer();\n\t if(fileNames.size() > 0){\n\t \t for(int i = 0 ; i < fileNames.size(); i++){\n\t \t \tfileName.append(fileNames.get(i));\n\t \t \tif(i + 1 != fileNames.size()){\n\t \t \t\tfileName.append(\"#\");\n\t \t \t}\n\t \t }\n\t \t message.put(\"File:\", fileName.toString().toLowerCase());\n\t }\n\t\n\t result.put(interID, message);\n\t \n\t \t}\n\t } catch(Exception e){\n\t \tSystem.err.println(e.getMessage());\n\t }\n\t return result;\n\t }",
"private void getLargeOrderList(){\n sendPacket(CustomerTableAccess.getConnection().getLargeOrderList());\n \n }",
"public void obtenerHistoricoEstatusCliente(Cliente cliente)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerHistoricoEstatusCliente(\"\n +\"Cliente cliente):Entrada\");\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n query.append(\" SELECT ESTA_OID_ESTA_CLIE, OID_HIST_ESTA, \");\n query.append(\" PERD_OID_PERI, \");\n query.append(\" PERD_OID_PERI_PERI_FIN, \");\n query.append(\" PED.FEC_INIC as PED_FEC_INIC, \");\n query.append(\" PED.FEC_FINA as PED_FEC_FINA, \");\n query.append(\" PED.MARC_OID_MARC as PED_MARC_OID_MARC, \");\n query.append(\" PED.CANA_OID_CANA as PED_CANA_OID_CANA, \");\n query.append(\" PED.PAIS_OID_PAIS as PED_PAIS_OID_PAIS, \");\n query.append(\" PCD.COD_PERI as PCD_COD_PERI, \");\n query.append(\" PEH.FEC_INIC as PEH_FEC_INIC, \");\n query.append(\" PEH.FEC_FINA as PEH_FEC_FINA, \");\n query.append(\" PEH.MARC_OID_MARC as PEH_MARC_OID_MARC, \");\n query.append(\" PEH.CANA_OID_CANA as PEH_CANA_OID_CANA, \");\n query.append(\" PEH.PAIS_OID_PAIS as PEH_PAIS_OID_PAIS, \");\n query.append(\" PCH.COD_PERI as PCH_COD_PERI \");\n query.append(\" FROM MAE_CLIEN_HISTO_ESTAT, \");\n query.append(\" CRA_PERIO PED, \");\n query.append(\" SEG_PERIO_CORPO PCD, \");\n query.append(\" CRA_PERIO PEH, \");\n query.append(\" SEG_PERIO_CORPO PCH \");\n query.append(\" WHERE PERD_OID_PERI = PED.OID_PERI \");\n query.append(\" AND PED.PERI_OID_PERI = PCD.OID_PERI \");\n query.append(\" AND PERD_OID_PERI_PERI_FIN = PEH.OID_PERI(+) \");\n query.append(\" AND PEH.PERI_OID_PERI = PCH.OID_PERI(+) \");\n query.append(\" AND CLIE_OID_CLIE = \").append(cliente\n .getOidCliente());\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\" obtenerHistoricoEstatusCliente respuesta \" + respuesta); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n cliente.setHistoricoEstatusCliente(new HistoricoEstatusCliente[0]);\n } else {\n HistoricoEstatusCliente[] historico = new HistoricoEstatusCliente[\n respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"Pongo un historico\");\n\n Periodo periodoDesde = new Periodo();\n periodoDesde.setOidPeriodo(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PERD_OID_PERI\")).longValue()));\n periodoDesde.setFechaDesde((Date) respuesta\n .getValueAt(i, \"PED_FEC_INIC\"));\n periodoDesde.setFechaHasta((Date) respuesta\n .getValueAt(i, \"PED_FEC_FINA\"));\n periodoDesde.setOidMarca(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PED_MARC_OID_MARC\")).longValue()));\n periodoDesde.setOidCanal(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PED_CANA_OID_CANA\")).longValue()));\n periodoDesde.setOidPais(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PED_PAIS_OID_PAIS\")).longValue()));\n periodoDesde.setCodperiodo((String) respuesta\n .getValueAt(i, \"PCD_COD_PERI\"));\n\n Periodo periodoHasta;\n BigDecimal periodoFin = (BigDecimal) respuesta\n .getValueAt(i, \"PERD_OID_PERI_PERI_FIN\");\n\n if (periodoFin == null) {\n periodoHasta = null;\n } else {\n periodoHasta = new Periodo();\n periodoHasta.setOidPeriodo(new Long(periodoFin\n .longValue()));\n periodoHasta.setFechaDesde((Date) respuesta\n .getValueAt(i, \"PEH_FEC_INIC\"));\n periodoHasta.setFechaHasta((Date) respuesta\n .getValueAt(i, \"PEH_FEC_FINA\"));\n periodoHasta.setOidMarca((respuesta\n .getValueAt(i, \"PEH_MARC_OID_MARC\") != null)\n ? new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PEH_MARC_OID_MARC\")).longValue()) \n : null);\n periodoHasta.setOidCanal((respuesta\n .getValueAt(i, \"PEH_CANA_OID_CANA\") != null) \n ? new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PEH_CANA_OID_CANA\")).longValue()) \n : null);\n periodoHasta.setOidPais((respuesta\n .getValueAt(i, \"PEH_PAIS_OID_PAIS\") != null)\n ? new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PEH_PAIS_OID_PAIS\")).longValue()) \n : null);\n periodoHasta.setCodperiodo((String) respuesta\n .getValueAt(i, \"PCH_COD_PERI\"));\n }\n\n historico[i] = new HistoricoEstatusCliente();\n historico[i].setOidEstatus(respuesta.getValueAt(i, \"ESTA_OID_ESTA_CLIE\")==null?null:\n new Long(((BigDecimal) respuesta.getValueAt(i, \"ESTA_OID_ESTA_CLIE\")).longValue()));\n historico[i].setPeriodoInicio(periodoDesde);\n historico[i].setPeriodoFin(periodoHasta);\n \n if(log.isDebugEnabled()) {//sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"Pongo un historico historico[i].setOidEs\"\n +\"tatus \" + historico[i].getOidEstatus());\n UtilidadesLog.debug(\"Pongo un historico historico[i].setPerio\"\n +\"doInicio \" + historico[i].getPeriodoInicio());\n UtilidadesLog.debug(\"Pongo un historico historico[i].setPerio\"\n +\"doFin \" + historico[i].getPeriodoFin());\n } \n }\n\n cliente.setHistoricoEstatusCliente(historico);\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerHistoricoEstatusCliente(\"\n +\"Cliente cliente):Salida\");\n }",
"public RecordSet obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe) throws MareException{\n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe): Entrada\");\n \n RecordSet rs = new RecordSet();\n StringBuffer query = new StringBuffer();\n BelcorpService bs;\n try\n { bs = BelcorpService.getInstance();\n }\n catch(MareMiiServiceNotFoundException ex)\n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n // gPineda - V-COB006 - 30/01/2007\n //query.append(\" SELECT OID_ETAP_DEUD_TIPO_CARG AS OID, VAL_DESC descripcion \");\n query.append(\" SELECT oid_etap_deud_tipo_carg AS OID, NVL(val_desc, gen.VAL_I18N) descripcion \");\n query.append(\" FROM cob_etapa_deuda_tipo_cargo etapTipoCar, \");\n query.append(\" \t\t ccc_tipo_cargo_abono tipoCar, \");\n query.append(\" \t\t gen_i18n_sicc_pais gen \");\n query.append(\" WHERE ETDE_OID_ETAP_DEUD = \" + dtoe.getOid() );\n query.append(\" \t and etapTipoCar.TCAB_OID_TIPO_CARG_ABON = tipoCar.OID_TIPO_CARG_ABON \");\n query.append(\" \t\t and gen.VAL_OID = tipoCar.OID_TIPO_CARG_ABON \");\n query.append(\" \t\t and gen.ATTR_ENTI = 'CCC_TIPO_CARGO_ABONO' \");\n query.append(\" \t\t and gen.ATTR_NUM_ATRI = 1 \");\n query.append(\" ORDER BY descripcion \");\n \n try \n { rs = bs.dbService.executeStaticQuery(query.toString());\n }\n catch (Exception ex) \n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n }\n \n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe): Salida\");\n \n return rs; \n }",
"public ArrayList<String> getListrEpcm_Num() throws SQLException, ClassNotFoundException {\r\n //SQL query\r\n String sql = \"SELECT rEpcm_Num FROM AUTREPCM\";\r\n //New listrEpcm_Num ArrayList \r\n ArrayList<String> listrEpcm_Num = new ArrayList<String>();\r\n\r\n try {\r\n dbCon.psmt = dbCon.getConnect().prepareStatement(sql);\r\n //Create ResultSet \r\n dbCon.rs = dbCon.psmt.executeQuery();\r\n if(dbCon.rs == null){\r\n lg.error(\"method getListAutcarnm(): ResultSet = null\");\r\n return listrEpcm_Num;\r\n }\r\n //Get id into string\r\n while(dbCon.rs.next()) {\r\n listrEpcm_Num.add(dbCon.rs.getString(1).trim());\r\n }\r\n return listrEpcm_Num;\r\n }catch(Exception tt) {\r\n \r\n // Call Log4j for logging\r\n StackTraceElement stackTraceElement[] = tt.getStackTrace();\r\n for (int i = 0; i < stackTraceElement.length; i++) {\r\n lg.warn(stackTraceElement[i].getClassName());\r\n lg.warn(stackTraceElement[i].getFileName());\r\n lg.warn(stackTraceElement[i].getLineNumber());\r\n lg.warn(stackTraceElement[i].getMethodName());\r\n \r\n }\r\n \r\n throw new SQLException();\r\n \r\n }finally {\r\n if((dbCon.psmt != null) && (dbCon.getConnect() != null)){\r\n try {\r\n //Close PreparedStatement\r\n dbCon.psmt.close();\r\n //Close connect\r\n dbCon.getConnect().close();\r\n } catch (SQLException e) {\r\n lg.error(\"The PreparedStatement or Connection not close \");\r\n }\r\n } else {\r\n // do something\r\n }\r\n }\r\n \r\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n public MapList getOpenedThisMonthCRs(Context context, String[] args) throws Exception {\n\n Pattern relationship_pattern = new Pattern(TigerConstants.RELATIONSHIP_PSS_SUBPROGRAMPROJECT);\n relationship_pattern.addPattern(TigerConstants.RELATIONSHIP_PSS_CONNECTEDPCMDATA);\n\n Pattern type_pattern = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n type_pattern.addPattern(TigerConstants.TYPE_PSS_PROGRAMPROJECT);\n\n Pattern finalType = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n\n MapList mapList = new MapList();\n try {\n\n StringList slselectObjStmts = getSLCTableSelectables(context);\n\n Map programMap = (Map) JPO.unpackArgs(args);\n String strProgProjId = (String) programMap.get(\"objectId\");\n // TIGTK-16801 : 29-08-2018 : START\n boolean bAdminOrPMCMEditAllow = isAdminOrPMCMofRelatedPP(context, strProgProjId);\n StringBuffer sbObjectWhere = new StringBuffer();\n sbObjectWhere.append(\"(type==\\\"\");\n sbObjectWhere.append(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n sbObjectWhere.append(\"\\\"&¤t!=\\\"\");\n sbObjectWhere.append(TigerConstants.STATE_COMPLETE_CR);\n sbObjectWhere.append(\"\\\"\");\n sbObjectWhere.append(\"&&\");\n sbObjectWhere.append(\"current!=\\\"\");\n sbObjectWhere.append(TigerConstants.STATE_REJECTED_CR);\n sbObjectWhere.append(\"\\\")\");\n // TIGTK-16801 : 29-08-2018 : END\n DomainObject domainObj = DomainObject.newInstance(context, strProgProjId);\n\n Date dcurrentDate = new Date();\n\n MapList tempList = domainObj.getRelatedObjects(context, relationship_pattern.getPattern(), // relationship pattern\n type_pattern.getPattern(), // object pattern\n slselectObjStmts, // object selects\n null, // relationship selects\n false, // to direction\n true, // from direction\n (short) 0, // recursion level\n sbObjectWhere.toString(), // object where clause\n null, (short) 0, false, // checkHidden\n true, // preventDuplicates\n (short) 1000, // pageSize\n finalType, // Postpattern\n null, null, null);\n\n for (int i = 0; i < tempList.size(); i++) {\n\n Map map = (Map) tempList.get(i);\n\n String sCROriginDate = (String) map.get(\"originated\");\n SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n Date dCROriginDate = formatter.parse(sCROriginDate);\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(dcurrentDate);\n cal.add(Calendar.MONTH, -1);\n Date dLastMonthDate = cal.getTime();\n\n if (dCROriginDate.after(dLastMonthDate) && dCROriginDate.before(dcurrentDate)) {\n mapList.add(map);\n }\n\n // TIGTK-16801 : 30-08-2018 : START\n map.put(\"bAdminOrPMCMEditAllow\", bAdminOrPMCMEditAllow);\n // TIGTK-16801 : 30-08-2018 : END\n\n }\n // TIGTK_3961:Sort CR data according to CR state :23/1/2017:Rutuja Ekatpure:Start\n if (mapList.size() > 1) {\n return sortCRListByState(context, mapList);\n } else {\n return mapList;\n }\n // TIGTK_3961:Sort CR data according to CR state :23/1/2017:Rutuja Ekatpure:End\n } catch (Exception ex) {\n logger.error(\"Error in getOpenedThisMonthCRs: \", ex);\n throw ex;\n }\n }",
"private void getrec() {\n\t\tcontractDetail.retrieve(stateVariable.getXwordn(), stateVariable.getXwabcd());\n\t\tnmfkpinds.setPgmInd36(! lastIO.isFound());\n\t\tnmfkpinds.setPgmInd66(isLastError());\n\t\t// BR00010 Product not found on Contract_Detail\n\t\tif (nmfkpinds.pgmInd36()) {\n\t\t\tmsgObjIdx = setMsgObj(\"OES0115\", \"XWABCD\", msgObjIdx, messages);\n\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t}\n\t\telse {\n\t\t\tif (nmfkpinds.pgmInd66()) {\n\t\t\t\tif (fileds.filests == 1218) {\n\t\t\t\t\tmsgObjIdx = setMsgObj(\"Y3U9999\", \"\", msgObjIdx, messages);\n\t\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmsgObjIdx = setMsgObj(\"OEM0004\", \"\", msgObjIdx, messages);\n\t\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalidt();\n\t\t\t}\n\t\t}\n\t}",
"public RegistrationKey[] getForPatient(long patNum) throws Exception {\n if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)\n {\n return Meth.<RegistrationKey[]>GetObject(MethodBase.GetCurrentMethod(), patNum);\n }\n \n String command = \"SELECT * FROM registrationkey WHERE \";\n Family fam = Patients.getFamily(patNum);\n for (int i = 0;i < fam.ListPats.Length;i++)\n {\n command += \"PatNum=\" + POut.Long(fam.ListPats[i].PatNum) + \" \";\n if (i < fam.ListPats.Length - 1)\n {\n command += \"OR \";\n }\n \n }\n DataTable table = db.getTable(command);\n RegistrationKey[] keys = new RegistrationKey[table.Rows.Count];\n for (int i = 0;i < keys.Length;i++)\n {\n keys[i] = new RegistrationKey();\n keys[i].RegistrationKeyNum = PIn.Long(table.Rows[i][0].ToString());\n keys[i].PatNum = PIn.Long(table.Rows[i][1].ToString());\n keys[i].RegKey = PIn.String(table.Rows[i][2].ToString());\n keys[i].Note = PIn.String(table.Rows[i][3].ToString());\n keys[i].DateStarted = PIn.Date(table.Rows[i][4].ToString());\n keys[i].DateDisabled = PIn.Date(table.Rows[i][5].ToString());\n keys[i].DateEnded = PIn.Date(table.Rows[i][6].ToString());\n keys[i].IsForeign = PIn.Bool(table.Rows[i][7].ToString());\n keys[i].UsesServerVersion = PIn.Bool(table.Rows[i][8].ToString());\n keys[i].IsFreeVersion = PIn.Bool(table.Rows[i][9].ToString());\n keys[i].IsOnlyForTesting = PIn.Bool(table.Rows[i][10].ToString());\n keys[i].VotesAllotted = PIn.Int(table.Rows[i][11].ToString());\n }\n return keys;\n }",
"public MapList getOpenedCRs(Context context, String[] args) throws Exception {\n\n Pattern relationship_pattern = new Pattern(TigerConstants.RELATIONSHIP_PSS_SUBPROGRAMPROJECT);\n relationship_pattern.addPattern(TigerConstants.RELATIONSHIP_PSS_CONNECTEDPCMDATA);\n\n Pattern type_pattern = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n type_pattern.addPattern(TigerConstants.TYPE_PSS_PROGRAMPROJECT);\n\n Pattern finalType = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n\n try {\n\n StringList slselectObjStmts = getSLCTableSelectables(context);\n\n Map programMap = (Map) JPO.unpackArgs(args);\n String strProgProjId = (String) programMap.get(\"objectId\");\n // TIGTK-16801 : 30-08-2018 : START\n boolean bAdminOrPMCMEditAllow = isAdminOrPMCMofRelatedPP(context, strProgProjId);\n StringBuffer sbObjectWhere = new StringBuffer();\n sbObjectWhere.append(\"(type==\\\"\");\n sbObjectWhere.append(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n sbObjectWhere.append(\"\\\"&¤t!=\\\"\");\n sbObjectWhere.append(TigerConstants.STATE_COMPLETE_CR);\n sbObjectWhere.append(\"\\\"\");\n sbObjectWhere.append(\"&&\");\n sbObjectWhere.append(\"current!=\\\"\");\n sbObjectWhere.append(TigerConstants.STATE_REJECTED_CR);\n sbObjectWhere.append(\"\\\")\");\n // TIGTK-16801 : 30-08-2018 : END\n\n DomainObject domainObj = DomainObject.newInstance(context, strProgProjId);\n\n MapList mapList = domainObj.getRelatedObjects(context, relationship_pattern.getPattern(), // relationship pattern\n type_pattern.getPattern(), // object pattern\n slselectObjStmts, // object selects\n null, // relationship selects\n false, // to direction\n true, // from direction\n (short) 0, // recursion level\n sbObjectWhere.toString(), // object where clause\n null, (short) 0, false, // checkHidden\n true, // preventDuplicates\n (short) 1000, // pageSize\n finalType, // Postpattern\n null, null, null);\n // TIGTK_3961:Sort CR data according to CR state :23/1/2017:Rutuja Ekatpure:Start\n if (mapList.size() > 0) {\n // return sortCRListByState(context, mapList);\n // PCM2.0 Spr4:TIGTK-6894:19/9/2017:START\n MapList mlReturn = sortCRListByState(context, mapList);\n\n Iterator<Map<String, String>> itrCR = mlReturn.iterator();\n while (itrCR.hasNext()) {\n Map tempMap = itrCR.next();\n String strCRId = (String) tempMap.get(DomainConstants.SELECT_ID);\n MapList mlIA = getImpactAnalysis(context, strCRId);\n\n String strIAId = \"\";\n if (!mlIA.isEmpty()) {\n Map mpIA = (Map) mlIA.get(0);\n strIAId = (String) mpIA.get(DomainConstants.SELECT_ID);\n }\n tempMap.put(\"LatestRevIAObjectId\", strIAId);\n // TIGTK-16801 : 30-08-2018 : START\n tempMap.put(\"bAdminOrPMCMEditAllow\", bAdminOrPMCMEditAllow);\n // TIGTK-16801 : 30-08-2018 : END\n }\n return mlReturn;\n // PCM2.0 Spr4:TIGTK-6894:19/9/2017:END\n } else {\n return mapList;\n }\n // TIGTK_3961:Sort CR data according to CR state :23/1/2017:Rutuja Ekatpure:End\n } catch (Exception ex) {\n logger.error(\"Error in getOpenedCRs: \", ex);\n throw ex;\n }\n }",
"private void m72698ho() {\n try {\n FileInputStream openFileInput = this.mContext.openFileInput(this.aeq);\n try {\n XmlPullParser newPullParser = Xml.newPullParser();\n newPullParser.setInput(openFileInput, \"UTF-8\");\n int i = 0;\n while (i != 1 && i != 2) {\n i = newPullParser.next();\n }\n if (\"historical-records\".equals(newPullParser.getName())) {\n List list = this.aep;\n list.clear();\n while (true) {\n int next = newPullParser.next();\n if (next != 1) {\n if (!(next == 3 || next == 4)) {\n if (\"historical-record\".equals(newPullParser.getName())) {\n list.add(new C31890c(newPullParser.getAttributeValue(null, \"activity\"), Long.parseLong(newPullParser.getAttributeValue(null, \"time\")), Float.parseFloat(newPullParser.getAttributeValue(null, \"weight\"))));\n } else {\n throw new XmlPullParserException(\"Share records file not well-formed.\");\n }\n }\n } else if (openFileInput != null) {\n try {\n openFileInput.close();\n return;\n } catch (IOException e) {\n return;\n }\n } else {\n return;\n }\n }\n }\n throw new XmlPullParserException(\"Share records file does not start with historical-records tag.\");\n } catch (XmlPullParserException e2) {\n new StringBuilder(\"Error reading historical recrod file: \").append(this.aeq);\n if (openFileInput != null) {\n try {\n openFileInput.close();\n } catch (IOException e3) {\n }\n }\n } catch (IOException e4) {\n new StringBuilder(\"Error reading historical recrod file: \").append(this.aeq);\n if (openFileInput != null) {\n try {\n openFileInput.close();\n } catch (IOException e5) {\n }\n }\n } catch (Throwable th) {\n if (openFileInput != null) {\n try {\n openFileInput.close();\n } catch (IOException e6) {\n }\n }\n }\n } catch (FileNotFoundException e7) {\n }\n }",
"public org.tempuri.HISWebServiceStub.DOCHBListResponse dOCHBList(\r\n org.tempuri.HISWebServiceStub.DOCHBList dOCHBList14)\r\n throws java.rmi.RemoteException {\r\n org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n try {\r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[7].getName());\r\n _operationClient.getOptions()\r\n .setAction(\"http://tempuri.org/DOCHBList\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n addPropertyToOperationClient(_operationClient,\r\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\r\n \"&\");\r\n\r\n // create SOAP envelope with that payload\r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n\r\n env = toEnvelope(getFactory(_operationClient.getOptions()\r\n .getSoapVersionURI()),\r\n dOCHBList14,\r\n optimizeContent(\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"dOCHBList\")),\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"DOCHBList\"));\r\n\r\n //adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // set the message context with that soap envelope\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message contxt to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n //execute the operation client\r\n _operationClient.execute(true);\r\n\r\n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\r\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\r\n\r\n java.lang.Object object = fromOM(_returnEnv.getBody()\r\n .getFirstElement(),\r\n org.tempuri.HISWebServiceStub.DOCHBListResponse.class);\r\n\r\n return (org.tempuri.HISWebServiceStub.DOCHBListResponse) object;\r\n } catch (org.apache.axis2.AxisFault f) {\r\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\r\n\r\n if (faultElt != null) {\r\n if (faultExceptionNameMap.containsKey(\r\n new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"DOCHBList\"))) {\r\n //make the fault by reflection\r\n try {\r\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"DOCHBList\"));\r\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\r\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\r\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\r\n\r\n //message class\r\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"DOCHBList\"));\r\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\r\n java.lang.Object messageObject = fromOM(faultElt,\r\n messageClass);\r\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\r\n new java.lang.Class[] { messageClass });\r\n m.invoke(ex, new java.lang.Object[] { messageObject });\r\n\r\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\r\n } catch (java.lang.ClassCastException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.ClassNotFoundException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.NoSuchMethodException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.reflect.InvocationTargetException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.IllegalAccessException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.InstantiationException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } finally {\r\n if (_messageContext.getTransportOut() != null) {\r\n _messageContext.getTransportOut().getSender()\r\n .cleanup(_messageContext);\r\n }\r\n }\r\n }",
"public WxMessage getLocotion(String openId)\r\n/* 40: */ {\r\n/* 41:40 */ WxMessage wx = null;\r\n/* 42:41 */ Connection conn = null;\r\n/* 43: */ try\r\n/* 44: */ {\r\n/* 45:43 */ conn = DbcpConnection.getConnection();\r\n/* 46:44 */ String sql = \"SELECT * FROM S_COMMUNICATION WHERE OPEN_ID = ?\";\r\n/* 47:45 */ PreparedStatement pstmt = conn.prepareStatement(sql);\r\n/* 48:46 */ pstmt.setString(1, openId);\r\n/* 49:47 */ ResultSet rs = pstmt.executeQuery();\r\n/* 50:48 */ if (rs.next())\r\n/* 51: */ {\r\n/* 52:49 */ wx = new WxMessage();\r\n/* 53:50 */ wx.setLatitude(rs.getString(\"LATITUDE\"));\r\n/* 54:51 */ wx.setLongitude(rs.getString(\"LONGTITUDE\"));\r\n/* 55:52 */ wx.setCreateTime(rs.getString(\"LOCATION_TIME\"));\r\n/* 56: */ }\r\n/* 57: */ }\r\n/* 58: */ catch (Exception e)\r\n/* 59: */ {\r\n/* 60:55 */ log.fatal(\"sql Excetion\", e);\r\n/* 61: */ }\r\n/* 62: */ finally\r\n/* 63: */ {\r\n/* 64:57 */ DbcpConnection.close(conn, null, null);\r\n/* 65: */ }\r\n/* 66:59 */ return wx;\r\n/* 67: */ }",
"public RecordSet obtenerResumen(DTOResumen dtoe) throws MareException{\n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerResumen(DTOResumen dtoe): Entrada\");\n \n RecordSet rs = new RecordSet();\n StringBuffer query = new StringBuffer();\n BelcorpService bs;\n try\n { bs = BelcorpService.getInstance();\n }\n catch(MareMiiServiceNotFoundException ex)\n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n /*query.append(\" SELECT distinct p.IDPRINCIPAL AS OID,CONCAT(p.name,CONCAT(' ',CONCAT(pv.STRINGVALUE,CONCAT(' ',CONCAT(pv2.STRINGVALUE,CONCAT(' ',CONCAT(pv3.STRINGVALUE,CONCAT(' ',pv4.STRINGVALUE)))))))) NOMBRE, \");\n query.append(\" gen.VAL_I18N AS CANAL, \");\n query.append(\" sma.DES_MARC AS MARCA, \"); \n query.append(\" subvta.DES_SUBG_VENT AS SUBGERVENTA, \");\n query.append(\" gen2.VAL_I18N AS REGION, \");\n query.append(\" gen3.VAL_I18N AS ZONA, \");\n query.append(\" secc.DES_SECCI AS SECCION, \");\n query.append(\" gen5.VAL_I18N AS TERRITORIO \");\n query.append(\" FROM v_gen_i18n_sicc gen, \");\n query.append(\" v_gen_i18n_sicc gen2, \");\n query.append(\" v_gen_i18n_sicc gen3, \");\n query.append(\" v_gen_i18n_sicc gen5, \");\n query.append(\" seg_marca sma, \");\n query.append(\" zon_secci secc, \");\n query.append(\" cob_usuar_etapa_cobra_detal cdetal, \");\n query.append(\" zon_sub_geren_venta subvta, \");\n query.append(\" cob_usuar_etapa_cobra_cabec ccabe, \");\n query.append(\" cob_usuar_cobra usucob, \");\n query.append(\" own_mare.principals p, \");\n query.append(\" propertyvalues pv, \");\n query.append(\" propertyvalues pv2, \");\n query.append(\" propertyvalues pv3, \");\n query.append(\" propertyvalues pv4, \");\n query.append(\" own_mare.users u \");\n query.append(\" WHERE cdetal.zsgv_oid_subg_vent = subvta.oid_subg_vent \");\n query.append(\" AND ccabe.oid_usua_etap_cobr = cdetal.oid_usua_etap_cobr_deta \");\n query.append(\" AND secc.oid_secc(+) = cdetal.zscc_oid_secc \");\n query.append(\" AND sma.oid_marc = subvta.marc_oid_marc \");\n query.append(\" AND ccabe.usco_oid_usua_cobr = usucob.oid_usua_cobr \");\n query.append(\" AND gen.val_oid = subvta.cana_oid_cana \");\n query.append(\" AND gen.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND gen.attr_num_atri = 1 \");\n query.append(\" AND gen.idio_oid_idio = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND pv.idproperty(+) = 2 \");\n query.append(\" AND pv.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv2.idproperty(+) = 3 \");\n query.append(\" AND pv2.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv3.idproperty = 5 \");\n query.append(\" AND pv3.idprincipal = p.idprincipal \");\n query.append(\" AND pv4.idproperty = 6 \");\n query.append(\" AND pv4.idprincipal = p.idprincipal \");\n query.append(\" AND gen2.val_oid(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen2.attr_enti(+) = 'ZON_REGIO' \");\n query.append(\" AND gen2.attr_num_atri(+) = 1 \");\n query.append(\" AND gen2.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen3.val_oid(+) = cdetal.zzon_oid_zona \");\n query.append(\" AND gen3.attr_enti(+) = 'ZON_ZONA' \");\n query.append(\" AND gen3.attr_num_atri(+) = 1 \");\n query.append(\" AND gen3.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen5.val_oid(+) = cdetal.terr_oid_terr \");\n query.append(\" AND gen5.attr_enti(+) = 'ZON_TERRI' \");\n query.append(\" AND gen5.attr_num_atri(+) = 1 \");\n query.append(\" AND gen5.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND u.iduser = p.idprincipal \");\n query.append(\" AND p.idprincipal = ccabe.usco_oid_usua_cobr \");\n */\n \n /*query.append(\" SELECT distinct p.IDPRINCIPAL AS OID, \");\n query.append(\" p.name AS USUARIO, \");\n */\n //Se le agega \"p.IDPRINCIPAL,\" segun BELC300017927 \n //query.append(\" SELECT distinct p.name AS USUARIO, \"); \n query.append(\" SELECT distinct p.IDPRINCIPAL, p.name AS USUARIO, \");\n query.append(\" CONCAT(p.name,CONCAT(' ',CONCAT(pv.STRINGVALUE,CONCAT(' ',CONCAT(pv2.STRINGVALUE,CONCAT(' ',CONCAT(pv3.STRINGVALUE,CONCAT(' ',pv4.STRINGVALUE)))))))) NOMBRE, \");\n query.append(\" sma.DES_MARC AS MARCA, \");\n query.append(\" gen.VAL_I18N AS CANAL, \"); \n query.append(\" subvta.DES_SUBG_VENT AS SUBGERVENTA, \");\n query.append(\" regio.DES_REGI AS REGION, \");\n query.append(\" zona.DES_ZONA AS ZONA, \"); \n \t query.append(\" secc.DES_SECCI AS SECCION, \"); \n query.append(\" terri.COD_TERR AS TERRITORIO \");\n query.append(\" FROM v_gen_i18n_sicc gen, \");\n query.append(\" SEG_CANAL canal, \");\n query.append(\" ZON_TERRI terri, \");\n query.append(\" ZON_ZONA zona, \");\n query.append(\" ZON_REGIO regio, \");\n query.append(\" seg_marca sma, \");\n query.append(\" zon_secci secc, \");\n query.append(\" cob_usuar_etapa_cobra_detal cdetal, \");\n query.append(\" zon_sub_geren_venta subvta, \");\n query.append(\" cob_usuar_etapa_cobra_cabec ccabe, \");\n query.append(\" cob_usuar_cobra usucob, \");\n query.append(\" principals p, \");\n query.append(\" propertyvalues pv, \");\n query.append(\" propertyvalues pv2, \");\n query.append(\" propertyvalues pv3, \");\n query.append(\" propertyvalues pv4, \");\n query.append(\" users u \");\n query.append(\" WHERE cdetal.zsgv_oid_subg_vent = subvta.oid_subg_vent \");\n query.append(\" AND ccabe.oid_usua_etap_cobr = cdetal.UECC_OID_USUA_ETAP_COBR \");\n query.append(\" AND secc.oid_secc(+) = cdetal.zscc_oid_secc \");\n query.append(\" AND sma.oid_marc = subvta.marc_oid_marc \");\n query.append(\" AND ccabe.usco_oid_usua_cobr = usucob.oid_usua_cobr \");\n query.append(\" AND gen.val_oid = subvta.cana_oid_cana \");\n query.append(\" AND gen.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND gen.attr_num_atri = 1 \");\n query.append(\" AND gen.idio_oid_idio = '1' \");\n query.append(\" AND pv.idproperty(+) = 2 \");\n query.append(\" AND pv.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv2.idproperty(+) = 3 \");\n query.append(\" AND pv2.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv3.idproperty = 5 \");\n query.append(\" AND pv3.idprincipal = p.idprincipal \");\n query.append(\" AND pv4.idproperty = 6 \");\n query.append(\" AND pv4.idprincipal = p.idprincipal \t\t \");\n query.append(\" AND terri.OID_TERR = cdetal.terr_oid_terr\t\t \");\n query.append(\" AND zona.OID_ZONA = cdetal.zzon_oid_zona\t\t \");\n query.append(\" AND regio.OID_REGI = cdetal.ZORG_OID_REGI\t\t \");\n query.append(\" AND u.iduser = p.idprincipal \");\n query.append(\" AND p.idprincipal = usucob.USER_OID_USUA_COBR \");\n \n /* Validaciones */\n if( dtoe.getOidMarca()!= null ){\n query.append(\" AND subvta.MARC_OID_MARC = \" + dtoe.getOidMarca() );\n }\n if( dtoe.getOidCanal() != null){\n query.append(\" AND subvta.CANA_OID_CANA = \" + dtoe.getOidCanal() );\n }\n if( dtoe.getOidSGV() != null ){\n query.append(\" AND subvta.OID_SUBG_VENT = \" + dtoe.getOidSGV() );\n }\n if( dtoe.getOidRegion() != null ){\n query.append(\" AND cdetal.ZORG_OID_REGI = \" + dtoe.getOidRegion() ); \n }\n if( dtoe.getOidZona() != null ){\n query.append(\" AND cdetal.ZZON_OID_ZONA = \" + dtoe.getOidZona() ); \n }\n if( dtoe.getOidSeccion() != null ){\n query.append(\" AND cdetal.ZSCC_OID_SECC = \" + dtoe.getOidSeccion() );\n }\n if( dtoe.getOidTerritorio() != null ){\n query.append(\" AND cdetal.TERR_OID_TERR = \" + dtoe.getOidTerritorio() );\n }\n UtilidadesLog.debug(\"query \" + query.toString() );\n try \n { rs = bs.dbService.executeStaticQuery(query.toString());\n }\n catch (Exception ex) \n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n }\t\n \n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerResumen(DTOResumen dtoe): Salida\");\n \n return rs; \n }",
"@SuppressWarnings(\"rawtypes\")\n public MapList getInProcessCRs(Context context, String[] args) throws Exception {\n\n Pattern relationship_pattern = new Pattern(TigerConstants.RELATIONSHIP_PSS_SUBPROGRAMPROJECT);\n relationship_pattern.addPattern(TigerConstants.RELATIONSHIP_PSS_CONNECTEDPCMDATA);\n\n Pattern type_pattern = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n type_pattern.addPattern(TigerConstants.TYPE_PSS_PROGRAMPROJECT);\n\n Pattern finalType = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n\n try {\n StringList slselectObjStmts = getSLCTableSelectables(context);\n\n Map programMap = (Map) JPO.unpackArgs(args);\n String strProgProjId = (String) programMap.get(\"objectId\");\n // TIGTK-16801 : 30-08-2018 : START\n boolean bAdminOrPMCMEditAllow = isAdminOrPMCMofRelatedPP(context, strProgProjId);\n StringBuffer sbObjectWhere = new StringBuffer();\n sbObjectWhere.append(\"(type==\\\"\");\n sbObjectWhere.append(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n sbObjectWhere.append(\"\\\"&¤t==\\\"\");\n sbObjectWhere.append(TigerConstants.STATE_PSS_CR_INPROCESS);\n sbObjectWhere.append(\"\\\")\");\n // TIGTK-16801 : 30-08-2018 : END\n\n DomainObject domainObj = DomainObject.newInstance(context, strProgProjId);\n\n MapList mapList = domainObj.getRelatedObjects(context, relationship_pattern.getPattern(), // relationship pattern\n type_pattern.getPattern(), // object pattern\n slselectObjStmts, // object selects\n null, // relationship selects\n false, // to direction\n true, // from direction\n (short) 0, // recursion level\n sbObjectWhere.toString(), // object where clause\n null, (short) 0, false, // checkHidden\n true, // preventDuplicates\n (short) 1000, // pageSize\n finalType, // Postpattern\n null, null, null);\n\n // PCM2.0 Spr4:TIGTK-6894:19/9/2017:START\n if (mapList.size() > 0) {\n\n Iterator<Map<String, String>> itrCR = mapList.iterator();\n while (itrCR.hasNext()) {\n Map tempMap = itrCR.next();\n String strCRId = (String) tempMap.get(DomainConstants.SELECT_ID);\n MapList mlIA = getImpactAnalysis(context, strCRId);\n\n String strIAId = \"\";\n if (!mlIA.isEmpty()) {\n Map mpIA = (Map) mlIA.get(0);\n strIAId = (String) mpIA.get(DomainConstants.SELECT_ID);\n }\n tempMap.put(\"LatestRevIAObjectId\", strIAId);\n // TIGTK-16801 : 30-08-2018 : START\n tempMap.put(\"bAdminOrPMCMEditAllow\", bAdminOrPMCMEditAllow);\n // TIGTK-16801 : 30-08-2018 : END\n }\n }\n // PCM2.0 Spr4:TIGTK-6894:19/9/2017:END\n return mapList;\n } catch (Exception ex) {\n logger.error(\"Error in getInProcessCRs: \", ex);\n throw ex;\n }\n }",
"public ArrayList getSongs() {\r\n\t\tArrayList songs = new ArrayList(mlitDataFields.size());\r\n\t\tfor (int i = 0; i < mlitDataFields.size(); i++) {\r\n\t\t\tArrayList fps = ((ArrayList) mlitDataFields.get(i));\r\n\t\t\tString name = null;\r\n\t\t\tint id = 0;\r\n\t\t\tDaapSong s = new DaapSong();\r\n\t\t\t\ts.host = host;\r\n\t\t\tfor (int j = 0; j < fps.size(); j++) {\r\n\t\t\t\tFieldPair fp = ((FieldPair) fps.get(j));\r\n\t\t\t\tif (fp.name.equals(\"miid\")) {\r\n\t\t\t\t\ts.id = Request.readInt(fp.value, 0, 4);\r\n\t\t\t\t} else if (fp.name.equals(\"minm\")) {\r\n\t\t\t\t\ts.name = Request.readString(fp.value, 0, fp.value.length).trim();\r\n\t\t\t\t} else if (fp.name.equals(\"mper\")) {\r\n\t\t\t\t s.persistent_id = Request.readString(fp.value, 0, fp.value.length).trim();\r\n\t\t\t\t} else if (fp.name.equals(\"asal\")) {\r\n\t\t\t\t\ts.album = Request.readString(fp.value, 0, fp.value.length).trim();\r\n\t\t\t\t} else if (fp.name.equals(\"asar\")) {\r\n\t\t\t\t\ts.artist = Request.readString(fp.value, 0, fp.value.length).trim();\r\n\t\t\t\t} else if (fp.name.equals(\"astn\")) {\r\n\t\t\t\t\ts.track = Request.readInt(fp.value, 0, 2);\r\n\t\t\t\t} else if (fp.name.equals(\"asgn\")) {\r\n\t\t\t\t\ts.genre = Request.readString(fp.value, 0, fp.value.length);\r\n\t\t\t\t} else if (fp.name.equals(\"asfm\")) {\r\n\t\t\t\t\ts.format = Request.readString(fp.value, 0, fp.value.length);\r\n\t\t\t\t} else if (fp.name.equals(\"astm\")) {\r\n\t\t\t\t\ts.time = Request.readInt(fp.value, 0, 4);\r\n\t\t\t\t} else if (fp.name.equals(\"assz\")) {\r\n\t\t\t\t\ts.size = Request.readInt(fp.value, 0, 4);\r\n\t\t\t\t} else if (fp.name.equals(\"asco\")) {\r\n\t\t\t\t s.compilation = (Request.readInt(fp.value, 0,1) == 1);\r\n\t\t\t\t} else if (fp.name.equals(\"asbr\")) {\r\n\t\t\t\t s.bitrate = Request.readInt(fp.value,0,2);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tsongs.add(s);\r\n\t\t}\r\n\t\treturn songs;\r\n\t}",
"private synchronized void parsebm() throws MessagingException {\n/* 777 */ if (this.parsed) {\n/* */ return;\n/* */ }\n/* 780 */ InputStream in = null;\n/* 781 */ SharedInputStream sin = null;\n/* 782 */ long start = 0L, end = 0L;\n/* */ \n/* */ try {\n/* 785 */ in = this.ds.getInputStream();\n/* 786 */ if (!(in instanceof java.io.ByteArrayInputStream) && !(in instanceof BufferedInputStream) && !(in instanceof SharedInputStream))\n/* */ {\n/* */ \n/* 789 */ in = new BufferedInputStream(in); } \n/* 790 */ } catch (Exception ex) {\n/* 791 */ throw new MessagingException(\"No inputstream from datasource\", ex);\n/* */ } \n/* 793 */ if (in instanceof SharedInputStream) {\n/* 794 */ sin = (SharedInputStream)in;\n/* */ }\n/* 796 */ ContentType cType = new ContentType(this.contentType);\n/* 797 */ String boundary = null;\n/* 798 */ if (!this.ignoreExistingBoundaryParameter) {\n/* 799 */ String bp = cType.getParameter(\"boundary\");\n/* 800 */ if (bp != null)\n/* 801 */ boundary = \"--\" + bp; \n/* */ } \n/* 803 */ if (boundary == null && !this.ignoreMissingBoundaryParameter && !this.ignoreExistingBoundaryParameter)\n/* */ {\n/* 805 */ throw new MessagingException(\"Missing boundary parameter\");\n/* */ }\n/* */ \n/* */ try {\n/* 809 */ LineInputStream lin = new LineInputStream(in);\n/* 810 */ StringBuffer preamblesb = null;\n/* */ \n/* 812 */ String lineSeparator = null; String line;\n/* 813 */ while ((line = lin.readLine()) != null) {\n/* */ int k;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 821 */ for (k = line.length() - 1; k >= 0; k--) {\n/* 822 */ char c = line.charAt(k);\n/* 823 */ if (c != ' ' && c != '\\t')\n/* */ break; \n/* */ } \n/* 826 */ line = line.substring(0, k + 1);\n/* 827 */ if (boundary != null) {\n/* 828 */ if (line.equals(boundary))\n/* */ break; \n/* 830 */ if (line.length() == boundary.length() + 2 && line.startsWith(boundary) && line.endsWith(\"--\")) {\n/* */ \n/* 832 */ line = null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* 841 */ } else if (line.length() > 2 && line.startsWith(\"--\") && (\n/* 842 */ line.length() <= 4 || !allDashes(line))) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 850 */ boundary = line;\n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* */ \n/* 857 */ if (line.length() > 0) {\n/* */ \n/* */ \n/* 860 */ if (lineSeparator == null) {\n/* */ try {\n/* 862 */ lineSeparator = System.getProperty(\"line.separator\", \"\\n\");\n/* */ }\n/* 864 */ catch (SecurityException ex) {\n/* 865 */ lineSeparator = \"\\n\";\n/* */ } \n/* */ }\n/* */ \n/* 869 */ if (preamblesb == null)\n/* 870 */ preamblesb = new StringBuffer(line.length() + 2); \n/* 871 */ preamblesb.append(line).append(lineSeparator);\n/* */ } \n/* */ } \n/* */ \n/* 875 */ if (preamblesb != null) {\n/* 876 */ this.preamble = preamblesb.toString();\n/* */ }\n/* 878 */ if (line == null) {\n/* 879 */ if (this.allowEmpty) {\n/* */ return;\n/* */ }\n/* 882 */ throw new MessagingException(\"Missing start boundary\");\n/* */ } \n/* */ \n/* */ \n/* 886 */ byte[] bndbytes = ASCIIUtility.getBytes(boundary);\n/* 887 */ int bl = bndbytes.length;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 894 */ int[] bcs = new int[256];\n/* 895 */ for (int i = 0; i < bl; i++) {\n/* 896 */ bcs[bndbytes[i] & 0xFF] = i + 1;\n/* */ }\n/* */ \n/* 899 */ int[] gss = new int[bl];\n/* */ \n/* 901 */ for (int j = bl; j > 0; j--) {\n/* */ \n/* 903 */ int k = bl - 1; while (true) { if (k >= j) {\n/* */ \n/* 905 */ if (bndbytes[k] == bndbytes[k - j]) {\n/* */ \n/* 907 */ gss[k - 1] = j;\n/* */ \n/* */ k--;\n/* */ } \n/* */ \n/* */ break;\n/* */ } \n/* 914 */ while (k > 0)\n/* 915 */ gss[--k] = j; break; }\n/* */ \n/* 917 */ } gss[bl - 1] = 1;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 923 */ boolean done = false;\n/* */ \n/* 925 */ while (!done) {\n/* 926 */ int eolLen; MimeBodyPart part; InternetHeaders headers = null;\n/* 927 */ if (sin != null) {\n/* 928 */ start = sin.getPosition();\n/* */ \n/* 930 */ while ((line = lin.readLine()) != null && line.length() > 0);\n/* */ \n/* 932 */ if (line == null) {\n/* 933 */ if (!this.ignoreMissingEndBoundary) {\n/* 934 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* */ \n/* 937 */ this.complete = false;\n/* */ \n/* */ break;\n/* */ } \n/* */ } else {\n/* 942 */ headers = createInternetHeaders(in);\n/* */ } \n/* */ \n/* 945 */ if (!in.markSupported()) {\n/* 946 */ throw new MessagingException(\"Stream doesn't support mark\");\n/* */ }\n/* 948 */ ByteArrayOutputStream buf = null;\n/* */ \n/* 950 */ if (sin == null) {\n/* 951 */ buf = new ByteArrayOutputStream();\n/* */ } else {\n/* 953 */ end = sin.getPosition();\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 965 */ byte[] inbuf = new byte[bl];\n/* 966 */ byte[] previnbuf = new byte[bl];\n/* 967 */ int inSize = 0;\n/* 968 */ int prevSize = 0;\n/* */ \n/* 970 */ boolean first = true;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ while (true) {\n/* 976 */ in.mark(bl + 4 + 1000);\n/* 977 */ eolLen = 0;\n/* 978 */ inSize = readFully(in, inbuf, 0, bl);\n/* 979 */ if (inSize < bl) {\n/* */ \n/* 981 */ if (!this.ignoreMissingEndBoundary) {\n/* 982 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* 984 */ if (sin != null)\n/* 985 */ end = sin.getPosition(); \n/* 986 */ this.complete = false;\n/* 987 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ int k;\n/* 992 */ for (k = bl - 1; k >= 0 && \n/* 993 */ inbuf[k] == bndbytes[k]; k--);\n/* */ \n/* */ \n/* 996 */ if (k < 0) {\n/* 997 */ eolLen = 0;\n/* 998 */ if (!first) {\n/* */ \n/* */ \n/* 1001 */ int b = previnbuf[prevSize - 1];\n/* 1002 */ if (b == 13 || b == 10) {\n/* 1003 */ eolLen = 1;\n/* 1004 */ if (b == 10 && prevSize >= 2) {\n/* 1005 */ b = previnbuf[prevSize - 2];\n/* 1006 */ if (b == 13)\n/* 1007 */ eolLen = 2; \n/* */ } \n/* */ } \n/* */ } \n/* 1011 */ if (first || eolLen > 0) {\n/* 1012 */ if (sin != null)\n/* */ {\n/* */ \n/* 1015 */ end = sin.getPosition() - bl - eolLen;\n/* */ }\n/* */ \n/* 1018 */ int b2 = in.read();\n/* 1019 */ if (b2 == 45 && \n/* 1020 */ in.read() == 45) {\n/* 1021 */ this.complete = true;\n/* 1022 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 1027 */ while (b2 == 32 || b2 == 9) {\n/* 1028 */ b2 = in.read();\n/* */ }\n/* 1030 */ if (b2 == 10)\n/* */ break; \n/* 1032 */ if (b2 == 13) {\n/* 1033 */ in.mark(1);\n/* 1034 */ if (in.read() != 10)\n/* 1035 */ in.reset(); \n/* */ break;\n/* */ } \n/* */ } \n/* 1039 */ k = 0;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1049 */ int skip = Math.max(k + 1 - bcs[inbuf[k] & Byte.MAX_VALUE], gss[k]);\n/* */ \n/* 1051 */ if (skip < 2) {\n/* */ \n/* */ \n/* */ \n/* 1055 */ if (sin == null && prevSize > 1)\n/* 1056 */ buf.write(previnbuf, 0, prevSize - 1); \n/* 1057 */ in.reset();\n/* 1058 */ skipFully(in, 1L);\n/* 1059 */ if (prevSize >= 1) {\n/* */ \n/* 1061 */ previnbuf[0] = previnbuf[prevSize - 1];\n/* 1062 */ previnbuf[1] = inbuf[0];\n/* 1063 */ prevSize = 2;\n/* */ } else {\n/* */ \n/* 1066 */ previnbuf[0] = inbuf[0];\n/* 1067 */ prevSize = 1;\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 1072 */ if (prevSize > 0 && sin == null) {\n/* 1073 */ buf.write(previnbuf, 0, prevSize);\n/* */ }\n/* 1075 */ prevSize = skip;\n/* 1076 */ in.reset();\n/* 1077 */ skipFully(in, prevSize);\n/* */ \n/* 1079 */ byte[] tmp = inbuf;\n/* 1080 */ inbuf = previnbuf;\n/* 1081 */ previnbuf = tmp;\n/* */ } \n/* 1083 */ first = false;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1090 */ if (sin != null) {\n/* 1091 */ part = createMimeBodyPartIs(sin.newStream(start, end));\n/* */ } else {\n/* */ \n/* 1094 */ if (prevSize - eolLen > 0) {\n/* 1095 */ buf.write(previnbuf, 0, prevSize - eolLen);\n/* */ }\n/* */ \n/* 1098 */ if (!this.complete && inSize > 0)\n/* 1099 */ buf.write(inbuf, 0, inSize); \n/* 1100 */ part = createMimeBodyPart(headers, buf.toByteArray());\n/* */ } \n/* 1102 */ super.addBodyPart(part);\n/* */ } \n/* 1104 */ } catch (IOException ioex) {\n/* 1105 */ throw new MessagingException(\"IO Error\", ioex);\n/* */ } finally {\n/* */ try {\n/* 1108 */ in.close();\n/* 1109 */ } catch (IOException cex) {}\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1114 */ this.parsed = true;\n/* */ }",
"private static List<ContentObjectMetadata> getLmdObjectListForObjects(User user, ExecutionContext context, List<ManagedObject> moList)\n throws RSuiteException {\n List<ContentObjectMetadata> comList = new ArrayList<ContentObjectMetadata>();\n for (ManagedObject mo : moList) {\n ContentObjectMetadata com = new ContentObjectMetadata(context, user, mo.getId());\n List<String> lmdNames = RSuiteUtils.getLmdFieldNames(context, user, mo);\n for (String lmdName : lmdNames) {\n for (MetaDataItem mi : mo.getMetaDataItems()) {\n if (mi.getName().equals(lmdName)) {\n com.addMetadataProperty(lmdName, mi.getValue());\n }\n }\n }\n comList.add(com);\n }\n return comList;\n }",
"public FSReturnVals ReadPrevRecord(FileHandle ofh, RID pivot, TinyRec rec)\n {\n FSReturnVals outcome = FSReturnVals.Fail;\n // should set ip address, port number\n Vector<IP> servers = ofh.getServersForChunk(pivot.getChunkHandle());\n int numServers = servers.size();\n if (ofh == null)\n {\n return FSReturnVals.BadHandle;\n }\n if (rec == null)\n {\n return FSReturnVals.RecDoesNotExist;\n }\n for(int i = 0; i < numServers; i++)\n {\n IP ip = new IP();\n ip.setPort(servers.elementAt(i).getPort());\n ip.setAddress(servers.elementAt(i).getAddress());\n try\n {\n Socket sock = new Socket(ip.getAddress(), ip.getPort());\n ObjectOutputStream serverOutput = new ObjectOutputStream(sock.getOutputStream());\n serverOutput.flush();\n ObjectInputStream serverInput = new ObjectInputStream(sock.getInputStream());\n serverOutput.writeInt(Constants.IsClient);\n \n serverOutput.writeInt(Constants.READ_PREV_RECORD);\n serverOutput.writeInt(pivot.getChunkHandle().length());\n serverOutput.writeBytes(pivot.getChunkHandle());\n serverOutput.flush();\n serverOutput.writeInt(pivot.index);\n \n int response = serverInput.readInt();\n if (response == Constants.FALSE)\n {\n i--;\n continue;\n }\n else if (response == Constants.NOT_IN_CHUNK)\n {\n i--;\n continue;\n }\n \n //int type = serverOutput.readInt();\n //int command = serverOutput.readInt();\n //if(type == Constants.IsServer && command = Constants.READ_NEXT_RECORD)\n //{\n int sz = serverInput.readInt();\n byte[] data = new byte[sz];\n serverInput.read(data, 0, sz);\n String datastr = new String(data, \"UTF-8\");\n if(data.length > 0)\n {\n int j = serverInput.readInt();\n outcome = intToFSReturnVal(j);\n rec.setPayload(data);\n break;\n }\n else\n {\n i--;\n continue;\n }\n //}\n //else\n //{\n // int j = serverInput.readInt();\n // outcome = intToFSReturnVal(j)\n //}\n \n }\n catch (Exception e)\n {\n outcome = FSReturnVals.Fail;\n System.out.println(\"Unable to append records (ClientREC:65)\");\n }\n }\n \n return outcome;\n }",
"public Long obtenerUAporcodigo(Long oidMarca, Long oidCanal, Long oidPais,\n String codsgv, String codRegion, String codZona, String codSeccion,\n String codTer) throws MareException {\n \n UtilidadesLog.info(\"DAOZON.obtenerUAporcodigo(Long oidMarca, Long oidCanal, Long oidPais, String codsgv, String codRegion, String codZona, String codSeccion, String codTer): Entrada\");\n \n BigDecimal result;\n BelcorpService belcorpService;\n RecordSet respuestaRecordSet = null;\n Vector parametros = new Vector();\n\n StringBuffer stringBuffer = null;\n\n try {\n belcorpService = BelcorpService.getInstance();\n\n if (checkStr(codSeccion) && checkStr(codZona) &&\n checkStr(codRegion) && checkStr(codsgv) &&\n checkStr(codTer)) {\n //Chequeo sobre CodSGV,Region,Zona,Seccion. Para Territorio\n stringBuffer = new StringBuffer(\"SELECT T.OID_TERR as UA\");\n stringBuffer.append(\n \" FROM ZON_SUB_GEREN_VENTA SGV, ZON_REGIO R, ZON_ZONA Z, ZON_SECCI S, ZON_TERRI T, ZON_TERRI_ADMIN TA \");\n stringBuffer.append(\" WHERE \");\n stringBuffer.append(\" SGV.CANA_OID_CANA = \" +\n oidCanal.toString());\n stringBuffer.append(\" AND SGV.MARC_OID_MARC = \" +\n oidMarca.toString());\n stringBuffer.append(\" AND SGV.PAIS_OID_PAIS = \" +\n oidPais.toString());\n stringBuffer.append(\" AND SGV.COD_SUBG_VENT = '\" + codsgv +\n \"' \");\n stringBuffer.append(\" AND R.COD_REGI = '\" + codRegion + \"' \");\n stringBuffer.append(\" AND Z.COD_ZONA = '\" + codZona + \"' \");\n stringBuffer.append(\" AND S.COD_SECC = '\" + codSeccion + \"' \");\n stringBuffer.append(\" AND T.COD_TERR = '\" + codTer + \"' \");\n stringBuffer.append(\n \" AND R.ZSGV_OID_SUBG_VENT = SGV.OID_SUBG_VENT \");\n stringBuffer.append(\" AND Z.ZORG_OID_REGI = R.OID_REGI \");\n stringBuffer.append(\" AND S.ZZON_OID_ZONA = Z.OID_ZONA \");\n stringBuffer.append(\" AND TA.ZSCC_OID_SECC = S.OID_SECC \");\n stringBuffer.append(\" AND TA.TERR_OID_TERR = T.OID_TERR \"); \n stringBuffer.append(\" AND SGV.IND_BORR = 0 \");\n stringBuffer.append(\" AND R.IND_BORR = 0 \");\n stringBuffer.append(\" AND Z.IND_BORR = 0 \");\n stringBuffer.append(\" AND S.IND_BORR = 0 \");\n stringBuffer.append(\" AND T.IND_BORR = 0 \");\n stringBuffer.append(\" AND TA.IND_BORR = 0 \");\n \n respuestaRecordSet = belcorpService.dbService.executeStaticQuery(stringBuffer.toString());\n } else if (checkStr(codSeccion) && checkStr(codZona) &&\n checkStr(codRegion) && checkStr(codsgv)) {\n //Chequeo sobre CodSGV,Region,Zona,Seccion. Para Territorio\n stringBuffer = new StringBuffer(\"SELECT S.OID_SECC as UA\");\n stringBuffer.append(\n \" FROM ZON_SUB_GEREN_VENTA SGV, ZON_REGIO R, ZON_ZONA Z, ZON_SECCI S\");\n stringBuffer.append(\" WHERE \");\n stringBuffer.append(\" SGV.CANA_OID_CANA = \" +\n oidCanal.toString());\n stringBuffer.append(\" AND SGV.MARC_OID_MARC = \" +\n oidMarca.toString());\n stringBuffer.append(\" AND SGV.PAIS_OID_PAIS = \" +\n oidPais.toString());\n stringBuffer.append(\" AND SGV.COD_SUBG_VENT = '\" + codsgv +\n \"' \");\n stringBuffer.append(\" AND R.COD_REGI = '\" + codRegion + \"' \");\n stringBuffer.append(\" AND Z.COD_ZONA = '\" + codZona + \"' \");\n stringBuffer.append(\" AND S.COD_SECC = '\" + codSeccion + \"' \");\n stringBuffer.append(\n \" AND R.ZSGV_OID_SUBG_VENT = SGV.OID_SUBG_VENT \");\n stringBuffer.append(\" AND Z.ZORG_OID_REGI = R.OID_REGI \");\n stringBuffer.append(\" AND S.ZZON_OID_ZONA = Z.OID_ZONA \");\n stringBuffer.append(\" AND SGV.IND_BORR = 0 \");\n stringBuffer.append(\" AND R.IND_BORR = 0 \");\n stringBuffer.append(\" AND Z.IND_BORR = 0 \");\n stringBuffer.append(\" AND S.IND_BORR = 0 \");\n \n respuestaRecordSet = belcorpService.dbService.executeStaticQuery(stringBuffer.toString());\n } else if (checkStr(codsgv) && checkStr(codRegion) &&\n checkStr(codZona)) {\n //Chequeo sobre codSgv,Region,Zona. Para Seccion\n stringBuffer = new StringBuffer(\"SELECT Z.OID_ZONA as UA\");\n stringBuffer.append(\n \" FROM ZON_SUB_GEREN_VENTA SGV, ZON_REGIO R, ZON_ZONA Z\");\n stringBuffer.append(\" WHERE \");\n stringBuffer.append(\" SGV.CANA_OID_CANA = \" +\n oidCanal.toString());\n stringBuffer.append(\" AND SGV.MARC_OID_MARC = \" +\n oidMarca.toString());\n stringBuffer.append(\" AND SGV.PAIS_OID_PAIS = \" +\n oidPais.toString());\n stringBuffer.append(\" AND SGV.COD_SUBG_VENT = '\" + codsgv +\n \"' \");\n stringBuffer.append(\" AND R.COD_REGI = '\" + codRegion + \"' \");\n stringBuffer.append(\" AND Z.COD_ZONA = '\" + codZona + \"' \");\n stringBuffer.append(\n \" AND R.ZSGV_OID_SUBG_VENT = SGV.OID_SUBG_VENT \");\n stringBuffer.append(\" AND Z.ZORG_OID_REGI = R.OID_REGI \");\n stringBuffer.append(\" AND SGV.IND_BORR = 0 \");\n stringBuffer.append(\" AND R.IND_BORR = 0 \");\n stringBuffer.append(\" AND Z.IND_BORR = 0 \");\n \n respuestaRecordSet = belcorpService.dbService.executeStaticQuery(stringBuffer.toString());\n } else if (checkStr(codsgv) && checkStr(codRegion)) {\n //Chequeo sobre codSgv,Region. Para Zona.\n stringBuffer = new StringBuffer(\"SELECT R.OID_REGI as UA\");\n stringBuffer.append(\n \" FROM ZON_SUB_GEREN_VENTA SGV, ZON_REGIO R\");\n stringBuffer.append(\" WHERE \");\n stringBuffer.append(\" SGV.CANA_OID_CANA = \" +\n oidCanal.toString());\n stringBuffer.append(\" AND SGV.MARC_OID_MARC = \" +\n oidMarca.toString());\n stringBuffer.append(\" AND SGV.PAIS_OID_PAIS = \" +\n oidPais.toString());\n stringBuffer.append(\" AND SGV.COD_SUBG_VENT = '\" + codsgv +\n \"' \");\n stringBuffer.append(\" AND R.COD_REGI = '\" + codRegion + \"' \");\n stringBuffer.append(\n \" AND R.ZSGV_OID_SUBG_VENT = SGV.OID_SUBG_VENT \");\n stringBuffer.append(\" AND SGV.IND_BORR = 0 \");\n stringBuffer.append(\" AND R.IND_BORR = 0 \");\n \n respuestaRecordSet = belcorpService.dbService.executeStaticQuery(stringBuffer.toString());\n } else if (checkStr(codsgv)) {\n //Chequeo sobre codSgv. Para Region\n stringBuffer = new StringBuffer(\n \"SELECT SGV.OID_SUBG_VENT as UA\");\n stringBuffer.append(\" FROM ZON_SUB_GEREN_VENTA SGV\");\n stringBuffer.append(\" WHERE \");\n stringBuffer.append(\" SGV.CANA_OID_CANA = \" +\n oidCanal.toString());\n stringBuffer.append(\" AND SGV.MARC_OID_MARC = \" +\n oidMarca.toString());\n stringBuffer.append(\" AND SGV.PAIS_OID_PAIS = \" +\n oidPais.toString());\n stringBuffer.append(\" AND SGV.COD_SUBG_VENT = '\" + codsgv + \"' \");\n stringBuffer.append(\" AND SGV.IND_BORR = 0 \");\n \n respuestaRecordSet = belcorpService.dbService.executeStaticQuery(stringBuffer.toString());\n }\n } catch (MareMiiServiceNotFoundException serviceNotFoundException) {\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(serviceNotFoundException,\n UtilidadesError.armarCodigoError(codigoError));\n } catch (Exception exception) {\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(exception,\n UtilidadesError.armarCodigoError(codigoError));\n }\n\n if (respuestaRecordSet.esVacio()) {\n UtilidadesLog.info(\"DAOZON.obtenerUAporcodigo(Long oidMarca, Long oidCanal, Long oidPais, String codsgv, String codRegion, String codZona, String codSeccion, String codTer): Salida\");\n return null;\n } else {\n result = (BigDecimal) respuestaRecordSet.getValueAt(0, \"UA\");\n }\n UtilidadesLog.info(\"DAOZON.obtenerUAporcodigo(Long oidMarca, Long oidCanal, Long oidPais, String codsgv, String codRegion, String codZona, String codSeccion, String codTer): Salida\");\n return new Long(result.longValue());\n }",
"public void exechbase(List<String> hilbertresults, double lon1,double lon2,double lat1,double lat2) throws IOException {\n\t\tScan scan = new Scan();\r\n Table table = con.getTable(TableName.valueOf(tname));\r\n FilterList allFilters = new FilterList(FilterList.Operator.MUST_PASS_ALL);\r\n\t\t//String[] hilbertresultsindex = hilbertresults.split(\",\");\r\n\t\t\r\n\t\tfor(int i =0;i<(hilbertresults.size());i++) {\r\n allFilters.addFilter(new SingleColumnValueFilter(Bytes.toBytes(\"data\"), Bytes.toBytes(\"hilbertindex\"), CompareOperator.EQUAL,Bytes.toBytes(hilbertresults.get(i))));\r\n }\r\n allFilters.addFilter(new SingleColumnValueFilter(Bytes.toBytes(\"data\"), Bytes.toBytes(\"lon\"), CompareOperator.GREATER_OR_EQUAL,Bytes.toBytes(lon1)));\r\n allFilters.addFilter(new SingleColumnValueFilter(Bytes.toBytes(\"data\"), Bytes.toBytes(\"lon\"), CompareOperator.LESS_OR_EQUAL,Bytes.toBytes(lon2)));\r\n allFilters.addFilter(new SingleColumnValueFilter(Bytes.toBytes(\"data\"), Bytes.toBytes(\"lat\"), CompareOperator.LESS_OR_EQUAL,Bytes.toBytes(lat1)));\r\n allFilters.addFilter(new SingleColumnValueFilter(Bytes.toBytes(\"data\"), Bytes.toBytes(\"lat\"), CompareOperator.GREATER_OR_EQUAL,Bytes.toBytes(lon2)));\r\n //allFilters.addFilter(new SingleColumnValueFilter(Bytes.toBytes(\"data\"), Bytes.toBytes(\"groupid\"), CompareOperator.LESS_OR_EQUAL,Bytes.toBytes(30000)));\r\n\r\n\t\tscan.setFilter(allFilters);\r\n //scan.addFamily(Bytes.toBytes(\"data\"));\r\n \r\n ResultScanner scanner = table.getScanner(scan);\r\n int c=0;\r\n long t1 = System.currentTimeMillis();\r\n for (Result result = scanner.next(); result != null; result = scanner.next()) {\r\n //System.out.println(\"Found row : \" + result);\r\n c++;\r\n }\r\n System.out.println(\"Number of rows : \" + c);\r\n System.out.println(\"Calculation Time: \" + (System.currentTimeMillis() - t1));\r\n scanner.close();\r\n table.close();\r\n con.close();\r\n\t\t\r\n\t}",
"@Test\r\n\tpublic void testGetRecords() {\r\n\t\tAssert.assertNull(oic.getRecords(\"a\"));\r\n\r\n\t\tList<ObstetricsInit> list;\r\n\t\ttry {\r\n\t\t\tlist = oiData.getRecords(1);\r\n\t\t\tAssert.assertEquals(list, oic.getRecords(\"1\"));\r\n\t\t} catch (DBException e) {\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\t//TODO: Maybe test sorting\r\n\t}",
"java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> \n getRowList();",
"public void getChallanRecords(TaxChallan taxChallan){\r\n\t\tObject data[][] = null;\r\n\t\r\n\t\ttry {\r\n\t\t\tString challanQuery = \"SELECT HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE,HRMS_TAX_CHALLAN_DTL.EMP_ID,EMP_TOKEN,EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME,HRMS_TAX_CHALLAN_DTL.CHALLAN_TDS,\"\r\n\t\t\t\t\t+ \" NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_SURCHARGE,0),NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_EDU_CESS,0),NVL(HRMS_TAX_CHALLAN_DTL.CHALLAN_TOTAL_TAX,0) FROM\"\r\n\t\t\t\t\t+ \" HRMS_TAX_CHALLAN_DTL INNER JOIN HRMS_TAX_CHALLAN ON(HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE=HRMS_TAX_CHALLAN.CHALLAN_CODE)\"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_EMP_OFFC ON(HRMS_TAX_CHALLAN_DTL.EMP_ID=HRMS_EMP_OFFC.EMP_ID)\"\r\n\t\t\t\t\t+ \" WHERE HRMS_TAX_CHALLAN_DTL.CHALLAN_CODE=\"\r\n\t\t\t\t\t+ taxChallan.getChallanID()\r\n\t\t\t\t\t+ \" ORDER BY UPPER(EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME)\";\r\n\t\t\tdata = getSqlModel().getSingleResult(challanQuery);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"exception in challanQuery in getChallanRecords method\",e);\r\n\t\t} //end of catch\r\n\t\t\r\n\t\tif(data.length> 0 && data!=null){\r\n\t\ttaxChallan.setListFlag(\"true\");\r\n\t\tArrayList<Object> chList = new ArrayList<Object>();\r\n\t\ttry{\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t\t\tTaxChallan bean=new TaxChallan(); \r\n\t\t\tbean.setChallanCode(String.valueOf(data[i][0]));//Challan Code\r\n\t\t\tbean.setEmpId(String.valueOf(data[i][1]));//Employee Id\r\n\t\t\tbean.setEmpToken(String.valueOf(data[i][2]));//Token No.\r\n\t\t\tbean.setEmpName(String.valueOf(data[i][3]));//Emp Name\r\n\t\t\tbean.setChallanTax(Utility.twoDecimals(String.valueOf(data[i][4])));//Tds\r\n\t\t\t//bean.setChallanSurcharge(String.valueOf(data[i][5]));\r\n\t\t\tbean.setChallanSurcharge(Utility.twoDecimals(String.valueOf(data[i][5])));//Surcharge\r\n\t\t\tbean.setChallanEduCess(Utility.twoDecimals(String.valueOf(data[i][6])));//Education cess\r\n\t\t\tbean.setChallanTotTax(Utility.twoDecimals(String.valueOf(data[i][7])));\t//Total Tax\r\n\t\t//\tbean.setChallanTotTax(String.valueOf(data[i][7]));\r\n\t\t//\tbean.setPayDate(String.valueOf(data[i][8]));\r\n\t\t\t\r\n\t\t//\tif(String.valueOf(data[i][9]).equals(\"null\") || String.valueOf(data[i][9]).equals(\"\")){\r\n\t\t//\t\tbean.setDeductDate(\"\");\r\n\t\t//\t}else{\r\n\t\t//\tbean.setDeductDate(String.valueOf(data[i][9]).trim());\r\n\t\t//\t}\r\n\t\t\t\r\n\t\t//\tif(String.valueOf(data[i][10]).equals(\"null\") || String.valueOf(data[i][10]).equals(\"\")){\r\n\t\t//\t\tbean.setDepDate(\"\");\r\n\t\t//\t}else{\r\n\t\t//\tbean.setDepDate(String.valueOf(data[i][10]).trim());\r\n\t\t//\t}\r\n\t\t\tchList.add(bean);\r\n\t\t}\r\n\t\t}catch (Exception e) {\r\n\t\t\tlogger.error(\"exception in data loop\",e);\r\n\t\t} //end of catch\r\n\t\t\r\n\t\t taxChallan.setChallanList(chList);\r\n\t\t \r\n\t\t} //end of if\r\n\t\r\n\t}",
"java.util.List<com.sanqing.sca.message.ProtocolDecode.SimpleData> \n getSimpleDataList();",
"private List<String> readRecord(JsonObject workItem) throws AutomicException {\n List<String> record = new ArrayList<String>(resultFields.size());\n for (String field : resultFields) {\n JsonElement jeObj = workItem.get(field);\n String value = null;\n if (jeObj != null && jeObj.isJsonPrimitive()) {\n value = jeObj.getAsString();\n } else if (jeObj != null && jeObj.isJsonObject()) {\n JsonObject jObj = (JsonObject) jeObj;\n if (jObj.has(\"_refObjectName\")) {\n value = jObj.get(\"_refObjectName\").getAsString();\n }\n }\n record.add(value);\n }\n return record;\n }",
"public abstract IMEmoticonRecordDao mo122978a();",
"public D1DryadOAIPMHMapper(){\n\t\t_datasets = new ArrayList<DryadDataSet>();\n\t}",
"public /*override*/ void LoadRecordData(BinaryReader bamlBinaryReader) \r\n {\r\n TypeId = bamlBinaryReader.ReadInt16(); \r\n RuntimeName = bamlBinaryReader.ReadString(); \r\n }",
"public Vector getListMhsDanCurrNilaiMknya(String thsms, String idkmk,String uniqueId, String kdkmk, String nakmk, String shift) {\n \tVector v = new Vector();\n \t\n \t\n \tListIterator li = v.listIterator();\n\t\ttry {\n\t\t\tContext initContext = new InitialContext();\n\t\t\tContext envContext = (Context)initContext.lookup(\"java:/comp/env\");\n\t\t\tds = (DataSource)envContext.lookup(\"jdbc\"+beans.setting.Constants.getDbschema());\n\t\t\tcon = ds.getConnection();\n\t\t\t//yg terkini pake unique id\n\t\t\t//yg dulu pake idkmk shift,dts\n\t\t\t//stmt = con.prepareStatement(\"select NPMHSTRNLM,NILAITRNLM,NLAKHTRNLM,NLAKH_BY_DOSEN from TRNLM where (THSMSTRNLM=? and CLASS_POOL_UNIQUE_ID=?) or ((THSMSTRNLM=? and IDKMKTRNLM=? and SHIFTTRNLM=?))\");\n\t\t\tstmt = con.prepareStatement(\"select NPMHSTRNLM,NILAITRNLM,NLAKHTRNLM,BOBOTTRNLM,NLAKH_BY_DOSEN from TRNLM where (CLASS_POOL_UNIQUE_ID=?) or ((THSMSTRNLM=? and IDKMKTRNLM=? and SHIFTTRNLM=?))\");\n\t\t\t//stmt.setString(1,thsms);\n\t\t\tstmt.setLong(1,Long.parseLong(uniqueId));\n\t\t\tstmt.setString(2,thsms);\n\t\t\tstmt.setLong(3,Long.parseLong(idkmk));\n\t\t\tstmt.setString(4,shift);\n\t\t\trs = stmt.executeQuery();\n\t\t\twhile(rs.next()) {\n\t\t\t\tString npmhs = \"\"+rs.getString(\"NPMHSTRNLM\");\n\t\t\t\tString nilai = \"\"+rs.getFloat(\"NILAITRNLM\");\n\t\t\t\tString nlakh = \"\"+rs.getString(\"NLAKHTRNLM\");\n\t\t\t\tString bobot = \"\"+rs.getDouble(\"BOBOTTRNLM\");\n\t\t\t\tString nlakhByDosen = \"\"+rs.getBoolean(\"NLAKH_BY_DOSEN\");\n\t\t\t\tli.add(npmhs+\"`\"+nilai+\"`\"+nlakh+\"`\"+nlakhByDosen+\"`\"+bobot);\n\t\t\t}\n\t\t}\n\t\tcatch (NamingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t} \n\t\tfinally {\n\t\t\tif (rs!=null) try { rs.close(); } catch (Exception ignore){}\n\t\t\tif (stmt!=null) try { stmt.close(); } catch (Exception ignore){}\n\t\t\tif (con!=null) try { con.close();} catch (Exception ignore){}\n\t\t}\n\t\t//System.out.println(\"v size=\"+v.size());\n \treturn v;\n }",
"void mo13370a(int i, int i2, List<C15929a> list) throws IOException;",
"public TreeMap<Object, Metadata> metadata_reader(String filepath) throws Exception {\r\n String lang = Globals.CURRENT_LOCALE.getLanguage();\r\n TreeMap<Object, Metadata> metadatas = new TreeMap<Object, Metadata>();\r\n\r\n //Hash dei MIDs dei nodi obbligatori\r\n TreeMap forceAddMID = new TreeMap();\r\n forceAddMID.put(\"98\", 1);\r\n forceAddMID.put(\"14\", 1);\r\n forceAddMID.put(\"15\", 1);\r\n forceAddMID.put(\"64\", 1);\r\n forceAddMID.put(\"65\", 1);\r\n forceAddMID.put(\"122\", 1);\r\n forceAddMID.put(\"105\", 1);\r\n forceAddMID.put(\"23\", 1); //format\r\n forceAddMID.put(\"24\", 1); //location\r\n forceAddMID.put(\"25\", 1); //filesize\r\n forceAddMID.put(\"17\", 1); //technical\r\n forceAddMID.put(\"22\", 1); //Classification\r\n forceAddMID.put(\"45\", 1); //Taxonpath\r\n forceAddMID.put(\"46\", 1); //Source\r\n forceAddMID.put(\"47\", 1); //Taxon\r\n forceAddMID.put(\"82\", 1); //Kontextuelle Angaben\r\n forceAddMID.put(\"89\", 1); //REFERENZ\r\n forceAddMID.put(\"94\", 1); //Referenz\r\n forceAddMID.put(\"95\", 1); //Referenznummer\r\n forceAddMID.put(\"137\", 1); //Referenznummer\r\n forceAddMID.put(\"123\", 1); //identifiers\r\n forceAddMID.put(\"124\", 1); //identifiers\r\n forceAddMID.put(\"125\", 1); //identifiers\r\n forceAddMID.put(\"5\", 1); //keywords\r\n\tforceAddMID.put(\"96\", 1); // GPS\r\n forceAddMID.put(\"6\", 1); // Copertura\r\n forceAddMID.put(\"84\", 1); // Dimensioni\r\n forceAddMID.put(\"83\", 1); // Descrizione\r\n forceAddMID.put(\"93\", 1); // Tipo Materiale\r\n forceAddMID.put(\"88\", 1); // Unita di misura\r\n forceAddMID.put(\"85\", 1); // Lunghezza\r\n forceAddMID.put(\"86\", 1); // Larghezza\r\n forceAddMID.put(\"87\", 1); // Altezza\r\n forceAddMID.put(\"92\", 1); // Diametro\r\n \r\n forceAddMID.put(\"11\", 1); // Contributo\r\n forceAddMID.put(\"12\", 1); // Ruolo\r\n //forceAddMID.put(\"126\", 1); // Altro Ruolo\r\n forceAddMID.put(\"13\", 1); // Dati Personali\r\n forceAddMID.put(\"14\", 1); // Nome\r\n forceAddMID.put(\"15\", 1); // Cognome \r\n forceAddMID.put(\"63\", 1); // Ente\r\n forceAddMID.put(\"64\", 1); // Titolo\r\n forceAddMID.put(\"65\", 1); // Titolo\r\n //forceAddMID.put(\"66\", 1); // Tipo\r\n forceAddMID.put(\"148\", 1); // Numero Matricola\r\n \r\n /*forceAddMID.put(\"115\", 1); // Provenienza\r\n forceAddMID.put(\"114\", 1); // Provenienza - info\r\n forceAddMID.put(\"121\", 1); // Provenienza - tipo materiale\r\n forceAddMID.put(\"119\", 1); // Provenienza - note\r\n forceAddMID.put(\"107\", 1); // Provenienza - ruolo\r\n forceAddMID.put(\"106\", 1); // Provenienza - dati personali\r\n forceAddMID.put(\"108\", 1); // Provenienza - Nome\r\n forceAddMID.put(\"109\", 1); // Provenienza - Cognome\r\n forceAddMID.put(\"113\", 1); // Provenienza - Ente\r\n forceAddMID.put(\"110\", 1); // Provenienza - Titolo uno\r\n forceAddMID.put(\"111\", 1); // Provenienza - Titolo due\r\n forceAddMID.put(\"112\", 1); // Provenienza - tipo\r\n forceAddMID.put(\"117\", 1); // Provenienza - contributo\r\n forceAddMID.put(\"118\", 1); // Provenienza - contributo\r\n forceAddMID.put(\"116\", 1); // Provenienza - contributo\r\n forceAddMID.put(\"120\", 1); // Provenienza - contributo*/\r\n \r\n try {\r\n //selectedClassificationList = new TreeMap<String, String>();\r\n \r\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc;\r\n \r\n File urlf = new File(filepath);\r\n doc = dBuilder.parse(urlf);\r\n\r\n Node n = doc.getFirstChild();\r\n\r\n if (n.getNodeType() == Node.ELEMENT_NODE) {\r\n Element iENode = (Element) n;\r\n metadata_reader_metadatas(iENode, metadatas, false, forceAddMID, lang);\r\n }\r\n } catch (Exception ex) {\r\n throw ex;\r\n }\r\n\r\n return metadatas;\r\n }",
"public FSReturnVals ReadFirstRecord(FileHandle ofh, TinyRec rec)\n {\n FSReturnVals outcome = FSReturnVals.Fail;\n // should set ip address, port number\n Vector<IP> servers = ofh.getServersForChunk(rec.getRID().getChunkHandle());\n int numServers = servers.size();\n if (ofh == null)\n {\n return FSReturnVals.BadHandle;\n }\n if (rec == null)\n {\n return FSReturnVals.BadRecID;\n }\n for(int i = 0; i < numServers; i++)\n {\n IP ip = new IP();\n ip.setPort(servers.elementAt(i).getPort());\n ip.setAddress(servers.elementAt(i).getAddress());\n try\n {\n Socket sock = new Socket(ip.getAddress(), ip.getPort());\n ObjectOutputStream serverOutput = new ObjectOutputStream(sock.getOutputStream());\n serverOutput.flush();\n ObjectInputStream serverInput = new ObjectInputStream(sock.getInputStream());\n serverOutput.writeInt(Constants.IsClient);\n \n serverOutput.writeInt(Constants.READ_FIRST_RECORD);\n serverOutput.writeInt(rec.getRID().getChunkHandle().length());\n serverOutput.writeBytes(rec.getRID().getChunkHandle());\n serverOutput.flush();\n \n int response = serverInput.readInt();\n if (response == Constants.FALSE)\n {\n i--;\n continue;\n }\n \n //int type = serverOutput.readInt();\n //int command = serverOutput.readInt();\n //if(type == Constants.IsServer && command = Constants.READ_FIRST_RECORD)\n //{\n int sz = serverInput.readInt();\n byte[] data = new byte[sz];\n serverInput.read(data, 0, sz);\n String datastr = new String(data, \"UTF-8\");\n if(data.length > 0)\n {\n int j = serverInput.readInt();\n outcome = intToFSReturnVal(j);\n rec.setPayload(data);\n break;\n }\n else\n {\n i--;\n continue;\n }\n //}\n //else\n //{\n // int j = serverInput.readInt();\n // outcome = intToFSReturnVal(j)\n //}\n }\n catch (Exception e)\n {\n outcome = FSReturnVals.Fail;\n System.out.println(\"Unable to append records (ClientREC:65)\");\n }\n }\n \n return outcome;\n\t}",
"public Object[] getSql_Qry_Hist(String UserId,String L_SysCd,String L_JobCd,\r\n \t\tString Cbo_ReqCd, String L_ItemId)\tthrows SQLException, Exception {\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tPreparedStatement pstmt2 = null;\r\n\t\tResultSet rs = null;\r\n\t\tResultSet rs2 = null;\r\n\t\tStringBuffer strQuery = new StringBuffer();\r\n\t\tArrayList<HashMap<String, String>> rtList = new ArrayList<HashMap<String, String>>();\r\n\t\tHashMap<String, String>\t\t\t rst\t\t = null;\r\n\r\n\t\tConnectionContext connectionContext = new ConnectionResource();\r\n\t\ttry {\r\n\t\t\tconn = connectionContext.getConnection();\r\n\r\n\t\t strQuery.setLength(0);\r\n\t \tstrQuery.append(\"select a.cr_acptno,a.cr_aplydate,a.cr_status, \\n\");\r\n\t \tstrQuery.append(\" a.cr_rsrccd,a.cr_qrycd,b.cm_username,c.cm_codename, \\n\");\r\n\t \tstrQuery.append(\" d.cr_qrycd qrycd,d.cr_sayu,d.cr_passok,d.cr_passcd \\n\");\r\n\t \tstrQuery.append(\" , to_char(d.cr_acptdate,'yyyy-mm-dd hh24:mi:ss') cr_acptdate \\n\");\r\n\t \tstrQuery.append(\" , to_char(a.cr_prcdate,'yyyy-mm-dd hh24:mi:ss') cr_prcdate \\n\");\r\n\t \tstrQuery.append(\" , d.cr_itsmtitle , d.cr_itsmid \\n\");\r\n\t \tstrQuery.append(\" from cmr1010 a,cmr1000 d,cmm0040 b,cmm0020 c \\n\");\r\n\t \tstrQuery.append(\" where a.cr_itemid=? and \\n\"); //L_ItemId\r\n if (!Cbo_ReqCd.equals(\"ALL\")){\r\n \tstrQuery.append(\" d.cr_qrycd=? and \\n\"); //Cbo_ReqCd\r\n }\r\n strQuery.append(\" a.cr_acptno=d.cr_acptno and \\n\");\r\n strQuery.append(\" a.cr_editor=b.cm_userid and \\n\");\r\n strQuery.append(\" c.cm_macode='REQUEST' and d.cr_qrycd=c.cm_micode \\n\");\r\n if (Cbo_ReqCd.equals(\"ALL\") || Cbo_ReqCd.equals(\"04\")){\r\n\t strQuery.append(\" union \\n\");\r\n\t strQuery.append(\" select b.cr_acptno,'' as cr_aplydate,'9' cr_status,a.cr_rsrccd, \\n\");\r\n\t strQuery.append(\" decode(b.cr_qrycd,'03','최초이행','추가이행') as cr_qrycd,c.cm_username, \\n\");\r\n\t strQuery.append(\" decode(b.cr_qrycd,'03','최초이행','추가이행') as cm_codename, \\n\");\r\n\t strQuery.append(\" '04' as qrycd, \\n\");\r\n\t strQuery.append(\" '형상관리 일괄이행' as cr_passcd, '0' as cr_passok,'형상관리 일괄이행' as cr_passcd \\n\"); \r\n\t strQuery.append(\" , to_char(b.cr_acptdate,'yyyy-mm-dd hh24:mi:ss') as cr_acptdate \\n\");\r\n\t strQuery.append(\" , to_char(b.cr_acptdate,'yyyy-mm-dd hh24:mi:ss') as cr_prcdate \\n\");\r\n\t strQuery.append(\" , '' as cr_itsmtitle , '' as cr_itsmid\\n\");\r\n\t strQuery.append(\" from cmr0020 a,cmr0021 b,cmm0040 c \\n\");\r\n\t strQuery.append(\" where a.cr_itemid=? and \\n\"); //L_ItemId\r\n\t strQuery.append(\" b.cr_qrycd in ('03','05') and \\n\");\r\n\t strQuery.append(\" a.cr_itemid = b.cr_itemid and \\n\");\r\n\t strQuery.append(\" b.cr_editor=c.cm_userid \\n\");\r\n }\r\n strQuery.append(\" order by cr_prcdate desc \\n\");\r\n\r\n\t\t //pstmt = conn.prepareStatement(strQuery.toString());\r\n\t\t pstmt = new LoggableStatement(conn, strQuery.toString());\r\n\t\t int CNT = 0;\r\n\t \tpstmt.setString(++CNT, L_ItemId);\r\n\t \tif (!Cbo_ReqCd.equals(\"ALL\")) pstmt.setString(++CNT, Cbo_ReqCd);\r\n\t \tif (Cbo_ReqCd.equals(\"ALL\") || Cbo_ReqCd.equals(\"04\")) pstmt.setString(++CNT, L_ItemId);\r\n\t \tecamsLogger.error(((LoggableStatement)pstmt).getQueryString());\r\n\t \trs = pstmt.executeQuery();\r\n\t\t while (rs.next()){\r\n\t\t\t\trst = new HashMap<String,String>();\r\n\t\t\t\t//rst.put(\"NO\",Integer.toString(rs.getRow()));\r\n\t\t\t\trst.put(\"SubItems1\",rs.getString(\"cr_acptdate\"));//rs.getString(\"cr_acptdate\").substring(0,rs.getString(\"cr_acptdate\").length()-2)\r\n\t\t\t\trst.put(\"SubItems2\",rs.getString(\"cm_username\"));\r\n\r\n\t\t\t\trst.put(\"SubItems3\",rs.getString(\"cm_codename\"));\r\n\t\t\t\tif (rs.getString(\"cr_acptno\").substring(4,6).equals(\"04\")){\r\n\t\t\t\t\tstrQuery.setLength(0);\r\n\t\t\t\t\tstrQuery.append(\"select cm_codename from cmm0020 where cm_macode='CHECKIN' and cm_micode=? \\n\");\r\n\t\t\t\t pstmt2 = conn.prepareStatement(strQuery.toString());\r\n\t\t\t\t pstmt2.setString(1, rs.getString(\"cr_qrycd\"));\r\n\t\t\t \trs2 = pstmt2.executeQuery();\r\n\t\t\t \tif (rs2.next())\r\n\t\t\t \t\trst.put(\"SubItems3\",rs.getString(\"cm_codename\") + \"[\" + rs2.getString(\"cm_codename\") + \"]\");\r\n\t\t\t \trs2.close();\r\n\t\t\t \tpstmt2.close();\r\n }\r\n rst.put(\"qrycd\", rs.getString(\"qrycd\"));\r\n rst.put(\"SubItems4\",rs.getString(\"cr_acptno\").substring(6));\r\n\r\n if (!rs.getString(\"qrycd\").equals(\"04\")){\r\n\t rst.put(\"SubItems5\",\"\");\r\n }else{\r\n \tstrQuery.setLength(0);\r\n \tstrQuery.append(\"select cm_codename from cmm0020 \\n\");\r\n \tstrQuery.append(\"where cm_macode='REQPASS' and cm_micode=? \\n\");//cr_passok\r\n \tpstmt2 = conn.prepareStatement(strQuery.toString());\r\n \tpstmt2.setString(1, rs.getString(\"cr_passok\"));\r\n\t\t\t \trs2 = pstmt2.executeQuery();\r\n\t\t\t \tif (rs2.next())\r\n\t\t\t \t\trst.put(\"SubItems5\",rs2.getString(\"cm_codename\"));\r\n\t\t\t \trs2.close();\r\n\t\t\t \tpstmt2.close();\r\n\r\n\t\t\t\t\tif (rs.getString(\"cr_aplydate\") != null){\r\n\t if (rs.getString(\"cr_aplydate\").equals(\"9\"))\r\n\t \trst.put(\"SubItems5\",\"적용제외\");\r\n\t else\r\n\t \trst.put(\"SubItems5\",\"적용일시적용[\"+rs.getString(\"cr_aplydate\").substring(0,4)\r\n\t \t\t\t+\"/\"+rs.getString(\"cr_aplydate\").substring(4,6)+\"/\"+rs.getString(\"cr_aplydate\").substring(6,8)\r\n\t \t\t\t+\" \"+rs.getString(\"cr_aplydate\").substring(8,10)+\":\"+rs.getString(\"cr_aplydate\").substring(10,12)+\"]\");\r\n\t\t\t\t\t}\r\n }\r\n\r\n if (rs.getString(\"cr_prcdate\") != null){\r\n\t if (rs.getString(\"cr_prcdate\").length() > 0){\r\n\t \tif (rs.getString(\"cr_status\").equals(\"3\"))\r\n\t\t \t rst.put(\"SubItems6\", \"[반송]\" + rs.getString(\"cr_prcdate\"));//rs.getString(\"cr_prcdate\").substring(5,rs.getString(\"cr_prcdate\").length()-2)\r\n\t \telse\r\n\t \t rst.put(\"SubItems6\", rs.getString(\"cr_prcdate\"));//rs.getString(\"cr_prcdate\").substring(5,rs.getString(\"cr_prcdate\").length()-2)\r\n\t \t//rst.put(\"SubItems6\", rs.getString(\"cr_prcdate\").substring(5,7) + \"/\" +\r\n\t \t\t//rs.getString(\"cr_prcdate\").substring(8,10) + \" \" +\r\n\t \t\t//rs.getString(\"cr_prcdate\").substring(10,12) + \":\" +\r\n\t \t\t//rs.getString(\"cr_prcdate\").substring(12,14) + \":\" +\r\n\t \t\t//rs.getString(\"cr_prcdate\").substring(14));\r\n\t }\r\n } else {\r\n \trst.put(\"SubItems6\",\"진행중\");\r\n }\r\n if ( rs.getString(\"cr_sayu\") !=null ){\r\n \trst.put(\"SubItems7\", rs.getString(\"cr_sayu\"));//신청사유\r\n } else {\r\n \trst.put(\"SubItems7\", \"\");//신청사유\r\n }\r\n \r\n if ( rs.getString(\"cr_itsmid\") != null ) {\r\n \trst.put(\"srinfo\", \"[\" + rs.getString(\"cr_itsmid\") + \"]\" + rs.getString(\"cr_itsmtitle\") );\r\n } else {\r\n \trst.put(\"srinfo\", \"\" );\r\n }\r\n rst.put(\"SubItems8\", rs.getString(\"cr_acptno\"));\r\n rst.put(\"SubItems9\", rs.getString(\"cr_status\"));\r\n rtList.add(rst);\r\n rst = null;\r\n\t\t }\r\n\t\t rs.close();\r\n\t\t pstmt.close();\r\n\t\t conn.close();\r\n\t\t rs = null;\r\n\t\t pstmt = null;\r\n\t\t conn = null;\r\n\r\n\t\t\treturn rtList.toArray();\r\n\r\n\t\t} catch (SQLException sqlexception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\tsqlexception.printStackTrace();\r\n\t\t\tthrow sqlexception;\r\n\t\t} catch (Exception exception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\texception.printStackTrace();\r\n\t\t\tthrow exception;\r\n\t\t}finally{\r\n\t\t\tif (strQuery != null)\tstrQuery = null;\r\n\t\t\tif (rtList != null)\trtList = null;\r\n\t\t\tif (rs != null) try{rs.close();}catch (Exception ex){ex.printStackTrace();}\r\n\t\t\tif (pstmt != null) try{pstmt.close();}catch (Exception ex2){ex2.printStackTrace();}\r\n\t\t\tif (conn != null){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tConnectionResource.release(conn);\r\n\t\t\t\t}catch(Exception ex3){\r\n\t\t\t\t\tex3.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:38.928 -0500\", hash_original_method = \"65EA4CC7473CC6604A3DE8B9A82FCC11\", hash_generated_method = \"2C399FBFF5BF16C5903F56ED85D3BCE5\")\n \npublic int fetchIsimRecords(IccFileHandler iccFh, Handler h) {\n iccFh.loadEFTransparent(EF_IMPI, h.obtainMessage(\n IccRecords.EVENT_GET_ICC_RECORD_DONE, new EfIsimImpiLoaded()));\n iccFh.loadEFLinearFixedAll(EF_IMPU, h.obtainMessage(\n IccRecords.EVENT_GET_ICC_RECORD_DONE, new EfIsimImpuLoaded()));\n iccFh.loadEFTransparent(EF_DOMAIN, h.obtainMessage(\n IccRecords.EVENT_GET_ICC_RECORD_DONE, new EfIsimDomainLoaded()));\n return 3; // number of EF record load requests\n }",
"public static ArrayList<DayData> getAllData(List<List<String>> records) {\r\n ArrayList<DayData> dayDataL = new ArrayList<>(50);\r\n for (int i = 1; i < 51; i++) {\r\n\r\n dayDataL.add(getStockByNumber(records, i));\r\n //System.out.println(\"Added \" + i);\r\n //System.out.println(getUsedMemory());\r\n }\r\n\r\n return dayDataL;\r\n }",
"public RecordSet loadAllProcessDetailHistory(Record inputRecord);",
"public java.sql.ResultSet CitasActivasSoloMedico(String CodigoMedico){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo,su.usu_codigo,SUBSTRING(phm.horas, 7, 3) AS jornada FROM pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes,seg_datos_personales sdp,seg_usuario su WHERE pmd.codigo = \"+CodigoMedico+\" AND phm.codMedico_fk = pmd.codigo AND pmd.codEspe_fk = pes.codigo AND phm.estado='0' AND sdp.numeroDocumento = pmd.numeroDocumento AND su.dat_codigo_fk = sdp.dat_codigo AND phm.fechas >= CURDATE() ORDER BY phm.fechas,jornada,phm.horas LIMIT 100 \");\r\n \t//System.out.println(\"SELECT ahm.codigo,ahm.horas,ahm.fechas,ahm.NombrePaciente,aes.nombre_especialidad,amd.nombre,amd.apellidos,ahm.estado,aes.codigo,amd.codigo,su.usu_codigo,SUBSTRING(ahm.horas, 7, 3) AS jornada FROM agm_horariomedico ahm,agm_medico amd,agm_especialidad aes,seg_datos_personales sdp,seg_usuario su WHERE amd.codigo = \"+CodigoMedico+\" AND ahm.codMedico_fk = amd.codigo AND amd.codEspe_fk = aes.codigo AND ahm.estado='0' AND sdp.numeroDocumento = amd.numeroDocumento AND su.dat_codigo_fk = sdp.dat_codigo AND ahm.fechas >= CURDATE() ORDER BY ahm.fechas,jornada,ahm.horas LIMIT 100 \");\r\n \t\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultapormedicofecha \"+ex);\r\n }\t\r\n return rs;\r\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 Collection cargarMasivo(int codigoCiclo, String proceso, String subproceso, int periodo) {\n/* 287 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 289 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, u.Descripcion Nombre_Area, Um.Descripcion as Nombre_Unidad_Medida, to_char(m.Codigo_Objetivo,'9999999999') ||' - ' || o.Descripcion Nombre_Objetivo, to_char(m.Codigo_Meta,'9999999999') ||' - ' || m.Descripcion Nombre_Meta, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, l.Valor_Logro, case when l.Valor_Logro is not null then 'A' else 'N' end Existe from Cal_Planes p, Cal_Plan_Objetivos o, Cal_Plan_Metas m left join Cal_Logros l on( m.Codigo_Ciclo = l.Codigo_Ciclo and m.Codigo_Plan = l.Codigo_Plan and m.Codigo_Meta = l.Codigo_Meta and m.Codigo_Objetivo = l.Codigo_Objetivo and \" + periodo + \" = l.Periodo),\" + \" Unidades_Dependencia u,\" + \" Sis_Multivalores Um\" + \" where p.Ciclo = o.Codigo_Ciclo\" + \" and p.Codigo_Plan = o.Codigo_Plan\" + \" and o.Codigo_Ciclo = m.Codigo_Ciclo\" + \" and o.Codigo_Plan = m.Codigo_Plan\" + \" and o.Codigo_Objetivo = m.Codigo_Objetivo\" + \" and p.Codigo_Area = u.Codigo\" + \" and m.Unidad_Medida = Um.Valor\" + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\" + \" and o.Proceso = '\" + proceso + \"'\" + \" and o.Subproceso = '\" + subproceso + \"'\" + \" and p.Ciclo = \" + codigoCiclo + \" and m.Estado = 'A'\" + \" and o.Estado = 'A'\" + \" and o.Tipo_Objetivo in ('G', 'M')\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 333 */ if (periodo == 1) {\n/* 334 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 336 */ else if (periodo == 2) {\n/* 337 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 339 */ else if (periodo == 3) {\n/* 340 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 342 */ else if (periodo == 4) {\n/* 343 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 345 */ else if (periodo == 5) {\n/* 346 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 348 */ else if (periodo == 6) {\n/* 349 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 351 */ else if (periodo == 7) {\n/* 352 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 354 */ else if (periodo == 8) {\n/* 355 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 357 */ else if (periodo == 9) {\n/* 358 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 360 */ else if (periodo == 10) {\n/* 361 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 363 */ else if (periodo == 11) {\n/* 364 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 366 */ else if (periodo == 12) {\n/* 367 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 370 */ s = s + \" order by m.Codigo_Ciclo, m.Codigo_Objetivo, m.Codigo_Meta, u.Descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 377 */ boolean rtaDB = this.dat.parseSql(s);\n/* 378 */ if (!rtaDB) {\n/* 379 */ return resultados;\n/* */ }\n/* */ \n/* 382 */ this.rs = this.dat.getResultSet();\n/* 383 */ while (this.rs.next()) {\n/* 384 */ CalMetasDTO reg = new CalMetasDTO();\n/* 385 */ reg.setCodigoCiclo(codigoCiclo);\n/* 386 */ reg.setCodigoPlan(this.rs.getInt(\"codigo_plan\"));\n/* 387 */ reg.setCodigoMeta(this.rs.getInt(\"codigo_meta\"));\n/* 388 */ reg.setCodigoObjetivo(this.rs.getInt(\"codigo_objetivo\"));\n/* 389 */ reg.setNombreArea(this.rs.getString(\"Nombre_Area\"));\n/* 390 */ reg.setNombreMeta(this.rs.getString(\"Nombre_meta\"));\n/* 391 */ reg.setNombreObjetivo(this.rs.getString(\"Nombre_Objetivo\"));\n/* 392 */ reg.setUnidadMedida(this.rs.getString(\"unidad_medida\"));\n/* 393 */ reg.setValorMinimo(this.rs.getDouble(\"valor_minimo\"));\n/* 394 */ reg.setValorMaximo(this.rs.getDouble(\"valor_maximo\"));\n/* 395 */ reg.setValorLogro(this.rs.getDouble(\"Valor_Logro\"));\n/* 396 */ reg.setNombreUnidadMedida(this.rs.getString(\"nombre_unidad_medida\"));\n/* 397 */ reg.setEstado(this.rs.getString(\"existe\"));\n/* 398 */ resultados.add(reg);\n/* */ }\n/* */ \n/* 401 */ } catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 405 */ return resultados;\n/* */ }",
"public RecordSet loadAllCorpOrgDiscountMember(Record inputRecord, RecordLoadProcessor entitlementRLP);",
"public Collection cargarDeObjetivo(int codigoCiclo, int codigoPlan, int objetivo, int periodo, String estado) {\n/* 121 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 123 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion as Nombretipomedicion, Est.Descripcion as Nombreestado, Um.Descripcion as Nombre_Unidad_Medida, SUM(CASE WHEN ac.NUMERO IS NOT NULL THEN 1 ELSE 0 END) acciones from Cal_Plan_Metas m left join Am_Acciones Ac on( m.Codigo_Ciclo = Ac.Codigo_Ciclo and m.Codigo_Plan = Ac.Codigo_Plan and m.Codigo_Meta = Ac.Codigo_Meta and Ac.Asociado = 'P'), \\t\\t Sis_Multivalores Tm, \\t\\t Sis_Multivalores Est, \\t\\t Sis_Multivalores Um where m.Tipo_Medicion = Tm.Valor and Tm.Tabla = 'CAL_TIPO_MEDICION' and m.Estado = Est.Valor and Est.Tabla = 'CAL_ESTADO_META' and m.Unidad_Medida = Um.Valor and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META' and m.codigo_ciclo=\" + codigoCiclo + \" and m.codigo_plan=\" + codigoPlan + \" and m.codigo_objetivo=\" + objetivo;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 180 */ if (estado.length() > 0) {\n/* 181 */ s = s + \" and m.estado='A'\";\n/* */ }\n/* */ \n/* 184 */ if (periodo == 1) {\n/* 185 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 187 */ else if (periodo == 2) {\n/* 188 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 190 */ else if (periodo == 3) {\n/* 191 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 193 */ else if (periodo == 4) {\n/* 194 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 196 */ else if (periodo == 5) {\n/* 197 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 199 */ else if (periodo == 6) {\n/* 200 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 202 */ else if (periodo == 7) {\n/* 203 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 205 */ else if (periodo == 8) {\n/* 206 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 208 */ else if (periodo == 9) {\n/* 209 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 211 */ else if (periodo == 10) {\n/* 212 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 214 */ else if (periodo == 11) {\n/* 215 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 217 */ else if (periodo == 12) {\n/* 218 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 221 */ s = s + \" GROUP BY m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion, Est.Descripcion, Um.Descripcion order by m.descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 259 */ boolean rtaDB = this.dat.parseSql(s);\n/* 260 */ if (!rtaDB) {\n/* 261 */ return resultados;\n/* */ }\n/* */ \n/* 264 */ this.rs = this.dat.getResultSet();\n/* 265 */ while (this.rs.next()) {\n/* 266 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 269 */ catch (Exception e) {\n/* 270 */ e.printStackTrace();\n/* 271 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 273 */ return resultados;\n/* */ }",
"public void Get() { ob = ti.Get(currentrowi, \"persoana\"); ID = ti.ID; CNP = ob[0]; Nume = ob[1]; Prenume = ob[2]; }",
"public final List<C1025a> mo4167yR() {\n ArrayList arrayList = new ArrayList();\n for (int i = 0; i < this.bUL.size(); i++) {\n C1027c c1027c = (C1027c) this.bUL.get(i);\n Intent v = C6278a.m10277u(c1027c.bUU);\n if (v == null) {\n C1070c.m2367e(\"MicroMsg.AlarmDetector\", \"bytesToIntent is null, alarmInfoSet maybe invalid object\", new Object[0]);\n } else {\n arrayList.add(new C1025a(c1027c.type, c1027c.bUN, c1027c.bUO, new C1029e(c1027c.bUT, v, c1027c.bUV), c1027c.stackTrace, c1027c.bUR));\n }\n }\n return arrayList;\n }",
"@SuppressWarnings(\"all\")\npublic interface I_LBR_MDFeUnloadDoc \n{\n\n /** TableName=LBR_MDFeUnloadDoc */\n public static final String Table_Name = \"LBR_MDFeUnloadDoc\";\n\n /** AD_Table_ID=1120355 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name C_Region_ID */\n public static final String COLUMNNAME_C_Region_ID = \"C_Region_ID\";\n\n\t/** Set Region.\n\t * Identifies a geographical Region\n\t */\n\tpublic void setC_Region_ID (int C_Region_ID);\n\n\t/** Get Region.\n\t * Identifies a geographical Region\n\t */\n\tpublic int getC_Region_ID();\n\n\tpublic org.compiere.model.I_C_Region getC_Region() throws RuntimeException;\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name DateDoc */\n public static final String COLUMNNAME_DateDoc = \"DateDoc\";\n\n\t/** Set Document Date.\n\t * Date of the Document\n\t */\n\tpublic void setDateDoc (Timestamp DateDoc);\n\n\t/** Get Document Date.\n\t * Date of the Document\n\t */\n\tpublic Timestamp getDateDoc();\n\n /** Column name DateTrx */\n public static final String COLUMNNAME_DateTrx = \"DateTrx\";\n\n\t/** Set Transaction Date.\n\t * Transaction Date\n\t */\n\tpublic void setDateTrx (Timestamp DateTrx);\n\n\t/** Get Transaction Date.\n\t * Transaction Date\n\t */\n\tpublic Timestamp getDateTrx();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name GrandTotal */\n public static final String COLUMNNAME_GrandTotal = \"GrandTotal\";\n\n\t/** Set Grand Total.\n\t * Total amount of document\n\t */\n\tpublic void setGrandTotal (BigDecimal GrandTotal);\n\n\t/** Get Grand Total.\n\t * Total amount of document\n\t */\n\tpublic BigDecimal getGrandTotal();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name LBR_MDFeDocType */\n public static final String COLUMNNAME_LBR_MDFeDocType = \"LBR_MDFeDocType\";\n\n\t/** Set MDFe Document Type.\n\t * MDFe Document Type\n\t */\n\tpublic void setLBR_MDFeDocType (String LBR_MDFeDocType);\n\n\t/** Get MDFe Document Type.\n\t * MDFe Document Type\n\t */\n\tpublic String getLBR_MDFeDocType();\n\n /** Column name LBR_MDFeUnloadDoc_ID */\n public static final String COLUMNNAME_LBR_MDFeUnloadDoc_ID = \"LBR_MDFeUnloadDoc_ID\";\n\n\t/** Set Documento de Descarregamento do MDFe\t */\n\tpublic void setLBR_MDFeUnloadDoc_ID (int LBR_MDFeUnloadDoc_ID);\n\n\t/** Get Documento de Descarregamento do MDFe\t */\n\tpublic int getLBR_MDFeUnloadDoc_ID();\n\n /** Column name LBR_MDFeUnload_ID */\n public static final String COLUMNNAME_LBR_MDFeUnload_ID = \"LBR_MDFeUnload_ID\";\n\n\t/** Set Descarregamento do Manifesto\t */\n\tpublic void setLBR_MDFeUnload_ID (int LBR_MDFeUnload_ID);\n\n\t/** Get Descarregamento do Manifesto\t */\n\tpublic int getLBR_MDFeUnload_ID();\n\n\tpublic org.adempierelbr.model.I_LBR_MDFeUnload getLBR_MDFeUnload() throws RuntimeException;\n\n /** Column name LBR_NotaFiscal_ID */\n public static final String COLUMNNAME_LBR_NotaFiscal_ID = \"LBR_NotaFiscal_ID\";\n\n\t/** Set Nota Fiscal.\n\t * Primary key table LBR_NotaFiscal\n\t */\n\tpublic void setLBR_NotaFiscal_ID (int LBR_NotaFiscal_ID);\n\n\t/** Get Nota Fiscal.\n\t * Primary key table LBR_NotaFiscal\n\t */\n\tpublic int getLBR_NotaFiscal_ID();\n\n\tpublic org.adempierelbr.model.I_LBR_NotaFiscal getLBR_NotaFiscal() throws RuntimeException;\n\n /** Column name LBR_SubSerie */\n public static final String COLUMNNAME_LBR_SubSerie = \"LBR_SubSerie\";\n\n\t/** Set Sub Serie.\n\t * Sub Serie\n\t */\n\tpublic void setLBR_SubSerie (String LBR_SubSerie);\n\n\t/** Get Sub Serie.\n\t * Sub Serie\n\t */\n\tpublic String getLBR_SubSerie();\n\n /** Column name PIN */\n public static final String COLUMNNAME_PIN = \"PIN\";\n\n\t/** Set PIN.\n\t * Personal Identification Number\n\t */\n\tpublic void setPIN (String PIN);\n\n\t/** Get PIN.\n\t * Personal Identification Number\n\t */\n\tpublic String getPIN();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n\n /** Column name lbr_Barcode2 */\n public static final String COLUMNNAME_lbr_Barcode2 = \"lbr_Barcode2\";\n\n\t/** Set Barcode 2.\n\t * Second Barcode of the Nota Fiscal\n\t */\n\tpublic void setlbr_Barcode2 (String lbr_Barcode2);\n\n\t/** Get Barcode 2.\n\t * Second Barcode of the Nota Fiscal\n\t */\n\tpublic String getlbr_Barcode2();\n\n /** Column name lbr_CNPJ */\n public static final String COLUMNNAME_lbr_CNPJ = \"lbr_CNPJ\";\n\n\t/** Set CNPJ.\n\t * Used to identify Legal Entities in Brazil\n\t */\n\tpublic void setlbr_CNPJ (String lbr_CNPJ);\n\n\t/** Get CNPJ.\n\t * Used to identify Legal Entities in Brazil\n\t */\n\tpublic String getlbr_CNPJ();\n\n /** Column name lbr_NFSerie */\n public static final String COLUMNNAME_lbr_NFSerie = \"lbr_NFSerie\";\n\n\t/** Set NF Serie\t */\n\tpublic void setlbr_NFSerie (String lbr_NFSerie);\n\n\t/** Get NF Serie\t */\n\tpublic String getlbr_NFSerie();\n\n /** Column name lbr_NFeID */\n public static final String COLUMNNAME_lbr_NFeID = \"lbr_NFeID\";\n\n\t/** Set NFe ID.\n\t * Identification of NFe\n\t */\n\tpublic void setlbr_NFeID (String lbr_NFeID);\n\n\t/** Get NFe ID.\n\t * Identification of NFe\n\t */\n\tpublic String getlbr_NFeID();\n\n /** Column name lbr_NFeProt */\n public static final String COLUMNNAME_lbr_NFeProt = \"lbr_NFeProt\";\n\n\t/** Set NFe Protocol\t */\n\tpublic void setlbr_NFeProt (String lbr_NFeProt);\n\n\t/** Get NFe Protocol\t */\n\tpublic String getlbr_NFeProt();\n}",
"java.util.List<db.fennec.proto.FDataEntryProto> \n getDataList();",
"public List<Record>getRecords(){\n List<Record>recordList=new ArrayList<>();\n RecordCursorWrapper currsorWrapper=queryRecords(null,null);\n try{\n currsorWrapper.moveToFirst();\n while(!currsorWrapper.isAfterLast()){\n recordList.add(currsorWrapper.getRecord());\n currsorWrapper.moveToNext();\n }\n }finally {\n currsorWrapper.close();\n }\n return recordList;\n }",
"public ArrayList<ChiTietPhieuNhap> listChiTietPhieuNhap(String MaPN){\r\n Connection conn = DBConnect.getConnection();\r\n String sql = \"SELECT * FROM chitietphieunhap WHERE MaPN = '\"+MaPN+\"'\";\r\n ArrayList<ChiTietPhieuNhap> list = new ArrayList<>();\r\n \r\n try {\r\n PreparedStatement ps = conn.prepareCall(sql);\r\n ResultSet rs = ps.executeQuery();\r\n while(rs.next()){\r\n ChiTietPhieuNhap chitietphieunhap = new ChiTietPhieuNhap();\r\n \r\n chitietphieunhap.setMaPN(rs.getString(\"MaPN\"));\r\n chitietphieunhap.setMaSP(rs.getString(\"MaSP\"));\r\n chitietphieunhap.setSoLuong(rs.getInt(\"SoLuong\"));\r\n chitietphieunhap.setDonGia(rs.getInt(\"DonGia\"));\r\n \r\n list.add(chitietphieunhap);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ChiTietPhieuNhapDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return list;\r\n }",
"public RecordsList listRecords(ResumptionToken resumptionToken) throws OAIException {\n try {\n \tString query = builder.buildListRecordsQuery(resumptionToken);\n \tDocument document = reader.read(query);\n return new RecordsList(document);\n } catch (ErrorResponseException e) {\n \tthrow e;\n } catch (Exception e) {\n throw new OAIException(e);\n }\n }",
"private void getBulkApiRecordsInfo(Date processStartDate, Date processEndDate, String objectName, boolean isManualProcess){\r\n\t\tLOGGER.trace(\"Entrando en getAllBulkApiInfo para obtener los registros actualizados en Salesforce\");\r\n\t\tLOGGER.info(\"Búsqueda desde \" + processStartDate + \", hasta \" + processEndDate);\r\n\t\tBulkApiInfoContainerBatch containerList = null;\r\n\t\tboolean processOk = false;\r\n\t\tString processErrorCause = \"\";\r\n\t\tHistoricBatchVO mainHistoricProcessInfo = new HistoricBatchVO();\r\n\t\ttry {\r\n\t\t\tStringBuilder historicMainProcessId = Utils.generateDateId();\r\n\t\t\tmainHistoricProcessInfo.setStartDate(new Date());\r\n \t\t\tmainHistoricProcessInfo.setOperation(ConstantesBatch.BATCH_MAIN_PROCESS);\r\n \t\t\tUserSessionInfo userInfo = Utils.getUserSessionInfoFromProperties();\r\n \t\t\tif (!Utils.isNullOrEmptyString(objectName)) {\r\n\t\t\t\t//0.1. Se rellenan los datos del proceso principal para cargarlos la tabla de historico\r\n \t\t\t\thistoricMainProcessId.append(\"-\").append(objectsMapper.getObjectNamesAbbreviationsMap().get(objectName));\r\n\t\t\t\tmainHistoricProcessInfo.setProcessId(historicMainProcessId.toString());\r\n\t\t\t\t//0.2. Se rellenan los datos del proceso de actualizacion de objetos para cargarlos a la tabla de historico\r\n\t\t\t\tHistoricBatchVO objectLoadingHistoricProcessInfo = new HistoricBatchVO();\r\n\t\t\t\tobjectLoadingHistoricProcessInfo.setProcessId(historicMainProcessId.toString());\r\n\t\t\t\tobjectLoadingHistoricProcessInfo.setStartDate(new Date());\r\n\t\t\t\tobjectLoadingHistoricProcessInfo.setOperation(ConstantesBatch.OBJECT_LOADING);\r\n\t\t\t\tobjectLoadingHistoricProcessInfo.setObject(objectsMapper.getObjectHistoricNamesMap().get(objectName));\r\n \t\t\t\t//1. Se realiza el login contra Salesforce REST API.\r\n\t\t\t\tuserInfo = salesforceLoginChecker.getUserSessionInfo(userInfo);\r\n\t\t\t\t//2. Se recorre el mapa de objetos para realizar las llamadas al API.\r\n\t\t\t\tcontainerList = getAllRecordsFromRestApi(objectName, objectsMapper.getObjectSelectsMap().get(objectName), processStartDate, processEndDate, userInfo.getSessionId(), historicMainProcessId.toString(), processStartDate);\r\n\t\t\t\t//3. Se envia el objeto al DAO para tratar la lista\r\n\t\t\t\tif (containerList != null) {\r\n\t\t\t\t\tif (containerList.getTotalRecords() > 0) {\r\n\t\t\t\t\t\tLOGGER.info(\"Recuperados \" + containerList.getTotalRecords() + \" registros del objeto \" + containerList.getEntityName());\r\n\t\t\t\t\t\tprocessOk = batchService.updateHerokuObjectsFromBulkApi(containerList, historicMainProcessId.toString());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tLOGGER.info(\"No hay registros que actualizar para el objeto '\" + containerList.getEntityName() + \"'\");\t\t\t\t\t\t\r\n\t\t\t\t\t\tprocessOk = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tLOGGER.error(\"No hay datos de registros a cargar. No se realiza ninguna accion en base de datos\");\r\n\t\t\t\t\tprocessOk = false;\r\n\t\t\t\t\tprocessErrorCause = ConstantesBatch.ERROR_OBJECT_RECORDS_NULL;\r\n\t\t\t\t}\r\n\t\t\t\tobjectLoadingHistoricProcessInfo.setSuccess(processOk);\r\n\t\t\t\tobjectLoadingHistoricProcessInfo.setErrorCause(processOk ? null : processErrorCause);\r\n\t\t\t\tobjectLoadingHistoricProcessInfo.setEndDate(new Date());\r\n\t\t\t\thistoricBatchDao.insertHistoric(objectLoadingHistoricProcessInfo);\r\n\t\t\t} else if (objectsMapper.getObjectSelectsMap() != null && !objectsMapper.getObjectSelectsMap().isEmpty()) {\r\n\t\t\t\t//0. Se rellenan los datos del proceso para la tabla de historico\r\n \t\t\t\thistoricMainProcessId.append(\"-\").append(\"FULL\");\r\n\t\t\t\tmainHistoricProcessInfo.setProcessId(historicMainProcessId.toString());\r\n\t\t\t\tHistoricBatchVO objectLoadingHistoricProcessInfo = null;\r\n\t\t\t\t//1. Se realiza el login contra Salesforce REST API.\r\n\t\t\t\tuserInfo = salesforceLoginChecker.getUserSessionInfo(userInfo);\r\n\t\t\t\t//2. Se recorre el mapa de objetos para realizar las llamadas al API.\r\n\t\t\t\tMap<String, String> objectsMap = new LinkedHashMap<String, String>();\r\n\t\t\t\tobjectsMap.putAll(objectsMapper.getObjectSelectsMap());\r\n\t\t\t\tif (!isManualProcess) {\r\n\t\t\t\t\t//2.1 Si la llamada se realiza de manera programada, CaseComment y HerokuUser tienen su propia tarea\r\n\t\t\t\t\tobjectsMap.remove(ConstantesBulkApi.ENTITY_HEROKU_USER);\r\n\t\t\t\t\tobjectsMap.remove(ConstantesBulkApi.ENTITY_CASE_COMMENT);\r\n\t\t\t\t}\r\n\t\t\t\tIterator<Entry<String, String>> objectsIterator = objectsMap.entrySet().iterator();\r\n\t\t\t\twhile (objectsIterator.hasNext()) {\r\n\t\t\t\t\tEntry<String, String> object = objectsIterator.next();\r\n\t\t\t\t\t//0.2. Se rellenan los datos del proceso de actualizacion de objetos para cargarlos a la tabla de historico\r\n\t\t\t\t\tobjectLoadingHistoricProcessInfo = new HistoricBatchVO();\r\n\t\t\t\t\tobjectLoadingHistoricProcessInfo.setProcessId(historicMainProcessId.toString());\r\n\t\t\t\t\tobjectLoadingHistoricProcessInfo.setStartDate(new Date());\r\n\t\t\t\t\tobjectLoadingHistoricProcessInfo.setOperation(ConstantesBatch.OBJECT_LOADING);\r\n\t\t\t\t\tobjectLoadingHistoricProcessInfo.setObject(objectsMapper.getObjectHistoricNamesMap().get(object.getKey()));\r\n\t\t\t\t\t//3.1. No se recorren los objetos CaseComment y HerokuUser porque tienen su propio Job programado\r\n\t\t\t\t\tcontainerList = getAllRecordsFromRestApi(object.getKey(), object.getValue(), processStartDate, processEndDate, userInfo.getSessionId(), historicMainProcessId.toString(), processStartDate);\r\n\t\t\t\t\t//4. Se envia el objeto al DAO para tratar la lista\r\n\t\t\t\t\tif (containerList != null) {\r\n\t\t\t\t\t\tif (containerList.getTotalRecords() > 0) {\r\n\t\t\t\t\t\t\tLOGGER.info(\"Recuperados \" + containerList.getTotalRecords() + \" registros del objeto \" + containerList.getEntityName());\r\n\t\t\t\t\t\t\tprocessOk = batchService.updateHerokuObjectsFromBulkApi(containerList, historicMainProcessId.toString());\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tLOGGER.info(\"No hay registros que actualizar para el objeto '\" + containerList.getEntityName() + \"'\");\r\n\t\t\t\t\t\t\tprocessOk = true;\r\n\t\t\t\t\t\t\tprocessErrorCause = ConstantesBatch.ERROR_OBJECT_RECORDS_NULL;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tLOGGER.error(\"No hay datos de registros a cargar. No se realiza ninguna accion en base de datos\");\r\n\t\t\t\t\t\tprocessOk = false;\r\n\t\t\t\t\t\tprocessErrorCause = ConstantesBatch.ERROR_OBJECT_RECORDS_NULL;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tobjectLoadingHistoricProcessInfo.setSuccess(processOk);\r\n\t\t\t\t\tobjectLoadingHistoricProcessInfo.setErrorCause(processOk ? null : processErrorCause);\r\n\t\t\t\t\tobjectLoadingHistoricProcessInfo.setEndDate(new Date());\r\n\t\t\t\t\thistoricBatchDao.insertHistoric(objectLoadingHistoricProcessInfo);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tLOGGER.error(\"No hay datos de registros a cargar. No se realiza ninguna llamada\");\r\n\t\t\t\tprocessOk = true;\r\n\t\t\t}\r\n\t\t} catch (Exception exception) {\r\n\t\t\tLOGGER.error(\"Error realizando la carga de registros desde REST API: \", exception);\r\n\t\t\tprocessOk = false;\r\n\t\t\tprocessErrorCause = ConstantesBatch.ERROR_MAIN_PROCESS;\r\n\t\t}\r\n\t\tresultProccess=processOk;\r\n\t\tmainHistoricProcessInfo.setSuccess(processOk);\r\n\t\tmainHistoricProcessInfo.setErrorCause(processOk ? null : processErrorCause);\r\n\t\tmainHistoricProcessInfo.setEndDate(new Date());\r\n\t\thistoricBatchDao.insertHistoric(mainHistoricProcessInfo);\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}",
"void mo29841a(IObjectWrapper iObjectWrapper, zzaiq zzaiq, List<zzaiw> list) throws RemoteException;",
"private void getBiometricFiles(Uin uinObject, List<DocumentsDTO> documents) {\n\t\tuinObject.getBiometrics().stream().forEach(bio -> {\n\t\t\tif (allowedBioAttributes.contains(bio.getBiometricFileType())) {\n\t\t\t\ttry {\n\t\t\t\t\tString fileName = BIOMETRICS + SLASH + bio.getBioFileId();\n\t\t\t\t\tLocalDateTime startTime = DateUtils.getUTCCurrentDateTime();\n\t\t\t\t\tbyte[] data = securityManager\n\t\t\t\t\t\t\t.decrypt(IOUtils.toByteArray(fsAdapter.getFile(uinObject.getUinHash(), fileName)));\n\t\t\t\t\tmosipLogger.debug(IdRepoSecurityManager.getUser(), ID_REPO_SERVICE_IMPL, GET_FILES,\n\t\t\t\t\t\t\t\"time taken to get file in millis: \" + fileName + \" - \"\n\t\t\t\t\t\t\t\t\t+ Duration.between(startTime, DateUtils.getUTCCurrentDateTime()).toMillis() + \" \"\n\t\t\t\t\t\t\t\t\t+ \"Start time : \" + startTime + \" \" + \"end time : \"\n\t\t\t\t\t\t\t\t\t+ DateUtils.getUTCCurrentDateTime());\n\t\t\t\t\tif (Objects.nonNull(data)) {\n\t\t\t\t\t\tif (StringUtils.equals(bio.getBiometricFileHash(), securityManager.hash(data))) {\n\t\t\t\t\t\t\tdocuments.add(new DocumentsDTO(bio.getBiometricFileType(), CryptoUtil.encodeBase64(data)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmosipLogger.error(IdRepoSecurityManager.getUser(), ID_REPO_SERVICE_IMPL, GET_FILES,\n\t\t\t\t\t\t\t\t\tIdRepoErrorConstants.DOCUMENT_HASH_MISMATCH.getErrorMessage());\n\t\t\t\t\t\t\tthrow new IdRepoAppException(IdRepoErrorConstants.DOCUMENT_HASH_MISMATCH);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IdRepoAppException e) {\n\t\t\t\t\tmosipLogger.error(IdRepoSecurityManager.getUser(), ID_REPO_SERVICE_IMPL, GET_FILES, e.getMessage());\n\t\t\t\t\tthrow new IdRepoAppUncheckedException(e.getErrorCode(), e.getErrorText(), e);\n\t\t\t\t} catch (FSAdapterException e) {\n\t\t\t\t\tmosipLogger.error(IdRepoSecurityManager.getUser(), ID_REPO_SERVICE_IMPL, GET_FILES, e.getMessage());\n\t\t\t\t\tthrow new IdRepoAppUncheckedException(\n\t\t\t\t\t\t\te.getErrorCode().equals(HDFSAdapterErrorCode.FILE_NOT_FOUND_EXCEPTION.getErrorCode())\n\t\t\t\t\t\t\t\t\t? IdRepoErrorConstants.FILE_NOT_FOUND\n\t\t\t\t\t\t\t\t\t: IdRepoErrorConstants.FILE_STORAGE_ACCESS_ERROR,\n\t\t\t\t\t\t\te);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tmosipLogger.error(IdRepoSecurityManager.getUser(), ID_REPO_SERVICE_IMPL, GET_FILES, e.getMessage());\n\t\t\t\t\tthrow new IdRepoAppUncheckedException(IdRepoErrorConstants.FILE_STORAGE_ACCESS_ERROR, e);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public List<ImageLinkVO> getScene7ImageLinks(String orinNum) throws PEPPersistencyException {\n\n LOGGER.info(\"***Entering getScene7ImageLinks() method.\");\n Session session = null; \n List<ImageLinkVO> imageLinkVOList = new ArrayList<ImageLinkVO>();\n ImageLinkVO imageLinkVO = null;\n List<Object[]> rows=null;\n final XqueryConstants xqueryConstants = new XqueryConstants();\n try {\n session = sessionFactory.openSession(); \n final Query query =session.createSQLQuery(xqueryConstants.getScene7ImageLinks());\n if(query!=null)\n {\n query.setParameter(0, orinNum); \n rows = query.list();\n }\n if(rows!=null)\n {\n for (final Object[] row : rows) {\n \timageLinkVO = new ImageLinkVO();\n \timageLinkVO.setOrin(row[0] == null? \"\" : row[0].toString());\n \timageLinkVO.setShotType(row[4] == null? \"\" : row[4].toString());\n \timageLinkVO.setImageURL(row[1] == null? \"\" : row[1].toString());\n \timageLinkVO.setSwatchURL(row[2] == null? \"\" : row[2].toString());\n \timageLinkVO.setViewURL(row[3] == null? \"\" : row[3].toString()); \n \n LOGGER.debug(\"Image Link Attribute Values -- \\nORIN: \" + imageLinkVO.getOrin() +\n \"\\nSHOT TYPE: \" + imageLinkVO.getShotType() +\n \"\\nIMAGE URL: \" + imageLinkVO.getImageURL() + \n \"\\nSWATCH URL: \" + imageLinkVO.getSwatchURL() + \n \"\\nVIEW URL: \" + imageLinkVO.getViewURL());\n \n if(!StringUtils.isEmpty(imageLinkVO.getImageURL())\n \t\t|| !StringUtils.isEmpty(imageLinkVO.getSwatchURL())\n \t\t\t\t|| !StringUtils.isEmpty(imageLinkVO.getViewURL()))\n {\n \timageLinkVOList.add(imageLinkVO);\n }\n }\n }\n }\n catch(final Exception exception){\n LOGGER.error(\"Exception in getScene7ImageLinks() method DAO layer. -- \" + exception.getMessage());\n throw new PEPPersistencyException(exception);\n }\n finally {\n session.flush(); \n session.close();\n }\n LOGGER.info(\"***Exiting ImageRequestDAO.getScene7ImageLinks() method.\");\n return imageLinkVOList;\n }",
"public int getLBR_DocLine_ICMS_ID();",
"public HashMap<Integer, HashMap<String, String>> getXMLMessageDataForCollabFromDB(ArrayList<Integer> interIDs) throws SQLException, NumberFormatException, XPathExpressionException, ParserConfigurationException, SAXException, IOException{\n\t HashMap<Integer, HashMap<String, String>> result = new HashMap();\n\t String query = null;\n\t HashMap<String, String> message;\n\t HashMap<String, ArrayList<String>> messageMap;\n\t \n//\t Select parentEventID,eventID,resourceName,roomName,networkID, buddyName, intemployeeID, containerID, contentType, contentSubType, resourceID, attributes\n\t \n\t String parentEventId;\n\t String eventId;\n\t String roomName;\n\t String networkId;\n\t String buddyName;\n\t String intEmployeeId;\n\t String employeeId = null;\n\t String containerId;\n\t String networkName;\n\t String employeeEmail = null;\n\t \n\t int contentTypeID;\n\t String contentType;\n\t int contentSubTypeID;\n\t String contentSubType = null;\n\t int resourceID;\n\t SQLXML attributes;\n\t int actionID;\n\t String actionType;\n\t ArrayList<String> resources;\n\t String resourceName;\n\t String resourceURL;\n\t String text;\n\t String messageAttributes = null;\n\t HashMap<String, String> msgAttributes = null;\n\t \n//\t stmt = getConnection(dbParams).createStatement();\n\t \n\t DOMSource domSource;\n\t Document document;\n\t XPath xpath = XPathFactory.newInstance().newXPath();\n\t \n\t String expression = \"//name[.='event.action']/following-sibling::*[1][name()='value']\";\n\t \n\t //loop through each interID\n\t for(int interID : interIDs){\n\t \n\t message = new HashMap();\n\t \n\t query = \"Select parentEventID,eventID,roomName,networkID, buddyName, intemployeeID, containerID, contentType, contentSubType, resourceID, attributes from Interactions where interID = \"+interID;\n//\t System.out.println(query);\n\t rs = stmt.executeQuery(query);\n\t rs.next();\n\t parentEventId = rs.getString(1);\n\t eventId = rs.getString(2);\n\t roomName = rs.getString(3);\n\t networkId = rs.getString(4);\n\t buddyName = rs.getString(5);\n\t intEmployeeId = rs.getString(6);\n\t containerId = rs.getString(7);\n\t contentTypeID = rs.getInt(8);\n\t contentSubTypeID = rs.getInt(9);\n\t resourceID = rs.getInt(10);\n\t attributes = rs.getSQLXML(11);\n\t \n\t\t domSource = attributes.getSource(DOMSource.class);\n\t\t document = (Document) domSource.getNode();\n\t\t actionID = Integer.parseInt(xpath.evaluate(expression, document));\n\t\t \n\t\t //Get contentType\n\t\t contentType = getContentType(stmt, contentTypeID);\n\t\t //Get ContentSubType\n\t\t if(contentSubTypeID != -1){\n\t\t \t contentSubType = getContentSubType(stmt, contentSubTypeID);\t \n\t\t }\n\t\t \n\t\t //Get Action Type\n\t\t actionType = getActionType(actionID);\n\t\t //Get Resource Name and URL\n\t\t resources = getResourceNameAndURL(resourceID);\n\t\t resourceName = resources.get(0);\n\t\t resourceURL = resources.get(1);\n//\t\t Get Network Name\n\t\t networkName = getNetworkName(networkId);\n//\t\t Get EmployeeId\n\t\t if(intEmployeeId != null){\n\t\t \t employeeId = getEmployeeId(stmt, intEmployeeId);\n//\t\t\t Get Employee Email\n\t\t\t \n\t\t\t employeeEmail = getEmployeeEmail(stmt, intEmployeeId);\n\t\t\t if(employeeEmail == null){\n\t\t\t \t employeeEmail = buddyName;\n\t\t\t }\n\t\t }\n\t\t \n\n\t\t \n\t\t //Get Message Table data\n\t\t query = \"Select text from Messages where interID = \"+interID;\n//\t\t System.out.println(query);\n\t rs = stmt.executeQuery(query);\n\t rs.next();\n\t text = rs.getString(1).trim().replaceAll(\"\\n\", \"\").replaceAll(\"\\r\", \"\");\n\t\t\t query = \"Select attributes from Messages where interID = \"+interID + \" and attributes is not null\";\n//\t\t\t System.out.println(query);\n\t\t rs = stmt.executeQuery(query);\n\t\t if(rs.next()){\n\t\t \t messageAttributes = rs.getString(1);\n\t\t }\n\t\t \t \n\t msgAttributes = new HashMap();\n\t //Get Attribute Names and Values\n\t\t if(messageAttributes != null){\n\t\t \t \n\t\t \t msgAttributes = getMessageAttributes(messageAttributes); \t \n\t\t }\n\t \n\t \n\t //Add all the values\n\t message.put(\"parentEventID\", parentEventId);\n\t message.put(\"eventId\", eventId);\n\t message.put(\"containerId\", containerId);\n\t message.put(\"roomName\", roomName);\n\t message.put(\"buddyName\", buddyName);\n\t message.put(\"networkID\", networkId);\n\t message.put(\"networkName\", networkName);\n\t message.put(\"employeeId\", employeeId);\n\t message.put(\"employeeEmail\", employeeEmail);\n\t message.put(\"intEmployeeID\", intEmployeeId);\n\t message.put(\"Content type\", contentType);\n\t if(contentSubTypeID != 0){\n\t \t message.put(\"Content sub-type\", contentSubType); \n\t }\n\t \n\t message.put(\"Action\", actionType);\n\t message.put(\"Resource name\", resourceName);\n\t message.put(\"Resource URL\", resourceURL);\n\t message.put(\"Text\", text);\n\t if(msgAttributes.size() > 0){\n\t \t message.putAll(msgAttributes); \n\t }\n\t \n//\t for(String attName : msgAttributes.keySet()){\n//\t message.put(attName, msgAttributes.get(attName));\n//\t }\n\n\t ArrayList<String> fileNames = getFileListsForCollab(interID);\n\t StringBuffer fileName = new StringBuffer();\n\t if(fileNames.size() > 0){\n\t \t for(int i = 0 ; i < fileNames.size(); i++){\n\t \t\t fileName.append(fileNames.get(i));\n\t \t\t if(i + 1 != fileNames.size()){\n\t \t\t\t fileName.append(\"#\");\n\t \t\t }\n\t \t }\n\t \t message.put(\"File\", fileName.toString());\n\t }\n\t \n\t result.put(interID, message);\n\t }\n\t \n\t return result;\n\t }",
"abstract protected T getRecordFromLine(String line) throws DataImportException ;",
"public Vector getRpCancelForm(String yyyymm)throws Exception \n\t{\n\t\tSystem.out.println(\" innser gtRPCancelForm : \"+ yyyymm); \n\t\tVector v = new Vector(); \n\t\tMrecord rpc = CFile.opens(\"cancelform@insuredocument\"); \n\t\trpc.start(0); //(deptCode docCode cancelDate startNo)\n\t\tString fRI = \"0\"; \n\t\tString fROW = \"0\"; \t\t\n\t\tString fR17\t= \"0\"; \n\t\tString fCI = \"0\"; \n\t\tString fCOW = \"0\"; \n\t\tString fC17\t= \"0\";\n\n\t\tSystem.out.println(\" branch : \" + branch); \n\t\tboolean okfind = rpc.equalGreat(branch); \n\t\tSystem.out.println(\" okfind : \"+okfind); \n\t\tfor (; okfind && branch.compareTo(rpc.get(\"deptCode\").trim()) == 0; okfind = rpc.next())\t\t\t\n\t\t{\n\t\t\tSystem.out.println(\" --->>. innerloop : \"+ rpc.get(\"cancelDate\").substring(0, 6)); \n\t\t\tif (yyyymm.compareTo(rpc.get(\"cancelDate\").substring(0, 6)) != 0)\n\t\t\t\tcontinue; \n\t\t\tSystem.out.println(\" --->>. status : \" + rpc.get(\"status\") + \" docCode : \"+rpc.get(\"status\")); \n\t\t\tif (\"R\".compareTo(rpc.get(\"status\").trim()) == 0 )\n\t\t\t{\n\t\t\t\tif (rpc.get(\"docCode\").trim().compareTo(\"01\") == 0)\n\t\t\t\t\tfRI = M.addnum(fRI, calNum(rpc.get(\"startNo\"), rpc.get(\"lastNo\"))); \t\t\t\t\n\t\t\t\telse if (rpc.get(\"docCode\").trim().compareTo(\"02\") == 0 || rpc.get(\"docCode\").trim().compareTo(\"03\") == 0)\n\t\t\t\t\tfROW = M.addnum(fROW, calNum(rpc.get(\"startNo\"), rpc.get(\"lastNo\"))); \t\t\t\t\t\t\t\t\n\t\t\t\telse if (\trpc.get(\"docCode\").trim().compareTo(\"17\") == 0 || \n\t\t\t\t\t\t\trpc.get(\"docCode\").trim().compareTo(\"22\") == 0 )\n\t\t\t\t\tfR17 = M.addnum(fR17, calNum(rpc.get(\"startNo\"), rpc.get(\"lastNo\"))); \t\t\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\telse if (\"C\".compareTo(rpc.get(\"status\").trim()) == 0 )\n\t\t\t{\n\t\t\t\tif (rpc.get(\"docCode\").trim().compareTo(\"01\") == 0)\n\t\t\t\t\tfCI = M.addnum(fCI, calNum(rpc.get(\"startNo\"), rpc.get(\"lastNo\"))); \t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\telse if (rpc.get(\"docCode\").trim().compareTo(\"02\") == 0 || rpc.get(\"docCode\").trim().compareTo(\"03\") == 0 )\n\t\t\t\t\tfCOW = M.addnum(fCOW, calNum(rpc.get(\"startNo\"), rpc.get(\"lastNo\")));\n\t\t\t\telse if (rpc.get(\"docCode\").trim().compareTo(\"17\") == 0 || rpc.get(\"docCode\").trim().compareTo(\"22\") == 0 )\n\t\t\t\t\tfC17 = M.addnum(fC17, calNum(rpc.get(\"startNo\"), rpc.get(\"lastNo\"))); \t\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t\tv.add(fCI); \n\t\tv.add(fCOW); \n\t\tv.add(fRI); \n\t\tv.add(fROW); \n\t\tv.add(fC17); \n\t\tv.add(fR17); \n\t\treturn v; \n\t}",
"public static ArrayList readScifinder( String filename)\n {\n \t\tArrayList bibitems=new ArrayList();\n \t\tFile f = new File(filename);\n \n \t\tif(!f.exists() && !f.canRead() && !f.isFile()){\n \t\t\tSystem.err.println(\"Error \" + filename + \" is not a valid file and|or is not readable.\");\n \t\t\treturn null;\n \t\t}\n \t\tStringBuffer sb=new StringBuffer();\n \t\ttry{\n \t\t\tBufferedReader in = new BufferedReader(new FileReader( filename));\n \n \t\t\tString str;\n \t\t\twhile ((str = in.readLine()) != null) {\n \t\t\t\tsb.append(str);\n \t\t\t}\n \t\t\tin.close();\n \n \t\t}\n \t\tcatch(IOException e){return null;}\n \t\tString [] entries=sb.toString().split(\"START_RECORD\");\n \t\tHashMap hm=new HashMap();\n \t\tfor(int i=1; i<entries.length; i++){\n \t\t\tString[] fields = entries[i].split(\"FIELD \");\n \t\t\tString Type=\"\";\n \t\t\thm.clear(); // reset\n \t\t\tfor(int j=0; j<fields.length; j++) if (fields[j].indexOf(\":\") >= 0) {\n \t\t\t\tString tmp[]= new String[2];\n tmp[0] = fields[j].substring(0, fields[j].indexOf(\":\"));\n tmp[1] = fields[j].substring(fields[j].indexOf(\":\")+1);\n \t\t\t\tif(tmp.length > 1){//==2\n \t\t\t\t\tif(tmp[0].equals(\"Author\"))\n \t\t\t\t\t\thm.put( \"author\", tmp[1].replaceAll(\";\",\" and \") );\n \t\t\t\t\telse if(tmp[0].equals(\"Title\"))\n \t\t\t\t\t\thm.put(\"title\",tmp[1]);\n \n \t\t\t\t\telse if(tmp[0].equals(\"Journal Title\"))\n \t\t\t\t\t\thm.put(\"journal\",tmp[1]);\n \n \t\t\t\t\telse if(tmp[0].equals(\"Volume\"))\n \t\t\t\t\thm.put(\"volume\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Page\"))\n \t\t\t\t\thm.put(\"pages\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Publication Year\"))\n \t\t\t\t\thm.put(\"year\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Abstract\"))\n \t\t\t\t\thm.put(\"abstract\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Supplementary Terms\"))\n \t\t\t\t\thm.put(\"keywords\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Document Type\"))\n \t\t\t\t\tType=tmp[1].replaceAll(\"Journal\",\"article\");\n \t\t\t}\n \t }\n \n \t BibtexEntry b=new BibtexEntry(Globals.DEFAULT_BIBTEXENTRY_ID,\n \t\t\t\t\t\t\t\t\t Globals.getEntryType(Type)); // id assumes an existing database so don't create one here\n \t b.setField( hm);\n \t bibitems.add( b );\n \n \t}\n \treturn bibitems;\n }",
"private void processMetadataFromLoader() {\n\n int recordCount = mdi.readInt();\n\n long currentTime = System.currentTimeMillis();\n synchronized (entities) {\n clearOldTempIndexes(currentTime);\n\n for (int i = 0; i < recordCount; i++) {\n int tempIndex = mdi.readInt();\n assert DirectProtocol.isValidTempIndex(tempIndex);\n String symbol = mdi.readCharSequence().toString().intern();\n\n ConstantIdentityKey key;\n int entityIndex = entities.get(symbol, NOT_FOUND_VALUE);\n if (entityIndex == NOT_FOUND_VALUE) {\n entityIndex = entities.size();\n key = new ConstantIdentityKey(symbol);\n entities.put(key, entityIndex);\n } else {\n key = entities.getKeyObject(symbol);\n }\n\n // Note: key is guarantied to be same object as in \"entities\" field\n tempIndexes.put(tempIndex, key);\n\n sendMetadata(symbol, entityIndex);\n }\n if (recordCount > 0) {\n lastTempIndexAdded = currentTime;\n }\n }\n }",
"@Override\n\tpublic Map<String, Object> read(String nombrec) {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withProcedureName(\"pa_mat_produnidadmed_GetNomc\").withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\",OracleTypes.CURSOR,new ColumnMapRowMapper()), new SqlParameter(\"p_nombrecorto\", Types.VARCHAR));\n\t\tSqlParameterSource in = new MapSqlParameterSource().addValue(\"p_nombrecorto\", nombrec);\n\t\treturn simpleJdbcCall.execute(in);\n\t}",
"public OperationLog[] SearchOperationLog (String opName, String opType, String wsName, String status, String[] domains,\r\n String userName, String token, String transID, Date start, Date end, String version_no)\r\n {\r\n\t if (version_no == null || version_no.equals(\"\"))\r\n\t\t version_no = \"VER_11\";\r\n\t \r\n OperationLog[] retArray = null;\r\n IDBAdapter db = null;\r\n ResultSet rs = null;\r\n try {\r\n String sql = \"select A.\"+this.OpLogID+\",B.\"+this.OperationName+\",B.\"+this.OperationType+\",C.\"+this.WebService+\",D.\"+this.NodeDomain;\r\n sql += \",A.\"+this.UserName+\",A.\"+this.TransID+\",E.\"+this.OperationLogStatus+\",A.\"+this.StartDate+\",A.\"+this.EndDate;\r\n sql += \" from \"+this.TableName+\" A,\"+this.OperationTableName+\" B,\"+this.WebServiceTableName+\" C,\";\r\n sql += this.NodeDomainTableName+\" D,\"+this.OperationLogStatusTableName+\" E\";\r\n sql += \" where A.\"+this.OperationID+\" = B.\"+this.OperationID+\" and A.\"+this.OpLogID+\" = E.\"+this.OpLogID;\r\n sql += \" and B.\"+this.WebServiceID+\" = C.\"+this.WebServiceID+\" (+) and B.\"+this.NodeDomainID+\" = D.\"+this.NodeDomainID;\r\n sql += \" and B.\"+this.VersionNo+\" = '\"+version_no+\"'\";//Added by Helen 20081030\r\n if (opName != null)\r\n sql += \" and B.\"+this.OperationName+\" = '\"+opName+\"'\";\r\n if (opType != null)\r\n sql += \" and B.\" + this.OperationType + \" = '\" + opType + \"'\";\r\n if (wsName != null)\r\n sql += \" and C.\"+this.WebService+\" = '\"+wsName+\"'\";\r\n if (domains != null && domains.length > 0) {\r\n sql += \" and (D.\"+this.NodeDomain+\" in (\";\r\n for (int i = 0; i < domains.length; i++) {\r\n if (i != 0) sql += \",\";\r\n sql += \"'\"+domains[i]+\"'\";\r\n }\r\n sql += \")\";\r\n sql += \" or (C.\" + this.WebService + \" = '\" + Phrase.WEB_METHOD_AUTHENTICATE + \"'\";\r\n sql += \" and A.\" + this.Token + \" in (select F.\" + this.Token + \" from \" + this.TableName + \" F\";\r\n sql += \", \" + this.OperationTableName + \" G, \" + this.NodeDomainTableName + \" H\";\r\n sql += \" where F.\" + this.OperationID + \" = G.\" + this.OperationID + \" and G.\" + this.NodeDomainID + \" = H.\" + this.NodeDomainID;\r\n sql += \" and H.\" + this.NodeDomain + \" in (\";\r\n for (int i = 0; i < domains.length; i++) {\r\n if (i != 0) sql += \",\";\r\n sql += \"'\"+domains[i]+\"'\";\r\n }\r\n sql += \")))\";\r\n sql += \" or (C.\" + this.WebService + \" = '\" + Phrase.WEB_METHOD_GETSERVICES + \"'\";\r\n sql += \" and A.SERVICE_TYPE in (\";\r\n for (int i = 0; i < domains.length; i++) {\r\n if (i != 0) sql += \",\";\r\n sql += \"'\"+domains[i]+\"'\";\r\n }\r\n sql += \"))\";\r\n sql += \" or (C.\" + this.WebService + \" = '\" + Phrase.WEB_METHOD_GETSTATUS + \"'\";\r\n sql += \" and A.\" + this.SuppliedTransID + \" in (select I.\" + this.TransID + \" from \" + this.TableName + \" I\";\r\n sql += \", \" + this.OperationTableName + \" J, \" + this.NodeDomainTableName + \" K\";\r\n sql += \" where I.\" + this.OperationID + \" = J.\" + this.OperationID + \" and J.\" + this.NodeDomainID + \" = K.\" + this.NodeDomainID;\r\n sql += \" and K.\" + this.NodeDomain + \" in (\";\r\n for (int i = 0; i < domains.length; i++) {\r\n if (i != 0) sql += \",\";\r\n sql += \"'\"+domains[i]+\"'\";\r\n }\r\n sql += \")))\";\r\n sql += \")\";\r\n }\r\n if (userName != null)\r\n sql += \" and upper(A.\"+this.UserName+\") like upper('%\"+userName+\"%')\";\r\n if (token != null)\r\n sql += \" and A.\"+this.Token+\" like '%\"+token+\"%'\";\r\n if (transID != null)\r\n sql += \" and (A.\"+this.TransID+\" like '%\"+transID+\"%' or A.\"+this.SuppliedTransID+\" like '%\"+transID+\"%')\";\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n if (start != null)\r\n sql += \" and (A.\"+this.StartDate+\" > '\"+dateFormat.format(start)+\"' or A.\"+this.EndDate+\" > '\"+dateFormat.format(start)+\"')\";\r\n if (end != null) {\r\n Calendar cal = Calendar.getInstance(TimeZone.getDefault());\r\n cal.setTime(end);\r\n cal.add(Calendar.DAY_OF_MONTH,1);\r\n java.util.Date searchEnd = cal.getTime();\r\n sql += \" and (A.\"+this.StartDate+\" < '\"+dateFormat.format(searchEnd)+\"' or A.\"+this.EndDate+\" < '\"+dateFormat.format(searchEnd)+\"')\";\r\n }\r\n sql += \" and E.\"+this.OperationLogStatusID+\" = (select max(E2.\"+this.OperationLogStatusID+\")\";\r\n sql += \" from \"+this.OperationLogStatusTableName+\" E2 where E2.\"+this.OpLogID+\" = E.\"+this.OpLogID+\")\";\r\n if (status != null && !status.equals(\"\"))\r\n sql += \" and E.\"+this.OperationLogStatus+\" = '\"+status+\"'\";\r\n sql += \" and B.\"+this.VersionNo+\" = '\"+version_no+\"'\";\r\n sql += \" order by A.\"+this.OpLogID+\" desc\";\r\n db = this.GetNodeDB();\r\n rs = db.GetResultSet(sql);\r\n if (rs != null && rs.last() && rs.getRow() > 0) {\r\n retArray = new OperationLog[rs.getRow()];\r\n rs.beforeFirst();\r\n for (int i = 0; rs.next() && i < retArray.length; i++) {\r\n OperationLog temp = new OperationLog(rs.getInt(this.OpLogID));\r\n temp.SetOperationName(rs.getString(this.OperationName));\r\n temp.SetOperationType(rs.getString(this.OperationType));\r\n temp.SetDomain(rs.getString(this.NodeDomain));\r\n temp.SetUserName(rs.getString(this.UserName));\r\n temp.SetTransID(rs.getString(this.TransID));\r\n ArrayList statusList = new ArrayList();\r\n ArrayList tempList = new ArrayList();\r\n tempList.add(rs.getString(this.OperationLogStatus));\r\n statusList.add(tempList);\r\n temp.SetStatus(statusList);\r\n temp.SetStartDate(rs.getString(this.StartDate));\r\n temp.SetEndDate(rs.getString(this.EndDate));\r\n if (temp.GetOperationType() != null)\r\n if (temp.GetOperationType().equals(Phrase.WEB_SERVICE_OPERATION))\r\n temp.SetWebServiceName(rs.getString(this.WebService));\r\n retArray[i] = temp;\r\n }\r\n }\r\n } catch (Exception e) {\r\n this.LogException(\"Could Not Search Operation Log: \" + e.toString());\r\n } finally {\r\n try {\r\n if (rs != null)\r\n rs.close();\r\n if (db != null)\r\n db.Close();\r\n } catch (Exception e) {\r\n this.LogException(e.toString());\r\n }\r\n }\r\n return retArray;\r\n }",
"public List<ContentInterventoBOBean> execGetAll() {\n System.out.println(\"InterventoLogics - execGetAll\");\n InterventoClient client = new InterventoClient(new ContentInterventoRequestBean());\n try {\n client.getAll();\n return BOFactory.convertWorkableToBOInterventi(client.getResList());\n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public ArrayList<String> obtenerCantidadRemota(java.sql.Connection con, int CodEmp, int CodLoc,int CodTipDoc, int CodDoc){\r\n java.sql.Statement stmLoc; \r\n java.sql.ResultSet rstLoc;\r\n try{\r\n if(con!=null){\r\n arlDatIng = new ArrayList();\r\n stmLoc=con.createStatement();\r\n strSql=\"\";/* LOS INGRESOS AGRUPADOS POR ITEM */\r\n strSql+=\" SELECT a2.co_emp , a2.co_loc, a2.co_tipDoc, a2.co_doc,a8.co_bodGrp as co_bodIng, a7.co_bodEgr, \\n\";\r\n strSql+=\" a3.co_reg,a6.co_reg as coRegRel,a3.co_itm, a3.nd_can \\n\";\r\n strSql+=\" FROM tbm_cabMovInv as a2 /*EL INGRESO */ \\n\";\r\n strSql+=\" INNER JOIN tbm_detMovInv as a3 ON (a2.co_emp=a3.co_emp AND a2.co_loc=a3.co_loc AND \\n\";\r\n strSql+=\" a2.co_tipDoc=a3.co_tipDoc AND a2.co_doc=a3.co_doc) \\n\";\r\n strSql+=\" INNER JOIN tbr_detMovInv as a5 ON (a3.co_emp=a5.co_empRel AND a3.co_loc=a5.co_locRel AND a3.co_tipDoc=a5.co_tipDocRel \\n\";\r\n strSql+=\" AND a3.co_doc=a5.co_docRel AND a3.co_reg=a5.co_regRel) \\n\";\r\n strSql+=\" INNER JOIN tbm_detMovInv as a6 ON (a5.co_emp=a6.co_emp AND a5.co_loc=a6.co_loc AND a5.co_tipDoc=a6.co_tipDoc AND \\n\";\r\n strSql+=\" a5.co_doc=a6.co_doc AND a5.co_reg=a6.co_reg)/*LA FACTURA*/ \\n\";\r\n strSql+=\" LEFT OUTER JOIN ( \\n\";\r\n strSql+=\" SELECT a1.co_emp, a1.co_loc, a1.co_tipDoc, a1.co_doc,a4.co_bodGrp as co_bodEgr, a1.co_reg, \\n\";\r\n strSql+=\" a3.co_emp as co_empIng, a3.co_loc as co_locIng, a3.co_tipDoc as co_tipDocIng, \\n\";\r\n strSql+=\" a3.co_doc as co_docIng,a3.co_reg as co_regIng\\n\";\r\n strSql+=\" FROM tbm_detMovInv AS a1 \\n\";\r\n strSql+=\" INNER JOIN tbr_detMovInv AS a2 ON (a1.co_emp=a2.co_Emp AND a1.co_loc=a2.co_loc AND a1.co_tipDoc=a2.co_tipDoc AND \\n\";\r\n strSql+=\" a1.co_doc=a2.co_doc AND a1.co_reg=a2.co_reg) \\n\";\r\n strSql+=\" INNER JOIN (\t \\n\";\r\n strSql+=\" SELECT a3.co_emp , a3.co_loc, a3.co_tipDoc, a3.co_doc ,a3.co_reg \\n\";\r\n strSql+=\" FROM tbm_detMovInv as a3 \\n\";\r\n strSql+=\" INNER JOIN tbr_detMovInv as a5 ON (a3.co_emp=a5.co_empRel AND a3.co_loc=a5.co_locRel AND \\n\";\r\n strSql+=\" a3.co_tipDoc=a5.co_tipDocRel AND a3.co_doc=a5.co_docRel \\n\";\r\n strSql+=\" AND a3.co_reg=a5.co_regRel) \\n\";\r\n strSql+=\" WHERE a5.co_emp=\"+CodEmp+\" AND a5.co_loc=\"+CodLoc+\" AND a5.co_tipDoc=\"+CodTipDoc+\" AND a5.co_doc=\"+CodDoc+\" \\n\";\r\n strSql+=\" ) as a3 ON (a2.co_empRel=a3.co_emp AND a2.co_locRel=a3.co_loc AND a2.co_tipDocRel=a3.co_tipDoc AND \\n\";\r\n strSql+=\" a2.co_docRel=a3.co_doc AND a2.co_regRel=a3.co_reg) \\n\";\r\n strSql+=\" INNER JOIN tbr_bodEmpBodGrp AS a4 ON (a1.co_emp=a4.co_emp AND a1.co_bod=a4.co_bod AND a4.co_empGrp=\"+objParSis.getCodigoEmpresaGrupo()+\") \\n\";\r\n strSql+=\" WHERE NOT (a1.co_emp=\"+CodEmp+\" AND a1.co_loc=\"+CodLoc+\" AND a1.co_tipDoc=\"+CodTipDoc+\" AND a1.co_doc=\"+CodDoc+\" ) \\n\";\r\n strSql+=\" ) as a7 ON (a3.co_emp=a7.co_empIng AND a3.co_loc=a7.co_locIng AND a3.co_tipDoc=a7.co_tipDocIng AND \\n\";\r\n strSql+=\" a3.co_doc=a7.co_docIng AND a3.co_reg=a7.co_regIng) \\n\";\r\n strSql+=\" INNER JOIN tbr_bodEmpBodGrp AS a8 ON (a3.co_emp=a8.co_emp AND a3.co_bod=a8.co_bod AND a8.co_empGrp=\"+objParSis.getCodigoEmpresaGrupo()+\" )\\n\";\r\n strSql+=\" WHERE a6.co_emp=\"+CodEmp+\" AND a6.co_loc=\"+CodLoc+\" AND a6.co_tipDoc=\"+CodTipDoc+\" AND a6.co_doc=\"+CodDoc+\" \\n\";\r\n strSql+=\" AND a3.nd_can > 0 AND (a2.tx_tipMov='V' OR a2.tx_tipMov='I' OR a2.tx_tipMov='R') \\n\";\r\n strSql+=\" GROUP BY a6.co_reg, a2.co_emp , a2.co_loc, a2.co_tipDoc, a2.co_doc,a8.co_bodGrp,a7.co_bodEgr,a3.co_reg,a3.co_reg, a3.co_itm, a3.nd_can \\n\";\r\n strSql+=\" ORDER BY a6.co_reg \\n\"; // IMPORTANTE ORDENADO POR LOS REGISTROS DE LA FACTURA \r\n System.out.println(\"obtenerCantidadRemota:... \\n\" + strSql);\r\n rstLoc=stmLoc.executeQuery(strSql);\r\n while(rstLoc.next()){\r\n arlRegIng=new ArrayList();\r\n arlRegIng.add(INT_ARL_COD_EMP,rstLoc.getInt(\"co_emp\")); // (DATOS DEL INGRESO)\r\n arlRegIng.add(INT_ARL_COD_LOC,rstLoc.getInt(\"co_loc\"));\r\n arlRegIng.add(INT_ARL_COD_TIP_DOC,rstLoc.getInt(\"co_tipDoc\"));\r\n arlRegIng.add(INT_ARL_COD_DOC,rstLoc.getInt(\"co_doc\"));\r\n arlRegIng.add(INT_ARL_COD_REG,rstLoc.getInt(\"co_reg\"));\r\n arlRegIng.add(INT_ARL_COD_REG_REL,rstLoc.getInt(\"coRegRel\")); // RELACIONAL (LA FACTURA)\r\n arlRegIng.add(INT_ARL_COD_ITM,rstLoc.getInt(\"co_itm\"));\r\n arlRegIng.add(INT_ARL_CAN_ITM,rstLoc.getDouble(\"nd_can\"));\r\n arlRegIng.add(INT_ARL_BOD_ING,rstLoc.getInt(\"co_bodIng\")); /* JoséMario 12/Sep/2016 */\r\n arlRegIng.add(INT_ARL_BOD_EGR,rstLoc.getInt(\"co_bodEgr\")); /* JoséMario 12/Sep/2016 */\r\n arlRegIng.add(INT_ARL_CAN_UTI,0.00);\r\n arlDatIng.add(arlRegIng);\r\n }\r\n rstLoc.close();\r\n rstLoc=null;\r\n stmLoc.close();\r\n stmLoc=null;\r\n }\r\n }\r\n catch (java.sql.SQLException e){ \r\n objUti.mostrarMsgErr_F1(jifCnt, e);\r\n }\r\n catch (Exception e){ \r\n objUti.mostrarMsgErr_F1(jifCnt, e);\r\n }\r\n return arlDatIng;\r\n }",
"public static ArrayList<SinhVienMonHoc> layDSSVMHByMon(int maMH) {\n\t\tList<SinhVienMonHoc> lstSVMH = new ArrayList<SinhVienMonHoc>();\n\t\tSession session = HibernateUtils.getSessionFactory().getCurrentSession();\n\t\ttry {\n\t\t\tsession.getTransaction().begin();\n\t\t\tString hql = \"from entities.MonHoc nd Where nd.maMonHoc = :mamonhoc\";\n\t\t\tQuery<MonHoc> query = session.createQuery(hql);\n\t\t\tquery.setParameter(\"mamonhoc\", maMH);\n\t\t\tMonHoc monHoc = query.getSingleResult();\n\t\t\tIterator<NguoiDung> dsSinhVien = monHoc.getDsSinhVien().iterator();\n\t\t\t\n\t\t\t\n\t\t\twhile (dsSinhVien.hasNext()) {\n\t\t\t\tNguoiDung sv = dsSinhVien.next();\n\t\t\t\tString hql2 = \"from entities.SinhVienMonHoc svmh Where svmh.maSinhVienMonHoc.maMonHoc = :mamonhoc \"\n\t\t\t\t\t\t+ \"and svmh.maSinhVienMonHoc.maSinhVien = :masinhvien\";\n\t\t\t\tQuery<SinhVienMonHoc> query2 = session.createQuery(hql2);\n\t\t\t\tquery2.setParameter(\"mamonhoc\", monHoc.getMaMonHoc());\n\t\t\t\tquery2.setParameter(\"masinhvien\", sv.getMaNguoiDung());\n\t\t\t\tSinhVienMonHoc svmh = query2.getSingleResult();\n\t\t\t\tsvmh.setTenSinhVien(sv.getTenNguoiDung());\n\t\t\t\tlstSVMH.add(svmh);\n\t\t\t}\n\t\t\tsession.getTransaction().commit();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t// Rollback trong trường hợp có lỗi xẩy ra.\n\t\t\tsession.getTransaction().rollback();\n\t\t}\n\t\t\n\t\tif(lstSVMH.size() == 0) return null;\n\t\tlstSVMH.sort(new Comparator<SinhVienMonHoc>() {\n\t\t\t@Override\n\t\t\tpublic int compare(SinhVienMonHoc o1, SinhVienMonHoc o2) {\n\t\t\t\treturn o1.getMaSinhVienMonHoc().getMaSinhVien() - o2.getMaSinhVienMonHoc().getMaSinhVien() ;\n\t\t\t}\n\t\t});\n\t\treturn (ArrayList<SinhVienMonHoc>)lstSVMH;\n\t}",
"void mo54414a(int i, List<DownloadChunk> list);",
"java.util.List<io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row> \n getRowList();",
"protected List<Map<String,String>> readRecord(int maxToRead) throws RemoteException {\n\t\tList<Map<String,String>> ans = new LinkedList<Map<String,String>>();\n\t\t\n\t\tList<String> list = selectLine(maxToRead);\n\t\t\n\t\tif(list != null){\n\t\t\t\n\t\t\tList<String> fieldNames = getFields().getFieldNames();\n\t\t\tIterator<String> it = list.iterator();\n\t\t\t\n\t\t\twhile(it.hasNext()){\n\t\t\t\tString l = it.next();\n\t\t\t\tif(l != null && ! l.isEmpty()){\n\t\t\t\t\tString[] line = l.split(\n\t\t\t\t\t\t\tPattern.quote(getChar(getProperty(key_delimiter))), -1);\n\t\t\t\t\tif (fieldNames.size() == line.length) {\n\t\t\t\t\t\tMap<String, String> cur = new LinkedHashMap<String, String>();\n\t\t\t\t\t\tfor (int i = 0; i < line.length; ++i) {\n\t\t\t\t\t\t\tcur.put(fieldNames.get(i), line[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tans.add(cur);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlogger.error(\"The line size (\" + line.length\n\t\t\t\t\t\t\t\t+ \") is not compatible to the number of fields (\"\n\t\t\t\t\t\t\t\t+ fieldNames.size() + \"). \" + \"The splitter is '\"\n\t\t\t\t\t\t\t\t+ getChar(getProperty(key_delimiter)) + \"'.\");\n\t\t\t\t\t\tlogger.error(\"Error line: \" + l);\n\t\t\t\t\t\tans = null;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn ans;\n\t}",
"public void escribirOAIPMH(OAIPMHAgrega oaipmh, Writer writer, int tipo) throws ParseadorException {\t\n\t\ttry {\n\t\t\tMarshaller marshaller = new Marshaller(writer);\n\t\t\tmarshaller.setEncoding(getProperty(\"default.encoding\"));\n\t\t\tString schemas = \"http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd\";\n\t\t\t\n\t\t\tif(tipo == IDENTIFY){\n\t\t\t\tString nameSpace = getProperty(\"nameSpaceIdentify\");\n\t\t\t\tString urlNameSpace = getProperty(\"urlNameSpaceIdentiy\");\n\t\t\t\tmarshaller.setNamespaceMapping(nameSpace, urlNameSpace);\n\t\t\t\tString schemaLocIdentify = getProperty(\"schemaLocIdentify\");\n\t\t\t\tschemas = schemas + \" \" + schemaLocIdentify;\n\t\t\t}\n\t\t\telse if (tipo == GETRECORD || tipo == LISTRECORDS){\n\t\t\t\tString nameSpaceOAIDC = getProperty(\"nameSpaceOAIDC\");\n\t\t\t\tString urlNameSpaceOAIDC = getProperty(\"urlNameSpaceOAIDC\");\n\t\t\t\tmarshaller.setNamespaceMapping(nameSpaceOAIDC, urlNameSpaceOAIDC);\n\t\t\t\tString schemaLocOAIDC = getProperty(\"schemaLocOAIDC\");\n\t\t\t\tschemas = schemas + \" \" + schemaLocOAIDC;\n\t\t\t\tString nameSpaceDC = getProperty(\"nameSpaceDC\");\n\t\t\t\tString urlNameSpaceDC =getProperty(\"urlNameSpaceDC\");\n\t\t\t\tmarshaller.setNamespaceMapping(nameSpaceDC, urlNameSpaceDC);\n\t\t\t}\n\t\t\n\t\t\tmarshaller.setSchemaLocation(schemas);\n\t\t\tmarshaller.setSuppressXSIType(true);\n\t\t\tmarshaller.setEncoding(getProperty(\"default.encoding\"));\n\t\t\tmarshaller.setValidation(false);\n\t\t\tmarshaller.marshal(oaipmh.getOaipmh());\n\t\t\t\n\t\t} catch (MarshalException e) {\n\t\t\tthrow new ParseadorException(\n\t\t\t\t\t\"Error de parseo al escribir el oaipmh\", e);\n\t\t} catch (ValidationException e) {\n\t\t\tthrow new ValidacionException(\n\t\t\t\t\t\"Error de validacion al escribir el oaipmh\", e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new ParseadorException(\n\t\t\t\t\t\"No se pudo abrir el fichero oaipmh para su escritura\", e);\n\t\t}\n\t\t\n\t}",
"com.google.protobuf.ByteString\n getField1051Bytes();",
"public void getRecords(Hashtable fields) throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\tmyData.record=createRecord(myData.spec,null);\n\t\ttry\n\t\t{\n\t\t\tmyData.record.getRecords(background.getClient(),fields);\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<? extends io.dstore.engine.procedures.MiCheckPerformanceAd.Response.RowOrBuilder> \n getRowOrBuilderList();",
"@Override\n public ArrayList<PepDetailsHistory> getPepHistoryDetails(String orinNo) throws PEPPersistencyException{\n LOGGER.info(\"inside getPepHistoryDetails()\");\n List<PepDetailsHistory> pepList = new ArrayList<PepDetailsHistory>();\n Session session = this.sessionFactory.openSession();\n Query query = null;\n Transaction tx = session.beginTransaction();\n query = session.createSQLQuery(xqueryConstants.getPepHistoryDetails());\n query.setParameter(\"orinNo\", orinNo); \n query.setFetchSize(100);\n List<Object[]> rows = query.list();\n SimpleDateFormat formatter1 = new SimpleDateFormat(\"MM/dd/yyyy HH:mm\");\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZZZ\");\n Date date = null;\n Date date1 = null;\n String createdOn = \"\";\n String updatedDate = \"\";\n \n \n try{\n \tProperties prop =PropertyLoader.getPropertyLoader(ImageConstants.LOAD_IMAGE_PROPERTY_FILE);\n for(Object[] row: rows){\n LOGGER.info(\"iterating pep history\");\n PepDetailsHistory pepHist = new PepDetailsHistory();\n pepHist.setPepOrinNumber(row[0]!=null?row[0].toString():null);\n \n \n \n if(null != row[6]){\n \tif(\"01\".equalsIgnoreCase(row[6].toString())){\n \t\tpepHist.setHistoryStatus(\"Was Initiated\");\n \t}\n \tif(\"02\".equalsIgnoreCase(row[6].toString())){\n \t\tpepHist.setHistoryStatus(\"Was Completed\");\n \t}\n\t\t\t\tif(\"03\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Approved\");\n\t\t\t\t}\n\t\t\t\tif(\"04\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Failed RRD Check\");\n\t\t\t\t}\n\t\t\t\tif(\"05\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Deactivated\");\n\t\t\t\t}\n\t\t\t\tif(\"06\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Closed\");\n\t\t\t\t}\n\t\t\t\tif(\"07\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Rejected By DCA\");\n\t\t\t\t}\n\t\t\t\tif(\"08\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Ready For Review\");\n\t\t\t\t}\n \t\n }else{\n \tpepHist.setHistoryStatus(\"\");\n }\n \n \n pepHist.setPepUpdatedBy(row[5]!=null?row[5].toString():null);\n \n if(row[2]!=null){\n \t\n \tdate = formatter.parse(row[2].toString());\n \tcreatedOn = formatter1.format(date);\n \tpepHist.setCreatedOn(createdOn!=null?createdOn.toString():null);\n \t\n \t\n }\n if(row[4]!=null){\n \tdate1 = formatter.parse(row[4].toString());\n \tupdatedDate = formatter1.format(date1);\n \tpepHist.setUpdateDate(updatedDate!=null?updatedDate.toString():null);\n }\n \n pepHist.setCreatedBy(row[1]!=null?row[1].toString():null);\n \n if(null != row[3]){\n \tString imageStateCode=row[3] == null? \"\" : row[3].toString();\n String imageStateDesc = prop.getProperty(\"Image\"+imageStateCode);\n \n String imageState = imageStateDesc == null ? \"\": imageStateDesc.toString();\n pepHist.setUpdatedStatus(imageState);\n }else{\n \tpepHist.setUpdatedStatus(\"\");\n }\n \n \n pepList.add(pepHist);\n \n }\n }catch(Exception e){\n \t\n }\n tx.commit();\n session.close();\n \n return (ArrayList<PepDetailsHistory>) pepList; \n }",
"public String getLBR_DocLine_ICMS_UU();",
"public RecordSet loadClaimInfo(Record inputRecord);",
"private MadisRecord processTypeF(String line, String[] headerType) {\n\n MadisRecord rec = null;\n String stationId = STRING_NULL; // 0\n String obsDate = null; // 1\n String obsTime = null; // 2\n String provider = STRING_NULL; // 3\n String sub_provider = STRING_NULL; // 4\n int dataset = MISSING_INT; // 5\n int restriction = MISSING_INT; // 6\n float td = MISSING_FLOAT; // 7\n QCD td_qcd = QCD.MISSING; // 8\n int td_qca = MISSING_INT; // 9\n int td_qcr = MISSING_INT; // 10\n float rh = MISSING_FLOAT; // 11\n QCD rh_qcd = QCD.MISSING; // 12\n int rh_qca = MISSING_INT; // 13\n int rh_qcr = MISSING_INT; // 14\n float altimeter = MISSING_FLOAT; // 15\n QCD altimeter_qcd = QCD.MISSING; // 16\n int altimeter_qca = MISSING_INT; // 17\n int altimeter_qcr = MISSING_INT; // 18\n float temperature = MISSING_FLOAT; // 19\n QCD temperature_qcd = QCD.MISSING; // 20\n int temperature_qca = MISSING_INT; // 21\n int temperature_qcr = MISSING_INT; // 22\n int windDirection = MISSING_INT; // 23\n QCD windDirection_qcd = QCD.MISSING; // 24\n int windDirection_qca = MISSING_INT; // 25\n int windDirection_qcr = MISSING_INT; // 26\n float windSpeed = MISSING_FLOAT; // 27\n QCD windSpeed_qcd = QCD.MISSING; // 28\n int windSpeed_qca = MISSING_INT; // 29\n int windSpeed_qcr = MISSING_INT; // 30\n int elevation = MISSING_INT; // 31\n QCD elevation_qcd = QCD.MISSING; // 32\n int elevation_qca = MISSING_INT; // 33\n int elevation_qcr = MISSING_INT; // 34\n float latitude = MISSING_FLOAT; // 35\n QCD latitude_qcd = QCD.MISSING; // 36\n int latitude_qca = MISSING_INT; // 37\n int latitude_qcr = MISSING_INT; // 38\n float longitude = MISSING_FLOAT; // 39\n QCD longitude_qcd = QCD.MISSING; // 40\n int longitude_qca = MISSING_INT; // 41\n int longitude_qcr = MISSING_INT; // 42\n float precipRate = MISSING_FLOAT; // 43\n QCD precipRate_qcd = QCD.MISSING; // 44\n int precipRate_qca = MISSING_INT; // 45\n int precipRate_qcr = MISSING_INT; // 46\n float windGust = MISSING_FLOAT; // 47\n QCD windGust_qcd = QCD.MISSING; // 48\n int windGust_qca = MISSING_INT; // 49\n int windGust_qcr = MISSING_INT; // 50\n float precipitalWater = MISSING_FLOAT;// 51\n QCD precipitalWater_qcd = QCD.MISSING;// 52\n int precipitalWater_qca = MISSING_INT; // 53\n int precipitalWater_qcr = MISSING_INT; // 54\n float pressure = MISSING_FLOAT;// 55\n QCD pressure_qcd = QCD.MISSING;// 56\n int pressure_qca = MISSING_INT; // 57\n int pressure_qcr = MISSING_INT; // 58\n\n String[] commaSepList = null;\n\n try {\n\n commaSepList = regex.split(line);\n\n if (commaSepList.length == typeFHeader.length) {\n\n rec = new MadisRecord();\n int i = 0;\n // get STAID\n stationId = trimQuotes(commaSepList[i++]).trim();\n\n // get OBSDATE\n obsDate = trimQuotes(commaSepList[i++]).trim();\n\n // get OBSTIME\n obsTime = trimQuotes(commaSepList[i++]).trim();\n\n // if these don't work, no use in going forward\n rec = setTimeObs(obsDate, obsTime, rec, headerType);\n // get PVDR\n provider = trimQuotes(commaSepList[i++]).trim();\n rec.setProvider(provider);\n\n // get SUBPVDR\n sub_provider = trimQuotes(commaSepList[i++]).trim();\n if (sub_provider.equals(BLANK)) {\n rec.setSubProvider(STRING_NULL);\n } else {\n rec.setSubProvider(sub_provider);\n }\n\n // the Dataset value\n dataset = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setDataset(dataset);\n // the Restriction value\n restriction = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setRestriction(restriction);\n // get TD\n td = new Float(trimQuotes(commaSepList[i++]).trim())\n .floatValue();\n rec.setDewpoint(td);\n // get TD QCD\n td_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim());\n rec.setDewpoint_qcd(td_qcd);\n // get TD QCA\n td_qca = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setDewpoint_qca(td_qca);\n // get TD QCR\n td_qcr = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setDewpoint_qcr(td_qcr);\n // get RH\n rh = new Float(trimQuotes(commaSepList[i++]).trim())\n .floatValue();\n rec.setRh(rh);\n // get RH QCD\n rh_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim());\n rec.setRh_qcd(rh_qcd);\n // get RH QCA\n rh_qca = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setRh_qca(rh_qca);\n // get RH QCR\n rh_qcr = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setRh_qcr(rh_qcr);\n // altimeter\n altimeter = new Float(trimQuotes(commaSepList[i++]).trim())\n .floatValue();\n rec.setAltimeter(altimeter);\n // get Altimeter QCD\n altimeter_qcd = QCD.fromString(trimQuotes(commaSepList[i++])\n .trim());\n rec.setAltimeter_qcd(altimeter_qcd);\n // get Altimeter QCA\n altimeter_qca = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setAltimeter_qca(altimeter_qca);\n // get Altimeter QCR\n altimeter_qcr = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setAltimeter_qcr(altimeter_qcr);\n // get Temperature\n temperature = new Float(trimQuotes(commaSepList[i++]).trim())\n .floatValue();\n rec.setTemperature(temperature);\n // get Temperature QCD\n temperature_qcd = QCD.fromString(trimQuotes(commaSepList[i++])\n .trim());\n rec.setTemperature_qcd(temperature_qcd);\n // get Temperature QCA\n temperature_qca = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setTemperature_qca(temperature_qca);\n // get Temperature QCR\n temperature_qcr = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setTemperature_qcr(temperature_qcr);\n // get Wind Direction\n windDirection = new Float(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setWindDirection(windDirection);\n // get Wind Direction QCD\n windDirection_qcd = QCD\n .fromString(trimQuotes(commaSepList[i++]).trim());\n rec.setWindDirection_qcd(windDirection_qcd);\n // get WindDirection QCA\n windDirection_qca = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setWindDirection_qca(windDirection_qca);\n // get WindDirection QCR\n windDirection_qcr = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setWindDirection_qcr(windDirection_qcr);\n // wind speed\n windSpeed = new Float(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setWindSpeed(windSpeed);\n // get Wind Speed QCD\n windSpeed_qcd = QCD.fromString(trimQuotes(commaSepList[i++])\n .trim());\n rec.setWindSpeed_qcd(windSpeed_qcd);\n // get WindSpeed QCA\n windSpeed_qca = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setWindSpeed_qca(windSpeed_qca);\n // get WindSpeed QCR\n windSpeed_qcr = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setWindSpeed_qcr(windSpeed_qcr);\n // get Elevation\n elevation = new Float(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n // get Elevation QCD\n elevation_qcd = QCD.fromString(trimQuotes(commaSepList[i++])\n .trim());\n rec.setElevation_qcd(elevation_qcd);\n // get Elevation QCA\n elevation_qca = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setElevation_qca(elevation_qca);\n // get Elevation QCR\n elevation_qcr = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setElevation_qcr(elevation_qcr);\n // get Latitude\n latitude = new Float(trimQuotes(commaSepList[i++]).trim())\n .floatValue();\n // get Latitude QCD\n latitude_qcd = QCD.fromString(trimQuotes(commaSepList[i++])\n .trim());\n rec.setLatitude_qcd(latitude_qcd);\n // get latitude QCA\n latitude_qca = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setElevation_qca(latitude_qca);\n // get latitude QCR\n latitude_qcr = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setElevation_qcr(latitude_qcr);\n // get Longitude\n longitude = new Float(trimQuotes(commaSepList[i++]).trim())\n .floatValue();\n // get Longitude QCD\n longitude_qcd = QCD.fromString(trimQuotes(commaSepList[i++])\n .trim());\n rec.setLongitude_qcd(longitude_qcd);\n // get longitude QCA\n longitude_qca = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setLongitude_qca(longitude_qca);\n // get longitude QCR\n longitude_qcr = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setLongitude_qcr(longitude_qcr);\n // get precipRate\n precipRate = new Float(trimQuotes(commaSepList[i++]).trim())\n .floatValue();\n rec.setPrecipRate(precipRate);\n // get precipRate QCD\n precipRate_qcd = QCD.fromString(trimQuotes(commaSepList[i++])\n .trim());\n rec.setPrecipRate_qcd(precipRate_qcd);\n // precipRate QCA\n precipRate_qca = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setPrecipRate_qca(precipRate_qca);\n // precipRate QCR\n precipRate_qca = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setPrecipRate_qca(precipRate_qcr);\n // get Wind Gust\n windGust = new Float(trimQuotes(commaSepList[i++]).trim())\n .floatValue();\n rec.setWindGust(windGust);\n // get Wind Gust QCD\n windGust_qcd = QCD.fromString(trimQuotes(commaSepList[i++])\n .trim());\n rec.setWindGust_qcd(windGust_qcd);\n // get Wind Gust QCA\n windGust_qca = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setPrecipRate_qca(windGust_qca);\n // get Wind Gust QCR\n windGust_qcr = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setPrecipRate_qcr(windGust_qcr);\n // get precipitalWater\n precipitalWater = new Float(trimQuotes(commaSepList[i++])\n .trim()).floatValue();\n rec.setPrecipitalWater(precipitalWater);\n // get precipitalWater QCD\n precipitalWater_qcd = QCD.fromString(trimQuotes(\n commaSepList[i++]).trim());\n rec.setPrecipitalWater_qcd(precipitalWater_qcd);\n // get precipitalWater QCA\n precipitalWater_qca = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setPrecipitalWater_qca(precipitalWater_qca);\n // get precipitalWater QCR\n precipitalWater_qcr = new Integer(trimQuotes(commaSepList[i++])\n .trim()).intValue();\n rec.setPrecipitalWater_qcr(precipitalWater_qcr);\n // get pressure\n pressure = new Float(trimQuotes(commaSepList[i++]).trim())\n .floatValue();\n rec.setPressure(pressure);\n // get pressure QCD\n pressure_qcd = QCD.fromString(trimQuotes(commaSepList[i++])\n .trim());\n rec.setPressure_qcd(pressure_qcd);\n // get pressure QCA\n pressure_qca = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setPressure_qca(pressure_qca);\n // get pressure QCR\n pressure_qcr = new Integer(trimQuotes(commaSepList[i++]).trim())\n .intValue();\n rec.setPressure_qcr(pressure_qcr);\n // Take care of creating the station\n rec = setObsLocation(stationId, latitude, longitude, elevation,\n rec);\n rec = setRecordTime(rec);\n }\n\n } catch (Exception e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Couldn't parse F file row. \" + stationId + e);\n }\n\n return rec;\n\n }",
"RecordSet loadAllComponents(Record record, RecordLoadProcessor recordLoadProcessor);",
"public static ru.terralink.mvideo.sap.Orders findByPrimaryKey(java.lang.String IV_FO_TOR_ID\n ,java.lang.String IV_FU_TOR_ID)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.findByPrimaryKey\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n \n \n String _selectSQL = \"SELECT x.\\\"a\\\",x.\\\"b\\\",x.\\\"c\\\",x.\\\"d\\\",x.\\\"e\\\",x.\\\"f\\\",x.\\\"g\\\",x.\\\"h\\\",x.\\\"i\\\",x.\\\"j\\\",x.\\\"l\\\",x.\\\"m\\\",x.\\\"n\\\",x.\\\"o\\\",x.\\\"p\\\",x.\\\"q\\\",x.\\\"r\\\",x.\\\"s\\\",x.\\\"t\\\",x.\\\"u\\\",x.\\\"v\\\",x.\\\"w\\\",x.\\\"x\\\",x.\\\"y\\\",x.\\\"z\\\",x.\\\"ba\\\",x.\\\"bb\\\",x.\\\"bc\\\",x.\\\"bd\\\",x.\\\"be\\\",x.\\\"bf\\\",x.\\\"bg\\\",x.\\\"bh\\\",x.\\\"bi\\\",x.\\\"bj\\\",x.\\\"bl\\\",x.\\\"bm\\\",x.\\\"pending\\\",x.\\\"_pc\\\",x.\\\"_rp\\\",x\"\n + \".\\\"_rf\\\",x.\\\"relationsFK\\\",x.\\\"bn\\\",x.\\\"_rc\\\",x.\\\"_ds\\\",x.\\\"cvpOperation_length\\\",x.\\\"cvpOperationLobs_length\\\" FROM \\\"mvideo5_1_0_orders\\\" x WHERE (((x.\\\"pending\\\" = 1 or not exists (select x_os.\\\"bn\\\" from \\\"mvideo5_1_0_orders_os\\\" x_os where x_os.\\\"bn\\\" = x.\\\"bn\\\")))) and ( x.\\\"bl\\\" = ? AND x.\\\"bm\\\" = ?)\";\n String[] ids = new String[0];\n com.sybase.reflection.DataType[] dts = new com.sybase.reflection.DataType[]{ \n com.sybase.reflection.DataType.forName(\"string\"),\n com.sybase.reflection.DataType.forName(\"string\"),\n };\n Object[] values = new Object[] { \n IV_FO_TOR_ID,\n IV_FU_TOR_ID,\n };\n Object res = DELEGATE.findWithSQL(_selectSQL, dts, values, ids, ru.terralink.mvideo.sap.Orders.class);\n return (ru.terralink.mvideo.sap.Orders)res;\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }",
"public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }",
"public void getByrGrpWklyOcfList(String queryString, I000091Bean bean){\r\n\t\t\r\n\t\t\tQuery query = entityManager\r\n\t\t\t\t\t.createNativeQuery(queryString);\r\n\t\t\t/**ResultSet of Buyer Group Weekly Ocf*/\r\n\t\t\tList<Object[]> selectResultSet = query.getResultList();\r\n\t\t\t\r\n\t\t\tif(selectResultSet != null && !(selectResultSet.isEmpty())){\r\n\t\t\t\tisDataExist = true;\r\n\t\t\t\tdataLength = dataLength + selectResultSet.size();\r\n\t\t\t\tfinalList.addAll(getWklyOcfList(selectResultSet,bean.getByrGrpCd()));\r\n\t\t\t}else{\r\n\t\t\t\tcommonutility.setStatus(PDConstants.INTERFACE_UNPROCESSED_STATUS);\r\n\t\t\t\tcommonutility.setRemarks(PDMessageConsants.M00354.replace(PDConstants.ERROR_MESSAGE_1, PDConstants.EXTRACT_PORCD + \" \"+porCd+ \" \"+bean.getByrGrpCd())\r\n\t\t\t\t\t\t\t.replace(PDConstants.ERROR_MESSAGE_2, PDConstants.BUYER_GROUP_WEEKLY_OCF_LIMIT_TRN));\r\n\t\t\t\tLOG.error(PDMessageConsants.M00354.replace(PDConstants.ERROR_MESSAGE_1, PDConstants.EXTRACT_PORCD + \" \"+porCd+ \" \"+bean.getByrGrpCd())\r\n\t\t\t\t\t\t\t.replace(PDConstants.ERROR_MESSAGE_2, PDConstants.BUYER_GROUP_WEEKLY_OCF_LIMIT_TRN));\r\n\t\t\t}\r\n\t}",
"@Test\n\tpublic void test() throws IOException, IllegalArgumentException, IllegalAccessException {\n\t\tList<SAMRecord> samarrl= new ArrayList<SAMRecord>();\n\t\tBedRecord bed = new BedRecord();\n\t\tbed.setChrom(\"chr9\");\n\t\tbed.setStart(122669886);\n\t\tbed.setEnd(122672448);\n\t\tbed.setStrand(\"+\");\n\t\tSAMRecordIterator samit = null;\n\t\tFile samfile = new File(\"C:/Users/Fengchao/Desktop/IASearch/mtr42_sorted_F_2.bam\");\n\t\tSAMFileReader samfilereader = new SAMFileReader(samfile);\n\n\t\tsamarrl = QuerySAMUtil.querySam(bed, samfilereader, 0, 0, true, true);\n\n\t\tSystem.out.println(samarrl.size());\n\n\t}",
"public Object[] getProgList(String AcptNo) throws SQLException, Exception {\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tStringBuffer strQuery = new StringBuffer();\n\t\tArrayList<HashMap<String, String>> rsval = new ArrayList<HashMap<String, String>>();\n\t\tHashMap<String, String>\t\t\t rst\t\t = null;\n//\t\tObject[] returnObjectArray\t= null;\n\t\tConnectionContext connectionContext = new ConnectionResource();\n\n\t\ttry {\n\n\t\t\tconn = connectionContext.getConnection();\n\t\t\tstrQuery.setLength(0);\n\t\t\tstrQuery.append(\" select a.cr_jobusr,a.cr_nightusr,a.cr_seq,a.cr_jobstatus,a.cr_jobstart,\\n\");\n\t\t\tstrQuery.append(\" a.cr_jobend,a.cr_runtime,a.cr_bigo,a.cr_time,b.* \\n\");\n\t\t\tstrQuery.append(\" from cmr2700 a, cmd1700 b \\n\");\n\t\t\tstrQuery.append(\" where cr_acptno=? \\n\");\n\t\t\tstrQuery.append(\" and b.cd_acptdt>=a.cr_time \\n\");\n\t\t\tstrQuery.append(\" and to_char(b.cd_creatdt,'yyyymmdd')<=a.cr_time \\n\");\n\t\t\tstrQuery.append(\" and a.cr_seq=b.cd_seq \\n\");\n\t\t\tstrQuery.append(\" order by cd_seq \\n\");\n\t pstmt = conn.prepareStatement(strQuery.toString());\n\t\t\t//pstmt = new LoggableStatement(conn,strQuery.toString());\n\t\t\tpstmt.setString(1, AcptNo);\n\t //ecamsLogger.error(((LoggableStatement)pstmt).getQueryString());\n\t rs = pstmt.executeQuery();\n\n\t while (rs.next())\n\t {\n\t \trst = new HashMap<String, String>();\n\t \trst.put(\"cr_jobusr\", rs.getString(\"cr_jobusr\"));\n\t \trst.put(\"cr_nightusr\", rs.getString(\"cr_nightusr\"));\n\t \trst.put(\"cr_seq\", rs.getString(\"cr_seq\"));\n\t \trst.put(\"cr_jobstatus\", rs.getString(\"cr_jobstatus\"));\n\t \trst.put(\"cr_jobstart\", rs.getString(\"cr_jobstart\"));\n\t \trst.put(\"cr_jobend\", rs.getString(\"cr_jobend\"));\n\t \trst.put(\"cr_runtime\", rs.getString(\"cr_runtime\"));\n\t \trst.put(\"cr_bigo\", rs.getString(\"cr_bigo\"));\n\t \trst.put(\"cr_time\", rs.getString(\"cr_time\").substring(0,4)+\"-\"+rs.getString(\"cr_time\").substring(4,6)+\"-\"+rs.getString(\"cr_time\").substring(6,8));\n\t \tif(!rs.getString(\"cd_color\").equals(\"\") || rs.getString(\"cd_color\")!=null){\n\t \t\trst.put(\"cr_opusr1\", rs.getString(\"cd_color\"));\n\t \t}else{\n\t \t\trst.put(\"cr_opusr1\", \"\");\n\t \t}\n\t \trst.put(\"cd_jobtime\", rs.getString(\"CD_JOBTIME\")); //작업시간\n\t \trst.put(\"cd_jobstep\", rs.getString(\"CD_JOBSTEP\")); //단계\n\t \trst.put(\"cd_grp\", rs.getString(\"CD_GRP\")); //GRP\n\t \trst.put(\"cd_gubun\", rs.getString(\"CD_GUBUN\")); //대분류\n\t \trst.put(\"cd_check\", rs.getString(\"CD_CHECK\")); //점검사항\n\t\t\t\trsval.add(rst);\n\t \trst = null;\n\t }\n\t\t\trs.close();\n\t\t\tpstmt.close();\n\t\t\tconn.close();\n\t\t\t\n\t\t\trs = null;\n\t\t\tpstmt = null;\n\t\t\tconn = null;\n\n\t\t\treturn rsval.toArray();\n\n\t\t} catch (SQLException sqlexception) {\n\t\t\tsqlexception.printStackTrace();\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() SQLException START ##\");\n\t\t\tecamsLogger.error(\"## Error DESC : \", sqlexception);\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() SQLException END ##\");\n\t\t\tthrow sqlexception;\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() Exception START ##\");\n\t\t\tecamsLogger.error(\"## Error DESC : \", exception);\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() Exception END ##\");\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tif (strQuery != null) \tstrQuery = null;\n\t\t\tif (rsval != null) rsval = null;\n\t\t\tif (rs != null) try{rs.close();}catch (Exception ex){ex.printStackTrace();}\n\t\t\tif (pstmt != null) try{pstmt.close();}catch (Exception ex2){ex2.printStackTrace();}\n\t\t\tif (conn != null){\n\t\t\t\ttry{\n\t\t\t\t\tConnectionResource.release(conn);\n\t\t\t\t}catch(Exception ex3){\n\t\t\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() connection release exception ##\");\n\t\t\t\t\tex3.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\tpublic void onGetPoiResult(PoiResult arg0) {\n\t\t\tList<PoiInfo> lists=arg0.getAllPoi();\n\t\t\tif(lists!=null){\n\t\t\tfor(PoiInfo poiInfo : lists){\n\t\t\t\tAppContext.listmap.add(poiInfo);\n\t\t\t\tico(poiInfo.location);\n\t\t\t\t}\n\t\t\t}\n\t \n\t\t\tLog.d(\"测试数据\", \"\");\n\t\t\t\n\t\t}",
"public void obtenerPosicionesSolicitud(Solicitud solicitud)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerPosicionesSolicitud(Solici\"\n +\"tud solicitud):Entrada\");\n\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n //jrivas 20/7/2006 (indDevolucion) DBLG5000974 / DBLG5000981 / DBLG5001011\n //jrivas 1/8/2006 (indAnulacion) DBLG50001003\n if (!solicitud.getIndDevolucion() && !solicitud.getIndAnulacion()) {\n query.append(\" SELECT OID_SOLI_POSI, \");\n query.append(\" ESPO_OID_ESTA_POSI, \");\n //jrivas 27/04/2006 INC DBLG50000354\n //query.append(\" VAL_PREC_CATA_TOTA_LOCA_UNID, \");\n query.append(\" NUM_UNID_POR_ATEN, \");\n query.append(\" NUM_UNID_COMPR, \");\n query.append(\" VAL_PREC_CATA_UNIT_LOCA, \");\n //jrivas 27/04/2006 INC DBLG50000354\n //query.append(\" VAL_PREC_CONT_UNIT_LOCA, \");\n query.append(\" IND_CTRL_STOC, \");\n query.append(\" IND_CTRL_LIQU, \");\n query.append(\" IND_LIMI_VENT, \");\n query.append(\" NUM_UNID_DEMA_REAL, \");\n query.append(\" MAPR_OID_MARC_PROD, \");\n query.append(\" UNEG_OID_UNID_NEGO, \");\n query.append(\" NEGO_OID_NEGO, \");\n query.append(\" GENE_OID_GENE, \");\n query.append(\" SGEN_OID_SUPE_GENE, \");\n query.append(\" TOFE_OID_TIPO_OFER, \");\n query.append(\" CIVI_OID_CICLO_VIDA, \");\n query.append(\" SP.NUM_UNID_DEMA, \");\n query.append(\" PR.OID_PROD, \");\n query.append(\" VAL_PREC_FACT_UNIT_LOCA, \");\n query.append(\" VAL_PREC_NETO_UNIT_LOCA \");\n \n // sapaza -- COL-SiCC-2013-0030 -- 28/11/2013 \n query.append(\" ,OFDE_OID_DETA_OFER \");\n \n query.append(\" FROM PED_SOLIC_POSIC SP, \");\n query.append(\" MAE_PRODU PR, \");\n query.append(\" PRE_OFERT_DETAL OD \");\n query.append(\" WHERE SP.PROD_OID_PROD = PR.OID_PROD \");\n query.append(\" AND SP.OFDE_OID_DETA_OFER = OD.OID_DETA_OFER(+) \");\n query.append(\" AND SP.SOCA_OID_SOLI_CABE = \").append(solicitud.getOidSolicitud());\n } else {\n query.append(\" SELECT OID_SOLI_POSI, ESPO_OID_ESTA_POSI, NUM_UNID_POR_ATEN, NUM_UNID_COMPR, \");\n query.append(\" VAL_PREC_CATA_UNIT_LOCA, IND_CTRL_STOC, IND_CTRL_LIQU, IND_LIMI_VENT, \");\n query.append(\" NUM_UNID_DEMA_REAL, MAPR_OID_MARC_PROD, UNEG_OID_UNID_NEGO, \");\n query.append(\" NEGO_OID_NEGO, GENE_OID_GENE, SGEN_OID_SUPE_GENE, \");\n query.append(\" A.CIVI_OID_CICLO_VIDA, A.TOFE_OID_TIPO_OFER, SP.NUM_UNID_DEMA, \");\n query.append(\" PR.OID_PROD, VAL_PREC_FACT_UNIT_LOCA, VAL_PREC_NETO_UNIT_LOCA \");\n \n // sapaza -- COL-SiCC-2013-0030 -- 28/11/2013 \n query.append(\" ,OFDE_OID_DETA_OFER \");\n \n // sapaza -- PER-SiCC-2011-0279 -- 07/06/2011\n if(solicitud.isValidaReemplazo()) {\n query.append(\" ,(SELECT COUNT(1) FROM pre_matri_factu mf, PRE_MATRI_REEMP mr \");\n query.append(\" WHERE mf.OID_MATR_FACT = mr.MAFA_OID_COD_REEM \"); \n query.append(\" AND mf.ofde_oid_deta_ofer = SP.OFDE_OID_DETA_OFER) COD_REEM \");\n }\n \n query.append(\" FROM PED_SOLIC_POSIC SP, \");\n query.append(\" MAE_PRODU PR, \");\n query.append(\" (SELECT DISTINCT OD.CIVI_OID_CICLO_VIDA, OD.TOFE_OID_TIPO_OFER, \");\n query.append(\" OD.PROD_OID_PROD \");\n query.append(\" FROM PRE_OFERT_DETAL OD, \");\n query.append(\" PRE_OFERT O, \");\n query.append(\" PRE_MATRI_FACTU_CABEC MFC \");\n query.append(\" WHERE OD.OFER_OID_OFER = O.OID_OFER \");\n query.append(\" AND O.MFCA_OID_CABE = MFC.OID_CABE \");\n query.append(\" AND MFC.PERD_OID_PERI = \");\n query.append(\" (SELECT DISTINCT SC3.PERD_OID_PERI \");\n query.append(\" FROM PED_SOLIC_POSIC SP, \");\n query.append(\" PED_SOLIC_CABEC SC, \");\n query.append(\" PED_SOLIC_CABEC SC2, \");\n query.append(\" PED_SOLIC_CABEC SC3 \");\n query.append(\" WHERE SC.OID_SOLI_CABE = \").append(solicitud.getOidSolicitud());\n query.append(\" AND SP.SOCA_OID_SOLI_CABE = SC.OID_SOLI_CABE \");\n query.append(\" AND SC.SOCA_OID_DOCU_REFE = SC2.OID_SOLI_CABE \");\n query.append(\" AND SC3.SOCA_OID_SOLI_CABE = SC2.OID_SOLI_CABE \");\n query.append(\" AND OD.VAL_CODI_VENT = SP.VAL_CODI_VENT \");\n query.append(\" AND OD.PROD_OID_PROD = SP.PROD_OID_PROD)) A \");\n query.append(\" WHERE SP.PROD_OID_PROD = PR.OID_PROD \");\n query.append(\" AND SP.SOCA_OID_SOLI_CABE = \").append(solicitud.getOidSolicitud());\n query.append(\" AND A.PROD_OID_PROD = SP.PROD_OID_PROD \");\n }\n\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* Posiciones \" + respuesta); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n solicitud.setPosiciones(new Posicion[0]);\n } else {\n Posicion[] posiciones = new Posicion[respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n posiciones[i] = new Posicion();\n posiciones[i].setSolicitud(solicitud);\n posiciones[i].setOidPosicion(new Long(((BigDecimal) \n respuesta.getValueAt(i, \"OID_SOLI_POSI\")).longValue()));\n\n {\n BigDecimal oidPosicion = (BigDecimal) respuesta\n .getValueAt(i, \"ESPO_OID_ESTA_POSI\");\n posiciones[i].setEstado((oidPosicion != null) ? new Long(\n oidPosicion.longValue()) : null);\n }\n\n //jrivas 27/04/2006 INC DBLG50000354\n /*{\n BigDecimal precio1 = (BigDecimal) respuesta\n .getValueAt(i, \"VAL_PREC_CATA_TOTA_LOCA_UNID\");\n posiciones[i].setPrecioCatalogTotalUniDemandaReal(\n (precio1 != null) ? precio1 : new BigDecimal(0));\n }*/\n\n {\n BigDecimal unidadesPorAtender = (BigDecimal) respuesta\n .getValueAt(i, \"NUM_UNID_POR_ATEN\");\n posiciones[i].setUnidadesPorAtender(\n (unidadesPorAtender != null) ? new Long(\n unidadesPorAtender.longValue()) : new Long(0));\n }\n\n {\n BigDecimal unidadesComprometidas = (BigDecimal) respuesta\n .getValueAt(i, \"NUM_UNID_COMPR\");\n posiciones[i].setUnidadesComprometidas(\n (unidadesComprometidas != null) ? new Long(\n unidadesComprometidas.longValue()) : new Long(0));\n }\n\n {\n BigDecimal precio2 = (BigDecimal) respuesta\n .getValueAt(i, \"VAL_PREC_CATA_UNIT_LOCA\");\n posiciones[i].setPrecioCatalogoUnitarioLocal(\n (precio2 != null) ? precio2 : new BigDecimal(0));\n }\n\n //jrivas 27/04/2006 INC DBLG50000354\n /* BigDecimal precio3 = (BigDecimal) respuesta\n .getValueAt(i, \"VAL_PREC_CONT_UNIT_LOCA\");\n posiciones[i].setPrecioContableUnitarioLocal(\n (precio3 != null) ? precio3 : new BigDecimal(0));*/\n\n\n {\n BigDecimal controlStock = (BigDecimal) respuesta\n .getValueAt(i, \"IND_CTRL_STOC\");\n\n if (controlStock == null) {\n posiciones[i].setControlStock(false);\n } else {\n if (controlStock.intValue() == 1) {\n posiciones[i].setControlStock(true);\n } else {\n posiciones[i].setControlStock(false);\n }\n }\n }\n\n {\n BigDecimal controlLiquidacion = (BigDecimal) respuesta\n .getValueAt(i, \"IND_CTRL_LIQU\");\n\n if (controlLiquidacion == null) {\n posiciones[i].setControlLiquidacion(false);\n } else {\n if (controlLiquidacion.intValue() == 1) {\n posiciones[i].setControlLiquidacion(true);\n } else {\n posiciones[i].setControlLiquidacion(false);\n }\n }\n }\n\n {\n BigDecimal limiteVenta = (BigDecimal) respuesta\n .getValueAt(i, \"IND_LIMI_VENT\");\n\n if (limiteVenta == null) {\n posiciones[i].setLimiteVenta(false);\n } else {\n if (limiteVenta.intValue() == 1) {\n posiciones[i].setLimiteVenta(true);\n } else {\n posiciones[i].setLimiteVenta(false);\n }\n }\n }\n\n {\n BigDecimal unidades = (BigDecimal) respuesta\n .getValueAt(i, \"NUM_UNID_DEMA_REAL\");\n posiciones[i].setUnidadesDemandaReal((unidades != null) \n ? new Long(unidades.longValue()) : new Long(0));\n }\n\n {\n BigDecimal oidMarcaProducto = (BigDecimal) respuesta\n .getValueAt(i, \"MAPR_OID_MARC_PROD\");\n posiciones[i].setOidMarcaProducto(\n (oidMarcaProducto != null) ? new Long(oidMarcaProducto\n .longValue()) : null);\n }\n\n {\n BigDecimal oidUnidadNegocio = (BigDecimal) respuesta\n .getValueAt(i, \"UNEG_OID_UNID_NEGO\");\n posiciones[i].setOidUnidadNegocio(\n (oidUnidadNegocio != null) ? new Long(oidUnidadNegocio\n .longValue()) : null);\n }\n\n {\n BigDecimal oidNegocio = (BigDecimal) respuesta\n .getValueAt(i, \"NEGO_OID_NEGO\");\n posiciones[i].setOidNegocio((oidNegocio != null) \n ? new Long(oidNegocio.longValue()) : null);\n }\n\n {\n BigDecimal oidGenerico = (BigDecimal) respuesta\n .getValueAt(i, \"GENE_OID_GENE\");\n posiciones[i].setOidGenerico((oidGenerico != null) \n ? new Long(oidGenerico.longValue()) : null);\n }\n\n {\n BigDecimal oidSuperGenerico = (BigDecimal) respuesta \n .getValueAt(i, \"SGEN_OID_SUPE_GENE\");\n posiciones[i].setOidSuperGenerico(\n (oidSuperGenerico != null) ? new Long(oidSuperGenerico\n .longValue()) : null);\n }\n\n BigDecimal uniDemandadas = (BigDecimal) respuesta\n .getValueAt(i, \"NUM_UNID_DEMA\");\n posiciones[i].setUnidadesDemandadas((uniDemandadas != null) \n ? new Long(uniDemandadas.longValue()) : new Long(0));\n\n posiciones[i].setOidProducto(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"OID_PROD\")).longValue()));\n \n BigDecimal oidTipoOferta = (BigDecimal) respuesta \n .getValueAt(i, \"TOFE_OID_TIPO_OFER\"); \n posiciones[i].setOidTipoOferta(\n (oidTipoOferta != null) ? new Long(oidTipoOferta\n .longValue()) : null);\n \n BigDecimal oidCicloVida = (BigDecimal) respuesta \n .getValueAt(i, \"CIVI_OID_CICLO_VIDA\"); \n posiciones[i].setOidCicloVida(\n (oidCicloVida != null) ? new Long(oidCicloVida\n .longValue()) : null);\n \n posiciones[i].setPrecioFacturaUnitarioLocal((BigDecimal) respuesta\n .getValueAt(i, \"VAL_PREC_FACT_UNIT_LOCA\"));\n \n posiciones[i].setPrecioNetoUnitarioLocal((BigDecimal) respuesta\n .getValueAt(i, \"VAL_PREC_NETO_UNIT_LOCA\"));\n \n // sapaza -- PER-SiCC-2011-0279 -- 07/06/2011\n if (solicitud.getIndDevolucion() && solicitud.isValidaReemplazo()) { \n BigDecimal codigoReemplazo = (BigDecimal) respuesta.getValueAt(i, \"COD_REEM\");\n \n if (codigoReemplazo == null) {\n posiciones[i].setProductoReemplazo(false);\n } else {\n if (codigoReemplazo.intValue() > 0) {\n posiciones[i].setProductoReemplazo(true);\n } else {\n posiciones[i].setProductoReemplazo(false);\n }\n }\n } else \n posiciones[i].setProductoReemplazo(false);\n \n // sapaza -- COL-SiCC-2013-0030 -- 28/11/2013 \n BigDecimal oidDetalleOferta = (BigDecimal) respuesta \n .getValueAt(i, \"OFDE_OID_DETA_OFER\"); \n posiciones[i].setOidDetalleOferta(\n (oidDetalleOferta != null) ? new Long(oidDetalleOferta.longValue()) : null); \n \n } // posiciones\n\n solicitud.setPosiciones(posiciones);\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerPosicionesSolicitud(Solici\"\n +\"tud solicitud):Salida\");\n }"
]
| [
"0.57651025",
"0.54318017",
"0.5235707",
"0.52241033",
"0.5077547",
"0.5034718",
"0.5022301",
"0.49758604",
"0.49487624",
"0.49411994",
"0.49346852",
"0.49188787",
"0.49118268",
"0.49078667",
"0.48868385",
"0.48826438",
"0.48814493",
"0.4875941",
"0.4859228",
"0.48298916",
"0.48278812",
"0.48208687",
"0.48196533",
"0.48133898",
"0.48094335",
"0.48044372",
"0.48039398",
"0.48034987",
"0.47999763",
"0.4794903",
"0.4794836",
"0.47947487",
"0.47887418",
"0.4783086",
"0.47726056",
"0.47674742",
"0.4766813",
"0.47588792",
"0.47461587",
"0.47427553",
"0.4734797",
"0.47240227",
"0.47194725",
"0.4713462",
"0.4712349",
"0.47025746",
"0.47004634",
"0.46908554",
"0.4680917",
"0.467875",
"0.46685964",
"0.4668317",
"0.46571398",
"0.46538675",
"0.46399543",
"0.46368155",
"0.46119887",
"0.46113002",
"0.46084374",
"0.46076983",
"0.46060234",
"0.46040377",
"0.46028265",
"0.4600067",
"0.4596064",
"0.45946103",
"0.45942262",
"0.459323",
"0.45899758",
"0.45869756",
"0.45857674",
"0.45787656",
"0.45772225",
"0.45725685",
"0.45694172",
"0.45686895",
"0.45678452",
"0.45599583",
"0.4554644",
"0.45535338",
"0.45530617",
"0.4551355",
"0.45505834",
"0.45500776",
"0.45500776",
"0.45500776",
"0.45500776",
"0.45500776",
"0.45471457",
"0.4545407",
"0.45400342",
"0.45372224",
"0.4536406",
"0.45317596",
"0.45299557",
"0.45289037",
"0.4528775",
"0.4528423",
"0.45251518",
"0.4525137",
"0.4525028"
]
| 0.0 | -1 |
ESCRIBIR GENERICOS Escribe los xml de la respuestas a cualquier tipo request de OAIPMH (Identify,ListMetadataFormats,ListSets,ListIdentifiers,ListRecords,GetRecord) | public void escribirOAIPMH(OAIPMHAgrega oaipmh, Writer writer, int tipo) throws ParseadorException {
try {
Marshaller marshaller = new Marshaller(writer);
marshaller.setEncoding(getProperty("default.encoding"));
String schemas = "http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd";
if(tipo == IDENTIFY){
String nameSpace = getProperty("nameSpaceIdentify");
String urlNameSpace = getProperty("urlNameSpaceIdentiy");
marshaller.setNamespaceMapping(nameSpace, urlNameSpace);
String schemaLocIdentify = getProperty("schemaLocIdentify");
schemas = schemas + " " + schemaLocIdentify;
}
else if (tipo == GETRECORD || tipo == LISTRECORDS){
String nameSpaceOAIDC = getProperty("nameSpaceOAIDC");
String urlNameSpaceOAIDC = getProperty("urlNameSpaceOAIDC");
marshaller.setNamespaceMapping(nameSpaceOAIDC, urlNameSpaceOAIDC);
String schemaLocOAIDC = getProperty("schemaLocOAIDC");
schemas = schemas + " " + schemaLocOAIDC;
String nameSpaceDC = getProperty("nameSpaceDC");
String urlNameSpaceDC =getProperty("urlNameSpaceDC");
marshaller.setNamespaceMapping(nameSpaceDC, urlNameSpaceDC);
}
marshaller.setSchemaLocation(schemas);
marshaller.setSuppressXSIType(true);
marshaller.setEncoding(getProperty("default.encoding"));
marshaller.setValidation(false);
marshaller.marshal(oaipmh.getOaipmh());
} catch (MarshalException e) {
throw new ParseadorException(
"Error de parseo al escribir el oaipmh", e);
} catch (ValidationException e) {
throw new ValidacionException(
"Error de validacion al escribir el oaipmh", e);
} catch (IOException e) {
throw new ParseadorException(
"No se pudo abrir el fichero oaipmh para su escritura", e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) throws Exception {\n\t\tString response = \"<AuditResultHospital xmlns=\\\"http://schemas.datacontract.org/2004/07/BMI.Engine.Common.Hospital\\\" xmlns:i=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\"\n\t\t\t\t+ \"<ClaimID>50b768e10c02b60f7c9343d9</ClaimID>\" + \"<Elapsed>0:0:0:324.324563</Elapsed>\"\n\t\t\t\t+ \"<Patient_IDStr>0057824702</Patient_IDStr>\" + \"<ViolationResult>\" + \"<RuleResultHospital>\"\n\t\t\t\t+ \"<DetailID>0</DetailID>\" + \"<FullTip/>\" + \"<GroupCode>{30E50964211259DAF0D7832C075574CF}</GroupCode>\"\n\t\t\t\t+ \"<ITEM_ID/>\" + \"<ITEM_NAME/>\" + \"<Reason>诊断信息不规范</Reason>\"\n\t\t\t\t+ \"<Related>50b768e10c02b60f7c9343d9</Related>\" + \"<ResultType>1</ResultType>\"\n\t\t\t\t+ \"<ResultTypeName>非医保支付</ResultTypeName>\" + \"<RuleName>就诊信息数据异常</RuleName>\" + \"<RuleNo>150001</RuleNo>\"\n\t\t\t\t+ \"<TipsCode4Hospital>N</TipsCode4Hospital>\" + \"</RuleResultHospital>\" + \"<RuleResultHospital>\"\n\t\t\t\t+ \"<DetailID>70b768e10c02b60f7c934428</DetailID>\" + \"<FullTip/>\"\n\t\t\t\t+ \"<GroupCode>{ABF47EFF6CDEED4FFF8684A5BD7832CA}</GroupCode>\" + \"<ITEM_ID>x090203004191001</ITEM_ID>\"\n\t\t\t\t+ \"<ITEM_NAME>重组人白介素-11[Ⅰ]</ITEM_NAME>\" + \"<Reason>限放化疗引起的血小板减少患者</Reason>\"\n\t\t\t\t+ \"<Related>50b768e10c02b60f7c9343d9|70b768e10c02b60f7c934428</Related>\" + \"<ResultType>2</ResultType>\"\n\t\t\t\t+ \"<ResultTypeName>待核实</ResultTypeName>\" + \"<RuleName>违反限定适应症(条件)用药</RuleName>\"\n\t\t\t\t+ \"<RuleNo>100301</RuleNo>\" + \"<TipsCode4Hospital>N</TipsCode4Hospital>\" + \"</RuleResultHospital>\"\n\t\t\t\t+ \"<RuleResultHospital>\" + \"<DetailID>70b768e10c02b60f7c934424</DetailID>\" + \"<FullTip/>\"\n\t\t\t\t+ \"<GroupCode>{D3A8CA51A1DB07AA23EF11D8D6295B40}</GroupCode>\" + \"<ITEM_ID>f12010001100</ITEM_ID>\"\n\t\t\t\t+ \"<ITEM_NAME>吸痰护理</ITEM_NAME>\"\n\t\t\t\t+ \"<Reason>重复收费</Reason><Related>50b768e10c02b60f7c9343d9|70b768e10c02b60f7c934422,50b768e10c02b60f7c9343d9|70b768e10c02b60f7c934424</Related>\"\n\t\t\t\t+ \"<ResultType>1</ResultType>\" + \"<ResultTypeName>非医保支付</ResultTypeName>\" + \"<RuleName>重复收费</RuleName>\"\n\t\t\t\t+ \"<RuleNo>130301</RuleNo>\"\n\t\t\t\t+ \"<TipsCode4Hospital>130301|{C81E728D9D4C2F636F067F89CC14862C}@0</TipsCode4Hospital>\"\n\t\t\t\t+ \"</RuleResultHospital>\" + \"</ViolationResult>\" + \"</AuditResultHospital>\";\n\t\tMap<String, Object> map = TransformUtil.xmlToMap(response);\n\t\tSystem.out.println(map);\n\t}",
"public static GetVehicleAlarmInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleAlarmInfoPage object =\n new GetVehicleAlarmInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleAlarmInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleAlarmInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"RecordDataSchema getActionResponseSchema();",
"public static GetVehicleAlarmInfoPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleAlarmInfoPageResponse object =\n new GetVehicleAlarmInfoPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleAlarmInfoPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleAlarmInfoPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static GetVehicleRecordPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleRecordPageResponse object =\n new GetVehicleRecordPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleRecordPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleRecordPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static GetVehicleRecordPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleRecordPage object =\n new GetVehicleRecordPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleRecordPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleRecordPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static HelloAuthenticatedWithEntitlementsResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedWithEntitlementsResponse object =\n new HelloAuthenticatedWithEntitlementsResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloAuthenticatedWithEntitlementsResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloAuthenticatedWithEntitlementsResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"@GET\n @Path(\"/{prefix}\")\n @Produces({\"application/xml\", \"application/json\"})\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED) //MediaType.MULTIPART_FORM_DATA)//\n @ApiOperation(value = \"Get single section of METS file.\", notes = \"Section will be selected by prefix of the metadata registered in KIT Data Manager.\"\n + \" If there are multiple sections with the same type an error will occur.\")\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Successful.\")\n ,\n @ApiResponse(code = 400, message = \"Bad request. At least one Parameter is invalid.\")\n ,\n @ApiResponse(code = 401, message = \"Unauthorized access.\")\n ,\n @ApiResponse(code = 404, message = \"ID doesn't exist.\")\n ,\n @ApiResponse(code = 500, message = \"Internal server error\")\n })\n public Response getPartialXML(\n @ApiParam(value = \"GroupId the user belongs to. (User has to be at least manager)\", required = false, defaultValue = \"USERS\") @QueryParam(\"groupId\") String pGroupId,\n @ApiParam(value = \"Unique ID for the metadata (should be identical to id of linked Digital Data Object).\", required = true) @QueryParam(value = \"oid\") String pDigitalObjectId,\n @ApiParam(value = \"Prefix of namespace of selected section\", required = true) @PathParam(\"prefix\") String prefixOfNamespace,\n @ApiParam(value = \"Section ID for the metadata (mandatory if multiple sections with same type exists).\", required = false) @QueryParam(value = \"sectionId\") String pSectionId) {\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(\"get Section XML: groupID = {} & digitalObjectId = {} & prefix = {} & section ID = {}\", pGroupId, pDigitalObjectId, prefixOfNamespace, pSectionId);\n }\n \n Response.Status statusCode = Response.Status.OK;\n StringBuilder sb = new StringBuilder();\n\n MediaType returnType = getAcceptableMediaType(context, MediaType.APPLICATION_JSON_TYPE, MediaType.APPLICATION_XML_TYPE);\n try {\n String metsDocument = new RestMetaStoreController().getPartialMetsDocument(context, pGroupId, pDigitalObjectId, prefixOfNamespace, pSectionId, returnType);\n\n sb.append(metsDocument);\n } catch (MetaStoreException ex) {\n LOGGER.error(\"Error while accessing section of mets file\", ex);\n exceptionToFormattedString(ex, returnType);\n statusCode = Response.Status.fromStatusCode(ex.getHttpStatus());\n } catch (Exception ex) {\n LOGGER.error(\"Uncatched error while accessing section of mets file\", ex);\n exceptionToFormattedString(ex, returnType);\n statusCode = Response.Status.INTERNAL_SERVER_ERROR;\n }\n return Response.status(statusCode).entity(sb.toString()).build();\n }",
"public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleRecordPageResponse getVehicleRecordPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleRecordPage getVehicleRecordPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName());\n _operationClient.getOptions().setAction(\"urn:getVehicleRecordPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getVehicleRecordPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getVehicleRecordPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleRecordPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleRecordPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }",
"public abstract List<EXIFContent> parse();",
"public static GetVehicleInfoPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPageResponse object =\n new GetVehicleInfoPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static HelloAuthenticatedWithEntitlementPrecheckResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedWithEntitlementPrecheckResponse object =\n new HelloAuthenticatedWithEntitlementPrecheckResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloAuthenticatedWithEntitlementPrecheckResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloAuthenticatedWithEntitlementPrecheckResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static final void main(String[] args) {\n\t\t\n\t\tFhirContext context = new FhirContext();\n\t\tfinal FhirOpenemrConn pg = new FhirOpenemrConn();\n\t\tBundle bundle;\n\t\tPatient patient;\n\t\tfinal String outputMediaType = \"application/json+fhir\";\n\t\tfinal String req=\"get_all\";\n\t\tString result = \"\";\n\t\tIParser parser = getParser(context, FHIRMediaType.getType(outputMediaType) );\n\t\tparser.setPrettyPrint(true);\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tPatientList patientList=null;\n\t\t\tFile f = new File(\"D:/AllPatients.txt\");\n\t\t\tpatientList = pg.getPatientList(f);\n\t\t\t\n\t\t\tif(req.equalsIgnoreCase(\"get_all\")){\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Patient List... \" + patientList);\n\t\t\t\tbundle = pg.getAllPatients(patientList);\n\t\t\t\tresult = parser.encodeResourceToString(bundle);\t\n\t\t\t}\n\t\t\t/*else if(req.equalsIgnoreCase(\"get_single\")){\n\t\t\t\tpatient = pg.getSinglePatient(patientList,0);\n\t\t\t\tSystem.out.println(\"Patient in main.... \" + patient.getId());\n\t\t\t\tresult = parser.encodeResourceToString(patient);\t\n\t\t\t}\n\t\t\telse\n\t\t\t\tresult = null;*/\n\t\t\t\n\t\t\tSystem.out.println(\"Result.... \"+result);\n\t\t\t\n\t\t\t\n\t\t} catch (JAXBException e) {\n\t\t\te.printStackTrace();\n\t\t }\t \n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*int status_code = 200;\n\t\tString reason = \"OK\";\n\t\tString errorMessage = null;\n\t\tString result = null;\n\t\tPatientList2 patientList;\n\t\tfinal FhirOpenemrConn conn = new FhirOpenemrConn();\n\t\t//String req = messageContext.getVariable(\"req\");\n\t\t// Get the response received from server stored in apigee variable\n\t\t\n\t\t\n\t\t// Get the actual Content type of response and required content type.\n\t\tString outputMediaType = \"application/json+fhir\";\n\n\t\t\n\t\t\n\t\tFhirContext context = new FhirContext();\n\t\ttry \n\t\t{\n\t\t\tFile f = new File(\"D:/patient.xml\");;\n\t\t\tpatientList = conn.getPatientList(f);\n\t\t Bundle bundle;\n\t\t\tPatient patient;\n\t\t\t\n\t\t\tIParser parser = getParser(context, FHIRMediaType.getType(\"application/json+fhir\"));\n\t\t\tparser.setPrettyPrint(true);\n\t\t\t\n\t\t\tpatient = conn.getSinglePatient(patientList,0);\n\t\t\tresult = parser.encodeResourceToString(patient);\n\t\t\t\n\t\t\tbundle = conn.getAllPatients(patientList);\n\t\t\tresult = parser.encodeResourceToString(bundle);\n\t\t\t\n\t\t\tSystem.out.println(\"Result....\" + result);\n\n\t\t}\n\t\tcatch (UnsupportedOperationException e) {\n\t\t\tstatus_code = 415;\n\t\t\treason = \"Unsupported media type\";\n\t\t\terrorMessage = \"Media type not supported.\";\n\t\t} \n\t\tcatch (Throwable e) {\n\t\t\tstatus_code = 500;\n\t\t\treason = \"Internal Server Error\";\n\t\t\terrorMessage = e.getMessage();\n\t\t\tSystem.out.println(\"Error... \" + e);\n\t\t}\n\t\t\n\t\tif (status_code == 200) {\n\t\t\t// Set result and message variables for apigee flow if response converted successfully\n\t\t\tSystem.out.println(\"Valid Result\");\n\t\t} \n\t\telse {\n\t\t\tSystem.out.println(\"Error..!!\");\n\t\t}\n\t\t*/\n\t\t\n\t\t\n\t\t\n\t}",
"public static GetVehicleInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPage object =\n new GetVehicleInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleAlarmInfoPageResponse getVehicleAlarmInfoPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleAlarmInfoPage getVehicleAlarmInfoPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());\n _operationClient.getOptions().setAction(\"urn:getVehicleAlarmInfoPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getVehicleAlarmInfoPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getVehicleAlarmInfoPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleAlarmInfoPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleAlarmInfoPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }",
"private void getRequestList()\n {\n StringBuilder soapMessage = new StringBuilder();\n soapMessage.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\");\n soapMessage.append(\"<Envelope xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">\");\n soapMessage.append(\"<Body>\");\n soapMessage.append(\"<ListRequestType xmlns=\\\"\" + Constants.TEMP_URI_NAMESPACE + \"\\\">\");\n soapMessage.append(\"<userHash>\" + DataManager.getInstance().user.getUserHash() + \"</userHash>\");\n soapMessage.append(\"</ListRequestType>\");\n soapMessage.append(\"</Body>\");\n soapMessage.append(\"</Envelope>\");\n showProgressDialog();\n VollyResponseListener vollyResponseListener = new VollyResponseListener()\n {\n @Override\n public void onErrorResponse(VolleyError volleyError)\n {\n volleyError.printStackTrace();\n }\n\n @Override\n public void onResponse(String response)\n {\n hideProgressDialog();\n requestList = new ArrayList<SmartObject>();\n Helper.Log(\"Response:%n %s\", response);\n DataManager.getInstance().requestUser = ParserManager.parseRequestResponse(response);\n for (int i = 0; i < ParserManager.parseRequestResponse(response).getRequests().size(); i++)\n {\n int requestId = Integer.parseInt(ParserManager.parseRequestResponse(response).getRequests().get(i).getRequestId());\n String requestName = ParserManager.parseRequestResponse(response).getRequests().get(i).getRequestName();\n requestList.add(i, new SmartObject(requestId, requestName));\n }\n\n {\n if (!requestList.isEmpty())\n showListPopUp(etSelectTeam, requestList);\n }\n\n }\n };\n try\n {\n VollyCustomRequest vollyCustomRequest = new VollyCustomRequest(Constants.PLANNER_WEBSERVICE_URL,\n soapMessage.toString(), Constants.TEMP_URI_NAMESPACE + \"IPlannerService/ListRequestType\", vollyResponseListener);\n vollyCustomRequest.init(\"validateUser\");\n\n\n } catch (Exception e1)\n {\n e1.printStackTrace();\n }\n\n }",
"public interface GetFeatureRequest extends Request{\n\n /**\n * @return QName : requested type name, can be null\n * if not yet configured.\n */\n QName getTypeName();\n\n /**\n * @param type : requested type name, must not be null\n */\n void setTypeName(QName type);\n\n /**\n * @return Filter : the request filter, null for no filter\n */\n Filter getFilter();\n\n /**\n * @param filter : the request filter, null for no filter\n */\n void setFilter(Filter filter);\n\n /**\n * @return Integer : maximum features returned by this request,\n * null for no limit.\n */\n Integer getMaxFeatures();\n\n /**\n * @param max : maximum features returned by this request,\n * null for no limit.\n */\n void setMaxFeatures(Integer max);\n\n /**\n * @return String[] : array of requested properties,\n * null if all properties, empty for only the id.\n */\n GenericName[] getPropertyNames();\n\n /**\n * @param properties : array of requested properties,\n * null if all properties, empty for only the id.\n */\n void setPropertyNames(GenericName[] properties);\n\n /**\n * Return the output format to use for the response.\n * text/xml; subtype=gml/3.1.1 must be supported.\n * Other output formats are possible as well as long as their MIME\n * type is advertised in the capabilities document.\n *\n * @return The current outputFormat\n */\n String getOutputFormat();\n\n /**\n * Set the output format to use for the response.\n * text/xml; subtype=gml/3.1.1 must be supported.\n * Other output formats are possible as well as long as their MIME\n * type is advertised in the capabilities document.\n *\n * @param outputFormat The current outputFormat\n */\n void setOutputFormat(String outputFormat);\n}",
"public static GetClientsResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\r\n GetClientsResponse object =\r\n new GetClientsResponse();\r\n\r\n int event;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix =\"\";\r\n java.lang.String namespaceuri =\"\";\r\n try {\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n \r\n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n if (fullTypeName!=null){\r\n java.lang.String nsPrefix = null;\r\n if (fullTypeName.indexOf(\":\") > -1){\r\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\r\n }\r\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\r\n \r\n if (!\"getClientsResponse\".equals(type)){\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\r\n return (GetClientsResponse)ExtensionMapper.getTypeObject(\r\n nsUri,type,reader);\r\n }\r\n \r\n\r\n }\r\n \r\n\r\n }\r\n\r\n \r\n\r\n \r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n \r\n\r\n \r\n \r\n reader.next();\r\n \r\n java.util.ArrayList list1 = new java.util.ArrayList();\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://registry\",\"return\").equals(reader.getName())){\r\n \r\n \r\n \r\n // Process the array and step past its final element's end.\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\r\n list1.add(null);\r\n reader.next();\r\n } else {\r\n list1.add(User.Factory.parse(reader));\r\n }\r\n //loop until we find a start element that is not part of this array\r\n boolean loopDone1 = false;\r\n while(!loopDone1){\r\n // We should be at the end element, but make sure\r\n while (!reader.isEndElement())\r\n reader.next();\r\n // Step out of this element\r\n reader.next();\r\n // Step to next element event.\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n if (reader.isEndElement()){\r\n //two continuous end elements means we are exiting the xml structure\r\n loopDone1 = true;\r\n } else {\r\n if (new javax.xml.namespace.QName(\"http://registry\",\"return\").equals(reader.getName())){\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\r\n list1.add(null);\r\n reader.next();\r\n } else {\r\n list1.add(User.Factory.parse(reader));\r\n }\r\n }else{\r\n loopDone1 = true;\r\n }\r\n }\r\n }\r\n // call the converter utility to convert and set the array\r\n \r\n object.set_return((User[])\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(\r\n User.class,\r\n list1));\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n \r\n if (reader.isStartElement())\r\n // A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\r\n \r\n\r\n\r\n\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }",
"public static GetDictionaryPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDictionaryPageResponse object =\n new GetDictionaryPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDictionaryPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDictionaryPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"@SuppressWarnings(\"JavaUtilDate\")\n public OAIPMHtype build() {\n response.setRequest(requestType);\n GregorianCalendar cal = new GregorianCalendar();\n cal.setGregorianChange(new Date());\n try {\n response.setResponseDate(DatatypeFactory.newInstance().newXMLGregorianCalendar(cal));\n } catch (DatatypeConfigurationException ex) {\n LOGGER.error(\"Failed to set response date to OAI-PMH response.\", ex);\n }\n\n if (!isError()) {\n switch (verb) {\n case IDENTIFY:\n response.setIdentify(identifyType);\n break;\n case LIST_METADATA_FORMATS:\n response.setListMetadataFormats(listMetadataFormatsType);\n break;\n case LIST_SETS:\n response.setListSets(listSetsType);\n break;\n case GET_RECORD:\n response.setGetRecord(getRecordType);\n break;\n case LIST_IDENTIFIERS:\n response.setListIdentifiers(listIdentifiers);\n break;\n case LIST_RECORDS:\n response.setListRecords(listRecordsType);\n break;\n }\n }\n\n return response;\n }",
"private com.novartis.xmlbinding.mt_response.Response getResponse(String xml) throws JAXBException, SAXException{\n\n try{\n requestContext = JAXBContext.newInstance(\"com.novartis.xmlbinding.mt_response\");\n\n schema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI)\n .newSchema(MTPrep.class.getClassLoader().getResource(\"com/novartis/messaging/schemas/MTResponse.xsd\"));\n\n unmarshaller = requestContext.createUnmarshaller();\n unmarshaller.setSchema(schema);\n }\n catch(JAXBException jex){\n throw new JAXBException(jex+\" in MTPrep.getResponse()\");\n }\n catch(SAXException sex){\n throw new SAXException(sex+\" in MTPrep.getResponse()\");\n }\n\n //read xml into object\n com.novartis.xmlbinding.mt_response.Response res = (com.novartis.xmlbinding.mt_response.Response) unmarshaller.unmarshal(new StringReader(xml));\n\n return res;\n }",
"public static GetDirectSrvInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectSrvInfoResponse object =\n new GetDirectSrvInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectSrvInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectSrvInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectSrvInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectSrvInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectSrvInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public void parseResponse();",
"public static GetParkPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetParkPageResponse object =\n new GetParkPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getParkPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetParkPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static GetFilesFromUserResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\r\n GetFilesFromUserResponse object =\r\n new GetFilesFromUserResponse();\r\n\r\n int event;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix =\"\";\r\n java.lang.String namespaceuri =\"\";\r\n try {\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n \r\n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n if (fullTypeName!=null){\r\n java.lang.String nsPrefix = null;\r\n if (fullTypeName.indexOf(\":\") > -1){\r\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\r\n }\r\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\r\n \r\n if (!\"getFilesFromUserResponse\".equals(type)){\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\r\n return (GetFilesFromUserResponse)ExtensionMapper.getTypeObject(\r\n nsUri,type,reader);\r\n }\r\n \r\n\r\n }\r\n \r\n\r\n }\r\n\r\n \r\n\r\n \r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n \r\n\r\n \r\n \r\n reader.next();\r\n \r\n java.util.ArrayList list1 = new java.util.ArrayList();\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://registry\",\"return\").equals(reader.getName())){\r\n \r\n \r\n \r\n // Process the array and step past its final element's end.\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\r\n list1.add(null);\r\n \r\n reader.next();\r\n } else {\r\n list1.add(reader.getElementText());\r\n }\r\n //loop until we find a start element that is not part of this array\r\n boolean loopDone1 = false;\r\n while(!loopDone1){\r\n // Ensure we are at the EndElement\r\n while (!reader.isEndElement()){\r\n reader.next();\r\n }\r\n // Step out of this element\r\n reader.next();\r\n // Step to next element event.\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n if (reader.isEndElement()){\r\n //two continuous end elements means we are exiting the xml structure\r\n loopDone1 = true;\r\n } else {\r\n if (new javax.xml.namespace.QName(\"http://registry\",\"return\").equals(reader.getName())){\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\r\n list1.add(null);\r\n \r\n reader.next();\r\n } else {\r\n list1.add(reader.getElementText());\r\n }\r\n }else{\r\n loopDone1 = true;\r\n }\r\n }\r\n }\r\n // call the converter utility to convert and set the array\r\n \r\n object.set_return((java.lang.String[])\r\n list1.toArray(new java.lang.String[list1.size()]));\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n \r\n if (reader.isStartElement())\r\n // A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\r\n \r\n\r\n\r\n\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }",
"private Collection<TremorRecord> parseResponse(HttpResponse successResponse) \r\n\t\t\t\t\t\t\t\t\t\t\tthrows XmlPullParserException, IOException, NumberFormatException, ParseException {\r\n\t\tArrayList<TremorRecord> tremors = new ArrayList<TremorRecord>();\r\n\t\t\r\n\t\tXmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();\r\n\t\tparser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);\r\n\t\t\r\n\t\tparser.setInput(successResponse.getEntity().getContent(), null);\r\n\t\t\r\n\t\tint eventType = parser.getEventType();\r\n\t\t\r\n\t\tTremorRecord record = null;\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(TremorConstants.USGS_DATE_FORMAT);\r\n\t\t\r\n\t\twhile(eventType != XmlPullParser.END_DOCUMENT) {\r\n\t\t\tswitch(eventType) {\r\n\t\t\tcase XmlPullParser.START_TAG:\r\n\t\t\t\tString tagName = parser.getName();\r\n\t\t\t\tLog.v(TremorConstants.LOG_TAG, \"XML Parsing---> Start Tag [\" + tagName + \"]\");\r\n\t\t\t\t\r\n\t\t\t\tif(TremorConstants.XML_TAG_ITEM.equals(tagName)) {\r\n\t\t\t\t\trecord = new TremorRecord();\r\n\t\t\t\t} else if(record != null) {\r\n\t\t\t\t\tString val = parser.nextText();\r\n\t\t\t\t\t\r\n\t\t\t\t\tLog.v(TremorConstants.LOG_TAG, \"XML Parsing---> Value [\" + val + \"]\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TremorConstants.XML_TAG_TITLE.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setTitle(val);\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_DEPTH.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setDepthKm(Double.valueOf(val));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_DESC.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setDescriptionHtml(val);\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_LAT.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setLatitude(Double.valueOf(val));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_LONG.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setLongitude(Double.valueOf(val));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_PUBDATE.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setPubDate(sdf.parse(val));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_REGION.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setRegion(val);\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_SECONDS.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setEventDateUtc(new Date(Long.parseLong(val) * 1000));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_SUBJECT.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setFloorMag(Integer.valueOf(val));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_URL.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setUrl(val);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase XmlPullParser.END_TAG:\r\n\t\t\t\ttagName = parser.getName();\r\n\t\t\t\tif(TremorConstants.XML_TAG_ITEM.equals(tagName)) {\r\n\t\t\t\t\tLog.v(TremorConstants.LOG_TAG, \"Finished parsing record, adding to collection. \" +\r\n\t\t\t\t\t\t\t\"Record [\" + record.toString() + \"].\");\r\n\t\t\t\t\t\r\n\t\t\t\t\ttremors.add(record);\r\n\t\t\t\t\trecord = null;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\teventType = parser.next();\r\n\t\t}\r\n\t\t\r\n\t\treturn tremors;\r\n\t}",
"public static GetDirectAreaInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectAreaInfoResponse object =\n new GetDirectAreaInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectAreaInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectAreaInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectAreaInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectAreaInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectAreaInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static GetVehicleBookPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleBookPageResponse object =\n new GetVehicleBookPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleBookPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleBookPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"GetRecordsResponseType createGetRecordsResponseType();",
"public List<ATWResponse> findResponsesByRequestId(int requestID) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<ATWResponse> list = entityManager.createQuery(findByRequestID)\n\t\t\t.setParameter(1, requestID)\n\t\t\t.getResultList();\n\t\tif(list != null) {System.out.println(\"Response by rid List size = \"+list.size());}\n\t\telse { System.out.println(\"Response List is by rid NULL\");}\n\t\treturn list;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprivate void parseMetadata(String resp, String downloadUUID) throws DocumentException{\n\t\tSAXReader reader = new SAXReader();\n\t\treader.setStripWhitespaceText(true);\n\t\treader.setMergeAdjacentText(true);\n\t\tDocument document = reader.read(new StringReader(resp));\n\t\t\n\t\tMap<String, String> namespaceURIs=null;\n\t\ttry {\n\t\t\tnamespaceURIs = Namespaces.getNamespaces(resp);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t \n\t\tlog.info(\"Parsing Metadata\");\n\t\t\n\t\tServiceElements serviceElements = new ServiceElements();\n\t\tList<DatasetElements> dataSetList=new ArrayList<DatasetElements>();\n\n\t\tserviceElements.setTitle(getElement(ServiceXPaths.getXPath(ServiceXPaths.TITEL,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setDesc(getElement(ServiceXPaths.getXPath(ServiceXPaths.DESC,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setDateStamp(getElement(ServiceXPaths.getXPath(ServiceXPaths.DATE_STAMP,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setRights(getElement(ServiceXPaths.getXPath(ServiceXPaths.RIGHTS,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setLanguage(getElement(ServiceXPaths.getXPath(ServiceXPaths.LANGUAGE,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setAuthorName(getElement(ServiceXPaths.getXPath(ServiceXPaths.AUTHOR_NAME,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setAuthorMail(getElement(ServiceXPaths.getXPath(ServiceXPaths.AUTHOR_MAIL,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setOrgName(getElement(ServiceXPaths.getXPath(ServiceXPaths.ORG_NAME,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setBrowseGraphic(getElement(ServiceXPaths.getXPath(ServiceXPaths.BROWSE_GRAPHIC,namespaceURIs), namespaceURIs, document));\n\n\t\t XPath xPathKW = DocumentHelper.createXPath(ServiceXPaths.getXPath(ServiceXPaths.KEYWORDS,namespaceURIs));\n\t\t xPathKW.setNamespaceURIs(namespaceURIs);\n\t\t List<Node> asResultsNodesKW = xPathKW.selectNodes(document.getRootElement());\n\t\t List<String> keywords =new ArrayList<String>();\n\t\t for(int j=0;j<asResultsNodesKW.size();j++){\n\t\t\t keywords.add(asResultsNodesKW.get(j).getStringValue().replace(\"&\", \"&\"));\n\t\t }\n\t\t serviceElements.setKeywords(keywords);\t\n\t\t \n\t\t XPath xPath2 = DocumentHelper.createXPath(ServiceXPaths.getXPath(ServiceXPaths.OPERATES_ON,namespaceURIs));\n\t\t xPath2.setNamespaceURIs(namespaceURIs);\n\n\t\t List<Node> asResultsNodes2 = xPath2.selectNodes(document.getRootElement());\t\t\n\n\t\t for(int i=0;i<asResultsNodes2.size();i++){\n\t\t\t \n\t\t\t DatasetElements dataSet=new DatasetElements();\n\t\t\t \t\t \n\t\t\t String respDS=CSWUtil.executeRequest(cswURL, asResultsNodes2.get(i).getText(), proxyHost, proxyPort);\n\t\t\t Document document2 = reader.read(new StringReader(respDS));\n\t\t\t namespaceURIs = Namespaces.getNamespaces(respDS);\n\t\t\t dataSet.setCodeUUID(getElement(DatasetXPaths.getXPath(DatasetXPaths.UUID,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setId(getElement(DatasetXPaths.getXPath(DatasetXPaths.FILE_ID,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setTitle(getElement(DatasetXPaths.getXPath(DatasetXPaths.TITLE,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setDesc(getElement(DatasetXPaths.getXPath(DatasetXPaths.DESC,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setDateStamp(getElement(DatasetXPaths.getXPath(DatasetXPaths.DATE_STAMP,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setRights(getElement(DatasetXPaths.getXPath(DatasetXPaths.RIGHTS,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setAuthorName(getElement(DatasetXPaths.getXPath(DatasetXPaths.AUTHOR_NAME,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setAuthorMail(getElement(DatasetXPaths.getXPath(DatasetXPaths.AUTHOR_MAIL,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setOrganisationName(getElement(DatasetXPaths.getXPath(DatasetXPaths.ORG_NAME,namespaceURIs), namespaceURIs, document2)); \n\t\t\t dataSet.setBBOXwest(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_WEST,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBBOXeast(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_EAST,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBBOXsouth(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_SOUTH,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBBOXnorth(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_NORTH,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setType(getElement(DatasetXPaths.getXPath(DatasetXPaths.TYPE,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setLanguage(getElement(DatasetXPaths.getXPath(DatasetXPaths.LANGUAGE,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBrowseGraphic(getElement(DatasetXPaths.getXPath(DatasetXPaths.BROWSE_GRAPHIC,namespaceURIs), namespaceURIs, document2));\n\t\t\t \n\t\t\t List<String> dsURLList=new ArrayList<String>();\n\t\t\t List<String> dsDescriptionList=new ArrayList<String>();\n\t\t\t List<String> dsCodeListValueList=new ArrayList<String>();\n\t\t\t List<String> dsNameValueList=new ArrayList<String>();\n\t\t\t List<String> dsAppProfileValueList=new ArrayList<String>();\n\t\t\t \n\t\t\t \n\t\t\t XPath xPath8 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE,namespaceURIs));\n\t\t\t xPath8.setNamespaceURIs(namespaceURIs);\n\t\t\t List<Node> asResultsNodes8 = xPath8.selectNodes(document2.getRootElement());\n\t\t\t for(int j=0;j<asResultsNodes8.size();j++){\n\t\t\t\t XPath xPath9 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_DESC_SUB,namespaceURIs));\n\t\t\t\t XPath xPath10 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_URL_SUB,namespaceURIs));\n\t\t\t\t XPath xPath11 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_CODE_SUB,namespaceURIs));\n\t\t\t\t //XPath xPath12 = DocumentHelper.createXPath(DatasetXLinks.getXPath(DatasetXPaths.ONLINE_RESSOURCE_PROTOCOL_SUB,namespaceURIs));\n\t\t\t\t XPath xPath13 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_PROFILE_SUB,namespaceURIs));\n\t\t\t\t XPath xPath14 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_NAME_SUB,namespaceURIs));\t\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t xPath9.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath10.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath11.setNamespaceURIs(namespaceURIs);\n\t\t\t\t //xPath12.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath13.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath14.setNamespaceURIs(namespaceURIs);\n\t\t\t\t \n\t\t\t\t List<Node> asResultsNodes9 = xPath9.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes10 = xPath10.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes11 = xPath11.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t //List<Node> asResultsNodes12 = xPath12.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes13 = xPath13.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes14 = xPath14.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t \n\t\t\t\t String desc = \"\";\n\t\t\t\t String url =\"\";\n\t\t\t\t String code = \"\";\n\t\t\t\t //String protocol = \"\";\n\t\t\t\t String appProfile = \"\";\n\t\t\t\t String name = \"\";\n\t\t\t\t \n\t\t\t\t if(asResultsNodes9.size() > 0){\n\t\t\t\t\t desc =asResultsNodes9.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t if(asResultsNodes10.size() > 0){\n\t\t\t\t\t url = asResultsNodes10.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t if(asResultsNodes11.size() > 0){\n\t\t\t\t\t code =asResultsNodes11.get(0).getStringValue();\n\t\t\t\t }\n//\t\t\t\t\t if(asResultsNodes12.size() > 0l){\n//\t\t\t\t\t\t protocol =asResultsNodes12.get(0).getStringValue();\n//\t\t\t\t\t }\n\t\t\t\t if(asResultsNodes13.size() > 0){\n\t\t\t\t\t appProfile =asResultsNodes13.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t if(asResultsNodes14.size() > 0){\n\t\t\t\t\t name =asResultsNodes14.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t \t\t\t\t\t\t\t\t \n\t\t\t\t dsURLList.add(url.replaceAll(\"&\", \"&\"));\n\t\t\t\t dsDescriptionList.add(desc.replaceAll(\"&\", \"&\"));\n\t\t\t\t dsCodeListValueList.add(code.replaceAll(\"&\", \"&\"));\n\t\t\t\t dsNameValueList.add(name.replaceAll(\"&\", \"&\"));\n\t\t\t\t dsAppProfileValueList.add(appProfile.replaceAll(\"&\", \"&\"));\n\n\t\t\t }\n\t\t\t dataSet.setURLList(dsURLList);\n\t\t\t dataSet.setDescriptionList(dsDescriptionList);\n\t\t\t dataSet.setCodeListValueList(dsCodeListValueList);\n\t\t\t dataSet.setNameList(dsNameValueList);\n\t\t\t dataSet.setAppProfileList(dsAppProfileValueList);\n\t\t\t \n\t\t\t dataSetList.add(dataSet);\n\t\t }\n\t\t \n\t\t writeFeed(serviceElements, dataSetList, downloadUUID);\n\t}",
"Object getAll(WebRequest webRequest, HttpServletResponse response, Model model) throws Exception;",
"public static HelloAuthenticatedResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedResponse object =\n new HelloAuthenticatedResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloAuthenticatedResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloAuthenticatedResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPageResponse getVehicleInfoPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPage getVehicleInfoPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"urn:getVehicleInfoPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getVehicleInfoPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getVehicleInfoPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }",
"private static DocumentoType[] getDocumentoTypeFromBPSDettaglioCartellaResponse( DettaglioCartellaAvvisoResponse response) {\r\n\t\t \r\n\t\tit.equitalia.dettagliocartellaavviso.wsdl.DocumentoType bpelDocumentoType = response.getCartellaAvviso().getDocumento();\r\n\t\t \r\n\t\tDocumentoType[] result = new DocumentoType[1];\r\n \t \r\n \t\tDocumentoType documentoType = new DocumentoType(); \r\n \t\tresult[0] = documentoType;\r\n\r\n \t\tIdentificativoDocumentoType identificativoDocumentoType = new IdentificativoDocumentoType();\r\n \t\tidentificativoDocumentoType.setTipoDocumento(bpelDocumentoType.getIdDocumento().getTipoDocumento() );\t\t//DATATYPEID=1 \tDescrizione\r\n \t\tidentificativoDocumentoType.setNumeroDocumento(bpelDocumentoType.getIdDocumento().getNumeroDocumento() );\t //DATATYPEID=2 \t\tN° Cartella \r\n \t\tdocumentoType.setIdDocumento(identificativoDocumentoType);\r\n \t\t\r\n \t\tit.equitalia.gestorefascicolows.dati.EnteType[] enti = new it.equitalia.gestorefascicolows.dati.EnteType[bpelDocumentoType.getEnte().length];\r\n \t\t \r\n \t\t \r\n \t\tfor (int iEnte = 0; iEnte < bpelDocumentoType.getEnte().length; iEnte++) {\r\n \t\t\tEnteType enteType = new EnteType();\r\n \t\tenteType.setDescrizione(bpelDocumentoType.getEnte()[iEnte].getDescrizione()); \t//DATATYPEID=3 \t\tEnte\r\n \t\tenti[iEnte] = enteType;\r\n\t\t}\r\n \t\t\r\n \t\tdocumentoType.setEnte(enti);\r\n\r\n \t\tdocumentoType.setDataNotifica(bpelDocumentoType.getDataNotifica()) ; //DATATYPEID=4 \t\t\tData Notifica\r\n \t\tdocumentoType.setImportoTotaleDocumento(bpelDocumentoType.getImportoTotaleDocumento().doubleValue()) ; //DATATYPEID=5 \t\tImporto Iniziale\r\n \t\tdocumentoType.setImportoInizialeTributi(bpelDocumentoType.getImportoInizialeTributi().doubleValue()) ; //DATATYPEID=6 \t\tImporto a ruolo\r\n \t\tdocumentoType.setImportoTotaleCompensi(bpelDocumentoType.getImportoTotaleCompensi().doubleValue()); // DATATYPEID=7 \t\tCompensi entro le scadenze\r\n \t\tdocumentoType.setImportoTotaleNotifica(bpelDocumentoType.getImportoTotaleNotifica().doubleValue()); //DATATYPEID=8 \t\tDiritti di Notifica\r\n\r\n \t\tdocumentoType.setImportoResiduoDocumento(bpelDocumentoType.getImportoResiduoDocumento().doubleValue()); // DATATYPEID=9 \t\tImporto da Pagare \r\n \t\tdocumentoType.setImportoResiduoTributi(bpelDocumentoType.getImportoResiduoTributi().doubleValue()); // DATATYPEID=10 \t\tImporti a ruolo residui\r\n \t\tdocumentoType.setImportoResiduoCompensi(bpelDocumentoType.getImportoResiduoCompensi().doubleValue()); //DATATYPEID=11 \t\tCompensi oltre le scadenze\r\n \t\tdocumentoType.setImportoResiduoNotifica(bpelDocumentoType.getImportoResiduoNotifica().doubleValue()); // DATATYPEID=12 \t\tDiritti di Notifica\r\n \t\tdocumentoType.setImportoInteressiMora(bpelDocumentoType.getImportoInteressiMora().doubleValue()); // DATATYPEID=13 \t\tInteressi di mora\r\n \t\tdocumentoType.setImportoSpeseProcedure(bpelDocumentoType.getImportoSpeseProcedure().doubleValue()); //DATATYPEID=14 \t\tSpese di Procedura\r\n \t\tdocumentoType.setImportoAltreSpese(bpelDocumentoType.getImportoAltreSpese().doubleValue()); \t\t\t\t//DATATYPEID=15 \t\tAltre Spese\r\n \t\tdocumentoType.setFlagSospensione(bpelDocumentoType.getFlagSospensione()); //DATATYPEID=16 \t\tSospensioni\r\n \t\tdocumentoType.setFlagSgravio(bpelDocumentoType.getFlagSgravio()); // DATATYPEID=17 \t\tSgravi\r\n \t\tdocumentoType.setFlagRateazione(bpelDocumentoType.getFlagRateazione()); //DATATYPEID=18 \t\tRateazioni\r\n \t\tdocumentoType.setFlagProcedura(bpelDocumentoType.getFlagProcedura()); //DATATYPEID=19 \t\tProcedure \r\n \t\t\r\n \t\tdocumentoType.setNumeroRav( bpelDocumentoType.getNumeroRav() ); \t\t//DATATYPEID=12 \t\tNumero RAV \r\n \r\n \tdocumentoType.setRObjectId(\"-\") ;\t\t//DATATYPEID=91 \t\t\r\n \t\tdocumentoType.setStatoPdf(CartellaDAOImpl.STATO_DOCUMENTUM_NON_RICHIESTO) ;\t\t//DATATYPEID=92 \t\t\r\n \t\tdocumentoType.setStatoRelate(CartellaDAOImpl.STATO_DOCUMENTUM_NON_RICHIESTO) ;\t\t//DATATYPEID=93 \t\t \r\n \t\t\r\n \t\r\n\t\treturn result ;\r\n\t\r\n\t}",
"public interface GPAdimWS {\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.provincia\")\n Call<List<Provincia>> listProvincia();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.especialidad\")\n Call<List<Especialidad>> listEspecialidad();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.cobertura\")\n Call<List<Cobertura>> listCobertura();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.medico/byCoberturaProvinciaEspecialidad/{cobertura}/{provincia}/{especialidad}\")\n Call<List<Medico>> listMedico(@Path(\"cobertura\") String cobertura, @Path(\"provincia\") Long provincia, @Path(\"especialidad\") Long especialidad);\n @POST(\"webresources/com.gylgroup.gp.turno\")\n Call<Turno> createTurno(@Body Turno turno);\n}",
"public static GetVehicleBookPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleBookPage object =\n new GetVehicleBookPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleBookPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleBookPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static GetParkPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetParkPage object =\n new GetParkPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getParkPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetParkPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static GetDictionaryPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDictionaryPage object =\n new GetDictionaryPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDictionaryPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDictionaryPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"RequestDetail getRequestDetail(String requestId) throws SAXException, IOException;",
"public interface QueryResponseParser {\n Documents<IdolSearchResult> parseQueryResults(AciSearchRequest<String> searchRequest, AciParameters aciParameters, QueryResponseData responseData, IdolDocumentService.QueryExecutor queryExecutor);\n\n List<IdolSearchResult> parseQueryHits(Collection<Hit> hits);\n}",
"public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPageResponse getDictionaryPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPage getDictionaryPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[6].getName());\n _operationClient.getOptions().setAction(\"urn:getDictionaryPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDictionaryPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getDictionaryPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }",
"@Override\r\n \tpublic MetaData getMetaData(HttpHeaders headers) {\n \t\ttry {\r\n \t\t\treturn MetaDataUtil.getMetaData(new ViewListeEleve(), new HashMap<String, MetaData>(),new ArrayList<String>());\r\n \t\t} catch (Exception e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\tthrow new WebApplicationException(Response.serverError().entity(new String(\"MetaData parse error\")).build());\r\n \t\t} \r\n \t}",
"public static GetDirectSrvInfo parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectSrvInfo object =\n new GetDirectSrvInfo();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectSrvInfo\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectSrvInfo)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static DoControlResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DoControlResponse object =\n new DoControlResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"doControlResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DoControlResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public String getRequestInXML() throws Exception;",
"private void parseForRecords() {\r\n\t\tApacheAgentExecutionContext c = (ApacheAgentExecutionContext)this.fContext;\r\n\t\tString text = c.getStatusPageContent();\r\n\t\tif(text == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tswitch(c.getApacheVersion()) {\r\n\t\t\tcase VERSION_IBM_6_0_X:\r\n\t\t\t\trecords = ApacheUtils.parseExtendedStatus_ibm_6_0(text);\r\n\t\t\tbreak;\r\n\t\t\tcase VERSION_ORACLE_1_3_X:\r\n\t\t\tcase VERSION_IBM_1_3_X:\r\n\t\t\t\trecords = ApacheUtils.parseExtendedStatus_1_3_x(text);\r\n\t\t\tbreak;\r\n\t\t\tcase VERSION_ORACLE_2_0_X:\r\n\t\t\tcase VERSION_IBM_2_0_X:\r\n\t\t\t\trecords = ApacheUtils.parseExtendedStatus_1_3_x(text);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tif(records == null) {\r\n\t\t\tfContext.error(new InvalidDataPattern());\r\n\t\t}\r\n\t}",
"private void onGetAllRettighet(Event<FintResource> responseEvent) {\n Identifikator batcaveId = new Identifikator();\n batcaveId.setIdentifikatorverdi(\"BATCAVE\");\n Rettighet batcave = new Rettighet();\n batcave.setSystemId(batcaveId);\n batcave.setNavn(\"Batcave\");\n batcave.setKode(\"BAT-002\");\n batcave.setBeskrivelse(\"Grants access to the secret cave\");\n responseEvent.addData(FintResource\n .with(batcave)\n .addRelations(new Relation.Builder().with(Rettighet.Relasjonsnavn.IDENTITET).forType(Identitet.class).field(\"systemid\").value(\"BATMAN\").build())\n .addRelations(new Relation.Builder().with(Rettighet.Relasjonsnavn.IDENTITET).forType(Identitet.class).field(\"systemid\").value(\"ROBIN\").build())\n );\n\n Identifikator batmobileId = new Identifikator();\n batmobileId.setIdentifikatorverdi(\"BATMOBILE\");\n Rettighet batmobile = new Rettighet();\n batmobile.setSystemId(batmobileId);\n batmobile.setKode(\"BAT-001\");\n batmobile.setNavn(\"Batmobile\");\n batmobile.setBeskrivelse(\"Grants access to driving the ultimate vehicle\");\n responseEvent.addData(FintResource.with(batmobile)\n .addRelations(new Relation.Builder().with(Rettighet.Relasjonsnavn.IDENTITET).forType(Identitet.class).field(\"systemid\").value(\"BATMAN\").build())\n );\n }",
"public static HelloResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloResponse object =\n new HelloResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"com.exacttarget.wsdl.partnerapi.QueryRequestMsgDocument.QueryRequestMsg getQueryRequestMsg();",
"public static GetXFListResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetXFListResponse object = new GetXFListResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetXFListResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetXFListResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetXFListResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"GetXFListResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetXFListResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetXFListResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }",
"private String[] runIdentification1(DigitalObject digo, WorkflowResult wfresult) throws Exception{\r\n\t\tList<Parameter> parameterList = new ArrayList<Parameter>();\t \t\r\n IdentifyResult results = identify1.identify(digo,parameterList);\r\n ServiceReport report = results.getReport();\r\n List<URI> types = results.getTypes();\r\n \r\n if(report.getType() == Type.ERROR){\r\n \tString s = \"Service execution failed: \" + report.getMessage();\r\n \t log.debug(s);\r\n \tthrow new Exception(s);\r\n }\r\n if(types.size()<1){\r\n \tString s = \"The specified file type is currently not supported by this workflow\";\r\n \t log.debug(s);\r\n \tthrow new Exception(s);\r\n }\r\n \r\n String[] strings = new String[types.size()];\r\n int count=0;\r\n for (URI uri : types) {\r\n \tstrings[count] = uri.toASCIIString();\r\n \tlog.debug(strings[count]);\r\n count++;\r\n }\r\n return strings;\r\n\t}",
"@GET\n @Path(\"/rest/{name}/{value}\")\n @Produces(MediaType.TEXT_XML)\n public String getXCRIXml(@PathParam(\"name\") String name, @PathParam(\"value\") String value) {\n TransformerFactory transFactory = TransformerFactory.newInstance();\n Transformer transformer;\n StringWriter buffer = new StringWriter();\n try {\n transformer = transFactory.newTransformer();\n transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"2\");\n transformer.transform(new DOMSource(xcriSession.searchCatalog(name, value)), new StreamResult(buffer));\n } catch (TransformerConfigurationException ex) {\n Logger.getLogger(XCRI_CAPRestService.class.getName()).log(Level.SEVERE, \"Problem outputting document\", ex);\n } catch (TransformerException ex) {\n Logger.getLogger(XCRI_CAPRestService.class.getName()).log(Level.SEVERE, \"Problem outputting document\", ex);\n }\n return buffer.toString();\n\n\n }",
"@GET\n\t@Produces(MediaType.TEXT_XML)\n\tpublic String getXMLList()\n\t{\n\t\tString myStr = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" + \"<parent>\" + \"<policy>\" + \" Hello, World\" + \"</policy>\" + \"<hello>\" + \" Hello, World\" + \"</hello>\" + \"</parent>\";\n\t\t// iterate via \"New way to loop\"\n\t\t/*System.out.println(\"Looping through the list to build the xml string\");\n\t\tfor (String policy : _policyList) \n\t\t{\n\t\t\tmyStr += \"<Policy>\" + policy + \"</Policy>\";\n\t\t}*/\n\n\t\treturn myStr;\n\t}",
"public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleBookPageResponse getVehicleBookPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleBookPage getVehicleBookPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[7].getName());\n _operationClient.getOptions().setAction(\"urn:getVehicleBookPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getVehicleBookPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getVehicleBookPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleBookPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleBookPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }",
"@GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n @Path(\"ServicioMonto/list\")\r\n public ArrayList<ServicioMonto> getXmlc() throws Exception {\n ArrayList<ServicioMonto> lista=new ArrayList<ServicioMonto>();\r\n lista=ServicioMonto.servicio_monto();\r\n return lista;\r\n }",
"public interface IDescribeLayoutResult {\r\n\r\n /**\r\n * element : layouts of type {urn:partner.soap.sforce.com}DescribeLayout\r\n * java type: com.sforce.soap.partner.DescribeLayout[]\r\n */\r\n\r\n public com.sforce.soap.partner.IDescribeLayout[] getLayouts();\r\n\r\n public void setLayouts(com.sforce.soap.partner.IDescribeLayout[] layouts);\r\n\r\n /**\r\n * element : recordTypeMappings of type {urn:partner.soap.sforce.com}RecordTypeMapping\r\n * java type: com.sforce.soap.partner.RecordTypeMapping[]\r\n */\r\n\r\n public com.sforce.soap.partner.IRecordTypeMapping[] getRecordTypeMappings();\r\n\r\n public void setRecordTypeMappings(com.sforce.soap.partner.IRecordTypeMapping[] recordTypeMappings);\r\n\r\n /**\r\n * element : recordTypeSelectorRequired of type {http://www.w3.org/2001/XMLSchema}boolean\r\n * java type: boolean\r\n */\r\n\r\n public boolean getRecordTypeSelectorRequired();\r\n\r\n public boolean isRecordTypeSelectorRequired();\r\n\r\n public void setRecordTypeSelectorRequired(boolean recordTypeSelectorRequired);\r\n\r\n\r\n}",
"public static DirectQueryResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectQueryResponse object =\n new DirectQueryResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directQueryResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectQueryResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"directQueryReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setDirectQueryReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setDirectQueryReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public interface XmlService {\n\n\t/**\n\t * Parse response file.\n\t * \n\t * @param xmlPath\n\t * @param orderId\n\t * @param complete_on\n\t * @return\n\t * @throws JAXBException\n\t */\n ResponseMQ parseResponseFile(String xmlPath, Long orderId, Date complete_on) throws JAXBException;\n \n /**\n * \n * @param xml\n * @param orderId\n * @param complete_on\n * @return\n * @throws JAXBException\n */\n\tResponseMQ parseResponse(String xml, Long orderId, Date complete_on) throws JAXBException;\n\n\t/**\n\t * Generate change status request.\n\t * \n\t * @param requestMQ\n\t * @return result string or NULL\n\t */\n\tString generateChangeStatusRequest(RequestMQ requestMQ);\n\t\n}",
"public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPageResponse getParkPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPage getParkPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\n _operationClient.getOptions().setAction(\"urn:getParkPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getParkPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getParkPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }",
"com.exacttarget.wsdl.partnerapi.QueryRequest getQueryRequest();",
"private void retrieveAll(Definition def)\r\n\t{\n\t\t\r\n\t\t\r\n\t\tjavax.wsdl.Types types=def.getTypes();\r\n\t\tif(types==null) return;\r\n\t\t\r\n\t\tSchema sch=(Schema) def.getTypes().getExtensibilityElements().get(0);\r\n\t\tElement elm=sch.getElement();\r\n\t\tString tns=sch.getElement().getAttribute(\"targetNamespace\");\r\n\t\t\r\n\t\tNodeList nl=elm.getChildNodes();\t\t\r\n\t\tElement elmnt;\r\n\t\tnsInc++;\r\n\t\tfor(int i=0;i<nl.getLength();i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif (checkElementName(nl.item(i), \"element\" ))\r\n\t\t\t{\r\n\t\t\t\telmnt=(Element)(nl.item(i));\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tOMElement omm=\tcreateOMFromSchema((Element)nl.item(i),tns);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tQName qname=new QName(tns,elmnt.getAttribute(\"name\"));//omm.getNamespace().getPrefix());\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttmpNameAndType.put(qname, omm);\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t}",
"public void GetListaTjWomenResponseBean() {\n }",
"public abstract List get(List oids) throws OIDDoesNotExistException;",
"private void getMall(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tXStream xstream = new XStreamEx(new DomDriver());\r\n\t\txstream.alias(\"AIPG\", AIPG.class);\r\n\t\txstream.alias(\"INFO\", InfoReq.class);\r\n\t\r\n\t\t\r\n\t\t\r\n\t\txstream.alias(\"RET_DETAIL\", Ret_Detail.class);\r\n \t\txstream.aliasField(\"RET_DETAILS\", Body.class, \"details\");\r\n\t\r\n\r\n\t\t\r\n//\t\txstream.aliasField(\"TRX->CODE1\", Info.class, \"TRX_CODE\");\r\n\t\t\r\n\t\tAIPG g = new AIPG( );\r\n\t\tInfoRsp info = new InfoRsp( );\r\n\t\tinfo.setTRX_CODE(\"-----\");\r\n\t\tinfo.setVERSION(\"03\");\r\n\t\tg.setINFO(info);\r\n\t\t\r\n\t\tBody body = new Body( );\r\n//\t\tTrans_Sum transsum = new Trans_Sum( );\r\n\t\tRet_Detail detail=new Ret_Detail();\r\n\t\tdetail.setSN(\"woshi\");\r\n\t body.addDetail(detail);\r\n\t \r\n\t\t\r\n\t\tg.setBODY(body);\r\n\t\tSystem.out.println(xstream.toXML(g).replaceAll(\"__\", \"_\"));\r\n\t\t\r\n\t\t\r\n\t}",
"java.lang.String getResponse();",
"private void onGetAllIdentitet(Event<FintResource> responseEvent) {\n Identifikator batmanId = new Identifikator();\n batmanId.setIdentifikatorverdi(\"BATMAN\");\n Identitet batman = new Identitet();\n batman.setSystemId(batmanId);\n responseEvent.addData(FintResource\n .with(batman)\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.PERSONALRESSURS).forType(Personalressurs.class).field(\"ansattnummer\").value(\"100001\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATCAVE\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATMOBILE\").build()));\n\n Identifikator robinId = new Identifikator();\n robinId.setIdentifikatorverdi(\"ROBIN\");\n Identitet robin = new Identitet();\n robin.setSystemId(robinId);\n responseEvent.addData(FintResource\n .with(robin)\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.PERSONALRESSURS).forType(Personalressurs.class).field(\"ansattnummer\").value(\"100002\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATCAVE\").build()));\n }",
"@GET\n @Path(\"/\")\n @Produces({\"application/xml\", \"application/json\"})\n @ApiOperation(value = \"Get single METS file.\", notes = \"METS file will be compiled from most current sections.\"\n + \" If there are multiple sections with the same type an error will occur.\")\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Successful.\")\n ,\n @ApiResponse(code = 400, message = \"Bad request. At least one Parameter is invalid.\")\n ,\n @ApiResponse(code = 401, message = \"Unauthorized access.\")\n ,\n @ApiResponse(code = 404, message = \"ID doesn't exist.\")\n ,\n @ApiResponse(code = 500, message = \"Internal server error\")\n })\n public Response getMetsDocument(\n @ApiParam(value = \"GroupId the user belongs to. (User has to be at least manager)\", required = false, defaultValue = \"USERS\") @QueryParam(\"groupId\") String pGroupId,\n @ApiParam(value = \"Unique ID for the metadata (should be identical to id of linked Digital Data Object).\", required = true) @QueryParam(value = \"oid\") String pDigitalObjectId) {\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(\"get METS file: groupID = {} & digitalObjectId = {} \", pGroupId, pDigitalObjectId);\n }\n\n Response.Status statusCode = Response.Status.OK;\n StringBuilder sb = new StringBuilder();\n\n MediaType returnType = getAcceptableMediaType(context, MediaType.APPLICATION_JSON_TYPE, MediaType.APPLICATION_XML_TYPE);\n try {\n String metsDocument = new RestMetaStoreController().getMetsDocument(context, pGroupId, pDigitalObjectId, returnType);\n\n sb.append(metsDocument);\n } catch (MetaStoreException ex) {\n LOGGER.error(\"Error while accessing mets file\", ex);\n exceptionToFormattedString(ex, returnType);\n statusCode = Response.Status.fromStatusCode(ex.getHttpStatus());\n } catch (Exception ex) {\n LOGGER.error(\"Uncatched error while accessing mets file\", ex);\n exceptionToFormattedString(ex, returnType);\n statusCode = Response.Status.INTERNAL_SERVER_ERROR;\n }\n return Response.status(statusCode).entity(sb.toString()).build();\n }",
"public List emulateResponse(String msg) {\n\t\tArrayList respuestas = new ArrayList();\n\t\t/* Se definen las tr de entrada y salida que se van a utilizar */\n\t\tTR056E entrada = null;\n\t\tTR056S salida = null;\n\t\t/*\n\t\t * Se generan objetos a partir de las TR de ejemplo para poder\n\t\t * modificarlas una para la entrada y otra para la salida.\n\t\t */\n\n\t\tentrada = (TR056E) getXmlProcessor().unmarshal(msg);\n\t\tsalida = new TR056S();\n\n\t\t/*\n\t\t * Se consulta el properties para conocer el estado de respuesta\n\t\t * definido para este caso emulado.\n\t\t */\n\t\tString resultado = getTrProperties().getProperty(\"tr_056_s.status\");\n\n\t\t/*\n\t\t * De acuerdo al resultado se procesan los datos segun convenga.\n\t\t */\n\t\tif (resultado.equals(\"ok\")) {\n\t\t\tsalida.setId(entrada.getId());\n\t\t\tsalida.setError(\"0\");\n\t\t} else {\n\t\t\tsalida.setId(entrada.getId());\n\t\t\tsalida.setErrorMessage(\"No se pudo realizar la configuracion\");\n\t\t\tsalida.setError(\"1\");\n\t\t}\n\t\t/*\n\t\t * Se genera el o los String de salida y se agregan a la lista de\n\t\t * respuestas.\n\t\t */\n\t\tString responseMessage = getXmlProcessor().marshal(salida);\n\t\tConfClienteZTEEmuRespuesta res = new ConfClienteZTEEmuRespuesta(\n\t\t\t\tresponseMessage);\n\t\trespuestas.add(res);\n\t\treturn respuestas;\n\t}",
"public abstract Response[] collectResponse();",
"public void test7() throws XRd4JException, SOAPException {\n String soapString = \"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:id=\\\"http://x-road.eu/xsd/identifiers\\\" xmlns:xrd=\\\"http://x-road.eu/xsd/xroad.xsd\\\"><SOAP-ENV:Header><xrd:client id:objectType=\\\"SUBSYSTEM\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>GOV</id:memberClass><id:memberCode>MEMBER1</id:memberCode><id:subsystemCode>client</id:subsystemCode></xrd:client><xrd:service id:objectType=\\\"SERVICE\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>COM</id:memberClass><id:memberCode>MEMBER2</id:memberCode><id:subsystemCode>subsystem</id:subsystemCode><id:serviceCode>listMethods</id:serviceCode></xrd:service><xrd:userId>EE1234567890</xrd:userId><xrd:id>ID-1234567890</xrd:id><xrd:protocolVersion>4.0</xrd:protocolVersion><xrd:requestHash algorithmId=\\\"SHA-512\\\">ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==</xrd:requestHash></SOAP-ENV:Header><SOAP-ENV:Body><xrd:listMethodsResponse></xrd:listMethodsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\";\n\n SOAPMessage msg = SOAPHelper.toSOAP(soapString);\n\n ServiceResponseDeserializer deserializer = new ListServicesResponseDeserializer();\n ServiceResponse<String, List<ProducerMember>> response = deserializer.deserialize(msg);\n\n assertEquals(\"FI\", response.getConsumer().getXRoadInstance());\n assertEquals(\"GOV\", response.getConsumer().getMemberClass());\n assertEquals(\"MEMBER1\", response.getConsumer().getMemberCode());\n assertEquals(\"client\", response.getConsumer().getSubsystemCode());\n assertEquals(ObjectType.SUBSYSTEM, response.getConsumer().getObjectType());\n\n assertEquals(\"FI\", response.getProducer().getXRoadInstance());\n assertEquals(\"COM\", response.getProducer().getMemberClass());\n assertEquals(\"MEMBER2\", response.getProducer().getMemberCode());\n assertEquals(\"subsystem\", response.getProducer().getSubsystemCode());\n assertEquals(\"listMethods\", response.getProducer().getServiceCode());\n assertEquals(null, response.getProducer().getServiceVersion());\n assertEquals(\"ID-1234567890\", response.getId());\n assertEquals(\"EE1234567890\", response.getUserId());\n assertEquals(\"4.0\", response.getProtocolVersion());\n assertEquals(ObjectType.SERVICE, response.getProducer().getObjectType());\n assertEquals(null, response.getRequestData());\n\n assertEquals(\"SHA-512\", response.getRequestHashAlgorithm());\n assertEquals(\"ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==\", response.getRequestHash());\n assertEquals(true, response.getSoapMessage() != null);\n\n assertEquals(0, response.getResponseData().size());\n }",
"public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPageResponse getRoadwayPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPage getRoadwayPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"urn:getRoadwayPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getRoadwayPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getRoadwayPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }",
"@WebService(name = \"SharedGalleryServerSOAP\", targetNamespace = \"http://SOAP.svr.tp1.sd/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface SharedGalleryServerSOAP {\n\n\n /**\n * \n * @return\n * returns java.util.List<java.lang.String>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getListOfAlbums\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.GetListOfAlbums\")\n @ResponseWrapper(localName = \"getListOfAlbumsResponse\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.GetListOfAlbumsResponse\")\n @Action(input = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/getListOfAlbumsRequest\", output = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/getListOfAlbumsResponse\")\n public List<String> getListOfAlbums();\n\n /**\n * \n * @param arg0\n * @return\n * returns java.util.List<java.lang.String>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getListOfPictures\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.GetListOfPictures\")\n @ResponseWrapper(localName = \"getListOfPicturesResponse\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.GetListOfPicturesResponse\")\n @Action(input = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/getListOfPicturesRequest\", output = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/getListOfPicturesResponse\")\n public List<String> getListOfPictures(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0);\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns byte[]\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPictureData\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.GetPictureData\")\n @ResponseWrapper(localName = \"getPictureDataResponse\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.GetPictureDataResponse\")\n @Action(input = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/getPictureDataRequest\", output = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/getPictureDataResponse\")\n public byte[] getPictureData(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1);\n\n /**\n * \n * @param arg0\n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"createAlbum\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.CreateAlbum\")\n @ResponseWrapper(localName = \"createAlbumResponse\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.CreateAlbumResponse\")\n @Action(input = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/createAlbumRequest\", output = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/createAlbumResponse\")\n public String createAlbum(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0);\n\n /**\n * \n * @param arg0\n * @return\n * returns java.lang.Boolean\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deleteAlbum\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.DeleteAlbum\")\n @ResponseWrapper(localName = \"deleteAlbumResponse\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.DeleteAlbumResponse\")\n @Action(input = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/deleteAlbumRequest\", output = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/deleteAlbumResponse\")\n public Boolean deleteAlbum(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0);\n\n /**\n * \n * @param arg2\n * @param arg1\n * @param arg0\n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"uploadPicture\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.UploadPicture\")\n @ResponseWrapper(localName = \"uploadPictureResponse\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.UploadPictureResponse\")\n @Action(input = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/uploadPictureRequest\", output = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/uploadPictureResponse\")\n public String uploadPicture(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n byte[] arg2);\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns java.lang.Boolean\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deletePicture\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.DeletePicture\")\n @ResponseWrapper(localName = \"deletePictureResponse\", targetNamespace = \"http://SOAP.svr.tp1.sd/\", className = \"sd.tp1.clt.ws.DeletePictureResponse\")\n @Action(input = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/deletePictureRequest\", output = \"http://SOAP.svr.tp1.sd/SharedGalleryServerSOAP/deletePictureResponse\")\n public Boolean deletePicture(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1);\n\n}",
"public org.pahospital.www.radiologyservice.RadiologyServiceStub.Appointment requestAppointment(\n\n org.pahospital.www.radiologyservice.RadiologyServiceStub.Appointment appointment2)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/RequestAppointment\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n appointment2,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"requestAppointment\")), new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"requestAppointment\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n org.pahospital.www.radiologyservice.RadiologyServiceStub.Appointment.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (org.pahospital.www.radiologyservice.RadiologyServiceStub.Appointment)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"RequestAppointment\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"RequestAppointment\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"RequestAppointment\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }",
"public static GetEntrancePageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetEntrancePageResponse object =\n new GetEntrancePageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getEntrancePageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetEntrancePageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static GetDirectAreaInfo parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectAreaInfo object =\n new GetDirectAreaInfo();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectAreaInfo\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectAreaInfo)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"private GeneralInfoVO getGeneralInfo(String xmlResponse) {\r\n\t\t\t\r\n\t\tGeneralInfoVO generalInfo = new GeneralInfoVO();\r\n\t\tElement root;\r\n\t\t\r\n\t\ttry {\r\n\t\t\troot = DOMUtils.openDocument(new ByteArrayInputStream(xmlResponse.getBytes()));\r\n\t\t\tElement data = DOMUtils.getElement(root, \"data\", true);\r\n\t\t\tdata = DOMUtils.getElement(data, \"customer\", true);\r\n\t\t\t\r\n\t\t\t// Obtain the client status from the DOM \r\n\t\t\tElement element;\r\n//\t\t\tElement element = DOMUtils.getElement(data, \"status\", true);\r\n//\t\t\tgeneralInfo.setStatus(formatStatus(DOMUtils.getText(element).toString()));\r\n\t\t\t//sets '' to status for a while (until this issue were defined)\r\n\t\t\tgeneralInfo.setStatus(\"\");\r\n\t\t\t\r\n\t\t\t/* Address */\t\t\t\t\t\t\r\n\t\t\tdata = DOMUtils.getElement(data, \"address\", true);\r\n\t\t\t// Obtain the street type from the DOM\r\n\t\t\telement = DOMUtils.getElement(data, \"street-type\", true);\r\n\t\t\tString address = DOMUtils.getText(element).toString();\r\n\t\r\n\t\t\t// Obtain the street name from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"street\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t\t// Obtain the street number from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"street-no\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t\t// Obtain the complement from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"complement\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t\t// Obtain the district from the DOM\r\n\t\t\telement = DOMUtils.getElement(data, \"district\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\t\t\t\r\n\t\t\t// Obtain the city from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"city\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t\t// Obtain the state from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"state\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t\tgeneralInfo.setAddress(address);\r\n\t\t\t/* --------- */\t\t\t\r\n\t\t\t\r\n\t\t\t// Obtain the subscriber name from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"full-name\", true);\r\n\t\t\t\r\n\t\t\tgeneralInfo.setSubscriberName(DOMUtils.getText(element).toString());\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tlog.error(\"Error parsing xml response from Infobus\", e);\r\n\t\t\tthrow new ErrorMessageException(e);\r\n\t\t}\r\n\r\n\t\treturn generalInfo;\r\n\t\t\r\n\t}",
"public static void main(String[] args){\n WSDLParser parser = new WSDLParser();\n \n //checar este wsdl http://www.xmethods.net/ve2/ViewListing.po?key=425856 //Elemento Symple\n Definitions wsdl = parser.parse(\"http://www.xignite.com/xAnalysts.asmx?WSDL\");\n \n //Definitions wsdl = parser.parse(\"http://www.restfulwebservices.net/wcf/BibleKJVService.svc?wsdl\");//Imports con targetnamespace mal\n //Definitions wsdl = parser.parse(\"http://www.thomas-bayer.com/axis2/services/BLZService?wsdl\");\n //Definitions wsdl = parser.parse(\"https://api.networkip.net/jaduka/?WSDL\");//http://www.xmethods.net/ve2/ViewListing.po?key=uuid:22952E44-96F9-4597-55E1-05447A4DD947\n \n //Schema schema = wsdl.getSchema(\"http://thomas-bayer.com/blz/\");\n Schema schema = wsdl.getSchema(wsdl.getTargetNamespace());\n //Schema schema = wsdl.getSchema(\"http://www.restfulwebservices.net/ServiceContracts/2008/01/Imports\");\n \n ///////////////////////////////////////////////////////////////////CODIGO PARSEO SCHEMA\n //SchemaParser parser = new SchemaParser();\n //Schema schema = parser.parse(\"samples/xsd/human-resources.xsd\");\n \n out(\"-------------- Schema Information --------------\");\n out(\" Schema TargetNamespace: \" + schema.getTargetNamespace());\n out(\" AttributeFormDefault: \" + schema.getAttributeFormDefault());\n out(\" ElementFormDefault: \" + schema.getElementFormDefault());\n out(\"\");\n \n out(\"Schema as String: \");\n out(schema.getAsString());\n \n if (schema.getImports().size() > 0) {\n out(\" Schema Imports: \");\n for (Import imp : schema.getImports()) {\n out(\" Import Namespace: \" + imp.getNamespace());\n out(\" Import Location: \" + imp.getSchemaLocation());\n }\n out(\"\");\n }\n \n if (schema.getIncludes().size() > 0) {\n out(\" Schema Includes: \");\n for (Include inc : schema.getIncludes()) {\n out(\" Include Location: \" + inc.getSchemaLocation());\n }\n out(\"\");\n }\n \n out(\" Schema Elements: \");\n for (Element e : schema.getAllElements()) {\n out(\" Element Name: \" + e.getName());\n if (e.getType() != null) {\n /*\n * schema.getType() delivers a TypeDefinition (SimpleType orComplexType)\n * object.\n */\n out(\" Element Type Name: \" + schema.getType(e.getType()).getName());\n out(\" Element minoccurs: \" + e.getMinOccurs());\n out(\" Element maxoccurs: \" + e.getMaxOccurs());\n out(\" Schema del Elemento: \" + e.getSchema().toString());\n \n if (e.getAnnotation() != null)\n annotationOut(e);\n }\n }\n out(\"\");\n \n out(\" Schema ComplexTypes: \");\n for (ComplexType ct : schema.getComplexTypes()) {\n out(\" ComplexType Name: \" + ct.getName());\n if (ct.getAnnotation() != null)\n annotationOut(ct);\n if (ct.getAttributes().size() > 0) {\n out(\" ComplexType Attributes: \");\n /*\n * If available, attributeGroup could be read as same as attribute in\n * the following.\n */\n for (Attribute attr : ct.getAttributes()) {\n out(\" Attribute Name: \" + attr.getName());\n out(\" Attribute Form: \" + attr.getForm());\n out(\" Attribute ID: \" + attr.getId());\n out(\" Attribute Use: \" + attr.getUse());\n out(\" Attribute FixedValue: \" + attr.getFixedValue());\n out(\" Attribute DefaultValue: \" + attr.getDefaultValue());\n }\n }\n /*\n * ct.getModel() delivers the child element used in complexType. In case\n * of 'sequence' you can also use the getSequence() method.\n */\n out(\" ComplexType Model: \" + ct.getModel().getClass().getSimpleName());\n if (ct.getModel() instanceof ModelGroup) {\n out(\" Model Particles: \");\n for (SchemaComponent sc : ((ModelGroup) ct.getModel()).getParticles()) {\n out(\" Particle Kind: \" + sc.getClass().getSimpleName());\n out(\" Particle Name: \" + sc.getName());\n out(\" Prefix: \" + sc.getPrefix());\n out(\" DataType: \" + ((QName)sc.getProperty(\"type\")).getQualifiedName() );\n out(\" String: \" + sc.getAsString());\n \n }\n }\n \n if (ct.getModel() instanceof ComplexContent) {\n Derivation der = ((ComplexContent) ct.getModel()).getDerivation();\n out(\" ComplexConten Derivation: \" + der.getClass().getSimpleName());\n out(\" Derivation Base: \" + der.getBase());\n }\n \n if (ct.getAbstractAttr() != null)\n out(\" ComplexType AbstractAttribute: \" + ct.getAbstractAttr());\n if (ct.getAnyAttribute() != null)\n out(\" ComplexType AnyAttribute: \" + ct.getAnyAttribute());\n \n out(\"\");\n }\n \n if (schema.getSimpleTypes().size() > 0) {\n out(\" Schema SimpleTypes: \");\n for (SimpleType st : schema.getSimpleTypes()) {\n out(\" SimpleType Name: \" + st.getName());\n out(\" SimpleType Restriction: \" + st.getRestriction());\n out(\" -----------:Base:\" + st.getRestriction().getBase().getQualifiedName());\n out(\" ----------:Prefix:\" + st.getRestriction().getBase().getPrefix());\n out(\" SimpleType Union: \" + st.getUnion());\n out(\" SimpleType List: \" + st.getList());\n }\n }\n \n \n }",
"public static GetRoadwayPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetRoadwayPageResponse object =\n new GetRoadwayPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getRoadwayPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetRoadwayPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public void test8() throws XRd4JException, SOAPException {\n String soapString = \"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:id=\\\"http://x-road.eu/xsd/identifiers\\\" xmlns:xrd=\\\"http://x-road.eu/xsd/xroad.xsd\\\"><SOAP-ENV:Header><xrd:client id:objectType=\\\"SUBSYSTEM\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>GOV</id:memberClass><id:memberCode>MEMBER1</id:memberCode><id:subsystemCode>client</id:subsystemCode></xrd:client><xrd:service id:objectType=\\\"SERVICE\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>COM</id:memberClass><id:memberCode>MEMBER2</id:memberCode><id:subsystemCode>subsystem</id:subsystemCode><id:serviceCode>listMethods</id:serviceCode></xrd:service><xrd:userId>EE1234567890</xrd:userId><xrd:id>ID-1234567890</xrd:id><xrd:protocolVersion>4.0</xrd:protocolVersion><xrd:requestHash algorithmId=\\\"SHA-512\\\">ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==</xrd:requestHash></SOAP-ENV:Header><SOAP-ENV:Body><xrd:listMethodsResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope>\";\n\n SOAPMessage msg = SOAPHelper.toSOAP(soapString);\n\n ServiceResponseDeserializer deserializer = new ListServicesResponseDeserializer();\n ServiceResponse<String, List<ProducerMember>> response = deserializer.deserialize(msg);\n\n assertEquals(\"FI\", response.getConsumer().getXRoadInstance());\n assertEquals(\"GOV\", response.getConsumer().getMemberClass());\n assertEquals(\"MEMBER1\", response.getConsumer().getMemberCode());\n assertEquals(\"client\", response.getConsumer().getSubsystemCode());\n assertEquals(ObjectType.SUBSYSTEM, response.getConsumer().getObjectType());\n\n assertEquals(\"FI\", response.getProducer().getXRoadInstance());\n assertEquals(\"COM\", response.getProducer().getMemberClass());\n assertEquals(\"MEMBER2\", response.getProducer().getMemberCode());\n assertEquals(\"subsystem\", response.getProducer().getSubsystemCode());\n assertEquals(\"listMethods\", response.getProducer().getServiceCode());\n assertEquals(null, response.getProducer().getServiceVersion());\n assertEquals(\"ID-1234567890\", response.getId());\n assertEquals(\"EE1234567890\", response.getUserId());\n assertEquals(\"4.0\", response.getProtocolVersion());\n assertEquals(ObjectType.SERVICE, response.getProducer().getObjectType());\n assertEquals(null, response.getRequestData());\n\n assertEquals(\"SHA-512\", response.getRequestHashAlgorithm());\n assertEquals(\"ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==\", response.getRequestHash());\n assertEquals(true, response.getSoapMessage() != null);\n\n assertEquals(0, response.getResponseData().size());\n }",
"public List<BLGetDTO> processGetBL(String xmlResponse, String methodType) throws XmlPullParserException, IOException{\n\t\tboolean isLoadingMessage=false;\n\t\tboolean isPaginationParam=false;\n\n\t\tBLColumnDTO column = null;\n\t\tList<BLColumnDTO> getBLColList = null;\n\t\tString tagName = null;\n\t String tagText;\n\t List<BLGetDTO> getBLList = new ArrayList<BLGetDTO>();\n\t BLGetDTO blGet = new BLGetDTO();\n\t boolean isColumn=false;\n\t\tXmlPullParserFactory xmlPullParserFactory = XmlPullParserFactory\n\t\t\t\t.newInstance();\n\t\txmlPullParserFactory.setNamespaceAware(true);\n\t\tXmlPullParser xmlPullParser = xmlPullParserFactory.newPullParser();\n\t\txmlPullParser.setInput(new StringReader(xmlResponse));\n\t\tint eventType = xmlPullParser.getEventType();\n\t\twhile (eventType != XmlPullParser.END_DOCUMENT) {\n\t\t\ttagName = xmlPullParser.getName();\n\t\t\tswitch (eventType) {\n\t\t\tcase XmlPullParser.START_TAG:\n\t\t\t\tif (tagName.equalsIgnoreCase(methodType)) {\n\t\t\t\t\tfor (int i = 0; i < xmlPullParser.getAttributeCount(); i++) {\n\t\t\t\t\t\tif (xmlPullParser\n\t\t\t\t\t\t\t\t.getAttributeName(i)\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\tOMSMessages.DB_TABLENAME.getValue())) {\n\t\t\t\t\t\t\tblGet.getDataTable = xmlPullParser\n\t\t\t\t\t\t\t\t\t.getAttributeValue(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else if (xmlPullParser.getAttributeName(i)\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\tOMSMessages.URL.getValue())) {\n\t\t\t\t\t\t\tblGet.getURL=xmlPullParser\n \t\t\t\t\t\t\t\t\t.getAttributeValue(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else if (xmlPullParser.getAttributeName(i)\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\tOMSMessages.HASUSERID.getValue())) {\n\t\t\t\t\t\t\tblGet.hasUserId= xmlPullParser\n\t\t\t\t\t\t\t\t\t.getAttributeValue(i);\n\t\t\t\t\t\t}else if (xmlPullParser.getAttributeName(i)\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\tOMSMessages.HAS_MODIFIED_DATE.getValue())) {\n\t\t\t\t\t\t\tblGet.hasModifiedDate= xmlPullParser\n\t\t\t\t\t\t\t\t\t.getAttributeValue(i);\n\t\t\t\t\t\t}else if (xmlPullParser.getAttributeName(i)\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\tOMSMessages.HAS_LOCATION.getValue())) {\n\t\t\t\t\t\t\tblGet.hasLocation= xmlPullParser\n\t\t\t\t\t\t\t\t\t.getAttributeValue(i);\n\t\t\t\t\t\t}else if (xmlPullParser.getAttributeName(i)\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"haspagination\")) { //Pagination Code\n\t\t\t\t\t\t\tblGet.hasPagination= xmlPullParser\n\t\t\t\t\t\t\t\t\t.getAttributeValue(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if (tagName\n\t\t\t\t\t\t.equalsIgnoreCase(OMSMessages.BL_GET_COLUMN.getValue())\n\t\t\t\t\t\t&& !xmlPullParser.isEmptyElementTag()) {\n\t\t\t\t\tisColumn=true;\n\t\t\t\t\tcolumn = new BLColumnDTO();\n\t\t\t\t}else if(tagName\n\t\t\t\t\t\t.equalsIgnoreCase(OMSMessages.BL_GET_QUERY_PARAMS.getValue())\n\t\t\t\t\t\t&& !xmlPullParser.isEmptyElementTag()){\n\t\t\t\t\tgetBLColList = new ArrayList<BLColumnDTO>();\n\t\t\t\t}else if(tagName\n\t\t\t\t\t\t.equalsIgnoreCase(\"loadingmessage\")\n\t\t\t\t\t\t&& !xmlPullParser.isEmptyElementTag()){\n\t\t\t\t\tisLoadingMessage=true;\n\t\t\t\t}else if(tagName\n\t\t\t\t\t\t.equalsIgnoreCase(\"paginationparam\")\n\t\t\t\t\t\t&& !xmlPullParser.isEmptyElementTag()){ //Pagination Code\n\t\t\t\t\tisPaginationParam=true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase XmlPullParser.END_DOCUMENT:\n\t\t\t\tbreak;\n\t\t\tcase XmlPullParser.START_DOCUMENT:\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase XmlPullParser.END_TAG:\n\t\t\t\tif (tagName.equalsIgnoreCase(OMSMessages.BL_GET_COLUMN.getValue())) {\n\t\t\t\t\tgetBLColList.add(column);\n\t\t\t\t\tisColumn=false;\n\t\t\t\t}else if (tagName.equalsIgnoreCase(methodType)) {\n\t\t\t\t\tgetBLList.add(blGet);\n\t\t\t\t}else if(tagName\n\t\t\t\t\t\t.equalsIgnoreCase(OMSMessages.BL_GET_QUERY_PARAMS.getValue())){\n\t\t\t\t\tblGet.getColList=getBLColList;\n\t\t\t\t\t\n\t\t\t\t}else if(tagName\n\t\t\t\t\t\t.equalsIgnoreCase(\"loadingmessage\")){\n\t\t\t\t\tisLoadingMessage=false;\n\t\t\t\t}else if(tagName\n\t\t\t\t\t\t.equalsIgnoreCase(\"paginationparam\")){ //Pagination Code\n\t\t\t\t\tisPaginationParam=false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase XmlPullParser.TEXT:\n\t\t\t//\tif (tagName.equalsIgnoreCase(OMSMessages.BL_GET_COLUMN.getValue())) {\n\t\t\t\tif(isColumn){\n\t\t\t\t tagText=xmlPullParser.getText();\n\t\t\t\t\tcolumn.columnName=tagText;\n\t\t\t\t} else if(isLoadingMessage){\n\t\t\t\t\ttagText=xmlPullParser.getText();\n\t\t\t\t\tblGet.blGetLoadingMessage=tagText;\n\t\t\t\t} else if(isPaginationParam){ //Pagination Code\n\t\t\t\t\t\ttagText=xmlPullParser.getText();\n\t\t\t\t\t\tblGet.paginationParam=tagText;\n\t\t\t\t\t}\n\t\t\t\t//}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\teventType = xmlPullParser.next();\n\t\t}\n\t\treturn getBLList;\n\t}",
"public net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse getTerminalCardType(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardType getTerminalCardType2)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getTerminalCardTypeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getTerminalCardType2,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }",
"private ArrayList<?> ParseXMLResponse(StringBuilder response, IDataInterface myHandler){\n \t\t SAXParserFactory spf = SAXParserFactory.newInstance();\n \t\t try {\n \t\t\tSAXParser sp = spf.newSAXParser();\n \t\t\tXMLReader xr = sp.getXMLReader();\n \t\t\t\n \t\t\txr.setContentHandler((ContentHandler) myHandler);\n \t\t\tInputSource is = new InputSource();\n \t\t\tis.setCharacterStream(new StringReader(response.toString()));\n \t\t\txr.parse(is);\n \t\t\t\n \t\t} catch (ParserConfigurationException e) {\n \t\t\te.printStackTrace();\n \t\t} catch (SAXException e) {\n \t\t\te.printStackTrace();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\treturn myHandler.getData();\n \t}",
"public void test4() throws XRd4JException, SOAPException {\n String soapString = \"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:id=\\\"http://x-road.eu/xsd/identifiers\\\" xmlns:xrd=\\\"http://x-road.eu/xsd/xroad.xsd\\\"><SOAP-ENV:Header><xrd:client id:objectType=\\\"SUBSYSTEM\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>GOV</id:memberClass><id:memberCode>MEMBER1</id:memberCode><id:subsystemCode>client</id:subsystemCode></xrd:client><xrd:service id:objectType=\\\"SERVICE\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>COM</id:memberClass><id:memberCode>MEMBER2</id:memberCode><id:subsystemCode>subsystem</id:subsystemCode><id:serviceCode>allowedMethods</id:serviceCode></xrd:service><xrd:userId>EE1234567890</xrd:userId><xrd:id>ID-1234567890</xrd:id><xrd:protocolVersion>4.0</xrd:protocolVersion><xrd:requestHash algorithmId=\\\"SHA-512\\\">ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==</xrd:requestHash></SOAP-ENV:Header><SOAP-ENV:Body><xrd:allowedMethodsResponse><xrd:service id:objectType=\\\"SERVICE\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>PRI</id:memberClass><id:memberCode>12345-6</id:memberCode><id:subsystemCode>subsystem</id:subsystemCode><id:serviceCode>testService</id:serviceCode><id:serviceVersion>v1</id:serviceVersion></xrd:service></xrd:allowedMethodsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\";\n\n SOAPMessage msg = SOAPHelper.toSOAP(soapString);\n\n ServiceResponseDeserializer deserializer = new ListServicesResponseDeserializer();\n ServiceResponse<String, List<ProducerMember>> response = deserializer.deserialize(msg);\n\n assertEquals(\"FI\", response.getConsumer().getXRoadInstance());\n assertEquals(\"GOV\", response.getConsumer().getMemberClass());\n assertEquals(\"MEMBER1\", response.getConsumer().getMemberCode());\n assertEquals(\"client\", response.getConsumer().getSubsystemCode());\n assertEquals(ObjectType.SUBSYSTEM, response.getConsumer().getObjectType());\n\n assertEquals(\"FI\", response.getProducer().getXRoadInstance());\n assertEquals(\"COM\", response.getProducer().getMemberClass());\n assertEquals(\"MEMBER2\", response.getProducer().getMemberCode());\n assertEquals(\"subsystem\", response.getProducer().getSubsystemCode());\n assertEquals(\"allowedMethods\", response.getProducer().getServiceCode());\n assertEquals(null, response.getProducer().getServiceVersion());\n assertEquals(\"ID-1234567890\", response.getId());\n assertEquals(\"EE1234567890\", response.getUserId());\n assertEquals(\"4.0\", response.getProtocolVersion());\n assertEquals(ObjectType.SERVICE, response.getProducer().getObjectType());\n assertEquals(null, response.getRequestData());\n\n assertEquals(\"SHA-512\", response.getRequestHashAlgorithm());\n assertEquals(\"ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==\", response.getRequestHash());\n assertEquals(true, response.getSoapMessage() != null);\n\n assertEquals(\"FI\", response.getResponseData().get(0).getXRoadInstance());\n assertEquals(\"PRI\", response.getResponseData().get(0).getMemberClass());\n assertEquals(\"12345-6\", response.getResponseData().get(0).getMemberCode());\n assertEquals(\"subsystem\", response.getResponseData().get(0).getSubsystemCode());\n assertEquals(\"testService\", response.getResponseData().get(0).getServiceCode());\n assertEquals(\"v1\", response.getResponseData().get(0).getServiceVersion());\n assertEquals(ObjectType.SERVICE, response.getResponseData().get(0).getObjectType());\n }",
"DescribeRecordResponseType createDescribeRecordResponseType();",
"public void test10() throws XRd4JException, SOAPException {\n String soapString = \"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:id=\\\"http://x-road.eu/xsd/identifiers\\\" xmlns:xrd=\\\"http://x-road.eu/xsd/xroad.xsd\\\"><SOAP-ENV:Header><xrd:client id:objectType=\\\"SUBSYSTEM\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>GOV</id:memberClass><id:memberCode>MEMBER1</id:memberCode><id:subsystemCode>client</id:subsystemCode></xrd:client><xrd:service id:objectType=\\\"SERVICE\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>COM</id:memberClass><id:memberCode>MEMBER2</id:memberCode><id:subsystemCode>subsystem</id:subsystemCode><id:serviceCode>allowedMethods</id:serviceCode></xrd:service><xrd:userId>EE1234567890</xrd:userId><xrd:id>ID-1234567890</xrd:id><xrd:protocolVersion>4.0</xrd:protocolVersion><xrd:requestHash algorithmId=\\\"SHA-512\\\">ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==</xrd:requestHash></SOAP-ENV:Header><SOAP-ENV:Body><xrd:allowedMethodsResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope>\";\n\n SOAPMessage msg = SOAPHelper.toSOAP(soapString);\n\n ServiceResponseDeserializer deserializer = new ListServicesResponseDeserializer();\n ServiceResponse<String, List<ProducerMember>> response = deserializer.deserialize(msg);\n\n assertEquals(\"FI\", response.getConsumer().getXRoadInstance());\n assertEquals(\"GOV\", response.getConsumer().getMemberClass());\n assertEquals(\"MEMBER1\", response.getConsumer().getMemberCode());\n assertEquals(\"client\", response.getConsumer().getSubsystemCode());\n assertEquals(ObjectType.SUBSYSTEM, response.getConsumer().getObjectType());\n\n assertEquals(\"FI\", response.getProducer().getXRoadInstance());\n assertEquals(\"COM\", response.getProducer().getMemberClass());\n assertEquals(\"MEMBER2\", response.getProducer().getMemberCode());\n assertEquals(\"subsystem\", response.getProducer().getSubsystemCode());\n assertEquals(\"allowedMethods\", response.getProducer().getServiceCode());\n assertEquals(null, response.getProducer().getServiceVersion());\n assertEquals(\"ID-1234567890\", response.getId());\n assertEquals(\"EE1234567890\", response.getUserId());\n assertEquals(\"4.0\", response.getProtocolVersion());\n assertEquals(ObjectType.SERVICE, response.getProducer().getObjectType());\n assertEquals(null, response.getRequestData());\n\n assertEquals(\"SHA-512\", response.getRequestHashAlgorithm());\n assertEquals(\"ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==\", response.getRequestHash());\n assertEquals(true, response.getSoapMessage() != null);\n\n assertEquals(0, response.getResponseData().size());\n }",
"public static HelloAuthenticatedWithEntitlements parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedWithEntitlements object =\n new HelloAuthenticatedWithEntitlements();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloAuthenticatedWithEntitlements\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloAuthenticatedWithEntitlements)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"param0\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setParam0(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public abstract String getResponse();",
"public void test9() throws XRd4JException, SOAPException {\n String soapString = \"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:id=\\\"http://x-road.eu/xsd/identifiers\\\" xmlns:xrd=\\\"http://x-road.eu/xsd/xroad.xsd\\\"><SOAP-ENV:Header><xrd:client id:objectType=\\\"SUBSYSTEM\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>GOV</id:memberClass><id:memberCode>MEMBER1</id:memberCode><id:subsystemCode>client</id:subsystemCode></xrd:client><xrd:service id:objectType=\\\"SERVICE\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>COM</id:memberClass><id:memberCode>MEMBER2</id:memberCode><id:subsystemCode>subsystem</id:subsystemCode><id:serviceCode>allowedMethods</id:serviceCode></xrd:service><xrd:userId>EE1234567890</xrd:userId><xrd:id>ID-1234567890</xrd:id><xrd:protocolVersion>4.0</xrd:protocolVersion><xrd:requestHash algorithmId=\\\"SHA-512\\\">ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==</xrd:requestHash></SOAP-ENV:Header><SOAP-ENV:Body><xrd:allowedMethodsResponse></xrd:allowedMethodsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\";\n\n SOAPMessage msg = SOAPHelper.toSOAP(soapString);\n\n ServiceResponseDeserializer deserializer = new ListServicesResponseDeserializer();\n ServiceResponse<String, List<ProducerMember>> response = deserializer.deserialize(msg);\n\n assertEquals(\"FI\", response.getConsumer().getXRoadInstance());\n assertEquals(\"GOV\", response.getConsumer().getMemberClass());\n assertEquals(\"MEMBER1\", response.getConsumer().getMemberCode());\n assertEquals(\"client\", response.getConsumer().getSubsystemCode());\n assertEquals(ObjectType.SUBSYSTEM, response.getConsumer().getObjectType());\n\n assertEquals(\"FI\", response.getProducer().getXRoadInstance());\n assertEquals(\"COM\", response.getProducer().getMemberClass());\n assertEquals(\"MEMBER2\", response.getProducer().getMemberCode());\n assertEquals(\"subsystem\", response.getProducer().getSubsystemCode());\n assertEquals(\"allowedMethods\", response.getProducer().getServiceCode());\n assertEquals(null, response.getProducer().getServiceVersion());\n assertEquals(\"ID-1234567890\", response.getId());\n assertEquals(\"EE1234567890\", response.getUserId());\n assertEquals(\"4.0\", response.getProtocolVersion());\n assertEquals(ObjectType.SERVICE, response.getProducer().getObjectType());\n assertEquals(null, response.getRequestData());\n\n assertEquals(\"SHA-512\", response.getRequestHashAlgorithm());\n assertEquals(\"ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==\", response.getRequestHash());\n assertEquals(true, response.getSoapMessage() != null);\n\n assertEquals(0, response.getResponseData().size());\n }",
"public ListaResponse<G> listar();",
"edu.usfca.cs.dfs.StorageMessages.ListResponse getListResponse();",
"public void test1() throws XRd4JException, SOAPException {\n String soapString = \"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:id=\\\"http://x-road.eu/xsd/identifiers\\\" xmlns:xrd=\\\"http://x-road.eu/xsd/xroad.xsd\\\"><SOAP-ENV:Header><xrd:client id:objectType=\\\"SUBSYSTEM\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>GOV</id:memberClass><id:memberCode>MEMBER1</id:memberCode><id:subsystemCode>client</id:subsystemCode></xrd:client><xrd:service id:objectType=\\\"SERVICE\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>COM</id:memberClass><id:memberCode>MEMBER2</id:memberCode><id:subsystemCode>subsystem</id:subsystemCode><id:serviceCode>listMethods</id:serviceCode></xrd:service><xrd:userId>EE1234567890</xrd:userId><xrd:id>ID-1234567890</xrd:id><xrd:protocolVersion>4.0</xrd:protocolVersion><xrd:requestHash algorithmId=\\\"SHA-512\\\">ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==</xrd:requestHash></SOAP-ENV:Header><SOAP-ENV:Body><xrd:listMethodsResponse><xrd:service id:objectType=\\\"SERVICE\\\"><id:xRoadInstance>FI</id:xRoadInstance><id:memberClass>PRI</id:memberClass><id:memberCode>12345-6</id:memberCode><id:subsystemCode>subsystem</id:subsystemCode><id:serviceCode>testService</id:serviceCode><id:serviceVersion>v1</id:serviceVersion></xrd:service></xrd:listMethodsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\";\n\n SOAPMessage msg = SOAPHelper.toSOAP(soapString);\n\n ServiceResponseDeserializer deserializer = new ListServicesResponseDeserializer();\n ServiceResponse<String, List<ProducerMember>> response = deserializer.deserialize(msg);\n\n assertEquals(\"FI\", response.getConsumer().getXRoadInstance());\n assertEquals(\"GOV\", response.getConsumer().getMemberClass());\n assertEquals(\"MEMBER1\", response.getConsumer().getMemberCode());\n assertEquals(\"client\", response.getConsumer().getSubsystemCode());\n assertEquals(ObjectType.SUBSYSTEM, response.getConsumer().getObjectType());\n\n assertEquals(\"FI\", response.getProducer().getXRoadInstance());\n assertEquals(\"COM\", response.getProducer().getMemberClass());\n assertEquals(\"MEMBER2\", response.getProducer().getMemberCode());\n assertEquals(\"subsystem\", response.getProducer().getSubsystemCode());\n assertEquals(\"listMethods\", response.getProducer().getServiceCode());\n assertEquals(null, response.getProducer().getServiceVersion());\n assertEquals(\"ID-1234567890\", response.getId());\n assertEquals(\"EE1234567890\", response.getUserId());\n assertEquals(\"4.0\", response.getProtocolVersion());\n assertEquals(ObjectType.SERVICE, response.getProducer().getObjectType());\n assertEquals(null, response.getRequestData());\n\n assertEquals(\"SHA-512\", response.getRequestHashAlgorithm());\n assertEquals(\"ZPbWPAOcJxzE81EmSk//R3DUQtqwMcuMMF9tsccJypdNcukzICQtlhhr3a/bTmexDrn8e/BrBVyl2t0ni/cUvw==\", response.getRequestHash());\n assertEquals(true, response.getSoapMessage() != null);\n\n assertEquals(\"FI\", response.getResponseData().get(0).getXRoadInstance());\n assertEquals(\"PRI\", response.getResponseData().get(0).getMemberClass());\n assertEquals(\"12345-6\", response.getResponseData().get(0).getMemberCode());\n assertEquals(\"subsystem\", response.getResponseData().get(0).getSubsystemCode());\n assertEquals(\"testService\", response.getResponseData().get(0).getServiceCode());\n assertEquals(\"v1\", response.getResponseData().get(0).getServiceVersion());\n assertEquals(ObjectType.SERVICE, response.getResponseData().get(0).getObjectType());\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localSpIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"spId\"));\r\n \r\n if (localSpId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSpId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"spId cannot be null!!\");\r\n }\r\n } if (localSpPasswordTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"spPassword\"));\r\n \r\n if (localSpPassword != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSpPassword));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"spPassword cannot be null!!\");\r\n }\r\n } if (localServiceIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"serviceId\"));\r\n \r\n if (localServiceId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localServiceId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"serviceId cannot be null!!\");\r\n }\r\n } if (localTimeStampTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"timeStamp\"));\r\n \r\n if (localTimeStamp != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localTimeStamp));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"timeStamp cannot be null!!\");\r\n }\r\n } if (localOATracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"OA\"));\r\n \r\n if (localOA != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOA));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"OA cannot be null!!\");\r\n }\r\n } if (localOauth_tokenTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"oauth_token\"));\r\n \r\n if (localOauth_token != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOauth_token));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"oauth_token cannot be null!!\");\r\n }\r\n } if (localFATracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"FA\"));\r\n \r\n if (localFA != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFA));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"FA cannot be null!!\");\r\n }\r\n } if (localTokenTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"token\"));\r\n \r\n if (localToken != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localToken));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"token cannot be null!!\");\r\n }\r\n } if (localWatcherTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"watcher\"));\r\n \r\n if (localWatcher != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localWatcher));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"watcher cannot be null!!\");\r\n }\r\n } if (localPresentityTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"presentity\"));\r\n \r\n if (localPresentity != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPresentity));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"presentity cannot be null!!\");\r\n }\r\n } if (localAuthIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"authId\"));\r\n \r\n if (localAuthId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAuthId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"authId cannot be null!!\");\r\n }\r\n } if (localLinkidTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"linkid\"));\r\n \r\n if (localLinkid != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localLinkid));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"linkid cannot be null!!\");\r\n }\r\n } if (localPresentidTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"presentid\"));\r\n \r\n if (localPresentid != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPresentid));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"presentid cannot be null!!\");\r\n }\r\n } if (localMsgTypeTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"msgType\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMsgType));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData getIdVerificationResponseData();",
"public net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse getDirectSrvInfo(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfo getDirectSrvInfo10)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDirectSrvInfoRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDirectSrvInfo10,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectSrvInfo\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectSrvInfo\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }",
"private void choice_fuel(Field response) {\n ListRecords lrN = new ListRecords();\n Record recN;\n// for (Record rec : lr) {\n Record rec = (Record) response.value;\n recN = new Record();\n recN.add(new Field(\"type\", Field.TYPE_INTEGER, 1));\n recN.add(new Field(\"name\", Field.TYPE_STRING, rec.getString(\"name\")));\n lrN.add(recN);\n long idL = (Long)rec.getValue(\"id\");\n Integer id = (int)idL;\n\n recN.add(new Field(\"idNetwork\", Field.TYPE_LONG, idL));\n ListRecords listR = (ListRecords) rec.getValue(\"fuels\");\n if (listR != null) {\n for (Record recFuel : listR) {\n recN = new Record();\n recN.add(new Field(\"type\", Field.TYPE_INTEGER, 0));\n recN.add(new Field(\"idNetwork\", Field.TYPE_INTEGER, id));\n recN.add(new Field(\"price\", Field.TYPE_DOUBLE, recFuel.getDouble(\"price\")));\n recN.add(new Field(\"fuel_icon\", Field.TYPE_STRING, recFuel.getString(\"icon\")));\n lrN.add(recN);\n }\n }\n// }\n response.value = lrN;\n }",
"public static GetDownLoadCardResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDownLoadCardResponse object =\n new GetDownLoadCardResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDownLoadCardResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDownLoadCardResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDownLoadCardReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDownLoadCardReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDownLoadCardReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"public static HelloAuthenticatedWithEntitlementPrecheck parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedWithEntitlementPrecheck object =\n new HelloAuthenticatedWithEntitlementPrecheck();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloAuthenticatedWithEntitlementPrecheck\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloAuthenticatedWithEntitlementPrecheck)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"param0\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setParam0(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }",
"@Override\n public ExtensionResult doGetModelMobils(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n\n String tipe = getEasyMapValueByName(extensionRequest, \"type\");\n String merek = getEasyMapValueByName(extensionRequest, \"merk\");\n\n String url = \"https://bububibap.herokuapp.com/getToyota/\";\n List<List<String>> models = getModelModel(url, \"mobil\", \"model\", tipe);\n List<ButtonBuilder> buttonBuilders = new ArrayList<>();\n List<String> model = models.get(type_index);\n for (String mod : model) {\n ButtonTemplate button = new ButtonTemplate();\n //button.setPictureLink(appProperties.getToyotaImgUrl());\n //button.setPicturePath(appProperties.getToyotaImgUrl());\n button.setTitle(mod);\n button.setSubTitle(mod);\n List<EasyMap> actions = new ArrayList<>();\n EasyMap bookAction = new EasyMap();\n bookAction.setName(mod);\n bookAction.setValue(\"model \" + mod);\n actions.add(bookAction);\n button.setButtonValues(actions);\n ButtonBuilder buttonBuilder = new ButtonBuilder(button);\n buttonBuilders.add(buttonBuilder);\n }\n String btnBuilders = \"\";\n for (ButtonBuilder buttonBuilder : buttonBuilders) {\n btnBuilders += buttonBuilder.build();\n btnBuilders += \"&split&\";\n }\n\n CarouselBuilder carouselBuilder = new CarouselBuilder(btnBuilders);\n output.put(OUTPUT, carouselBuilder.build());\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n extensionResult.setValue(output);\n return extensionResult;\n }",
"@GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n @Path(\"StockProducto/list\")\r\n public ArrayList<StockProducto> getXmls() throws Exception {\n ArrayList<StockProducto> lista=new ArrayList<StockProducto>();\r\n lista=StockProducto.stockproducto();\r\n return lista;\r\n }"
]
| [
"0.57882714",
"0.56300265",
"0.56212366",
"0.5581528",
"0.55781347",
"0.55710334",
"0.5550184",
"0.5544871",
"0.5503959",
"0.54969794",
"0.5468168",
"0.5464511",
"0.5463959",
"0.54345345",
"0.542829",
"0.5389392",
"0.5387285",
"0.5381404",
"0.53811955",
"0.5375609",
"0.53643584",
"0.533339",
"0.5329356",
"0.5322232",
"0.5317436",
"0.5306728",
"0.5296845",
"0.5282281",
"0.52716136",
"0.5270488",
"0.5252327",
"0.52488786",
"0.5245338",
"0.52416766",
"0.5239189",
"0.52370447",
"0.523311",
"0.5232044",
"0.5214443",
"0.52042335",
"0.51964456",
"0.5173952",
"0.5169207",
"0.5161961",
"0.51591265",
"0.51479566",
"0.5141612",
"0.5128863",
"0.51246315",
"0.5118927",
"0.5112624",
"0.51079357",
"0.5107403",
"0.50956964",
"0.50796735",
"0.50786674",
"0.5070572",
"0.5066011",
"0.50639814",
"0.505845",
"0.50428474",
"0.5042303",
"0.5036706",
"0.50352365",
"0.50253016",
"0.5021055",
"0.501926",
"0.5012499",
"0.5004521",
"0.50012743",
"0.49972513",
"0.49971613",
"0.4989102",
"0.49779388",
"0.4972362",
"0.49649462",
"0.49640644",
"0.49632615",
"0.4962811",
"0.49576712",
"0.49545172",
"0.49541482",
"0.49527058",
"0.49508563",
"0.49453917",
"0.49450654",
"0.494245",
"0.49332935",
"0.4933016",
"0.49321365",
"0.49305093",
"0.49273458",
"0.49187493",
"0.4915513",
"0.49147922",
"0.49128678",
"0.49087247",
"0.4908362",
"0.49007946",
"0.48992783",
"0.4897814"
]
| 0.0 | -1 |
Interface representing an HTTP request. | public interface HttpRequest {
/**
* Gets the HTTP request {@link URL}.
*/
URL getUrl();
/**
* Gets the HTTP request method.
*/
String getMethod();
/**
* Gets an immutable map containing the request headers and their values.
*/
Map<String, List<String>> getHeaders();
/**
* Gets the header's value.
*
* @param name Header name for which to retrieve the value.
*
* @return The header's value, which might also be {@code null} if not set.
*/
String getHeader(String name);
/**
* Sets an HTTP header or overwrites an existing HTTP header with new value.
* <p>
* Trying to set an HTTP header with null name will return immediately.
* Trying to set one of the following restricted headers will also return immediately.
* </p>
* <ul>
* <li>{@code Access-Control-Request-Headers}</li>
* <li>{@code Access-Control-Request-Method}</li>
* <li>{@code Connection}</li>
* <li>{@code Content-Length}</li>
* <li>{@code Content-Transfer-Encoding}</li>
* <li>{@code Host}</li>
* <li>{@code Keep-Alive}</li>
* <li>{@code Origin}</li>
* <li>{@code Trailer}</li>
* <li>{@code Transfer-Encoding}</li>
* <li>{@code Upgrade}</li>
* <li>{@code Via}</li>
* </ul>
*
* @param name The header's name, which must not be {@code null} or any of the restricted headers.
* @param value The header's value
*/
void setHeader(String name, String value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IHttpRequest {\n Map<String, String> getHeaders();\n\n Map<String, String> getBodyParams();\n\n Map<String, String> getCookies();\n\n String getMethod();\n\n void setMethod(String method);\n\n String getUrl();\n\n void setUrl(String url);\n\n void addHeader(String header, String value);\n\n void addBodyParam(String bodyParam, String value);\n\n boolean isResource();\n}",
"public interface HttpRequest extends Serializable {\n\n\tpublic HttpResponse send() throws BackendConnectionException;\n\t\n\tpublic GoalContext getGoalContext();\n\t\n\tpublic HttpRequest setGoalContext(GoalContext _ctx);\n\n\tpublic void saveToDisk() throws IOException;\n\n\tpublic void savePayloadToDisk() throws IOException;\n\t\n\tpublic void loadFromDisk() throws IOException;\n\t\n\tpublic void loadPayloadFromDisk() throws IOException;\n\n\tpublic void deleteFromDisk() throws IOException;\n\n\tpublic void deletePayloadFromDisk() throws IOException;\n\n\tpublic String getFilename();\n}",
"public interface IRequest {\n\t/**\n\t * This method creates request based on operationType and parameter object.\n\t * @param opType operation type of the request to be created.\n\t * @param params List of parameters to be sent along with the request.\n\t */\n\tvoid createRequest(EnumOperationType opType, IParameter parameter);\n\t\n\t/**\n\t * This method retrieves operation type of the the request.\n\t * \n\t * @return operation type\n\t */\n\tEnumOperationType getOperationType();\n\t\n\t/**\n\t * This method retrieves the parameters object configured for the request.\n\t */\n\tIParameter getParameter();\n\t\n\t/**\n\t * This method allows user to get configured request in XML.\n\t * \n\t * @return\n\t * @throws Exception \n\t */\n\tpublic String getRequestInXML() throws Exception;\n\t\n\t/**\n\t * This method parses XML and creates a request object out of it. \n\t */\n\tpublic void parseXML(String XML);\n\t\n\tpublic void setId(String id);\n\t\n\tpublic String getId();\n}",
"public interface Request {\n}",
"public interface AlexaHttpRequest {\n /**\n * @return the signature, base64 encoded.\n */\n String getBaseEncoded64Signature();\n\n /**\n * @return URL for the certificate chain needed to verify the request signature.\n */\n String getSigningCertificateChainUrl();\n\n /**\n * @return the request envelope, in serialized form.\n */\n byte[] getSerializedRequestEnvelope();\n\n /**\n * @return the request envelope, in deserialized form.\n */\n RequestEnvelope getDeserializedRequestEnvelope();\n}",
"protected abstract HttpUriRequest getHttpUriRequest();",
"public interface TorrentServerRequest {\n\n\t/**\n\t * Sends a GET request to the torrent server\n\t * @param url URL for the GET request\n\t * @return GET request response\n\t */\n\tString getRequest(String url);\n\t\n\t/**\n\t * Sends a POST request to the torrent server\n\t * @param url URL for the POST request\n\t * @return POST request response\n\t */\n\tString postRequest(String url);\t\n\t\n\t/**\n\t * Gets a Json parser\n\t * @return Json parser\n\t */\n\tTorrentJsonParser getJsonParser();\n}",
"public interface IRequest<T, O> {\r\n /**\r\n * Call back interface method for processing the Server Request\r\n *\r\n * @param requestInfo - RequestInfo Object which holds all the required Request Details\r\n */\r\n void processRequest(RequestInfo<T, O> requestInfo, Class<T> TClass, Class<O> OClass, boolean invalidateCache);\r\n\r\n void registerListener(INetworkListener networkListener);\r\n\r\n boolean cancelRequest();\r\n}",
"public GrizzletRequest getRequest();",
"public interface Request{\n public Response execute(Library library);\n public String getTextString();\n public String[] getParams();\n public boolean isPartial();\n}",
"@NonNull\n HttpRequest toHttpRequest();",
"public interface HttpRequestService {\n\n String get(String url,HashMap<String,String> params) throws IOException;\n\n String get(String url) throws IOException;\n\n String post(String url,HashMap<String,String> params) throws Exception;\n\n}",
"public interface Request {\n public String toXml();\n\n\n public String getHandlerId();\n\n\n public String getRequestId();\n}",
"public interface HttpRequest {\n // MIME types\n public static final String JNLP_MIME_TYPE = \"application/x-java-jnlp-file\";\n public static final String ERROR_MIME_TYPE = \"application/x-java-jnlp-error\";\n public static final String JAR_MIME_TYPE = \"application/x-java-archive\";\n public static final String JARDIFF_MIME_TYPE = \"application/x-java-archive-diff\";\n public static final String GIF_MIME_TYPE = \"image/gif\";\n public static final String JPEG_MIME_TYPE = \"image/jpeg\";\n \n // Low-level interface\n HttpResponse doHeadRequest(URL url) throws IOException;\n HttpResponse doGetRequest (URL url) throws IOException;\n \n HttpResponse doHeadRequest(URL url, String[] headerKeys, String[] headerValues) throws IOException;\n HttpResponse doGetRequest (URL url, String[] headerKeys, String[] headerValues) throws IOException;\n}",
"private final static HttpRequest createRequest() {\r\n\r\n HttpRequest req = new BasicHttpRequest\r\n (\"GET\", \"/\", HttpVersion.HTTP_1_1);\r\n //(\"OPTIONS\", \"*\", HttpVersion.HTTP_1_1);\r\n\r\n return req;\r\n }",
"public interface RequestInfo {\n\n /**\n * Sets status for the request\n * @param status\n */\n void setStatus(STATUS status);\n\n /**\n * @return status of the request\n */\n STATUS getStatus();\n\n /**\n * @return unique id of the request\n */\n Long getId();\n\n /**\n * @return list of errors for this request if any\n */\n List<? extends ErrorInfo> getErrorInfo();\n\n /**\n * @return number of retries available for this request\n */\n int getRetries();\n\n /**\n * @return number of already executed attempts\n */\n int getExecutions();\n\n /**\n * @return command name for this request\n */\n String getCommandName();\n\n /**\n * @return business key assigned to this request\n */\n String getKey();\n\n /**\n * @return descriptive message assigned to this request\n */\n String getMessage();\n\n /**\n * @return time that this request shall be executed (for the first attempt)\n */\n Date getTime();\n\n /**\n * @return serialized bytes of the contextual request data\n */\n byte[] getRequestData();\n\n /**\n * @return serialized bytes of the response data\n */\n byte[] getResponseData();\n \n /**\n * @return optional deployment id in case this job is scheduled from within process context\n */\n String getDeploymentId();\n \n /**\n * @return optional process instance id in case this job is scheduled from within process context\n */\n Long getProcessInstanceId();\n \n /**\n * @return get priority assigned to this job request\n */\n int getPriority();\n}",
"public interface HttpRequestHandler {\n public boolean canHandle(String uri);\n public httpResponse handle(httpRequest request);\n}",
"public interface UrlConnector {\n /**\n * Obtains an HTTP GET request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpGet getRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP PUT request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPut putRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP POST request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPost postRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP DELETE request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpDelete deleteRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP PATCH request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPatch patchRequest(HttpServletRequest request, String address) throws IOException;\n}",
"public REQ getRequest() {\n return request;\n }",
"public interface InterfaceWebRequest {\n void dispatchRequest();\n}",
"public interface Request {\n\n /**\n * This method executes the request.\n * @return a responseEntity containing the reponse (status and body).\n */\n ResponseEntity execute();\n}",
"Request _request(String operation);",
"String getRequest();",
"public interface PostRequest {}",
"public interface RequestInterface {\n public void onResponse(String response);\n public void onError();\n}",
"@Override\n public Type getType() {\n return Type.TypeRequest;\n }",
"@NotNull\n @Generated\n @Selector(\"request\")\n public native NSURLRequest request();",
"public interface HttpRequestFactory\n{\n\n\tpublic abstract HttpRequest buildHttpRequest(HttpMethod httpmethod, String s);\n\n\tpublic abstract HttpRequest buildHttpRequest(HttpMethod httpmethod, String s, Map map);\n\n\tpublic abstract PinningInfoProvider getPinningInfoProvider();\n\n\tpublic abstract void setPinningInfoProvider(PinningInfoProvider pinninginfoprovider);\n}",
"net.iGap.proto.ProtoRequest.Request getRequest();",
"public interface RequestHandler {\n\tpublic Map<String,Object> handleRequest(Map<String,Object> request,\n\t\t\t InetAddress client);\n}",
"public Request(){\n\t\tthis(null, null, null);\n\t}",
"public interface Requestable {\n\n /**\n * In our TicTacToe game server sends get methods\n *\n * @return an json sting of the request\n */\n public String post();\n\n /**\n * In TicTacToe game client sends post methods\n *\n * @return an json string of the request;\n */\n public String get();\n\n}",
"private Request() {}",
"private Request() {}",
"public interface RequestFunction {}",
"public interface HttpRequestResolutionHandler {\r\n \r\n /**\r\n * Resolves the incoming HTTP request to a URL\r\n * that identifies a content binary \r\n *\r\n * @param inetAddress IP address the transaction was sent from.\r\n * @param url The <code>URL</code> requested by the transaction.\r\n * @param request The HTTP message request;\r\n * i.e., the request line and subsequent message headers.\r\n * @param networkInterface The <code>NetworkInterface</code> the request\r\n * came on.\r\n *\r\n * @return URL of the content binary if a match is found,\r\n * null otherwise.\r\n * \r\n */\r\n public URL resolveHttpRequest(InetAddress inetAddress,\r\n URL url,\r\n String[] request,\r\n NetworkInterface networkInterface);\r\n \r\n}",
"MovilizerRequest getRequestFromString(String requestString);",
"public static Request getRequest() {\n return request;\n }",
"public interface RequestModifier {\n\n /**\n * Set HTTP request method, only support get, post,put , delete method.\n *\n * @param method\n *\n */\n public void setMethod(HTTPMethod method);\n\n /**\n * Set HTTP Protocol.\n *\n * @param protocol\n *\n */\n public void setProtocol(String protocol);\n\n /**\n * Set HTTP version , such as HTTP1.1.\n *\n * @param version\n *\n */\n public void setVersion(String version);\n\n /**\n * Set HTTP domain.\n *\n * @param domain\n *\n */\n public void setDomain(String domain);\n\n /**\n * Set path in the url.\n *\n * @param path\n *\n */\n public void setPath(String path);\n\n /**\n * Set web server port\n *\n * @param port\n *\n */\n public void setPort(int port);\n\n /**\n * Set HTTP url\n *\n * @param url\n *\n */\n public void setUrl(URL url);\n\n /**\n * Set HTTP url string\n *\n * @param url\n *\n */\n public void setUrl(String url);\n\n /**\n * Modify the exist argument in url.\n *\n * @param urlArg\n *\n * @return boolean, if success to modfiy this argument, return true.\n * if fail to modfiy this argument, return false.\n */\n public boolean modifyURIArgContent(URLArg urlArg);\n\n /**\n * Modify the exist header in HTTP request headers.\n *\n * @param header\n *\n * @return boolean, if success to modfiy this argument, return true.\n * if fail to modfiy this argument, return false.\n */\n public boolean modifyHeaderContent(Header header);\n\n /**\n * Add the request header, if this header is exist, modfiy this value.\n *\n * @param key\n *\n * @param header\n *\n */\n public void addHeader(String key, String header);\n\n /**\n * Add the request header, if this header is exist, modfiy this value.\n *\n * @param key\n *\n * @param header\n *\n */\n public void delHeader(String key);\n\n /**\n * Add the post arg in request header, if this argument is exist, modfiy this value.\n *\n * @param key\n *\n * @param value\n *\n */\n public void addPostArg(String key, String value);\n\n /**\n * Add the url arg in request url, if this argument is exist, modfiy this value.\n *\n * @param key\n *\n * @param value\n *\n */\n public void addUrlArg(String key, String value);\n}",
"protected TrellisRequest getRequest() {\n return request;\n }",
"public interface HttpClientable {\n\n void get(String url);\n\n void get(String url, ParamStore params);\n\n void get(String url, ParamStore params, String tag);\n\n void post(String url, SparseArray<String> params);\n\n void post(String url, SparseArray<String> params, String tag);\n\n void upload(String url, HashMap<String, Object> params);\n\n void upload(String url, HashMap<String, Object> params, String tag);\n\n void download(String url);\n\n void download(String url, String tag);\n\n void cancelAll();\n\n void cancel(String tag);\n\n}",
"public interface IHTTPSession {\n\n\t\tvoid execute() throws IOException;\n\n\t\tCookieHandler getCookies();\n\n\t\tMap<String, String> getHeaders();\n\n\t\tInputStream getInputStream();\n\n\t\tMethod getMethod();\n\n\t\tMap<String, String> getParms();\n\n\t\tString getQueryParameterString();\n\n\t\t/**\n\t\t * @return the path part of the URL.\n\t\t */\n\t\tString getUri();\n\n\t\t/**\n\t\t * Adds the files in the request body to the files map.\n\t\t * \n\t\t * @param files\n\t\t * map to modify\n\t\t */\n\t\tvoid parseBody(Map<String, String> files) throws IOException, ResponseException;\n\n\t\t/**\n\t\t * Get the remote ip address of the requester.\n\t\t * \n\t\t * @return the IP address.\n\t\t */\n\t\tString getRemoteIpAddress();\n\n\t\t/**\n\t\t * Get the remote hostname of the requester.\n\t\t * \n\t\t * @return the hostname.\n\t\t */\n\t\tString getRemoteHostName();\n\t}",
"@UnstableApi\npublic interface FullRequest extends Request {}",
"public Request(final FullHttpRequest request) {\n this.request = request;\n }",
"public net.iGap.proto.ProtoRequest.Request getRequest() {\n return instance.getRequest();\n }",
"public T getRequestData();",
"public interface IHttpRequestHandler extends INamedObject\r\n{\t\r\n public HandlerResponse handleRequest( HttpRequestData httpRequest ) throws IOException;\r\n}",
"void request(RequestParams params);",
"public Request getRequest() throws IOException {\n\t\tString message = underlying.readStringLine();\n\t\tif(message != null && message.startsWith(\"!compute \"))\t\t\n\t\t\treturn new NodeRequest(message.substring(9).split(\"\\\\s\"));\t\t\n\t\tif(message != null && message.equals(\"!getLogs\"))\t\t\n\t\t\treturn new LogRequest();\n\t\tif(message != null && message.startsWith(\"!share \"))\t\t\n\t\t\treturn new ShareRequest(message.substring(7).trim());\n\t\tif(message != null && (message.startsWith(\"!commit \") || message.equals(\"!rollback\")))\t\t\n\t\t\treturn new CommitRequest(message);\n\t\treturn null;\n\t}",
"public interface NettyHttpRequestBuilder {\n /**\n * Converts this object to a full http request.\n *\n * @return a full http request\n */\n @NonNull\n FullHttpRequest toFullHttpRequest();\n\n /**\n * Converts this object to a streamed http request.\n * @return The streamed request\n */\n @NonNull\n StreamedHttpRequest toStreamHttpRequest();\n\n /**\n * Converts this object to the most appropriate http request type.\n * @return The http request\n */\n @NonNull\n HttpRequest toHttpRequest();\n\n /**\n * @return Is the request a stream.\n */\n boolean isStream();\n\n /**\n * Convert the given request to a full http request.\n * @param request The request\n * @return The full request.\n */\n static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) {\n Objects.requireNonNull(request, \"The request cannot be null\");\n while (request instanceof HttpRequestWrapper) {\n request = ((HttpRequestWrapper<?>) request).getDelegate();\n }\n if (request instanceof NettyHttpRequestBuilder) {\n return ((NettyHttpRequestBuilder) request).toHttpRequest();\n }\n // manual conversion\n HttpRequest nettyRequest;\n ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null);\n if (byteBuf != null) {\n nettyRequest = new DefaultFullHttpRequest(\n HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString(),\n byteBuf\n );\n } else {\n nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString()\n );\n }\n\n request.getHeaders()\n .forEach((s, strings) -> nettyRequest.headers().add(s, strings));\n return nettyRequest;\n }\n\n}",
"public Request<E, T> buildHttpGet ()\n\t{\n\t\treturn new HttpGetRequest<E,T>(this);\n\t}",
"public String getRequest() {\n return request;\n }",
"TypedRequest createTypedRequest();",
"public Request getRequest() {\n String xml = JAXBUtil.getXmlStringFromReader(fromClient, \"</request>\");\n\n if (xml == null) {\n return null;\n }\n\n return JAXBUtil.deserialize(xml, Request.class);\n }",
"public HttpRequest(URL url) throws IOException {\r\n this(url.openConnection());\r\n }",
"public HTTPRequestMethod getMethod();",
"static @NonNull HttpRequest toHttpRequest(@NonNull io.micronaut.http.HttpRequest<?> request) {\n Objects.requireNonNull(request, \"The request cannot be null\");\n while (request instanceof HttpRequestWrapper) {\n request = ((HttpRequestWrapper<?>) request).getDelegate();\n }\n if (request instanceof NettyHttpRequestBuilder) {\n return ((NettyHttpRequestBuilder) request).toHttpRequest();\n }\n // manual conversion\n HttpRequest nettyRequest;\n ByteBuf byteBuf = request.getBody(ByteBuf.class).orElse(null);\n if (byteBuf != null) {\n nettyRequest = new DefaultFullHttpRequest(\n HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString(),\n byteBuf\n );\n } else {\n nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,\n HttpMethod.valueOf(request.getMethodName()),\n request.getUri().toString()\n );\n }\n\n request.getHeaders()\n .forEach((s, strings) -> nettyRequest.headers().add(s, strings));\n return nettyRequest;\n }",
"public interface RequestResponse {\n /**\n * Checks if the request was successful and returned no error.\n * @return true if the request was successful\n */\n boolean isSuccessful();\n\n /**\n * Gets HTTP status code received by the server as a reaction to the request.\n * @return response status code\n */\n int getStatusCode();\n\n /**\n * Gets HTTP status message received by the server as a reaction to the request.\n * @return response status message\n */\n String getStatusMessage();\n\n /**\n * <p>Checks, if the request failed because of rate limitation.</p>\n * <p>If this happens, you probably used too many similar requests (like add reaction) one after another.\n * If this happens because of spamming requests, try waiting after each one with {@link Future#get()}.\n * If this happens randomly, it can be caused by different modules doing same actions. Try again.</p>\n * <p><b>Warning:</b> if you exceed the limits too often, you risk getting banned.</p>\n * @return true if the request failed due to rate limit\n */\n boolean isRateLimited();\n}",
"public interface WebappRequest\n{\n\t/**\n\t * Set an attribute\n\t * @param key Atrribute key\n\t * @param value Attribute value\n\t */\n\tvoid setAttribute(String key, Object value);\n\n\t/**\n\t * Get configuration parameters\n\t * @param key Paramater key\n\t * @return Parameter value\n\t */\n\tString getInitParameter(String key);\n\n\t/**\n\t * Get names of all the paramters in the request\n\t * @return enumaeration of parameter names\n\t */\n\tEnumeration getParameterNames();\n\n\t/**\n\t * Get the value of a parameter\n\t * @param key Parameter key\n\t * @return Parameter value\n\t */\n\tString getParameter(String key);\n\n\t/**\n\t * Get the values of a parameter\n\t * @param key Parameter key\n\t * @return Parameter value\n\t */\n\tString[] getParameterValues(String key);\n\n\t/**\n\t * Get the value of a particular attribute\n\t * @param key Attribute key\n\t * @return Attribute value\n\t */\n\tObject getAttribute(String key);\n\n\t/**\n\t * Get all the HTTP cookies in the session\n\t * @return cookies\n\t */\n\tCookie[] getCookies();\n\n\t/**\n\t * Get the request URL\n\t * @return request URL\n\t */\n\tString getRequestURL();\n\n\t/**\n\t * Get query string\n\t * @return query strin\n\t */\n\tString getQueryString();\n\n\t/**\n\t * Get session ID set by browser\n\t * @return session ID\n\t */\n\tString getSessionId();\n\n\t/**\n\t * Get IP address of browser\n\t * @return IP address\n\t */\n\tString getRemoteAddr();\n\n\t/**\n\t * Get fully qualified path\n\t * @param path Path relative to webapp/WEB-INF\n\t * @return fully qualified path\n\t */\n\tString getRealPath(String path);\n\n\t/**\n\t */\n\tEnumeration getHeaderNames();\n\n\t/**\n\t */\n\tString getHeader(String name);\n\n\tString getSource();\n\n\tLocale getLocale();\n\n\tString getScheme();\n\n\tString getServerName();\n\n\tint getServerPort();\n\n\tString getContextPath();\n}",
"public interface ServiceRequest<T> extends Serializable {\r\n\t\r\n\t/**\r\n\t * Gets the service name for this request\r\n\t * @return the valid service name\r\n\t */\r\n\tpublic String getServiceName();\r\n\t\r\n\t/**\r\n\t * Gets the service version.\r\n\t * @return the service version as string\r\n\t */\r\n\tpublic String getServiceVersion();\r\n\t\r\n\t/**\r\n\t * Set the version of the service for this request.\r\n\t * @param serviceVersion\r\n\t */\r\n\tpublic void setServiceVersion(String serviceVersion);\r\n\t \r\n\t/**\r\n\t * Gets the request body data aka paylod for the request\r\n\t * @return the request data\r\n\t */\r\n\tpublic T getRequestData();\r\n\t\r\n\t/**\r\n\t * Returns the security context around this request.\r\n\t * @return the security context for this request\r\n\t */\r\n\tpublic SecurityContext getSecurityContext();\r\n\t\r\n\t/**\r\n\t * Returns all headers.\r\n\t * @return the array of headers\r\n\t */\r\n\tpublic Header[] getHeaders();\r\n\t\r\n\t/**\r\n\t * Returns the header object if the header with a specified key is present.\r\n\t * @param key The key for which value has to be returned\r\n\t * @return the value of the specified key\r\n\t */\r\n\tpublic Header getHeaderByKey(String key);\t\r\n}",
"static Request parseRequest(InputStream in) throws IOException {\n\t\tRequestLine request = readRequestLine(in);\n\t\tHeaders headers = readHeaders(in);\n\t\tlong length = -1;\n\t\tInputStream body;\n\t\tif (HeaderValue.CHUNKED.equals(headers.get(HeaderName.TRANSFER_ENCODING))) {\n\t\t\tbody = new ChunkedInputStream(in);\n\t\t} else {\n\t\t\tString header = headers.get(HeaderName.CONTENT_LENGTH);\n\t\t\tlength = header == null ? 0 : Long.parseLong(header);\n\t\t\tbody = new LimitedInputStream(in, length);\n\t\t}\n\t\treturn new Request(request.method(), request.target(), request.path(), request.query(), headers, length, body);\n\t}",
"public String getRequest() {\n Object ref = request_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n request_ = s;\n }\n return s;\n }\n }",
"public net.iGap.proto.ProtoRequest.Request getRequest() {\n return request_ == null ? net.iGap.proto.ProtoRequest.Request.getDefaultInstance() : request_;\n }",
"public String getRequest() {\n Object ref = request_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n request_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public GhRequest getRequest() {\r\n return localRequest;\r\n }",
"public GhRequest getRequest() {\r\n return localRequest;\r\n }",
"void setRequest(Request req);",
"public interface RequestHandler {\r\n /**\r\n * Handle the request and response.\r\n *\r\n *\r\n * @param xmlRequest\r\n * the xml request element\r\n * @param req\r\n * the http request\r\n * @param res\r\n * the http response\r\n * @throws IllegalArgumentException\r\n * if argument is null\r\n * @throws IOException\r\n * if I/O error occurs\r\n */\r\n public void handle(Element xmlRequest, HttpServletRequest req, HttpServletResponse res) throws IOException;\r\n\r\n}",
"HttpGet getRequest(HttpServletRequest request, String address) throws IOException;",
"public DefaultHttpRequest() {\n }",
"public interface Controller {\r\n Object handle(WebRequest request);\r\n}",
"public interface Data {\n\n String getRequest();\n\n}",
"io.envoyproxy.envoy.type.metadata.v3.MetadataKind.Request getRequest();",
"public Request() {\n }",
"public GWIRequest(int method, Map<String, String> params,\n String url, Object request,\n Type resType,\n Response.Listener<R> listener,\n Response.ErrorListener errorListener) {\n super(method, url, errorListener);\n mParams = params;\n mBodyRequest = request;\n this.mResType = resType;\n this.mListener = listener;\n mGson = new GsonBuilder().registerTypeAdapter(Date.class, new DotNetDateAdapter()).setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE)\n .create();\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }",
"public Request getRequest() {\r\n return localRequest;\r\n }"
]
| [
"0.75705814",
"0.75439936",
"0.73527986",
"0.71763974",
"0.7053579",
"0.7019913",
"0.69628406",
"0.6944111",
"0.687306",
"0.68613595",
"0.6816985",
"0.6790411",
"0.6740628",
"0.6712765",
"0.66747075",
"0.65957016",
"0.6558242",
"0.6551507",
"0.6543021",
"0.65202284",
"0.65166306",
"0.6507713",
"0.6474729",
"0.64628655",
"0.64597106",
"0.64418113",
"0.6436742",
"0.6430088",
"0.64263946",
"0.6407929",
"0.63987124",
"0.6362137",
"0.63457257",
"0.63457257",
"0.6345505",
"0.6334946",
"0.6334935",
"0.63195115",
"0.6307047",
"0.6290442",
"0.6237278",
"0.6235731",
"0.62272155",
"0.62257344",
"0.6223203",
"0.6222072",
"0.6215154",
"0.6210169",
"0.6203874",
"0.61668366",
"0.6130885",
"0.6129422",
"0.61259556",
"0.6117548",
"0.6116475",
"0.61008507",
"0.6096592",
"0.6087198",
"0.60680807",
"0.60537827",
"0.6045487",
"0.60239184",
"0.60091823",
"0.60028875",
"0.59915096",
"0.59915096",
"0.5988254",
"0.59874564",
"0.59754163",
"0.59568816",
"0.59533024",
"0.59389186",
"0.5929345",
"0.592596",
"0.5922028",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197",
"0.59094197"
]
| 0.7103324 | 4 |
Gets the HTTP request method. | String getMethod(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRequestMethod()\n {\n return requestMethod;\n }",
"public String getRequestMethod(){\n return this.requestMethod;\n }",
"public HTTPRequestMethod getMethod();",
"@Override\n\tpublic String getRequestMethod() {\n\t\treturn requestMethod;\n\t}",
"public String getHttpMethod() {\n return httpMethod;\n }",
"public java.lang.String getReqMethod() {\n return req_method;\n }",
"public java.lang.String getReqMethod() {\n return req_method;\n }",
"String getHttpMethod();",
"String getHttpMethod();",
"public String getHttpMethod() {\n Object ref = httpMethod_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n httpMethod_ = s;\n }\n return s;\n }\n }",
"public HttpMethod getMethod()\r\n/* 44: */ {\r\n/* 45: 78 */ return HttpMethod.valueOf(this.servletRequest.getMethod());\r\n/* 46: */ }",
"public String getHttpmethod() {\n return httpmethod;\n }",
"public String getHttpMethod() {\n Object ref = httpMethod_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n httpMethod_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getMethod() {\n\t\treturn getParameter(\"method\");\n\t}",
"public HttpMethod getMethod()\r\n/* 31: */ {\r\n/* 32:60 */ return HttpMethod.valueOf(this.httpRequest.getMethod());\r\n/* 33: */ }",
"public HttpMethod method() {\n\t\treturn method;\n\t}",
"public HttpMethod getMethod() {\n return method;\n }",
"public HttpMethod method() {\n return method;\n }",
"public String getMethod(String request) {\n return request.split(\" \")[0];\n }",
"public String getMethod() {\n\t\t\treturn method;\n\t\t}",
"public String getMethod() {\n\t\treturn method;\n\t}",
"public String getMethod() {\n return method;\n }",
"public String getMethod() {\n return method;\n }",
"public String getMethod() {\n return method;\n }",
"public String getMethod() {\n\n return this.method;\n }",
"public String getMethod ()\n {\n return method;\n }",
"@Nullable\n public static EHTTPMethod getHttpMethod (@Nonnull final HttpServletRequest aHttpRequest)\n {\n ValueEnforcer.notNull (aHttpRequest, \"HttpRequest\");\n\n final String sMethod = aHttpRequest.getMethod ();\n return EHTTPMethod.getFromNameOrNull (sMethod);\n }",
"public com.google.protobuf.ByteString\n getHttpMethodBytes() {\n Object ref = httpMethod_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n httpMethod_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getHttpMethodBytes() {\n Object ref = httpMethod_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n httpMethod_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Method getMethod() {\n\t\treturn method;\n\t}",
"public Method getMethod () {\n\t\treturn method;\n\t}",
"public int getMethod(){\n return method;\n }",
"@Nullable @NotEmpty public String getMethod() {\n return StringSupport.trimOrNull(method);\n }",
"public Method getMethod() {\n return method;\n }",
"public Method getMethod() {\n return method;\n }",
"com.google.protobuf.ByteString\n getHttpMethodBytes();",
"@Override\n public String getMethod() {\n return METHOD_NAME;\n }",
"public String getAuthMethod() {\n\t\tString method = options.getProperty(\"auth-method\");\n\t\tif(method == null) {\n\t\t\tmethod = options.getProperty(\"Authentication-Method\");\n\t\t}\n\t\treturn trimedValue(method);\n\t}",
"public InputMethod getMethod() {\n return method;\n }",
"public String getRequestType() {\r\n return (String) getAttributeInternal(REQUESTTYPE);\r\n }",
"public Method getMethod() {\n return mMethod;\n }",
"public java.lang.String getRequestType() {\n return requestType;\n }",
"public void setReqMethod(java.lang.String value) {\n this.req_method = value;\n }",
"public Method getMethod();",
"public Method getMethod() {\n\t\treturn this.currentAction.getMethod();\n\t}",
"public HttpMethod getMethod()\r\n/* 29: */ {\r\n/* 30:56 */ return this.method;\r\n/* 31: */ }",
"public static String getRequestType(){\n return requestType;\n }",
"Collection<HttpMethod> getMinimalSupportedHttpMethods();",
"public String getRequestProtocol(){\n return this.requestProtocol;\n }",
"@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}",
"public String getMethod()\n {\n if (averageRating == null) {\n return \"\";\n } else {\n return averageRating.getMethod();\n }\n }",
"public String getApiMethod() {\n return apiMethod;\n }",
"Method getMethod();",
"Method getMethod();",
"protected Method getMethod() {\n return method;\n }",
"public java.lang.reflect.Method getMethod()\n {\n return __m_Method;\n }",
"MethodType getMethodType();",
"public void setRequestMethod(String requestMethod){\n this.requestMethod = requestMethod;\n }",
"ResourceMethod getMethodType();",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"public RequestType getRequestType(){\n\t\t\treturn this.type;\n\t\t}",
"public static Node getMethod() {\n Element testRequest = TECore.doc.createElement(Constants.Request);\n testRequest.setAttribute(NO, String.valueOf(TECore.methodCount));\n // append child into testRequest\n testRequest.appendChild(getMethodElements(TECore.doc, testRequest, Constants.Assertion, TECore.assertionMsz));\n testRequest.appendChild(getMethodElements(TECore.doc, testRequest, Constants.URL, TECore.pathURL));\n testRequest.appendChild(getMethodElements(TECore.doc, testRequest, Constants.Message, TECore.messageTest));\n return testRequest;\n }",
"public void setRequestMethod(int requestMethod) {\n this.requestMethod = requestMethod;\n }",
"public String getRequestType() { return this.requestType; }",
"public String getGetMethodName() {\n return m_getMethodName;\n }",
"Methodsig getMethod();",
"public String getRequest() {\n return request;\n }",
"public int getMethodValue() {\n return method_;\n }",
"public int getMethodValue() {\n return method_;\n }",
"public void setMethod(HTTPMethod method);",
"boolean hasHttpMethod();",
"public static String getRequest() {\n return request;\n }",
"public String getAuthMethod() {\n return AUTH_NAME;\n }",
"protected String getAuthMethod() {\n return \"Token\" ;// TODO this.conf.getAuthMethod();\n }",
"@JsonIgnore\n public java.lang.reflect.Method getMethod() {\n return this.method;\n }",
"default PacketMethod getMethod() {\n return PacketMethod.POST;\n }",
"@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}",
"public io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod() {\n @SuppressWarnings(\"deprecation\")\n io.opencannabis.schema.commerce.Payments.PaymentMethod result = io.opencannabis.schema.commerce.Payments.PaymentMethod.valueOf(method_);\n return result == null ? io.opencannabis.schema.commerce.Payments.PaymentMethod.UNRECOGNIZED : result;\n }",
"public io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod() {\n @SuppressWarnings(\"deprecation\")\n io.opencannabis.schema.commerce.Payments.PaymentMethod result = io.opencannabis.schema.commerce.Payments.PaymentMethod.valueOf(method_);\n return result == null ? io.opencannabis.schema.commerce.Payments.PaymentMethod.UNRECOGNIZED : result;\n }",
"MethodName getMethod();",
"public static boolean isGet(String argRequestMethod) {\r\n\t\treturn HttpConstants.GET.equalsIgnoreCase(argRequestMethod);\r\n\t}",
"String getRequest();",
"@Nullable\n @Override\n public String getName() {\n return /*this.requestMethod + \" \" +*/ this.url;\n }",
"@Override\n public HttpMethods getMethod() {\n return HttpMethods.EVAL;\n }",
"private static String getRequestsProtocol() {\n boolean isXForwardedProtoHttps = Controller.request().header(\"X-Forwarded-Proto\").map(h -> h.equals(\"https\"))\n .orElse(false);\n boolean isRefererProtoHttps = Controller.request().header(\"Referer\").map(h -> h.startsWith(\"https\")).orElse(\n false);\n return isXForwardedProtoHttps || isRefererProtoHttps || Controller.request().secure() ? \"https\" : \"http\";\n }",
"@Nullable\n abstract Method getMethod();",
"public ZserioType getRequestType()\n {\n return requestType;\n }",
"@Override\n\tpublic String getRequestType() {\n\t\treturn null;\n\t}",
"public boolean hasReqMethod() {\n return fieldSetFlags()[6];\n }",
"private void setRequestMethod() {\n switch (type) {\n case GET:\n try {\n connection.setRequestMethod(GET);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as GET successfully\");\n LOG.severe(e.toString());\n }\n break;\n case POST:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(POST);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as POST successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PUT:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PUT);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PUT successfully\");\n LOG.severe(e.toString());\n }\n break;\n case DELETE:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(DELETE);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as DELETE successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PATCH:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PATCH);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PATCH successfully\");\n LOG.severe(e.toString());\n }\n break;\n }\n }",
"public static int httpMethodId(final String httpMethod) {\n if (startsWith(httpMethod, GET) || startsWith(httpMethod, HEAD)) {\n return 0;\n } else if (startsWith(httpMethod, POST) || startsWith(httpMethod, PUT)) {\n return 1;\n } else if (startsWith(httpMethod, CONNECT)) {\n return 2;\n } else if (startsWith(httpMethod, OPTIONS)) {\n return 3;\n } else {\n return -1;\n /**\n * No match...\n * Following methods are not implemented: ||\n * startsWith(httpMethod,\"TRACE\")\n */\n }\n }",
"@Property\n public native MintRequestType getRequestType ();",
"public boolean hasHttpMethod() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"@Override\n public Type getType() {\n return Type.TypeRequest;\n }",
"public boolean hasHttpMethod() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public String getProtocol()\n {\n ASPManager mgr = getASPManager();\n String protocol = mgr.getAspRequest().getScheme();\n\n if(mgr.isDifferentApplicationPath())\n {\n int host_no = mgr.getCurrentHostIndex()+1;\n String[] data =Str.split((String)configfile.hosts.get(host_no+\"\"),\",\");\n \n if(!\"NONE\".equals(data[0]))\n protocol = data[0];\n }\n\n return protocol;\n }",
"public Method getActionMethod() {\n return this.method;\n }",
"public void setHttpMethod(int httpMethod) {\n method = httpMethod;\n }"
]
| [
"0.8266261",
"0.80912584",
"0.8072783",
"0.79883087",
"0.79233855",
"0.79163384",
"0.7897178",
"0.78841203",
"0.78841203",
"0.78641117",
"0.77921194",
"0.7761275",
"0.77607703",
"0.77286935",
"0.75749606",
"0.752505",
"0.74549514",
"0.74189484",
"0.7302455",
"0.72302145",
"0.7222082",
"0.71355814",
"0.71355814",
"0.71355814",
"0.7053895",
"0.7020723",
"0.701013",
"0.69567853",
"0.6906744",
"0.6819273",
"0.6800361",
"0.6761395",
"0.67474496",
"0.67040724",
"0.67040724",
"0.66786927",
"0.6648318",
"0.66448325",
"0.66315985",
"0.6617635",
"0.6540519",
"0.6536679",
"0.6479942",
"0.6455917",
"0.645528",
"0.6447232",
"0.6420195",
"0.6419893",
"0.6386264",
"0.6344779",
"0.63106334",
"0.6306498",
"0.6304927",
"0.6304927",
"0.629135",
"0.62273765",
"0.62052405",
"0.61999303",
"0.61864",
"0.6156586",
"0.6135634",
"0.61227477",
"0.61092585",
"0.6108681",
"0.60850835",
"0.605031",
"0.6039821",
"0.6019585",
"0.597927",
"0.59469074",
"0.5946615",
"0.5946121",
"0.59404725",
"0.59303355",
"0.59179944",
"0.5911461",
"0.5889983",
"0.5866902",
"0.5851655",
"0.58501697",
"0.5820236",
"0.5789774",
"0.57772446",
"0.577122",
"0.5762917",
"0.5754964",
"0.5754602",
"0.57530916",
"0.57323354",
"0.5713784",
"0.5707101",
"0.5703951",
"0.5700665",
"0.5688126",
"0.5663586",
"0.5662044",
"0.56516147",
"0.56470966",
"0.5640881"
]
| 0.68353856 | 30 |
Gets an immutable map containing the request headers and their values. | Map<String, List<String>> getHeaders(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Map<String, String> getRequestHeaders();",
"public Map<String, String> getRequestHeaders(HttpServletRequest request) {\n Map<String, String> headers = new HashMap<String, String>();\n\n if (request == null)\n return headers;\n\n Enumeration headerNames = request.getHeaderNames();\n while (headerNames.hasMoreElements()) {\n String headerName = (String) headerNames.nextElement();\n String headerVal = request.getHeader(headerName);\n\n headers.put(headerName, headerVal);\n }\n\n\n return headers;\n }",
"public Map<String,List<String>> getHeaderMap() {\n\n\t\treturn headers;\n\t}",
"Map<String, String> getHeaders();",
"public Map getHeaders() {\r\n if (headers == null) {\r\n headers = new HashMap();\r\n }\r\n\r\n return headers;\r\n }",
"public final Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }",
"public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }",
"public static Map<String, String> getHeaders() {\n if (headers == null) {\n headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"X-Custom-Header\", \"application/json\");\n }\n return headers;\n }",
"public Map<String, Header> getHeaderMap() {\n return headerMap;\n }",
"@Override public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }",
"public Map<String, HeaderInfo> getHeaders() {\n\t\treturn headers;\n\t}",
"public Map<String, String> headers() {\n return this.header.headers();\n }",
"public VersionedMap getHeaders ()\n {\n return headers;\n }",
"public Header[] getRequestHeaders();",
"public Header[] getRequestHeaders() {\n return getRequestHeaderGroup().getAllHeaders();\n }",
"public Map<String, List<String>> getHeaders() {\n\t\t\treturn headers;\n\t\t}",
"public Map<String, String> getHeaderList() {\n return headerMap;\n }",
"public MultiMap getHeaders() {\n return headers;\n }",
"public Map<String, List<String>> getResponseHeaders() {\n return responseHeaders == null ? Collections.EMPTY_MAP : responseHeaders;\n }",
"public Map<String, List<String>> getHeaders(){\n if (this.mResponseHeaders == null){\n this.mResponseHeaders = mConnection.getHeaderFields();\n }\n return this.mResponseHeaders;\n }",
"public Map<String, AbstractHeader> getHeaders()\n\t{\n\t\treturn headers;\n\t}",
"protected Map<String, String> getRequiredResponseHeaders()\n {\n if (requiredHttpHeaders != null)\n {\n return requiredHttpHeaders;\n }\n if (scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders() != null)\n {\n return scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders();\n }\n Map<String, String> requiredHttpHeaders = new HashMap<>();\n requiredHttpHeaders.put(HttpHeader.CONTENT_TYPE_HEADER, HttpHeader.SCIM_CONTENT_TYPE);\n return requiredHttpHeaders;\n }",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n\n return params;\n }",
"public Map<String, String> getExtraHeaders() {\n return Collections.unmodifiableMap(extraHeaders);\n }",
"public java.lang.String getReqHeaders() {\n return req_headers;\n }",
"@SuppressWarnings(\"unchecked\")\n private static Map<String, String> sortHeaders( HttpServletRequest request ) {\n Map<String, String> sortedHeaders = new TreeMap<String, String>();\n Enumeration<String> attrEnum = request.getHeaderNames();\n while ( attrEnum.hasMoreElements() ) {\n String s = attrEnum.nextElement();\n sortedHeaders.put( s, request.getHeader( s ) );\n }\n return sortedHeaders;\n }",
"public java.lang.String getReqHeaders() {\n return req_headers;\n }",
"@Nonnull\n @ReturnsMutableCopy\n public static HTTPHeaderMap getRequestHeaderMap (@Nonnull final HttpServletRequest aHttpRequest)\n {\n ValueEnforcer.notNull (aHttpRequest, \"HttpRequest\");\n\n final HTTPHeaderMap ret = new HTTPHeaderMap ();\n final Enumeration <?> eHeaders = aHttpRequest.getHeaderNames ();\n while (eHeaders.hasMoreElements ())\n {\n final String sName = (String) eHeaders.nextElement ();\n final Enumeration <?> eHeaderValues = aHttpRequest.getHeaders (sName);\n while (eHeaderValues.hasMoreElements ())\n {\n final String sValue = (String) eHeaderValues.nextElement ();\n ret.addHeader (sName, sValue);\n }\n }\n return ret;\n }",
"protected HeaderGroup getRequestHeaderGroup() {\n return requestHeaders;\n }",
"public static Map<String, Object> logRequestHeadersToMap(HttpServletRequest request) {\n // Locate\n Map<String, String> retLocate = new LinkedHashMap<>();\n retLocate.put(\"Country\", request.getLocale().getCountry());\n retLocate.put(\"DisplayCountry()\", request.getLocale().getDisplayCountry());\n retLocate.put(\"Language\", request.getLocale().getLanguage());\n retLocate.put(\"DisplayLanguage\", request.getLocale().getDisplayLanguage());\n retLocate.put(\"DisplayName\", request.getLocale().getDisplayName());\n retLocate.put(\"DisplayScript\", request.getLocale().getDisplayScript());\n retLocate.put(\"DisplayVariant\", request.getLocale().getDisplayVariant());\n retLocate.put(\"ISO3Country\", request.getLocale().getISO3Country());\n retLocate.put(\"ISO3Language\", request.getLocale().getISO3Language());\n retLocate.put(\"Variant\", request.getLocale().getVariant());\n retLocate.put(\"LanguageTag\", request.getLocale().toLanguageTag());\n // Others\n Map<String, Object> retOthers = new LinkedHashMap<>();\n retOthers.put(\"Method\", request.getMethod());\n retOthers.put(\"Host\", request.getRequestURL().toString());\n retOthers.put(\"AuthType\", request.getAuthType());\n retOthers.put(\"RequestURI\", request.getRequestURI());\n retOthers.put(\"RequestedSessionId\", request.getRequestedSessionId());\n retOthers.put(\"RemoteUser\", request.getRemoteUser());\n retOthers.put(\"RemotePort\", String.valueOf(request.getRemotePort()));\n retOthers.put(\"RemoteAddr\", request.getRemoteAddr());\n retOthers.put(\"ContextPath\", request.getContextPath());\n retOthers.put(\"CharacterEncoding\", request.getCharacterEncoding());\n retOthers.put(\"ContentType\", request.getContentType());\n retOthers.put(\"PathInfo\", request.getPathInfo());\n retOthers.put(\"PathTranslated\", request.getPathTranslated());\n retOthers.put(\"Protocol\", request.getProtocol());\n retOthers.put(\"ServletPath\", request.getServletPath());\n retOthers.put(\"LocalAddr\", request.getLocalAddr());\n retOthers.put(\"LocalName\", request.getLocalName());\n retOthers.put(\"TrailerFields\", request.getTrailerFields());\n\n // Cookies\n Map<String, String> retCookies = new LinkedHashMap<>();\n if (request.getCookies() != null) {\n for (Cookie cookie : request.getCookies()) {\n retCookies.put(cookie.getName(), cookie.getValue());\n }\n }\n // Headers\n Map<String, String> retHeaders = new LinkedHashMap<>();\n Enumeration<String> headerNames = request.getHeaderNames();\n while (headerNames.hasMoreElements()) {\n String str = headerNames.nextElement();\n retHeaders.put(str, request.getHeader(str));\n }\n\n\n // Return Map\n Map<String, Object> retVal = new LinkedHashMap<>();\n retVal.put(\"Headers\", retHeaders);\n retVal.put(\"Cookies\", retCookies);\n retVal.put(\"Locate\", retLocate);\n retVal.put(\"Others\", retOthers);\n retVal.put(\"QueryParams\", getQueryParams(request));\n\n return retVal;\n }",
"private HashMap<String, String> getHeaders() {\n mHeaders = new HashMap<>();\n // set user'token if user token is not set\n if ((this.mToken == null || this.mToken.isEmpty()) && mProfile != null)\n this.mToken = mProfile.getToken();\n\n if (this.mToken != null && !this.mToken.isEmpty()) {\n mHeaders.put(\"Authorization\", \"Token \" + this.mToken);\n Log.e(\"TOKEN\", mToken);\n }\n\n mHeaders.put(\"Content-Type\", \"application/form-data\");\n mHeaders.put(\"Accept\", \"application/json\");\n return mHeaders;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return httpClientRequest.getHeaders();\n }",
"public Map<String, List<String>> getInitialHeaders() {\n return mInitialHeaders;\n }",
"RequestHeaders headers();",
"public HttpHeaders getHeaders()\r\n/* 63: */ {\r\n/* 64: 93 */ if (this.headers == null)\r\n/* 65: */ {\r\n/* 66: 94 */ this.headers = new HttpHeaders();\r\n/* 67: */ Enumeration headerValues;\r\n/* 68: 95 */ for (Enumeration headerNames = this.servletRequest.getHeaderNames(); headerNames.hasMoreElements(); \r\n/* 69: 98 */ headerValues.hasMoreElements())\r\n/* 70: */ {\r\n/* 71: 96 */ String headerName = (String)headerNames.nextElement();\r\n/* 72: 97 */ headerValues = this.servletRequest.getHeaders(headerName);\r\n/* 73: 98 */ continue;\r\n/* 74: 99 */ String headerValue = (String)headerValues.nextElement();\r\n/* 75:100 */ this.headers.add(headerName, headerValue);\r\n/* 76: */ }\r\n/* 77: */ }\r\n/* 78:104 */ return this.headers;\r\n/* 79: */ }",
"public Set<String> getHeaderNames() {\n return headers.keySet();\n }",
"public Map<String, List<String>> getHeaderFields() {\n/* 262 */ return this.delegate.getHeaderFields();\n/* */ }",
"@Test\n public void testGetHeaders_whenServletRequestNoContainsHeaders() {\n\n MockHttpServletRequest request = new MockHttpServletRequest();\n Map<String, List<String>> expResult = new HashMap<>();\n\n HeadersService instance = new HeadersService();\n Map<String, List<String>> result = instance.getHeaders(request);\n assertEquals(expResult, result);\n }",
"public HashMap<String, String> getHeaderList() {\n return headerList;\n }",
"private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}",
"Headers getHeaders();",
"private Map<String, String> getParams(final HttpServletRequest request) {\n final Map<String, String> params = new HashMap<>();\n for (final Map.Entry<String, String[]> entry : request.getParameterMap().entrySet()) {\n params.put(entry.getKey(), entry.getValue()[0]);\n }\n return params;\n }",
"public abstract HttpHeaders headers();",
"public List<HttpHeaderOption> getRequestHeadersToAddList() {\n return requestHeadersToAdd;\n }",
"public List<HttpHeaderOption> getRequestHeadersToAddList() {\n return requestHeadersToAdd;\n }",
"public Map<String, String> readHeader() {\r\n\t\tMap<String, String> headers = null;\r\n\t\tif (advanceToTag(\"Document\")) {\r\n\t\t\tif (advanceToTag(\"Header\")) {\r\n\t\t\t\theaders = this.in.readPropertyBlock();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn headers;\r\n\t}",
"public HashMap<String, String> getHeader() {\n HashMap<String, String> header = new HashMap<String, String>();\n//\t\theader.put(\"Content-Type\", pref.getString(\"application/json\", \"application/json\"));\n /*header.put(\"authId\", pref.getString(KEY_USER_ID, KEY_USER_ID));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, KEY_AUTH_TOKEN));*/\n\n\n header.put(\"authId\", pref.getString(KEY_USER_ID, \"1\"));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, \"s4nbp5FibJpfEY9q\"));\n\n return header;\n }",
"protected Map<String,String> getParametersMap(HttpServletRequest request) {\n\t\tMap<String,String> map = new HashMap<String,String>();\n\t\t\n\t\tEnumeration<String> paramNames = request.getParameterNames() ;\n\t\t\n\t\twhile ( paramNames.hasMoreElements() ) {\n\t\t\tString name = paramNames.nextElement() ;\n\t\t\tString value = request.getParameter(name) ;\n\t\t\tmap.put(name, value);\n\t\t}\n\t\treturn map ;\n\t}",
"public Headers getHeaders() {\n if (headers == null) {\n headers = new DefaultHeaders();\n }\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"Map<String, Object> getRequestContextLocalAttrs();",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n params.put(\"Authorization\", appUtil.getPrefrence(\"token_type\") + \" \" + appUtil.getPrefrence(\"access_token\"));\n return params;\n }",
"public Map<String, List<String>> getRequestProperties() {\n/* 337 */ return this.delegate.getRequestProperties();\n/* */ }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return authenticator.getVolleyHttpHeaders();\n }",
"public HttpResponseHeaders getHeaders() {\n return mHeaders;\n }",
"public Map<String, List<String>> getHeaders() throws NullPointerException {\n if (headers != null) {\n return headers;\n }\n throw new NullPointerException(\"getHeaders must be called after asArray or asObject\");\n }",
"public Vector<YANG_Header> getHeaders() {\n\t\treturn headers;\n\t}",
"@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}",
"public Map<Integer, RequestLifecycleStatus> getRequestStatusMap() {\n return requestStatusMap;\n }",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"authorization\", apikey);\n\n\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headerMap = new HashMap<String, String>();\n headerMap.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\n }",
"public static HeaderHolder getRequestHeaderHolder() {\n return requestHeaderHolder;\n }",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n //params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n params.put(\"Authorization\", appUtil.getPrefrence(\"token_type\")+\" \"+appUtil.getPrefrence(\"access_token\"));\n return params;\n }",
"@Override\n\t\t\tpublic Map<String, String> getHeaders() throws AuthFailureError {\n\t\t\t\tHashMap<String, String> headers = new HashMap<String, String>();\n\t\t\t\theaders.put(\"Content-Type\", \"application/json;charset=UTF-8\");\n\t\t\t\treturn headers;\n\t\t\t}",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }",
"public interface HttpRequest {\n\n /**\n * Gets the HTTP request {@link URL}.\n */\n URL getUrl();\n\n /**\n * Gets the HTTP request method.\n */\n String getMethod();\n\n /**\n * Gets an immutable map containing the request headers and their values.\n */\n Map<String, List<String>> getHeaders();\n\n /**\n * Gets the header's value.\n *\n * @param name Header name for which to retrieve the value.\n *\n * @return The header's value, which might also be {@code null} if not set.\n */\n String getHeader(String name);\n\n /**\n * Sets an HTTP header or overwrites an existing HTTP header with new value.\n * <p>\n * Trying to set an HTTP header with null name will return immediately.\n * Trying to set one of the following restricted headers will also return immediately.\n * </p>\n * <ul>\n * <li>{@code Access-Control-Request-Headers}</li>\n * <li>{@code Access-Control-Request-Method}</li>\n * <li>{@code Connection}</li>\n * <li>{@code Content-Length}</li>\n * <li>{@code Content-Transfer-Encoding}</li>\n * <li>{@code Host}</li>\n * <li>{@code Keep-Alive}</li>\n * <li>{@code Origin}</li>\n * <li>{@code Trailer}</li>\n * <li>{@code Transfer-Encoding}</li>\n * <li>{@code Upgrade}</li>\n * <li>{@code Via}</li>\n * </ul>\n *\n * @param name The header's name, which must not be {@code null} or any of the restricted headers.\n * @param value The header's value\n */\n void setHeader(String name, String value);\n}",
"private static Map<Short, String> getHeaderValuesMap(Document reportDocument) {\n Map<Short, String> headerValues = new HashMap<Short, String>();\n Element reportElement = reportDocument.getDocumentElement();\n NodeList thElements = reportElement.getElementsByTagName(\"th\");\n // assumes only one header row\n for (int i = 0; i < thElements.getLength(); i++) {\n headerValues.put((short) i, thElements.item(i).getTextContent());\n }\n return headerValues;\n }",
"private Map<String, String> getReportMap(final Map<String, String> request) {\r\n\t\tMap<String, String> reportMap;\r\n\t\treportMap = new LinkedHashMap<String, String>();\r\n\t\treportMap.put(CommonConstants.KEYWORD,\r\n\t\t\t\trequest.get(RequestAttributeConstant.QUERY_SEARCH));\r\n\t\treportMap.put(DomainConstants.REFINEMENT_ID,\r\n\t\t\t\trequest.get(RequestAttributeConstant.REFINEMENT_ID));\r\n\t\treportMap.put(DomainConstants.LIMIT,\r\n\t\t\t\trequest.get(RequestAttributeConstant.LIMIT));\r\n\t\treportMap.put(DomainConstants.OFFSET,\r\n\t\t\t\trequest.get(RequestAttributeConstant.OFFSET));\r\n\t\treturn reportMap;\r\n\t}",
"public Header[] getResponseHeaders() {\n return getResponseHeaderGroup().getAllHeaders();\n }",
"public Map<String, String> createHeadersFromString(String headersAndValues) {\n\n if (headersAndValues == null || headersAndValues.isEmpty()) return Collections.emptyMap();\n\n final StringTokenizer token = new StringTokenizer(headersAndValues, \"@\");\n\n final Map<String, String> theHeaders = new HashMap<String, String>(token.countTokens());\n\n while (token.hasMoreTokens()) {\n final String headerAndValue = token.nextToken();\n if (!headerAndValue.contains(\":\"))\n throw new IllegalArgumentException(\n \"Request headers wrongly configured, missing separator :\" + headersAndValues);\n\n final String header = headerAndValue.substring(0, headerAndValue.indexOf(\":\"));\n final String value =\n headerAndValue.substring(headerAndValue.indexOf(\":\") + 1, headerAndValue.length());\n theHeaders.put(header, value);\n }\n\n return theHeaders;\n\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> keys = new HashMap<String, String>();\n keys.put(\"token\", TOKEN);\n return keys;\n }",
"public List<Map<String, Map<String, Object>>> getHeader(){\n return headerDescription;\n }",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }",
"public List<String> getHeaders() {\n try {\n return load().getHeaderNames();\n } catch (IOException ex) {\n Logger.getLogger(IntelligentSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return Collections.EMPTY_LIST;\n }",
"public static HashMap<String, String> getHeaderDetails(){\n\t\tHashMap<String, String> data = new HashMap<>();\n\n\t\tHeaderDataDAO headerDao = DaoFactory.getHeaderDataDAO();\n\t\tHeaderData headerData = headerDao.getAllRecords().get(0);\n\t\t\n\t\tif(headerData != null){\n\t\t\tdata.put(AppConstants.G_LUID, headerData.getLuid());\n\t\t\tdata.put(AppConstants.G_OFFICE_CODE, headerData.getOfficeCode());\n\t\t\tdata.put(AppConstants.G_USER_ID, headerData.getUserId());\n\t\t\tdata.put(AppConstants.C_LOG_DATE, StringUtils.leftPad(headerData.getLogDate(), 6, \"0\"));\n\t\t\tdata.put(AppConstants.G_LOG_TIME, StringUtils.leftPad(headerData.getLogTime(), 6, \"0\"));\n\t\t\tdata.put(AppConstants.G_TRAN_FI, headerData.getTranFi());\n\t\t}\n\n\t\treturn data;\n\t}",
"public Map<String, Object> getInfoMap() {\n\t\tMap<String, Object> paramMap = new HashMap<String, Object>();\n\t\tthis.putInMap(paramMap);\n\t\treturn paramMap;\n\t}",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n // params.put(\"Content-Type\", \"application/json; charset=UTF-8\");\n params.put(\"authorization\", token);\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headerMap = new HashMap<String, String>();\n headerMap.put(\"Content-Type\", \"application/json\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headerMap = new HashMap<String, String>();\n headerMap.put(\"Content-Type\", \"application/json\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\n }",
"List<Header> headers();",
"public Map<String, Object> getInfoMap()\n {\n Map<String, Object> paramMap = new HashMap<String, Object>();\n this.putInMap(paramMap);\n return paramMap;\n }",
"public List<String> getRequestHeadersToRemoveList() {\n return requestHeadersToRemove;\n }",
"public List<String> getRequestHeadersToRemoveList() {\n return requestHeadersToRemove;\n }",
"PyDictionary buildRequestTuple(HttpServletRequest req) {\n PyDictionary ret = new PyDictionary();\n ret.putAll(req.getParameterMap());\n return ret;\n }",
"public static Map<String, String> getHeaderParameters(String headerContent) {\n\t\tif (headerContent == null)\n\t\t\treturn null;\n\t\tfinal String[] params = StringUtils.split(headerContent, ';');\n\t\tif (params == null || params.length == 0)\n\t\t\treturn null;\n\t\tfinal Map<String, String> nameValues = new LinkedHashMap<>();\n\t\tfor (String param : params) {\n\t\t\tif (param == null)\n\t\t\t\tcontinue;\n\t\t\tString[] nameValue = StringUtils.split(param, \"=\");\n\t\t\tif (nameValue == null || nameValue.length != 2)\n\t\t\t\tcontinue;\n\t\t\tString value = nameValue[1].trim();\n\t\t\tif (value.startsWith(\"\\\"\") && value.endsWith(\"\\\"\"))\n\t\t\t\tvalue = value.substring(1, value.length() - 1);\n\t\t\tnameValues.put(nameValue[0].trim().toLowerCase(), value);\n\t\t}\n\t\treturn nameValues;\n\t}",
"private Map<String, String> getParameters(HttpServletRequest request) {\n Map<String, String> params = new HashMap<>();\n for (Map.Entry<String, String[]> entry : request.getParameterMap().entrySet()) {\n String paramName = entry.getKey();\n if (!Arrays.asList(NOT_PARAM_FIELDS).contains(paramName)) {\n String paramValue = null != entry.getValue() ? String.join(Constants.COMMA, entry.getValue()) : Constants.EMPTY_STRING;\n params.put(paramName, paramValue);\n }\n }\n return params;\n }"
]
| [
"0.82624054",
"0.78526145",
"0.78103787",
"0.7796311",
"0.7709923",
"0.76288927",
"0.7596782",
"0.73609644",
"0.7271843",
"0.7197566",
"0.7121264",
"0.7107575",
"0.69625187",
"0.691864",
"0.6911859",
"0.691014",
"0.6862452",
"0.685427",
"0.6842114",
"0.6839521",
"0.6725024",
"0.67154956",
"0.65486073",
"0.65486073",
"0.65232664",
"0.65215105",
"0.6488151",
"0.64800894",
"0.6474352",
"0.6453521",
"0.6450997",
"0.64112824",
"0.6378995",
"0.63540536",
"0.6347916",
"0.63111335",
"0.62427074",
"0.6114685",
"0.6061778",
"0.6052726",
"0.6049028",
"0.6034408",
"0.60274553",
"0.6018439",
"0.59723693",
"0.5970496",
"0.5923549",
"0.5922804",
"0.58931786",
"0.58863866",
"0.5841882",
"0.5841882",
"0.5841882",
"0.5829093",
"0.58213747",
"0.5817667",
"0.5803345",
"0.5796952",
"0.5786729",
"0.5779905",
"0.5772634",
"0.57710314",
"0.5768612",
"0.57621354",
"0.5753498",
"0.5747998",
"0.5743987",
"0.57188135",
"0.57188135",
"0.57188135",
"0.57188135",
"0.57188135",
"0.57188135",
"0.57188135",
"0.57188135",
"0.57188135",
"0.57188135",
"0.57188135",
"0.57096815",
"0.56856805",
"0.5664321",
"0.56586957",
"0.56567997",
"0.5642281",
"0.5619817",
"0.5612569",
"0.5612569",
"0.5593737",
"0.5578957",
"0.5578773",
"0.5576984",
"0.5554462",
"0.5554462",
"0.55532944",
"0.5550913",
"0.5523483",
"0.5523292",
"0.55220574",
"0.55031717",
"0.5493125"
]
| 0.74183846 | 7 |
/ this driver are avaliable at it is also included in the zip package. to compile this program you have to download and add it your buildpath. If everything fails and executable are available at | public static void main(String[] argv) throws SQLException {
try {
Class.forName("org.postgresql.Driver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
return;
}
/*
* Establishing connection
*/
try {
dbconn = DriverManager.getConnection(
"jdbc:postgresql://178.63.131.184:5432/dbwa2", "dbwa2",
"diku2012");
} catch (SQLException e) {
System.out
.println("Your internet connection or my server is dead.. :(");
return;
}
/*
* If connection were successfully established, then run
* printCategoryTable(); and afterwards close the connection.
*/
if (dbconn != null) {
System.out
.println("Fetching and formating data, please wait a few seconds!!\n\n");
printCategoryTable();
dbconn.close();
} else {
System.out.println("Failed to make connection!");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) throws IOException {\n\t\tFileChannel fc = FileChannel.open(Paths.get(\"F:/eclipse-jee-luna-SR2-win32-x86_64.zip\"), StandardOpenOption.READ);\r\n\t\tFileChannel w = FileChannel.open(Paths.get(\"F:/mobansdfd.zip\"), EnumSet.of(StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE));\r\n\t\tSelector s = Selector.open();\r\n\t\tByteBuffer b = ByteBuffer.allocate(1024);\r\n\t\twhile(fc.read(b) != -1) {\r\n\t\t\tw.write(b);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tDriver driveClass = new Driver();\r\n\t\tdriveClass.runDriver();\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\tDriver driver = new Driver();\n\t\t\tdriver.init();\n\t\t\tdriver.run();\n\t}",
"public void testMain() {\n System.out.println(\"main\");\n String[] args = new String[]{\n \n \"-out\", \"ausgabe.jar\",\n \"-mc\", \"inteco.Saukopf\",\n// \"-m manifest.mf \" \n// \"-v\",\n \"-l\",\n \"-lib\", \"CustJar.jar\", \"./asm.jar\", \"D:\\\\Development\\\\Java\\\\Componenten\\\\Hibernate\\\\hibernate-3.0.2\\\\hibernate-3.0\\\\lib\"\n // -mainclass\n };\n CustJar.main(args);\n\n \n }",
"public static void main(String[] args) {\n\t\tString targetURL = \"http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe\";\n\n\t\ttry {\n\t\t\tURL url = new URL(targetURL);\n\t\t} catch (Exception ex) {\n\n\t\t}\n\t}",
"public static void main(String args[])\r\n\t{\r\n\t\tToolStarter.startSwingTool(EV3SDCard.class, args);\r\n\t}",
"public static void main(String[] args) throws Exception {\n printClassPath();\n int res = ToolRunner.run(new SessionBinning(), args);\n System.exit(res);\n }",
"public static void main(String[] args) {\n\t\tClass cls = AbsolutePath.class; // These api are coming from java framework\n\t\tClassLoader loader = cls.getClassLoader();\n\t\tURL url = loader.getResource(\"./chromedriver.exe\"); // \". \" represents current working directory \n System.out.println(url.toString()); //chromeedriver gets automatically copied from source to target\n\t}",
"public static void main(String[] args) throws Exception {\n String path = \"D:\\\\下载\\\\openjdk-8u41-src-b04-14_jan_2020.zip\";\n// ioCopy(path);\n nioCopyTest1(path);\n// nioCopyTest2(path);\n// nioCopy3(path);\n }",
"public static void main(String [] args) throws Exception{\n\tint Systemexit= ToolRunner.run(new DriverIndianAirport(), args);\r\n\tSystem.exit(Systemexit);\r\n}",
"public static void main(String[] args) {\n\t\textractedMain(JarFolders.SRC_FOLDER);\r\n\t}",
"public static void main(String[] args) {\n\t\tDriver driver = new BenzDriver();\r\n\t\tCar car = driver.driverCar();\r\n\t\tcar.driver();\r\n\t}",
"public static void main(String[] args) {\n OraConnectionUsingNativeAPI();\n OracleJDBCDriverInfo();\n }",
"public void runProgram(Path p) {\n\t\ttry {\n\t\t\tFile f = new File(p.toString());\n\t\t\tString dir = f.getParent();\n\t\t\tString filename = f.getName();\n\t\t\tString currentOS = System.getProperty(\"os.name\").toLowerCase();\n\n\t\t\t//System.out.println(\"OS: \" + currentOS);\n\t\t\t\n\t\t\tif (currentOS.indexOf(\"win\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")).concat(\".exe\"));\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Compiled File: \" + compiled);\n\n\t\t\t\tif (this.programIfExists(compiled)) {\n\t\t\t\t\tSystem.out.println(\"Finished Compiling\");\n\t\t\t\t\tProcessBuilder pb = new ProcessBuilder(\"cmd\", \"/k\", \"start\", compiled);\n\t\t\t\t\tProcess proc = pb.start();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Some compilation error occured\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if(currentOS.indexOf(\"mac\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")).concat(\".out\"));\n\t\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t\tProcess proc = rt.exec(compiled);\n\t\t\t}\n\n\t\t\telse if(currentOS.indexOf(\"nix\") >= 0 || currentOS.indexOf(\"nux\") >= 0) {\n\t\t\t\tString compiled = dir.concat(\"\\\\\").concat(filename.substring(0, f.getName().lastIndexOf(\".\")));\n\t\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t\tProcess proc = rt.exec(compiled);\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception ex) {\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}",
"private static void compileAndRun(String fileName, String code) {\n\n if(verboseCompiling) println(\"Deleting old temp files...\", warning);\n new File(fileName + \".java\").delete();\n new File(fileName + \".class\").delete();\n\n if(verboseCompiling) println(\"Creating source file...\", progErr);\n file = new File(fileName + \".java\");\n\n if(verboseCompiling) println(\"Writing code to source file...\", progErr);\n try {\n new FileWriter(file).append(code).close();\n } catch (IOException i) {\n println(\"Had an IO Exception when trying to write the code. Stack trace:\", error);\n i.printStackTrace();\n return; //Exit on error\n }\n\n if(verboseCompiling) println(\"Compiling code...\", progErr);\n //This should only ever be called if the JDK isn't installed. How you'd get here, I don't know.\n if (compiler == null) {\n println(\"Fatal Error: JDK not installed. Go to java.sun.com and install.\", error);\n return;\n }\n\n //Tries to compile. Success code is 0, so if something goes wrong, report.\n int result = -1;\n if (compileOptions.trim().equals(\"\"))\n result = compiler.run(null, out, err, file.getAbsolutePath());\n else\n //result = compiler.run(null, out, err, compileOptions, file.getAbsolutePath());\n result = compiler.run(null, out, err, \"-cp\", \"/Users/student/Desktop/bluecove-2.1.0.jar\", file.getAbsolutePath());\n //ArrayList<String> files = new ArrayList<>();\n //files.add(fileName);\n //boolean result = compiler.getTask(null, null, new ErrorReporter(), null, files, null).call();\n if (result != 0) {\n displayLog();\n //println(\"end record\", error); //End recording and pull out the message\n\n //println(\"Error type: \" + result,error);\n println(\"Failed to compile.\", warning);\n return; //Return on error\n }\n\n if(verboseCompiling) println(\"Attempting to run code...\", progErr);\n try {\n //Makes sure the JVM resets if it's already running.\n if(JVMrunning) \n kill();\n\n //Clears terminal window on main method call.\n if(clearOnMethod)\n outputText.setText(\"\");\n\n //Some String constants for java path and OS-specific separators.\n String separator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"java.home\")\n + separator + \"bin\" + separator + \"java\";\n\n //Creates a new process that executes the source file.\n ProcessBuilder builder = null;\n if(runOptions.trim().equals(\"\")) \n builder = new ProcessBuilder(path, fileName);\n else \n builder = new ProcessBuilder(path, runOptions, fileName);\n\n //Everything should be good now. Everything past this is on you. Don't mess it up.\n println(\"Build succeeded on \" + java.util.Calendar.getInstance().getTime().toString(), progErr);\n println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\", progErr); \n\n //Tries to run compiled code.\n JVM = builder.start();\n JVMrunning = true;\n\n //Links runtime out/err to our terminal window. No support for input yet.\n Reader errorReader = new InputStreamReader(JVM.getErrorStream());\n Reader outReader = new InputStreamReader(JVM.getInputStream());\n //Writer inReader = new OutputStreamWriter(JVM.getOutputStream());\n\n redirectErr = redirectIOStream(errorReader, err);\n redirectOut = redirectIOStream(outReader, out);\n //redirectIn = redirectIOStream(null, inReader);\n } catch (IOException e) {\n //JVM = builder.start() can throw this.\n println(\"IOException when running the JVM.\", progErr);\n e.printStackTrace();\n displayLog();\n return;\n }\n }",
"public static void main(String[] args) {\n\t\tgetJredispool();\n\t}",
"public static void main(String[] args) {\n /* location of the driver executable\n For windows, navigate to file location, right click and click Properties. Grab the location value, add the filename at the end\n For MAC, navigate to file location, right click and click Get Info. Grab the location value, add the filename at the end\n */\n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\IJProjs\\\\NAAutoBoot\\\\chromedriver.exe\");\n\n System.out.println(\"driver location is:\"+System.getProperty(\"webdriver.chrome.driver\"));\n\n WebDriver driver1 = new ChromeDriver();\n\n driver1.get(\"https://www.bankofamerica.com/\");\n\n }",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"static public void main(String args[]) throws RemoteException, MalformedURLException{\n\t}",
"public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }",
"private void makeBinariesExecutable() throws IOException {\n\t\tif (!isWindows()) {\n\t\t\tBundle bundle = Platform.getBundle(Activator.PLUGIN_ID);\n\t\t\tFile binDir = new File(FileLocator.toFileURL(FileLocator.find(bundle, new Path(\"bin\"), null)).getPath());\n\t\t\tnew File(binDir, \"align-it\").setExecutable(true);\n\t\t\tnew File(binDir, \"filter-it\").setExecutable(true);\n\t\t\tnew File(binDir, \"strip-it\").setExecutable(true);\n\t\t\tnew File(binDir, \"shape-it\").setExecutable(true);\n\t\t}\n\t}",
"public static void main(String []args){\n\n }",
"private void m9e() {\n String str;\n ApplicationInfo applicationInfo = getApplicationInfo();\n String str2 = applicationInfo.dataDir + \"/tx_shell\";\n f1b = applicationInfo.sourceDir;\n int i = VERSION.SDK_INT;\n Object obj = null;\n if (i >= 19) {\n if (i > 19) {\n String[] strArr = Build.SUPPORTED_64_BIT_ABIS;\n if (strArr != null && strArr.length > 1) {\n obj = 1;\n }\n } else if (new File(\"/system/lib64\").exists()) {\n obj = 1;\n }\n }\n String str3 = null;\n if (VERSION.SDK_INT < 21) {\n str3 = Build.CPU_ABI;\n }\n if ((str3 == null || str3.length() < 2) && VERSION.SDK_INT >= 21) {\n str3 = Build.SUPPORTED_ABIS[0];\n }\n Object obj2 = 1;\n if (str3.toLowerCase(Locale.US).contains(\"x86\")) {\n obj2 = null;\n } else if (VERSION.SDK_INT >= 21) {\n String[] strArr2 = Build.SUPPORTED_ABIS;\n if (strArr2 != null) {\n for (String str4 : strArr2) {\n if (str4.toLowerCase(Locale.US).contains(\"x86\")) {\n obj2 = null;\n }\n }\n }\n }\n Object obj3 = null;\n if (str3.toLowerCase(Locale.US).contains(\"mips\")) {\n obj3 = 1;\n }\n String str5 = VERSION.SDK_INT > 8 ? applicationInfo.nativeLibraryDir : \"/data/data/\" + mPKName + \"/lib\";\n String str6 = \"\";\n String str7 = \"\";\n String str8 = \"\";\n str8 = \"\";\n if (obj2 != null) {\n str4 = m10f() + \"-\" + m5c();\n } else {\n str4 = \"shellx-\" + m5c();\n str8 = m10f() + \"-\" + m5c();\n }\n str6 = str6 + \"lib\" + str4 + \".so\";\n str8 = str7 + \"lib\" + str8 + \".so\";\n File file = new File(str5 + \"/\" + str6);\n File file2 = new File(str2 + \"/\" + str8);\n if (obj2 == null && VERSION.SDK_INT < 19) {\n if (!file2.exists()) {\n if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str8) == 0) {\n if (ZipUtil.extract(f1b, \"lib/armeabi/\" + str8, str2 + \"/\" + str8) == 0) {\n }\n } else if (ZipUtil.extract(f1b, \"lib/armeabi-v7a/\" + str8, str2 + \"/\" + str8) == 0) {\n }\n }\n try {\n Runtime.getRuntime().exec(\"chmod 700 \" + str2 + \"/\" + str8);\n System.load(str2 + \"/\" + str8);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (file.exists()) {\n System.loadLibrary(str4);\n } else {\n str5 = \"\";\n str4 = str2 + \"/\" + str6;\n if (ZipUtil.exist(f1b, \"lib/\" + str3 + \"/\" + str6) == 0) {\n str5 = \"lib/\" + str3 + \"/\" + str6;\n } else if (obj != null) {\n if (obj2 == null) {\n if (VERSION.SDK_INT >= 21) {\n String[] strArr3 = Build.SUPPORTED_ABIS;\n r0 = \"\";\n if (strArr3 != null) {\n int i2 = 0;\n while (i2 < strArr3.length) {\n if (ZipUtil.exist(f1b, \"lib/\" + strArr3[i2].toLowerCase(Locale.US) + \"/\" + str8) == 0 || ZipUtil.exist(f1b, \"lib/\" + strArr3[i2].toLowerCase(Locale.US) + \"/\" + str6) == 0) {\n str3 = strArr3[i2].toLowerCase(Locale.US);\n obj = 1;\n if (ZipUtil.exist(f1b, \"lib/x86_64/\" + str6) == 0) {\n str3 = \"lib/x86_64/\" + str6;\n } else {\n if (str3.compareTo(\"arm64-v8a\") == 0) {\n if (ZipUtil.exist(f1b, \"lib/arm64-v8a/\" + str6) == 0) {\n str3 = \"lib/arm64-v8a/\" + str6;\n }\n } else if (str3.compareTo(\"x86\") == 0) {\n if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str3 = \"lib/x86/\" + str6;\n }\n } else if (str3.compareTo(\"armeabi-v7a\") == 0 || str3.compareTo(\"armeabi\") == 0) {\n if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str3 = \"lib/x86/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str3 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str3 = \"lib/armeabi-v7a/\" + str6;\n }\n }\n str3 = str5;\n }\n if (VERSION.SDK_INT < 21 || r0 == null) {\n if (ZipUtil.exist(f1b, \"lib/x86_64/\" + str6) == 0) {\n str3 = \"lib/x86_64/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/arm64-v8a/\" + str6) == 0) {\n str3 = \"lib/arm64-v8a/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str3 = \"lib/x86/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str3 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str3 = \"lib/armeabi-v7a/\" + str6;\n }\n }\n str5 = str3;\n } else {\n i2++;\n }\n }\n }\n }\n obj = null;\n str3 = str5;\n if (ZipUtil.exist(f1b, \"lib/x86_64/\" + str6) == 0) {\n str3 = \"lib/x86_64/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/arm64-v8a/\" + str6) == 0) {\n str3 = \"lib/arm64-v8a/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str3 = \"lib/x86/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str3 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str3 = \"lib/armeabi-v7a/\" + str6;\n }\n str5 = str3;\n } else if (ZipUtil.exist(f1b, \"lib/arm64-v8a/\" + str6) == 0) {\n str5 = \"lib/arm64-v8a/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str5 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str5 = \"lib/armeabi-v7a/\" + str6;\n }\n } else if (obj2 != null) {\n Object obj4;\n if (obj3 == null || ZipUtil.exist(f1b, \"lib/mips/\" + str6) != 0) {\n obj4 = null;\n r0 = str5;\n } else {\n obj4 = 1;\n r0 = \"lib/mips/\" + str6;\n }\n if (obj4 == null) {\n if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n r0 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n r0 = \"lib/armeabi-v7a/\" + str6;\n }\n }\n str5 = r0;\n } else if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str5 = \"lib/x86/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str5 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str5 = \"lib/armeabi-v7a/\" + str6;\n }\n if (ZipUtil.extract(f1b, str5, str4) == 0) {\n try {\n Runtime.getRuntime().exec(\"chmod 700 \" + str4);\n System.load(str4);\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n }\n }",
"public void testGetDriver1() throws TelosysToolsException {\n\t\tgetDriverFromFile( TestsEnv.getTestFileAbsolutePath(\"/myfolder1/derbyclient.jar\") );\r\n\t}",
"public static void main (String []args){\n }",
"public static void main(String[] args) throws Exception{\r\n\t\t\r\n\t\tString line;\r\n\t\t//Scanner scan = new Scanner(System.in);\r\n\r\n\t\tProcess process = Runtime.getRuntime ().exec(\"cmd.exe /c mvn clean install com.jaxio.celerio:bootstrap-maven-plugin:bootstrap\",null,\r\n\t\t\t\tnew File(\"C:\\\\AutoCodeGeneration\\\\ivu.apie.database\\\\ivu.apie.database\"));\r\n\t\tOutputStream stdin = process.getOutputStream ();\r\n\t\tInputStream stderr = process.getErrorStream ();\r\n\t\tInputStream stdout = process.getInputStream ();\r\n\r\n\t\tBufferedReader reader = new BufferedReader (new InputStreamReader(stdout));\r\n\t\tBufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin));\r\n\r\n\t\tString input = \"2\";//scan.nextLine();\r\n\t\tinput += \"\\n\";\r\n\t\twriter.write(input);\r\n\t\twriter.flush();\r\n\r\n\t\tinput = \"4\";\r\n\t\tinput += \"\\n\";\r\n\t\twriter.write(input);\r\n\t\twriter.flush();\r\n\r\n\t\t/*\r\n\t\t * while ((line = reader.readLine ()) != null) { System.out.println (\"Stdout: \"\r\n\t\t * + line); }\r\n\t\t */\r\n\r\n\t\tinput = \"auto\";\r\n\t\t//input = \"vvvvvv\";\r\n\t\tinput += \"\\n\";\r\n\t\twriter.write(input);\r\n\t\twriter.flush();\r\n\t\t\r\n\t\tinput = \"com.jaxio.auto\";\r\n\t\t//input = \"package_name\";\r\n\t\tinput += \"\\n\";\r\n\t\twriter.write(input);\r\n\t\twriter.close();\r\n\r\n\t\twhile ((line = reader.readLine ()) != null) {\r\n\t\tSystem.out.println (\"Stdout: \" + line);\r\n\t\t}\r\n\t}",
"public static void main(String[] args)\n\t{\n\t\t//start the driver\n\t\tGUIDriver guiDriver = new GUIDriver();\n\t}",
"public static void main(String[] args) {\n\t\tmappingLibs.put(\"java.\", \"./lib/rt8.jar\");\n\t\tmappingLibs.put(\"org.apache.commons.codec.\", \"./lib/org.apache.commons.codec-1.9.0.jar\");\n\t\tmappingLibs.put(\"javax.crypto.\", \"./lib/javax-crypto.jar\");\n//\t\tallLibs = new ArrayList<String>(Arrays.asList(\"./lib/rt8.jar\", \"./lib/org.apache.commons.codec-1.9.0.jar\",\n//\t\t\t\t\"./lib/javax-crypto.jar\", \"./lib/symail.jar\", \"./lib/greenmail-standalone-1.5.8.jar\",\n//\t\t\t\t\"./lib/javax.mail.jar\", \"./lib/simple-java-mail-5.0.3.jar\", \"./lib/emailaddress-rfc2822-1.1.0.jar\"));\n\t\tallLibs = new ArrayList<String>(Arrays.asList(\"./lib/rt8.jar\", \"./lib/org.apache.commons.codec-1.9.0.jar\",\n\t\t\t\t\"./lib/javax-crypto.jar\", \"./lib/symail.jar\"));\n\t\tServerRunner.run(HttpServer.class);\n\t}",
"public static void main(String[] args) throws IOException {\n \n arg = new Arguments(args);\n \n execute(Paths.get(arg.getSourceDir()), \n getLibraryFiles(Paths.get(arg.getLibraryDir())));\n }",
"public static void main(String args[]) { We must set the RMI security manager to allow downloading of code\n // which, in this case, is the Blitz proxy amongst other things\n //\n try {\n// if (System.getSecurityManager() == null)\n// System.setSecurityManager(new RMISecurityManager());\n\n new Writer().exec();\n } catch (Exception anE) {\n System.err.println(\"Whoops\");\n anE.printStackTrace(System.err);\n }\n }",
"public static void main(String []args){\n }",
"public static void main(String []args){\n }",
"public void run(){\n\t\tGlobal.printer.print(\"\\ngetting resource from \"+apkName+\" ... \");\n\t\tString cmd = \"java -jar \\\"\"+this.apktoolPath+\"\\\" d \\\"\"+this.filePath+\"\\\" -f -o \\\"\"+ this.apkPath+\"\\\"\";\n\t\t//Global.copyDir(this.tmpResPath, this.apkPath);\n\t\ttry {\n\t\t\tGlobal.sysCmd(cmd );//,Global.printer);\n\t\t\tGlobal.printer.print(\"succeed!!\");\n\t\t} catch (Exception e) {\n\t\t\tGlobal.printer.print(\"error!!\");\n\t\t\t//Global.printer.print(e.getMessage());\n\t\t}\n\t}",
"public static void main(String[] args) throws MalformedURLException {\n\t\tFile src = new File(\"src\");\r\n\t\tFile appsrc = new File(src,\"ApiDemos-debug.apk\");\r\n\t\t\r\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\r\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Device\");\r\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.ANDROID);\r\n\t\tcap.setCapability(MobileCapabilityType.APP, appsrc.getAbsolutePath());\r\n\t\t\r\n\t\tAndroidDriver driver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"),cap);\r\n\t\t\r\n\t}",
"public static void main(String[]args) {\n\t}",
"public static void main(String[] args) {\r\n verificarArchivos();\r\n launch(args);\r\n }",
"public static void main (String[]args) throws IOException {\n }",
"public static void main(String args[])\n {\n new HardwareDeviceRental();\n }",
"public static void main(String[] args) throws IOException {\n\n _project _sc = _project.of();\n //reads from a maven-central jar file\n _downloadArchiveConsumer.of(\"https://search.maven.org/remotecontent?filepath=com/github/javaparser/javaparser-core/3.15.18/javaparser-core-3.15.18-sources.jar\",\n (ZipEntry ze, InputStream is)-> {\n if( ze.getName().endsWith(\".java\")){\n _sc.add( _codeUnit.of(is) );\n }\n });\n System.out.println( _sc.size() );\n\n _project _src = _githubProject.of(\"https://github.com/edefazio/bincat\").load();\n //_sources _src = _sources.of();\n //_downloadArchive _da = _downloadArchive.of(url, (ZipEntry ze,InputStream is)-> {\n // if( ze.getName().endsWith(\".java\")){\n // _src.add( _codeUnit.of(is) );\n // }\n //});\n /*\n try( InputStream inputStream = url.openStream();\n ZipInputStream zis = new ZipInputStream(inputStream) ) {\n\n byte[] buffer = new byte[2048];\n\n while (zis.available() > 0) {\n ZipEntry ze = zis.getNextEntry();\n System.out.println(\"reading \" + ze.getName());\n\n if( ze.isDirectory() ){\n ze.\n } else if( ze.)\n\n if (!ze.isDirectory() && ze.getName().endsWith(\".java\")) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n int len;\n while ((len = zis.read(buffer)) > 0) {\n baos.write(buffer, 0, len);\n }\n try {\n System.out.println(\"adding\" + ze.getName());\n _src.add(_codeUnit.of(baos.toString()));\n } catch (Exception e) {\n throw new _ioException(\"could not read from entry \" + ze.getName());\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n */\n\n System.out.println( \"finished reading \"+ _src.size());\n }",
"public static void main(String[] src) throws UnsupportedEncodingException {\n List<String> cmd = new ArrayList<>();\n cmd.add(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n cmd.add(\"-no-remote\");\n cmd.add(\"-P\");\n cmd.add(\"aesha2\");\n// cmd.add(\"\\\"fileName\\\"\");\n ProcessBuilder builder = new ProcessBuilder().command(cmd);\n Process process = null;\n int exitCode=-1;\n\n try {\n process = builder.start();\n final Process finalProcess = process;\n Thread t=new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(10000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n finalProcess.destroy();\n }\n });\n t.start();\n exitCode = process.waitFor();\n } catch (InterruptedException e) {\n String ed=new String(e.getMessage());\n System.out.println(ed);\n } catch (IOException e) {\n String ed=new String(e.getMessage());\n System.out.println(ed);\n }\n process.destroy();\n System.out.println(exitCode);\n }",
"public static void main(String[] args) {\n\t\tString driverPath = System.getProperty(\"user.dir\")+\"\\\\src\\\\drivers\\\\chromedriver.exe\";\n\t\t////D:\\2021\\Batches_DATA\\SDET_0301\\LearnSelenium_03_01\\WebDriverBasics\n\t\t//System.out.println(\"path - \"+ driverPath);\n\t\t//D:\\2021\\Batches_DATA\\SDET_0301\\LearnSelenium_03_01\\WebDriverBasics\\src\\drivers\\chromedriver.exe\n\t\t//D:\\2021\\Batches_DATA\\SDET_0301\\LearnSelenium_03_01\\WebDriverBasics\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverPath);\n\t\t\n\t\tWebDriver chDriver = new ChromeDriver();//complex object\n\t\t//maximize\n\t\tchDriver.manage().window().maximize();\n\t\t\n\t\tchDriver.get(\"https://opensource-demo.orangehrmlive.com/\");\n\t\t\n\t\t//Webdriver -Interface, driver - ref var, CHromeDriver-class\n\t\t\n\t\t\n\t\t//Firefox Browser:\n//\t\tString ffDriverPath = System.getProperty(\"user.dir\")+\"\\\\src\\\\drivers\\\\geckodriver.exe\";\n//\t\tSystem.setProperty(\"webdriver.gecko.driver\", ffDriverPath);\n//\t\tWebDriver ffDriver = new FirefoxDriver();//complex object\n\t\t\n\t\t//get the current Url, title of application\n\t\t\n\t\t//chDriver.close();\n\t\t\n\n\t}",
"private static void help(){\r\n System.out.println(\"\\n\\t Something Went Wrong\\nType\\t java -jar nipunpassgen.jar -h\\t for mor info\");\r\n System.exit(0);\r\n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t }",
"public static void main(String[] args) \r\n\t{\n\t\tString path=\"browser_drivers\\\\chromedriver.exe\";\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", path);\r\n\t\tWebDriver driver=new ChromeDriver(); //Launch browser\r\n\t\tdriver.get(\"http://seleniumhq.org\"); //Load webpage\r\n\t\tdriver.manage().window().maximize(); //maximize browser window\r\n\t\t\r\n\t\t\r\n\t\tString Exp_url=\"https://www.seleniumhq.org/\";\r\n\t\t\r\n\t\t//Capture runtime url\r\n\t\tString Runtime_url=driver.getCurrentUrl();\r\n\t\t\t\t\r\n\t\tif(Runtime_url.equals(Exp_url))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Expected url presented for selenium homepage\");\r\n\t\t\t\r\n\t\t\tWebElement Download_tab=driver.findElement(By.xpath(\"//a[@title='Get Selenium']\"));\r\n\t\t\tDownload_tab.click();\r\n\t\t\t\r\n\t\t\tif(driver.getCurrentUrl().contains(\"download/\"))\r\n\t\t\t\tSystem.out.println(\"expected url presented, Downlaod page verified\");\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"expected url not presented, download page not verified\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Wrong url presnted for selenium hompage\");\r\n\t\t}\r\n\t\r\n\t}",
"public static void main(String[] args) {\n \r\n\t}",
"public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }",
"public static void main(String[] args) throws IOException, ClassNotFoundException {\n\r\n\t\tlaunch(args);\r\n\r\n\t}",
"public static void main(String[] args) {\n new SearchHotelDataServiceMySqlImpl_Driver().drive(new SearchHotelDataServiceMySqlImpl_Stub());\n\t}",
"public static void main(String[] args){\n System.out.println(\"Registered drivers: \");\n for (Enumeration<Driver> driverEnumeration = DriverManager.getDrivers(); driverEnumeration.hasMoreElements(); ) {\n System.out.println((driverEnumeration.nextElement().getClass().getName()));\n }\n\n try {\n conn = DriverManager.getConnection(url, user, password);\n Statement stmt = conn.createStatement();\n ResultSet resultSet = stmt.executeQuery(\"SELECT * FROM test_table\");\n System.out.println(resultSet);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }",
"void makeExecutable(Os os, Path binaryPath);",
"public static void main(String[] args) {\n\t\t\r\n\t\tString browser = \"ff\";\r\n\t\t\r\n\t\tif(browser.equalsIgnoreCase(\"chrome\"))\r\n\t\t{\r\n\t\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\tWebDriver dr = new ChromeDriver();\r\n\t\t}\r\n\t\r\n\t\t if(browser.equalsIgnoreCase(\"ff\"))\r\n\t\t{\r\n\t\t\tWebDriverManager.firefoxdriver().setup();\r\n\t\t\tWebDriver dr = new FirefoxDriver();\r\n\t\t}\r\n\t\t\r\n\t\t if(browser.equalsIgnoreCase(\"IE\"))\r\n\t\t{\r\n\t\t\tWebDriverManager.iedriver().setup();\r\n\t\t\tWebDriver dr = new InternetExplorerDriver();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args) throws Exception {\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\n try {\n LaunchEnvironment env = new LaunchEnvironment(args);\n (new ConnectedDevicesTopology(env)).setup();\n } catch (Exception e) {\n System.exit(handleLaunchException(e));\n }\n }",
"public static void main(String[] args) throws MalformedURLException {\n\t\tFile appDir = new File(\"src/test/java\");\n\t\tFile app = new File(appDir, \"com.google.android-2.3.apk\");\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t//capabilities.setCapability(\"browserName\", \"Chrome\");\n\n\t\t//capabilities.setCapability(\"device\",\"Android\");\n\t\tcapabilities.setCapability(\"deveiceName\",\"SimulatorGalaxy\" );\t\t\n\t\tcapabilities.setCapability(\"platformVersion\", \"5.0.1\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"app\",app.getAbsolutePath());\n\t\tcapabilities.setCapability(\"appPackage\",\"com.android.chrome\");\n\t\tcapabilities.setCapability(\"appActivity\",\"com.google.android.apps.chrome.\");\n\t\tdriver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\t\n\n\t\t/*driver.get(\"Url\");\n\t\tdriver.findElement(By.id(\"menu_projects\")).click();\n\t\tdriver.findElement(By.id(\"menu_about\")).click();\n\t\tdriver.findElement(By.id(\"menu_support\")).click();\n\t\tdriver.findElement(By.id(\"menu_documentation\")).click();\n\t\tdriver.findElement(By.id(\"menu_download\")).click();\n\n\t\tdriver.quit();*/\n\t}",
"static void main(String[] args) {\n }",
"static public void main(String[] args) {\n\t}",
"public static void main(String[] args) {\r\n// Use for unit testing\r\n }",
"public static void main(String[] args) {\t}",
"static void main(String[] args)\n {\n }",
"public static void main(String[] args) {\nString browser=\"ff\";\nif (browser.equals(\"chrome\")) {\n\tWebDriverManager.chromedriver().setup();\n\t// System.setProperty(\"webdriver.chrome.driver\", \"/Users/user/Downloads/chromedriver\");\n\tdriver=new ChromeDriver();\n}\nelse if (browser.equals(\"ff\")) {\n\tWebDriverManager.firefoxdriver().setup();\n\tdriver=new FirefoxDriver();\n}\nelse\n\tif (browser.equals(\"IE\")) {\n\t\tWebDriverManager.iedriver().setup();\n\t\tdriver=new InternetExplorerDriver();\n\t}\n\telse\n\t\tif (browser.equals(\"opera\")) {\n\t\t\tWebDriverManager.operadriver().setup();\n\t\t\tdriver=new OperaDriver();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"no defined driver\");\n\t\t}\n\n\ndriver.get(\"https://google.com\");\n\n\n\n\t\n\n\n\n\n\n\n\n\n\n\n\n\t}",
"public static void main() {\n\t\tElectionDriverCode EDC = new ElectionDriverCode();\n\t\tSystem.setOut(EDC.fileout());\n\t}",
"public static void main(String[] args) {\n\t\nSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\vishal mittal\\\\Downloads\\\\chromedriver_win32 (16)\\\\chromedriver.exe\");\n\t\t\n// 2 . creating a reference object for interface WebDriver and access the child class \n\t\t// ChromeDriver -- chromebrowser\n\t\n\t\t// we have to import this class and interface from selenium packages\n\t\t\n\t\tWebDriver driver = new ChromeDriver();\n\t\t\n// get() method : to open our application URL on the browser\n\t\t\n\t\tdriver.get(\"https://www.h2kinfosys.com/\");\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\r\n\t\tDesktop OS = new Desktop();\r\n\t\tOS.computerModel();\r\n\t\tOS. desktopSize();\r\n\t\tOS.hardwareResources();\r\n\t\tOS.softwareResources();\r\n\t}",
"public static void main(String[] args){\n\t\t\n\t\t\n \t}",
"public static void main(String[] args){\n\t\tMemory mem = getMemInfo();\r\n//\t\tfor(CPU cpu : cpus){\r\n//\t\t\tSystem.out.println(cpu.getName()+\",\"+cpu.getUsedRatio());\r\n//\t\t}\r\n//\t\tfor(Disk d : disks){\r\n//\t\t\tSystem.out.println(d.getName()+\",\"+d.getFreeSize());\r\n//\t\t}\r\n\t\tSystem.out.println(mem.getFreeSize());\r\n//\t\tSystem.out.println(System.getProperty(\"java.library.path\"));\r\n\t}",
"public static void main(String[] args) throws MalformedURLException {\n\t\t\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\tDriverManager.createDriver();\r\n\t\t\tJUnitCore.runClasses(TestPrimer.class);\r\n\t\t\t\r\n\t\t}finally{\r\n\t\t\tDriverManager.killDriver();\t\t\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tDriverPage frame = new DriverPage();\n\t\t\t\t\tframe.setVisible(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\t\n\t\t\n\t}",
"public static void main(String[] args) {\n new AvailableRoomDataServiceMySqlImpl_Driver().drive(new AvailableRoomDataServiceMySqlImpl_Stub());\n\t}",
"public static void main(String[] args) {\n PC pc = new PC();\n pc.setCPU(\"AMD R9\");\n pc.setDisk(\"sanxing\");\n pc.setMemory(1024);\n pc.setBrand(\"macbook\");\n pc.printInfo();\n }",
"public static void main(String[] args) {\n\t\t\t\t\n\t\tMain t = new Main();\n\t\t\n\t\tSystem.out.println(\" ---------------------------------------------------------------- \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tUniversidad Nacional del Centro de la Provincia de Buenos Aires \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \t\tCátedra : Diseño de Compiladores \");\n\t\tSystem.out.println(\" \t\tExtensión del compilador : incorporación del operador '++' a identificadores tipo long \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tProf: Mg. Ing. Marcela Ridado \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tSr: Marcelo Rodríguez -- [email protected]\");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" Uso : [1]path al programa [2] path al directorio del archivo assembler generado [3] directorio para guardar la salida \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" ---------------------------------------------------------------- \");\n\t\t\n\t\tif (args.length!=3){\n\t\t\tSystem.out.println(\" Error - Faltan argumentos \");\n\t\t\tSystem.out.println(\" Uso : [1]path al programa [2] path al directorio de archivos assembler [3] directorio para guardar la salida \");\n\t\t\t//return;\n\t\t}\n\t\t\n\t\tString programa=args[0];\n\t\tString asmDir=args[1];\n\t\tString outputDir=args[2];\n\t\t\n\t\t\t\t\n\t\tFile asm = new File(asmDir);\n\t\t\n\t\t\n\t\tif (!asm.exists()){\n\t\t\tboolean result=false;\n\t\t\ttry{\n \t\t \tasm.mkdir();\n \t\tresult = true;\n \t\t\t} \n\t\t\t catch(SecurityException se){\n\t\t\t //handle it\n\t\t\t } \n\t\t\t if(result) { \n\t\t\t System.out.println(\"Directorio para archivos assembler creado.\"); \n\t\t\t }\n\t\t\t}\n\t\t\n\t\tFile output=new File(outputDir);\n\t\t\n\t\tif (!output.exists()){\n\t\t\tboolean result=false;\n\t\t\ttry{\n \t\t \toutput.mkdir();\n \t\tresult = true;\n \t\t\t} \n\t\t\t catch(SecurityException se){\n\t\t\t //handle it\n\t\t\t } \n\t\t\t if(result) { \n\t\t\t System.out.println(\"Directorio para archivos de salida creado\"); \n\t\t\t }\n\t\t\t}\n\t\t\n\t\t\n\t\tFile file = null;\n\t\t\n\t\t\n\t\tfile = new File(programa);\n\n\t\tif (!file.exists()){\n\t\t\tSystem.out.println(\" No hay programa para compilar .\");\n\t\t\treturn;\n\t\t}\n\t\t\n\n\t\t\n\t\tt.setUp(file,asmDir,outputDir);\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tOSFactory osFactory = new OSFactory();\n\t\tOS os = osFactory.getOs(\"windows\");\n\t\tos.spec();\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n RobocodeEngine engine = new RobocodeEngine(new java.io.File(\"\")); \n \n // Add our own battle listener to the RobocodeEngine \n engine.addBattleListener(new BattleObserver());\n // Show the Robocode battle view\n engine.setVisible(true);\n\n // Setup the battle specification\n\n int numberOfRounds = 3000;\n BattlefieldSpecification battlefield = new BattlefieldSpecification(800, 600); // 800x600\n RobotSpecification[] selectedRobots = engine.getLocalRepository(\"sample.Corners,sample.Walls,gatsby.CycleBot\");\n\n BattleSpecification battleSpec = new BattleSpecification(numberOfRounds, battlefield, selectedRobots);\n\n // Run our specified battle and let it run till it is over\n engine.runBattle(battleSpec, true); // waits till the battle finishes\n\n // Cleanup our RobocodeEngine\n engine.close();\n\n // Make sure that the Java VM is shut down properly\n System.exit(0);\n }",
"public static void main(String[] args){\n\t\t\r\n\t}",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"public static void main(String[] args) {\n \t\tSystem.out.println(I18n.tr(\"StatCvs-XML - CVS statistics generation\")+\"\\n\");\n \t\tSystem.setProperty(\"java.awt.headless\", \"true\");\n \t\t\n\t\tif (args.length == 0) {\n\t\t\tprintProperUsageAndExit();\n\t\t}\n \t\tif (args.length == 1) {\n \t\t\tString arg = args[0].toLowerCase();\n \t\t\tif (arg.equals(\"-h\") || arg.equals(\"-help\")) {\n \t\t\t\tprintProperUsageAndExit();\n \t\t\t} else if (arg.equals(\"-version\")) {\n \t\t\t\tprintVersionAndExit();\n \t\t\t}\n \t\t}\n \n \t\ttry {\n \t\t\tReportSettings settings = readSettings(args);\n \t\t\tinitLogger();\n \t\t\tgenerateSuite(settings);\n \t\t} catch (InvalidCommandLineException e) {\n \t\t\tSystem.err.println(e.getMessage());\n \t\t\tprintProperUsageAndExit();\n \t\t} catch (IOException e) {\n \t\t\tprintErrorMessageAndExit(e.getMessage());\n \t\t} catch (LogSyntaxException lex) {\n \t\t\tprintLogErrorMessageAndExit(lex.getMessage());\n \t\t} catch (OutOfMemoryError oome) {\n \t\t\tprintOutOfMemMessageAndExit();\n \t\t} catch (Exception ioex) {\n \t\t\tioex.printStackTrace();\n \t\t\tprintErrorMessageAndExit(ioex.getMessage());\n \t\t}\n \n \t\tSystem.exit(0);\n \t}",
"public static void main(String[] args) {\n\t\t\t}",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"com.j256.ormlite.logger.level\", \"ERROR\");\n\n\t\t// Registering resources classes and devices classes\n\t\t// @Extension did not work sometimes\n\t\tfinal PluginManager pluginManager = new JarPluginManager();\n\n\t\tSystem.out.println(\"Registering resource enumeration:\");\n\t\tResourceManager.register(DefaultResource.class);\n\t\tResourceManager.register(Ore.class);\n\t\tResourceManager.register(Ingot.class);\n\t\tResourceManager.register(Plate.class);\n\t\tResourceManager.register(Wire.class);\n\t\tResourceManager.register(Product.class);\n\n\t\tfinal List<Class<? extends Resource>> resourceEnums = pluginManager.getExtensionClasses(Resource.class);\n\t\tfor (final Class<? extends Resource> resourceEnum : resourceEnums) {\n\t\t\tResourceManager.register(resourceEnum);\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Registering device type:\");\n\t\tDeviceController.registerType(Floor.class);\n\t\tDeviceController.registerType(Buyer.class);\n\t\tDeviceController.registerType(Seller.class);\n\t\tDeviceController.registerType(Conveyor.class);\n\t\tDeviceController.registerType(LeftConveyor.class);\n\t\tDeviceController.registerType(RightConveyor.class);\n\t\tDeviceController.registerType(MultiConveyor.class);\n\t\tDeviceController.registerType(Furnace.class);\n\t\tDeviceController.registerType(Press.class);\n\t\tDeviceController.registerType(WireDrawer.class);\n\t\tDeviceController.registerType(Constructor.class);\n\n\t\tDataPersisterManager.registerDataPersisters(ResourcePersister.getInstance());\n\n\t\tfinal List<Class<? extends Device>> devicesClasses = pluginManager.getExtensionClasses(Device.class);\n\t\tfor (final Class<? extends Device> deviceClass : devicesClasses) {\n\t\t\tDeviceController.registerType(deviceClass);\n\t\t}\n\n\t\tSystem.out.println(\"-----------------------------------------------------------------\");\n\n\t\tlaunch(args);\n\t}",
"public static void main(String... args) throws Exception {\n //ScanUtils.getPrivateFields(PkgMain.class);\n// byte[] testPkg = new byte[]{\n// 0x1c,0x2d,0x3e,0x4f,\n// 0x13,0x00,0x00,0x00,\n// 0x06,0x00,0x00,0x00,\n// 0x01,0x00,0x00,0x00,\n// (byte) 0xE1,0x07,0x7,0x0f,\n// 0x16,0x35,0x0b,\n// 0x6e,0x01\n// };\n//\n// PkgTime tmpTestTime = new PkgTime(new Date());\n// PkgMain tmpTestMain = new PkgMain();\n// tmpTestMain.setInfo(tmpTestTime);\n// tmpTestMain.setSerialsNo(6);\n// tmpTestMain.setPyType(1);\n// tmpTestMain.setHeader(0x4f3e2d1c);\n// tmpTestMain.getPackageLength();\n// byte[] tmpbuffer = tmpTestMain.getThisBytes();\n//\n// PkgMain pkgMain = new PkgMain();\n// pkgMain.checkPackageIsReady(testPkg);\n// pkgMain.resolvePackage(testPkg,0);\n// byte[] testPk = new byte[100];\n// ByteBuffer byteBuffer = ByteBuffer.wrap(testPkg,0,testPkg.length);\n// byteBuffer.order(ByteOrder.LITTLE_ENDIAN);\n// byteBuffer.getInt(12);\n// byteBuffer = ByteBuffer.wrap(testPk);\n// byteBuffer.putInt(10);\n// byteBuffer.putInt(16);\n//\n// PackageUtil.resolvePackage(testPkg,0,pkgMain);\n// ScanUtils.setFieldValue(pkgMain,\"header\",0x6c7d8e9f);\n// PkgTime pkgTime = (PkgTime)ScanUtils.makeFieldInst(PkgTime.class);\n// PkgTD pkgTD =new PkgTD();\n// //pkgTD.setTest(pkgTime);\n// pkgMain.setInfo(pkgTD);\n// System.out.println(ScanUtils.getObjectSize(pkgMain));\n// return;\n if(args == null || args.length==0){\n System.out.println(\"arg = s or arg = c\");\n }else{\n if(args[0].equals(\"s\")){\n LabServer labServer = new LabServer();\n labServer.startTest();\n }\n if(args[0].equals(\"c\")){\n LabClient labClient = new LabClient();\n labClient.sendTest();\n }\n }\n }",
"public static void main(String[] args) throws Exception {\n\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) throws Exception {\n\t\texport();\r\n\t}",
"public static void main (String [] args){\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t}",
"public static void main(String[] args) throws Exception {\n JobDriver jobDriver = new CDPIJobDriver(args);\n int result = jobDriver.run();\n System.exit(result);\n }",
"public static void main(String args[]) {\n (Installer.instance = new Installer(true)).loadWindow();\n\n //TODO: Save autohide status on file before implementing\n Installer.instance.autoHide.setState(false);\n Installer.instance.autoHide.setVisible(false);\n\n String gameDir = FileUtils.getWorkingDirectory().getAbsolutePath();\n\n /* Forces the forge installer download, enables the progress bar */\n Rectangle oldBounds = Installer.instance.frame.getBounds();\n Installer.instance.frame.setBounds(oldBounds.x, oldBounds.y, oldBounds.width, oldBounds.height + 50);\n\n download(new File(gameDir), manifest_url, true, \"forge\");\n\n /* Removes the progress bar & download status after finishing download */\n Installer.instance.frame.setBounds(oldBounds);\n Installer.instance.downloadStatus.setVisible(false);\n\n log(\"Download completed\");\n }",
"public static void main(String args[]) throws Exception {\n }",
"public static void main(String[] args) {\n \n \n \n\t}",
"private static void deployHECode(String targetDir) throws InterruptedException, IOException, Exception {\r\n\t\t// Build library\r\n\t\tProcessBuilder ps = new ProcessBuilder(\"make\", \"-C\", targetDir);\r\n\r\n\t\t//From the DOC: Initially, this property is false, meaning that the \r\n\t\t//standard output and error output of a subprocess are sent to two \r\n\t\t//separate streams\r\n\t\tps.redirectErrorStream(true);\r\n\r\n\t\tProcess pr = ps.start(); \r\n\t\t\r\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(pr.getInputStream()));\r\n\t\tString line;\r\n\t\twhile ((line = in.readLine()) != null) {\r\n\t\t System.out.println(line);\r\n\t\t}\r\n\t\tint result = pr.waitFor();\r\n\t\tSystem.out.println(\"ok!\");\r\n\r\n\t\tin.close();\r\n//\t\tint result = Runtime.getRuntime().exec(\"make -C \" + targetDir).waitFor();\r\n\t\tif(result == 0) {\r\n\t\t\tSystem.out.println(\"Build successful\");\r\n\t\t} else {\r\n\t\t\tthrow new Exception(\"Service build unsuccessful\");\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n }",
"public static void main(String args[]) {\r\n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t}"
]
| [
"0.59038657",
"0.57963663",
"0.5719043",
"0.569816",
"0.5692783",
"0.5661349",
"0.5642808",
"0.56174195",
"0.5608775",
"0.5597704",
"0.55795455",
"0.55580246",
"0.55133104",
"0.5512524",
"0.5509306",
"0.54643077",
"0.5462184",
"0.54496855",
"0.54466397",
"0.5439335",
"0.54191124",
"0.5414131",
"0.5410374",
"0.5407139",
"0.5400789",
"0.540002",
"0.5398017",
"0.5394897",
"0.53924274",
"0.53602093",
"0.5355174",
"0.5355174",
"0.53510576",
"0.53427625",
"0.5334153",
"0.53259784",
"0.5317303",
"0.5298782",
"0.52877915",
"0.52812904",
"0.5275867",
"0.52739686",
"0.5273898",
"0.5270905",
"0.5268431",
"0.5264257",
"0.5263644",
"0.52629405",
"0.52580297",
"0.5256012",
"0.5250837",
"0.5249738",
"0.5249472",
"0.52477026",
"0.5240224",
"0.523782",
"0.5235668",
"0.52335525",
"0.5228141",
"0.5225869",
"0.52253664",
"0.522509",
"0.52236277",
"0.5219995",
"0.5219792",
"0.52016664",
"0.5199736",
"0.5199107",
"0.51938",
"0.5188832",
"0.5187885",
"0.51830673",
"0.51825964",
"0.517999",
"0.5178418",
"0.5178418",
"0.5174687",
"0.51739436",
"0.51731336",
"0.51721317",
"0.517003",
"0.5166984",
"0.5166984",
"0.5166984",
"0.5166984",
"0.5166984",
"0.5166984",
"0.5166984",
"0.5166984",
"0.5166984",
"0.5164518",
"0.5164177",
"0.51615405",
"0.5158413",
"0.51576066",
"0.51538473",
"0.5151921",
"0.51509255",
"0.51484555",
"0.51420796",
"0.5138439"
]
| 0.0 | -1 |
/ Create an int array, representing the (length+10) of the longest element in every column. | public static void printCategoryTable() throws SQLException {
PreparedStatement stmtGetLengthOfColumns = dbconn
.prepareStatement("SELECT max(character_length((cast(categoryid as text)))) as lenid, max(character_length(trim(both ' ' from categoryname))) as lenname,max(character_length(trim(both ' ' from description))) as lendes FROM nw_category");
ResultSet rsGetLengthOfColumns = stmtGetLengthOfColumns.executeQuery();
int[] columnLengths = new int[3];
rsGetLengthOfColumns.next();
for (int i = 0; 3 > i; i++) {
columnLengths[i] = rsGetLengthOfColumns.getInt(i + 1) + 10;
}
/*
* Executing the query to get the categories and resturnning data and
* metadata to resultsets.
*/
PreparedStatement pstmt = dbconn
.prepareStatement("SELECT categoryid,categoryname,description from nw_category");
ResultSet rs = pstmt.executeQuery();
ResultSetMetaData rsmd = rs.getMetaData();
/*
* Printf ColumnLabels
*/
for (int i = 0; rsmd.getColumnCount() > i; i++) {
System.out.printf("|%-" + columnLengths[i] + "S",
rsmd.getColumnLabel(i + 1));
}
System.out.print("|\n");
/*
* Printf seperator for data and metadata
*/
for (int i = 0; (rsmd.getColumnCount()) > i; i++) {
String sep = "";
for (int j = 0; j < columnLengths[i]; j++) {
sep = sep + "-";
}
System.out.print("+" + sep);
}
System.out.print("+\n");
/*
* Printf data;
*/
while (rs.next()) {
for (int i = 0; rsmd.getColumnCount() > i; i++) {
System.out.printf("|%-" + columnLengths[i] + "s",
rs.getString(i + 1));
}
System.out.print("|\n");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int[] longestSequence(int arrayParameter[]) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tint arrayLength=arrayParameter.length;\r\n\t\tint maxSequenceFirstIndex=0;\r\n\t\tint maxSequenceLength=0;\r\n\t\tint temperarySequenceLength=1;\r\n\t\tint arrayFirstIndex;\r\n\t\tint arrayLastIndex;\r\n\t\tint maxSequenceIndex;\r\n\t\tfor(arrayFirstIndex=0,arrayLastIndex=0;arrayLastIndex<(arrayLength-1);arrayLastIndex++){\r\n\t\t\tif(arrayParameter[arrayLastIndex]<arrayParameter[arrayLastIndex+1]){\r\n\t\t\t\ttemperarySequenceLength++;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\tif(temperarySequenceLength>maxSequenceLength){\r\n\t\t\t\t\t\tmaxSequenceLength=temperarySequenceLength;\r\n\t\t\t\t\t\ttemperarySequenceLength=1;\r\n\t\t\t\t\t\tmaxSequenceFirstIndex=arrayFirstIndex;\r\n\t\t\t\t\t\tarrayFirstIndex=arrayLastIndex+1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\ttemperarySequenceLength=1;\r\n\t\t\t\t\t\tarrayFirstIndex=arrayLastIndex+1;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(temperarySequenceLength>maxSequenceLength){\r\n\t\t\tmaxSequenceLength=temperarySequenceLength;\r\n\t\t\tmaxSequenceFirstIndex=arrayFirstIndex;\r\n\t\t}\r\n\t\tint temeraryArrayIndex=0;\r\n\t\tint temperaryArray[]=new int[maxSequenceLength];\r\n\t\tfor(maxSequenceIndex=maxSequenceFirstIndex;maxSequenceIndex<(maxSequenceFirstIndex+maxSequenceLength);maxSequenceIndex++){\r\n\t\t\ttemperaryArray[temeraryArrayIndex]=arrayParameter[maxSequenceIndex];\r\n\t\t\ttemeraryArrayIndex++;\r\n\t\t}\r\n\t\treturn temperaryArray;\r\n\t}",
"public static int[] decreasingIntArrBuilder(int length)\n {\n int[] vals = new int[length];\n for (int i = 0; i < length; i++)\n vals[i] = length - i;\n\n return vals;\n }",
"static int max(int ropeLen) {\n\t\tint[] dp = new int[ropeLen + 1];\n\t\tdp[0] = 1;\n\t\tfor (int i = 1; i <= ropeLen; i++) {\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tmax = Math.max(max, dp[j] * (i - j));\n\t\t\t}\n\t\t\tdp[i] = max;\n\t\t}\n\t\treturn dp[ropeLen];\n\t}",
"static int[][] getColumns(int[] array){\n int[][] rezultArray = new int[n][n];\n int index = 0;\n for (int i = 0; i < n; i++){\n for (int j = i; j < n * n; j += n){\n rezultArray[i][index++] = array[j];\n }\n index = 0;\n }\n return rezultArray;\n }",
"static List<Integer> getMax(int[] arr, int len){\n\t\tList<Integer> res = new ArrayList<>();\n\t\tif(arr == null || arr.length == 0 || len == 0){\n\t\t\treturn res;\n\t\t}\n\t\tif(arr.length <= len){\n\t\t\tres.add(getMax(arr, 0, arr.length-1));\n\t\t\treturn res;\n\t\t}\n\t\tint i =0, j = len-1, max = 0;\n\t\twhile(j < arr.length){\n\t\t\tif(max == 0){\n\t\t\t\tmax = getMax(arr, i, j);\n\t\t\t\tres.add(max);\n\t\t\t}\n\t\t\telse if(arr[j] > max){\n\t\t\t\tmax = arr[j];\n\t\t\t\tres.add(max);\n\t\t\t}\n\t\t\telse if(arr[i] == max){\n\t\t\t\tres.add(max);\n\t\t\t\tmax = 0;\n\t\t\t}else{\n\t\t\t\tres.add(max);\n\t\t\t}\n\t\t\ti++;\n\t\t\tj++;\n\t\t}\n\t\treturn res;\n\t}",
"static int[] populateArray(int lenght) {\n\t\tint[] A = new int[lenght];\n\t\t\n\t\tfor(int i=0; i < A.length; i++) {\n\t\t\tA[i] = (int)(Integer.MAX_VALUE * Math.random());\n\t\t}\n\t\t\n\t\treturn A;\n\t}",
"long arrayLength();",
"static int[] buildMaxHeap(int [] arr) {\n\t\tint n = arr.length;\n\t\tint startIdx = (n / 2) - 1;\n\t\tfor(int i = startIdx; i >= 0; i--)\n\t\t\theapify(arr, n, i);\n\t\treturn arr;\n\t}",
"public OrderedArray(int max) {\n arr = new long[max];\n nElms = 0;\n }",
"private static int[] generate_random_array(int max) {\n int size = ThreadLocalRandom.current().nextInt(2, max + 1);\n int[] array = new int[size];\n for (int i = 0; i < size - 1; i++) {\n int distance = size - i > i ? size - i : i;\n array[i] = ThreadLocalRandom.current().nextInt(1, distance);\n }\n array[size - 1] = 0;\n return array;\n }",
"public static int[] argmaxrow(double[][] a){\n\n \tint[] res = new int[a.length];\n \tint max = -1;\n \tfor(int i = 0; i < a.length; i++){\n \t\tmax = argmax(a[i]);\n \t\tres[i] = max;\n \t}\n\n \treturn res;\n\n }",
"public int getMaxCols() {\r\n\t\treturn boardcell[0].length;\r\n\t}",
"public int getLongest(int[] sequence) {\n\t\treturn sequence.length;\n\t}",
"int maxLen(int arr[], int n) \n {\n \tHashMap< Integer,Integer> map =new HashMap<Integer, Integer>();\n \t\n \t//set zero's as -1\n \tfor(int i= 0; i<n;i++)\n \t{\n \t\tif(arr[i]== 0){arr[i] = -1;}\n \t}\n \t\n \tint sum =0, maxLen =0;\n \t\n \tfor(int i= 0; i<n;i++)\n \t{\n \t\tsum += arr[i];\n \t\tif(sum == 0)\n \t\t{\n \t\t\tmaxLen = i+1;\n \t\t} \n \t\t\n \t\tif(map.containsKey(sum))\n \t\t{ maxLen = Math.max(maxLen, (i -map.get(sum))); \n \t\t}\n \t\telse{ map.put(sum, i);}\n \t}\n \t\n \treturn maxLen;\n }",
"public static int maxSeqLength(char[] X, char [] Y){\n\t\t\tint row = X.length+1, col = Y.length+1;\n\t\t\tint mat[][] = buldMatrix(X, Y); \n\t\t\treturn mat[row-1][col-1];\n\t\t}",
"private static int[] createRandomFilledArrayOfLength(int n) {\n int[] list = new int[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++) {\n list[i] = rand.nextInt(2*MAX_VALUE) - MAX_VALUE;\n }\n return list;\n }",
"public int[] mostConstrained()\n\t{\n\t\tint lowest = 123456; //initialized with very high number\n\t\tint[] mostConstrained = new int[2];\n\t\tfor(int r = 0; r < board.length; r++)\n\t\t{\n\t\t\tfor(int c = 0; c < board.length; c++)\n\t\t\t{\n\t\t\t\tif(board[r][c] == 0) //only checks spots on board that are 0\n\t\t\t\t{\n\t\t\t\t\tint count = 0; //counts the number of numbers that can be placed at s spot\n\t\t\t\t\tfor(int i = 1; i < 10; i++) //goes through numbers 1-9 and checks if the numbers can be placed at the spot\n\t\t\t\t\t{\n\t\t\t\t\t\tif(canPlace(r,c,i))\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t\tif(count < lowest) \n\t\t\t\t\t{\n\t\t\t\t\t\tlowest = count;\n\t\t\t\t\t\tmostConstrained[0] = r; \n\t\t\t\t\t\tmostConstrained[1] = c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn mostConstrained;\n\t}",
"public int findLengthOfLCIS(int[] arr) {\n\t \n if (arr.length == 0)\n return 0;\n \n int currFrom = -1, currTo = -1;\n\t\tint from = 0, to = 0;\n\t\t\n\t\tfor (int i=1; i<arr.length; i++) {\n\t\t\tif (arr[i] > arr[i-1]) {\n\t\t\t\tif (currFrom == -1) {\n\t\t\t\t\tcurrFrom = i-1;\n\t\t\t\t}\n\t\t\t\tcurrTo = i;\n\t\t\t} else {\n\t\t\t\tcurrFrom = -1;\n\t\t\t\tcurrTo = -1;\n\t\t\t}\n\t\t\t\n\t\t\tif (currTo - currFrom > to - from) {\n\t\t\t\tfrom = currFrom;\n\t\t\t\tto = currTo;\n\t\t\t}\n\t\t}\n\t\t\n return to - from + 1;\n\t }",
"private int indiceColMax(String tabla[][]){\n int indice=1;\n float aux=Float.parseFloat(tabla[0][1]);\n for (int j = 1; j <= nVariables; j++) {\n if(Float.parseFloat(tabla[0][j])<0 && Float.parseFloat(tabla[0][j])<aux){\n aux=Float.parseFloat(tabla[0][j]);\n indice=j;\n }\n }\n return indice;\n }",
"static long[] riddle(long[] arr) {\n \t\n \tint len = arr.length; \n \tlong[] a = new long[len]; \t\n\t\tfor (int t = 0; t < len; t++) {\n\t\t\tlong max = 0;\n\t\t\tfor (int i = 0; i < len; i++) {\t\t\t\t\n\t\t\t\tlong min = 0;\n\t\t\t\tSystem.out.println();\n\t\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\t\tif (min == 0) {\n\t\t\t\t\t\tmin = arr[j];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (min < arr[j]) {\n\t\t\t\t\t\t\tmin = arr[j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(min + \" \" );\n\t\t\t\t}\n\t\t\t\tif (max == 0) {\n\t\t\t\t\tmax = min;\n\t\t\t\t} else {\n\t\t\t\t\tif (min > max) {\n\t\t\t\t\t\tmax = min;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta[t] = max;\t\t\t\t\n\t\t\t}\n\t\t} \t\n \treturn a;\n }",
"public int longestSubarray(int[] A, int limit) {\n TreeMap<Integer, Integer> m = new TreeMap<>();\n int res = 0;\n\n for (int left = 0, right = 0; right < A.length; right++) {\n m.put(A[right], 1 + m.getOrDefault(A[right], 0));\n\n while (m.lastEntry().getKey() - m.firstEntry().getKey() > limit) {\n m.put(A[left], m.get(A[left]) - 1);\n if (m.get(A[left]) == 0) {\n m.remove(A[left]);\n }\n left++;\n }\n res = Math.max(res, right - left + 1);\n }\n\n return res;\n }",
"private static void fillMaxArray() {\n int maxIndex = 0;\n int maxCount = 0;\n for (int n = 0; n < LIMIT; n++) {\n if (COUNT[n] > maxCount) {\n maxIndex = n;\n maxCount = COUNT[n];\n }\n COUNT[n] = maxIndex;\n }\n //System.err.println(Arrays.toString(COUNT));\n }",
"public int length() { return 1+maxidx; }",
"public static int longestDecreasingSub(int arr[]) {\n\n\t\tint strg[] = new int[arr.length];\n\n\t\tstrg[arr.length - 1] = 1;\n\n\t\tLDS = new String[arr.length];\n\t\tLDS[arr.length - 1] = \"\" + arr[arr.length - 1];\n\t\tfor (int i = arr.length - 2; i >= 0; i--) {\n\t\t\tint longs = 0;\n\t\t\tfor (int j = i + 1; j < arr.length; j++) {\n\t\t\t\tif (arr[j] < arr[i] && strg[j] > longs) {\n\t\t\t\t\tlongs = strg[j];\n\t\t\t\t\tLDS[i] = LDS[j] + \"<\" + arr[i];\n\t\t\t\t}\n\t\t\t}\n if(longs==0)\n {\n \tLDS[i]=\"\"+arr[i];\n }\n\t\t\tstrg[i] = longs + 1;\n\n\t\t\t// System.out.println(strg[i]);\n\t\t}\n\t\tfor (String i : LDS) {\n\t\t\t//System.out.println(i);\n\t\t}\n\t\tint max = 0;\n\t\tfor (int i : strg) {\n\t\t\t// System.out.println(i);\n\t\t\tif (i > max) {\n\t\t\t\tmax = i;\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"static public long max(long[] valarray) {\r\n long max = 0;\r\n for (long i : valarray) {\r\n if (i > max)\r\n max = i;\r\n }\r\n return max;\r\n }",
"public DArray (int max)\n // constructor\n {\n theArray = new long[max];\n // create array\n nElems = 0;\n }",
"public int findMaxLength(int[] nums) {\n int[] arr = new int[2*nums.length+1];\n Arrays.fill(arr, -2);\n arr[nums.length] = -1;\n int max = 0;\n int count=0;\n for(int i=0;i<nums.length;i++){\n count += (nums[i]==0?-1:1);\n if(arr[count+nums.length]>=-1){\n max = Math.max(max,i-arr[count+nums.length]);\n }else{\n arr[count+nums.length]= i;\n }\n }\n return max;\n }",
"public static int[][] raggedArray(){\n int n=(int)(Math.random()*11);\n n+=10; \n //this randomly assigns n to between 10 and 20\n int[][] ragged=new int[n][];\n //initialize this array with n first components\n //forloop to assign each inner array a length\n for(int i=0; i<n; i++){\n int m=(int)(Math.random()*11);\n m+=10; //m is between 10 and 20\n ragged[i]=new int[m];\n //another for loop to assign values\n for(int k=0; k<m; k++){\n int val=(int)(Math.random()*1001);\n int sign=(int)(Math.random()*2);\n if(sign==0){\n \n }\n else{\n val*=-1;\n //makes it 50/50 to be negative\n }\n ragged[i][k]=val;\n //assigns value to that spot of array\n }\n }\n return ragged;\n }",
"public int[][] matrixCID(String[] array){\n\t\tint[][] matrix = new int[array.length-1][5];\n\t\tfor(int i = 1; i < array.length; i++){\n\t\t\tString[] words = toWord(array[i]);\t\n\t\t\tmatrix[i-1][0] = Integer.valueOf(words[0]); //CID\n\t\t\tmatrix[i-1][1] = Integer.valueOf(words[2]); //POP\n\t\t\tmatrix[i-1][2] = 0; //default length\n\t\t\tmatrix[i-1][3] = 0; //default chunk size\n\t\t\tmatrix[i-1][4] = 0; //default chunk pieces\n\t\t}\n\t\treturn matrix;\n\t}",
"public static void findLargest(int input[][]){\n int numRows = input.length;\n\t\tint numCols = input[0].length;\n int num = 0;\n \n int ans = Integer.MIN_VALUE;\n String row_or_col = \"NA\";\n\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tint sum = 0;\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tsum += input[i][j];\n\t\t\t}\n if (sum > ans) {\n ans = sum;\n num = i;\n row_or_col = \"row\";\n }\n\t\t}\n \n for (int i = 0; i < numCols; i++) {\n\t\t\tint sum = 0;\n\t\t\tfor (int j = 0; j < numRows; j++) {\n\t\t\t\tsum += input[i][j];\n\t\t\t}\n if (sum > ans) {\n ans = sum;\n num = i;\n row_or_col = \"column\";\n }\n\t\t}\n \n System.out.println(row_or_col+\" \"+num+\" \"+ans);\n\t}",
"public static void buildColumnMaxLength(int[] width, String[] value) {\n for (int i = 0; i < value.length; i++)\n width[i] = Math.max(width[i], value[i].length());\n }",
"public static int[] columns(int n) \n {\n int[] columns = new int[n];\n int h = (int)Math.floor(n / 2);\n \n for (int i = 0; i < n; i++)\n columns[i] = n - Math.abs(i - h);\n \n return columns;\n }",
"public OrderedArray(int max) {\n a = new long[max];\n nElems = 0;\n }",
"public static double[] maxrow(double[][] a){\n\n \tdouble[] res = new double[a.length];\n \tdouble max = -1;\n \tfor(int i = 0; i < a.length; i++){\n \t\tmax = max(a[i]);\n \t\tres[i] = max;\n \t}\n\n \treturn res;\n\n }",
"public long[] toArray() {\n/* 406 */ long[] array = new long[(int)(this.max - this.min + 1L)];\n/* 407 */ for (int i = 0; i < array.length; i++) {\n/* 408 */ array[i] = this.min + i;\n/* */ }\n/* 410 */ return array;\n/* */ }",
"public static int[] longestSubseq6 () {\r\n\t\t\r\n\t\t// length[i] is the length of the longest subsequence ending\r\n\t\t// at index i\r\n\t\t// prev[i] is the index of the previous element in the longest\r\n\t\t// subsequence ending at index i\r\n\t\tint[] length = new int[A.length];\r\n\t\tint[] prev = new int[A.length];\r\n\t\t\r\n\t\t// Fill in the arrays\t\r\n\t\tfor (int n = 0; n < A.length; n++) {\r\n\t\t\tint longest = 0;\r\n\t\t\tint longestIndex = -1;\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tif (A[n] > A[i]) {\r\n\t\t\t\t\tint size = length[i];\r\n\t\t\t\t\tif (size > longest) {\r\n\t\t\t\t\t\tlongest = size;\r\n\t\t\t\t\t\tlongestIndex = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlength[n] = longest+1;\r\n\t\t\tprev[n] = longestIndex;\r\n\t\t}\r\n\t\t\r\n\t\t// Next find the index where the longest subsequence ends.\r\n\t\tint longestIndex = 0;\r\n\t\tfor (int n = 0; n < A.length; n++) {\r\n\t\t\tif (length[n] > length[longestIndex]) {\r\n\t\t\t\tlongestIndex = n;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Next work backwards to reconstruct the sequence\r\n\t\tint[] result = new int[length[longestIndex]];\r\n\t\tfor (int i = result.length-1; i >= 0; i--) {\r\n\t\t\tresult[i] = A[longestIndex];\r\n\t\t\tlongestIndex = prev[longestIndex];\r\n\t\t}\r\n\t\t\r\n\t\t// And return the result.\r\n\t\treturn result;\r\n\t\t\r\n\t}",
"public static int[] buildMaxHeap(int[] arr){\n int size = arr.length;\n for(int i=size/2; i>0; i--){\n maxheapify(arr, size, i);\n }\n return arr;\n }",
"public static void main(String[] args) {\n\t\tScanner inp = new Scanner(System.in);\n\t\tint rows = inp.nextInt(), cols = inp.nextInt();\n\t\tint[][] arr = new int[rows][cols];\n\t\tfor (int i = 0; i <= rows - 1; i++) {\n\t\t\tfor (int j = 0; j <= cols - 1; j++) {\n\t\t\t\tarr[i][j] = inp.nextInt();\n\t\t\t}\n\t\t}\n\n\t\tint longest = arr[0][0];\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tfor (int j = 0; j < arr[i].length; j++) {\n\t\t\t\tif (longest < arr[i][j]) {\n\t\t\t\t\tlongest = arr[i][j];\n\t\t\t\t\t\n\t\t\t\t\tarr[i][j]=longest;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\t\t \n\t\t \n\n\t}\n\t\tSystem.out.println(Arrays.deepToString(arr));\n\t}",
"public static void getLongestPalindrome(char[] a) {\n\n int leftBound = 0, rightBound = 0;\n\n for (int i = 0; i < a.length; i++) {\n\n // Odd length palindrome\n leftBound = i - 1;\n rightBound = i + 1;\n int length = 0;\n while (leftBound >= 0 && rightBound < a.length && a[leftBound] == a[rightBound]) {\n if (maxLength < (rightBound - leftBound + 1)) {\n maxLength = (rightBound - leftBound + 1);\n start = leftBound;\n }\n --leftBound;\n ++rightBound;\n }\n\n // Even length palindrome\n leftBound = i - 1;\n rightBound = i;\n length = 0;\n while (leftBound >= 0 && rightBound < a.length && a[leftBound] == a[rightBound]) {\n if (maxLength < (rightBound - leftBound + 1)) {\n maxLength = (rightBound - leftBound + 1);\n start = leftBound;\n }\n --leftBound;\n ++rightBound;\n }\n\n }\n }",
"private int getCol(int[][] ints) {\n if (ints.length == 0) {\n return 0;\n }\n return ints[0].length;\n }",
"private static String largestNumber(String[] a) {\n String result = \"\";\n\n List<String> strArr = new ArrayList<>(Arrays.asList(a));\n\n// Collections.sort(strArr, Collections.reverseOrder());\n\n int longestNumberLength = 0;\n for (int i = 0; i < strArr.size(); i++) {\n if (strArr.get(i).length() > longestNumberLength) {\n longestNumberLength = strArr.get(i).length();\n }\n }\n\n int nDigit = 0;\n int maxNDigit = 0;\n int maxFirstDigit = 0;\n int maxSecondDigit = 0;\n int maxThirdDigit = 0;\n int maxFourthDigit = 0;\n int maxFifthDigit = 0;\n for (int i = 0; i < strArr.size(); i++) {\n if (strArr.get(i).length() >= nDigit + 1 && (strArr.get(i).charAt(nDigit) - '0') > maxNDigit) {\n maxNDigit = strArr.get(i).charAt(nDigit) - '0';\n }\n }\n\n List<String> maxNDigitNumbers = new ArrayList<>();\n\n for (int i = 0; i < strArr.size(); i++) {\n if (strArr.get(i).length() >= nDigit + 1 && (strArr.get(i).charAt(nDigit) - '0') == maxNDigit) {\n maxNDigitNumbers.add(strArr.get(i));\n }\n }\n\n\n// for (String s : maxNDigitNumbers) {\n// result = new StringBuilder().append(result).append(s).toString();\n// }\n\n return result;\n }",
"public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n int[] arr = new int[n];\n \n for(int i = 0; i< n; i++){\n arr[i] = scn.nextInt();\n }\n \n int[] dp = new int[n];\n dp[0] = 1;\n int maxLen = 1;\n // traversing from 1 to jth position starting from 0\n for(int i = 1; i<n; i++){\n for(int j = 0; j<i; j++){\n \n if(arr[i] > arr[j]){\n dp[i] = Math.max(dp[i],dp[j]);\n }\n }\n dp[i] += 1;\n \n if(maxLen < dp[i]){\n maxLen = dp[i];\n }\n }\n System.out.println(maxLen);\n //System.out.println(Arrays.toString(dp));\n\n }",
"public Integer[] createArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = (int)(value.length*Math.random());\n }\n\n return value;\n }",
"int getArrayLength();",
"int getArrayLength();",
"public static int lengthOfLongestAP(List<Token> tokens, int n) {\n int L[][] = new int[n][n];\n int llap = 2;\n\n for (int i = 0; i < n; i++) {\n L[i][n - 1] = 2;\n }\n\n for (int j = n - 2; j >= 1; j--) {\n int i = j-1, k = j+1;\n while (i >= 0 && k <= n-1) {\n if (tokens.get(i).getNumber() + tokens.get(k).getNumber() < 2 * tokens.get(j).getNumber()) {\n k++;\n }\n else if (tokens.get(i).getNumber() + tokens.get(k).getNumber() > 2 * tokens.get(j).getNumber()) {\n L[i][j] = 2;\n i--;\n }\n else {\n L[i][j] = L[j][k] + 1;\n llap = Math.max(llap, L[i][j]);\n i--;\n k++;\n }\n }\n\n while (i >= 0) {\n L[i][j] = 2;\n i--;\n }\n }\n\n return llap;\n }",
"public abstract void read_long_array(int[] value, int offset, int\nlength);",
"public Integer[] createSortedArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = i;\n }\n\n return value;\n }",
"public ArraySh(int max) {\n\t\ttheArray = new long[max];\n\t\tnElems = 0;\n\t}",
"static int[] getFirstResultString(int[] array){\n int from = (n * (lineNumber-1));\n int[] rezultColumn = Arrays.copyOfRange(array, from, from + n);\n return rezultColumn;\n }",
"public abstract long[] toLongArray();",
"public static int longArray() {\r\n\t\tString sCarp = System.getProperty(\"user.dir\");//Obtenemos la carpeta actual desde donde ejecutamos el código(de la carpeta del proyecto)\r\n\t\tFile carpeta = new File(sCarp); //Con este File obtenemos información de la carpeta\r\n\t\tFile[] listado = carpeta.listFiles();//Asi nos devuelven objetos file y podemos sacar mas info de ellos\r\n\r\n\t\tint longi=0;\r\n\t\t\r\n\t\tif(listado==null || listado.length == 0) {\r\n\t\t\tSystem.out.println(\"No hay elementos en la carpeta actual\");\r\n\t\t}else {\r\n\t\t\tlongi++;//solo ponemos un longi++ ya que si tiene archivos solo nos va a extraer uno que es la pos que guardamos\r\n\t\t\tfor(int i=0; i<listado.length;i++) {\r\n\t\t\t\tFile archivo = listado[i];\r\n\t\t\t\tif(archivo.isDirectory()==true) {\r\n\t\t\t\t\tFile[] listado2 = archivo.listFiles();\r\n\t\t\t\t\tif(listado2==null || listado2.length == 0) {\r\n\t\t\t\t\t\tSystem.out.println(\"No hay elementos en la carpeta actual\");\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tlongi++;\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}\r\n\t\t}\r\n\t\treturn longi;\r\n\t}",
"public int longestRod ();",
"public static void main(String[] args) {\n int[][] arr2D = { {1,2,3} , {4,5,6,7}, {8,9,10,11,12} , {13,14,15,20,16,17000} };\n // 0 1 2 3\n int max = arr2D[0][0];\n\n for( int i= 0; i <= arr2D.length-1; i++ ){ // to get each 1D Array\n\n for( int eachNum : arr2D[i] ){ // to get each element\n if(eachNum > max){\n max = eachNum;\n }\n }\n\n }\n\n System.out.println(\"Maximum: \"+max);\n\n\n }",
"public int getMaxColumn();",
"public int longestOnes(int[] A, int K) {\n //1:10\n int N = A.length;\n int left = 0;\n for (int right=0; right<N; right++) {\n K -= 1 - A[right];\n if (K < 0)\n K += 1 - A[left++];\n }\n return A.length - left;\n }",
"public int maxC()\r\n {\r\n return metro.numberOfColumns - 1;\r\n }",
"public int longestArithSeqLength(int[] A) {\n Map<Integer, Integer>[] dp = new HashMap[A.length];\n dp[0] = new HashMap<>();\n dp[0].put(0, 1);\n int result = 0;\n for (int i = 1; i < A.length;i++) {\n \tfor (int j = i - 1; j > -1; j--) {\n \t\tint diff = A[i] - A[j];\n \t\tint count = dp[j].getOrDefault(diff, 1) + 1;\n \t\tresult = Math.max(result, count);\n \t\tif (dp[i] == null) dp[i] = new HashMap<>();\n \t\tif (dp[i].containsKey(diff)) count = Math.max(count, dp[i].get(diff));\n \t\tdp[i].put(diff, count);\n \t}\n }\n return result;\n }",
"public int longestMountain(int[] arr) {\n int start = 0, res = 0;\n while(start < arr.length) {\n int peak = findPeak(arr, start);\n if(peak == start) {\n start = peak + 1;\n continue;\n }\n\n int valley = findValley(arr, peak);\n if(valley == peak) {\n start = valley + 1;\n continue;\n }\n\n res = Math.max(valley - start + 1, res);\n start = valley;\n }\n return res;\n }",
"public HighArray(int max) // constructor\n {\n a = new long[max]; // create the array\n nElems = 0; // no items yet\n }",
"int maxColSize() {\n int max = Integer.MIN_VALUE;\n for (IntSet col : this.cols) {\n if (col.size() > max) {\n max = col.size();\n }\n }\n return max;\n }",
"public int getLongestDay() {\r\n int longest = 0;\r\n // for each day of the week\r\n for (int d = 0; d < 5; d++) {\r\n int subtotal = 0;\r\n int sectionStart = 0;\r\n // find first hour that != 0\r\n for (int h = 0; h < 13; h++) {\r\n if (weekData[d][h] != 0) {\r\n sectionStart = h;\r\n break;\r\n }\r\n }\r\n // loop in reverse to find the last hour that != 0\r\n for (int h = 12; h >= 0; h--) {\r\n if (weekData[d][h] != 0) {\r\n // add the difference to the total\r\n subtotal += h-sectionStart+1;\r\n break;\r\n }\r\n }\r\n // if new longest day is longer than old longest day, set it to the\r\n // new value\r\n if (subtotal > longest) {\r\n longest = subtotal;\r\n }\r\n }\r\n return longest;\r\n }",
"public static int [] evaluate(int a[]) {\n\t\tint n = a.length;\n\t\tint maxlen = 0;\n\t\tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\tint sum = 0;\n\t\tint start = 0, end = 0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tsum += a[i];\n\t\t\t//case 1: prefix ending at i may be longest\n\t\t\tif(sum == 1) {\n\t\t\t\tmaxlen = i+1;\n\t\t\t\tend = i; start = 0;\n\t\t\t}\n\t\t\t//case 2: suffix ending at i(not starting at 0) may be longest\n\t\t\tif(map.containsKey(sum-1)) {\n\t\t\t\tif(maxlen < i-map.get(sum-1)) {\n\t\t\t\t\tmaxlen = i-map.get(sum-1);\n\t\t\t\t\tstart = map.get(sum-1)+1;\n\t\t\t\t\tend = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//using \"!\" b/c we don't want to override the smallest i with this prefix sum\n\t\t\t//in search of longest subarray\n\t\t\tif(!map.containsKey(sum)) map.put(sum, i); \n\t\t}\n\t\tint ans[] = {maxlen, start, end};\n\t\t//System.out.println(\"array : \"+Arrays.toString(a)+\" , start = \"+start+\", end = \"+end+\", max = \"+maxlen);\n\t\treturn ans;\n\t}",
"private int findLargestIndex(int[] widths) {\n int largestIndex = 0;\n int largestValue = 0;\n for (int i = 0; i < widths.length; i++) {\n if (widths[i] > largestValue) {\n largestIndex = i;\n largestValue = widths[i];\n }\n }\n return largestIndex;\n }",
"private void findLargestCells(int r22) {\n /*\n r21 = this;\n r7 = 1;\n r5 = r21.getChildCount();\n r8 = 0;\n L_0x0006:\n if (r8 >= r5) goto L_0x00d5;\n L_0x0008:\n r0 = r21;\n r4 = r0.getChildAt(r8);\n r17 = r4.getVisibility();\n r18 = 8;\n r0 = r17;\n r1 = r18;\n if (r0 != r1) goto L_0x001d;\n L_0x001a:\n r8 = r8 + 1;\n goto L_0x0006;\n L_0x001d:\n r0 = r4 instanceof android.widget.TableRow;\n r17 = r0;\n if (r17 == 0) goto L_0x001a;\n L_0x0023:\n r15 = r4;\n r15 = (android.widget.TableRow) r15;\n r10 = r15.getLayoutParams();\n r17 = -2;\n r0 = r17;\n r10.height = r0;\n r0 = r22;\n r16 = r15.getColumnsWidths(r0);\n r0 = r16;\n r13 = r0.length;\n if (r7 == 0) goto L_0x0073;\n L_0x003b:\n r0 = r21;\n r0 = r0.mMaxWidths;\n r17 = r0;\n if (r17 == 0) goto L_0x0052;\n L_0x0043:\n r0 = r21;\n r0 = r0.mMaxWidths;\n r17 = r0;\n r0 = r17;\n r0 = r0.length;\n r17 = r0;\n r0 = r17;\n if (r0 == r13) goto L_0x005c;\n L_0x0052:\n r0 = new int[r13];\n r17 = r0;\n r0 = r17;\n r1 = r21;\n r1.mMaxWidths = r0;\n L_0x005c:\n r17 = 0;\n r0 = r21;\n r0 = r0.mMaxWidths;\n r18 = r0;\n r19 = 0;\n r0 = r16;\n r1 = r17;\n r2 = r18;\n r3 = r19;\n java.lang.System.arraycopy(r0, r1, r2, r3, r13);\n r7 = 0;\n goto L_0x001a;\n L_0x0073:\n r0 = r21;\n r0 = r0.mMaxWidths;\n r17 = r0;\n r0 = r17;\n r11 = r0.length;\n r6 = r13 - r11;\n if (r6 <= 0) goto L_0x00bd;\n L_0x0080:\n r0 = r21;\n r14 = r0.mMaxWidths;\n r0 = new int[r13];\n r17 = r0;\n r0 = r17;\n r1 = r21;\n r1.mMaxWidths = r0;\n r17 = 0;\n r0 = r21;\n r0 = r0.mMaxWidths;\n r18 = r0;\n r19 = 0;\n r0 = r14.length;\n r20 = r0;\n r0 = r17;\n r1 = r18;\n r2 = r19;\n r3 = r20;\n java.lang.System.arraycopy(r14, r0, r1, r2, r3);\n r0 = r14.length;\n r17 = r0;\n r0 = r21;\n r0 = r0.mMaxWidths;\n r18 = r0;\n r0 = r14.length;\n r19 = r0;\n r0 = r16;\n r1 = r17;\n r2 = r18;\n r3 = r19;\n java.lang.System.arraycopy(r0, r1, r2, r3, r6);\n L_0x00bd:\n r0 = r21;\n r12 = r0.mMaxWidths;\n r11 = java.lang.Math.min(r11, r13);\n r9 = 0;\n L_0x00c6:\n if (r9 >= r11) goto L_0x001a;\n L_0x00c8:\n r17 = r12[r9];\n r18 = r16[r9];\n r17 = java.lang.Math.max(r17, r18);\n r12[r9] = r17;\n r9 = r9 + 1;\n goto L_0x00c6;\n L_0x00d5:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.TableLayout.findLargestCells(int):void\");\n }",
"public int[] maxset(int[] A) {all negative\n //p n p n n\n //\n int resultIndex = 0;\n BigInteger resultMax = BigInteger.ZERO;\n int resultLength = 0;\n\n int currentIndex = 0;\n BigInteger currentMax = BigInteger.valueOf(0);\n int currentLength = 0;\n\n for (int i = 0; i <= A.length-1; i++) {\n if (A[i] < 0) {\n\n currentMax = BigInteger.ZERO;\n currentIndex = i + 1;\n currentLength = 0;\n } else {\n currentMax = currentMax.add(BigInteger.valueOf(A[i]));\n currentLength++;\n if (currentMax.compareTo(resultMax)>0) {\n resultMax = currentMax;\n resultLength=currentLength;\n resultIndex = currentIndex;\n } else if (((currentMax == resultMax)) &&(currentLength > resultLength)) {\n resultLength = currentLength;\n resultIndex = currentIndex;\n }\n }\n }\n\n int[] resultArray = new int[resultLength];\n for (int i = 0; i < resultLength; i++) {\n resultArray[i] = A[resultIndex + i];\n }\n\n return resultArray;\n }",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int getMaxRows();",
"public int longestConsecutive(int[] num) {\r\n\r\n Set<Integer> set = new HashSet<Integer>();\r\n for (int i : num) {\r\n set.add(i);\r\n }\r\n\r\n int max = 0;\r\n for (int curt : num) {\r\n\r\n int left = curt - 1;\r\n int right = curt + 1;\r\n int count = 1;\r\n\r\n while (set.contains(left)) {\r\n set.remove(left); // save some time, will TLE if not remove this\r\n left--;\r\n count++;\r\n }\r\n\r\n while (set.contains(right)) {\r\n set.remove(right);\r\n right++;\r\n count++;\r\n }\r\n\r\n if (count > max) {\r\n max = count;\r\n }\r\n }\r\n\r\n return max;\r\n }",
"public static void buildMaxHeap(Integer[] A) {\n for (int r = A.length / 2 - 1; r >= 0; r--) {\n maxHeapify(A, r);\n }\n\n }",
"public int longestArithSeqLength(int[] A) {\n if (A.length <= 2) return A.length;\n \n int ans = 2, n = A.length;\n Map<Integer, Integer>[] dp = new HashMap[n];\n \n for (int i = 0; i < n; i++) {\n dp[i] = new HashMap<>();\n \n for (int j = 0; j < i; j++) {\n int diff = A[i] - A[j];\n dp[i].put(diff, dp[j].getOrDefault(diff, 1) + 1);\n \n ans = Math.max(ans, dp[i].get(diff));\n }\n }\n \n return ans;\n }",
"public Integer[] createInverseSortedArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = defaultLaenge - i;\n }\n\n return value;\n }",
"void buildMaxHeap(int[] array, int heapSize) {\n for (int i = heapSize / 2 - 1; i >= 0; i--) heapify(array, i, heapSize);\n }",
"public int findLongestWordLength() {\n int longestWordLength = wordsArray[0].length();\n\n for (int i = 1; i < wordsArray.length; i++) {\n if (wordsArray[i].length() > wordsArray[i - 1].length()) {\n longestWordLength = wordsArray[i].length();\n }\n }\n if (summationWord.length() > longestWordLength) {\n longestWordLength = summationWord.length();\n }\n return longestWordLength;\n }",
"private static int[] generateArray(int i, int j) {\n int[] col = new int[j+1];\n for(int k = 0; k <= j; k++)\n {\n col[k] = (i+k)%Algo.x.length;\n } \n return col;\n }",
"static int[] randomizeNumRowsCols() {\n\t\t/* Possible layouts are grids of either 2x2, 3x3, or 4x4\n\t\t * Beyond that gets too cluttered on a phone screen\n\t\t * Change NUM_ROWS to change the maximum rows and columns in the puzzle grid */\n\t\t\n\t\tfinal int NUM_ROWS = 4;\n\t\tArrayList<Integer> rowcol = new ArrayList<Integer>(NUM_ROWS);\n\t\t\n\t\tfor (int i=2; i<=NUM_ROWS; i++) {\n\t\t\trowcol.add(i);\n\t\t}\n\t Collections.shuffle(rowcol); //randomly shuffle the numbers\n\t \n\t int[] NUM = new int[3];\n\t NUM[ROWS] = rowcol.get(0); //picking the first element of a randomly shuffled array will give a random number\n\t NUM[COLS] = NUM[ROWS]; //set cols = rows because we will only deal with a square grid\n\t NUM[TOTAL] = NUM[ROWS] * NUM[COLS];\n\t \n\t return NUM;\n\t}",
"public int getMaxRows() {\r\n\t\treturn boardcell.length;\r\n\t}",
"public long[][] longMatrix() {\n\t\treturn LongMatrixMath\n\t\t\t\t.toMatrixFromArray(_value, _rowCount, _columnCount);\n\t}",
"int maxRowSize();",
"public int getMaxColumn() {\n return seatPlan[0].length;\n }",
"public IntegerDt getMaxLengthElement() { \n\t\tif (myMaxLength == null) {\n\t\t\tmyMaxLength = new IntegerDt();\n\t\t}\n\t\treturn myMaxLength;\n\t}",
"public int getMaxRow();",
"public int[] array1To100() {\n int[] sirDeLa1La100 = new int[100];\n for (int i = 0; i < sirDeLa1La100.length; i++) {\n sirDeLa1La100[i] = i + 1;\n }\n return sirDeLa1La100;\n }",
"public int maxDigit() {\n int maxDigit = 1;\n for (int i = 0; i < theArray.length; i++) {\n int n = numberOfDigit(theArray[i]);\n if (n > maxDigit)\n maxDigit = n;\n }\n return maxDigit;\n }",
"public int getMaxListLength();"
]
| [
"0.5989729",
"0.59143007",
"0.5845297",
"0.5784342",
"0.57554847",
"0.5693489",
"0.56274",
"0.5615397",
"0.55319417",
"0.55300987",
"0.5523266",
"0.5522342",
"0.5509306",
"0.5483125",
"0.5470952",
"0.54513645",
"0.5444191",
"0.5429009",
"0.5420459",
"0.5414847",
"0.5411078",
"0.5406751",
"0.53940284",
"0.53823316",
"0.5374478",
"0.53332984",
"0.53297764",
"0.5326666",
"0.5297511",
"0.5294684",
"0.52656823",
"0.5247246",
"0.52436817",
"0.52370256",
"0.5234304",
"0.5231365",
"0.52268946",
"0.52259505",
"0.52066964",
"0.5204779",
"0.5204464",
"0.52001476",
"0.5173284",
"0.51681054",
"0.51681054",
"0.5167743",
"0.51618373",
"0.5137992",
"0.51371646",
"0.51267016",
"0.5124223",
"0.5121338",
"0.5118568",
"0.5116405",
"0.5113661",
"0.51011676",
"0.5099357",
"0.5099075",
"0.50981027",
"0.50957566",
"0.50919026",
"0.5091131",
"0.5085026",
"0.5077071",
"0.5068267",
"0.5061256",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.5061114",
"0.505777",
"0.50554514",
"0.50547093",
"0.50453323",
"0.50404143",
"0.5030354",
"0.50224376",
"0.50195384",
"0.50167143",
"0.5003187",
"0.49997893",
"0.49871624",
"0.49844098",
"0.4980302",
"0.4979808",
"0.49726015",
"0.49677825"
]
| 0.0 | -1 |
IP donde se encuentra el broker / Constructor del Servidor A | public ServerA(){} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void connect(){\n // Averiguem quina direccio IP hem d'utilitzar\n InetAddress iAddress;\n try {\n iAddress = InetAddress.getLocalHost();\n String IP = iAddress.getHostAddress();\n\n //Socket sServidor = new Socket(\"172.20.31.90\", 33333);\n sServidor = new Socket (String.valueOf(IP), 33333);\n doStream = new DataOutputStream(sServidor.getOutputStream());\n diStream = new DataInputStream(sServidor.getInputStream());\n } catch (ConnectException c){\n System.err.println(\"Error! El servidor no esta disponible!\");\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override public String brokerAddress() { return brokerAddress; }",
"public void getServerIP() { \r\n\t\ttry { \r\n\t\t\tserver = new DatagramSocket(PORT); \r\n\t\t\tbyte buf[] = \"Client\".getBytes(); \r\n\t\t\tInetAddress aInetAddress = InetAddress.getByName(BOOTSTRAP); \r\n\r\n\t\t\tSystem.out.println(aInetAddress.toString()); \r\n\t\t\tDatagramPacket packet = new DatagramPacket(buf, buf.length, aInetAddress, BOOTSTRAP_PORT); \r\n\r\n\t\t\tserver.send(packet); \r\n\r\n\t\t\tbuf = new byte[size]; \r\n\t\t\tpacket = new DatagramPacket(buf, buf.length); \r\n\t\t\tserver.receive(packet); \r\n\r\n\t\t\tString[] addr = new String(packet.getData()).split(COLON); \r\n\t\t\tSERVERIP = addr[0].trim(); \r\n\t\t\tSERVER_PORT = Integer.parseInt(addr[1].trim()); \r\n\r\n\t\t\tSystem.out.println(\"Client Received IP of server: \" + SERVERIP + COLON + SERVER_PORT); \r\n\r\n\t\t} catch (Exception ex) { \r\n\t\t\tex.printStackTrace(); \r\n\t\t} finally { \r\n\t\t\tif (server != null) \r\n\t\t\t\tserver.close(); \r\n\t\t} \r\n\t}",
"public SIMClient(InetAddress serIP, int p,byte[] serPubKey){\n\t\tserverIP = serIP;\n\t\tport = p;\n\t\tserverPubKey = serPubKey;\n\t}",
"java.lang.String getBrokerAddress();",
"public ServerConnection()\n {\n //Initializing of the variables used in the constructor\n this.hostAddress = \"http://localhost\";\n this.port = 8882;\n }",
"@Override\r\n public String getIPAddress() {\r\n return address;\r\n }",
"abstract String getRemoteAddress();",
"private static void abrirPuerto() {\n try {\n serverSocket = new ServerSocket(PUERTO);\n System.out.println(\"Servidor escuchando por el puerto: \" + PUERTO);\n } catch (IOException ex) {\n Logger.getLogger(ServidorUnicauca.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void start_Connexion()throws UnknownHostException, IOException{\n \tsocket = new Socket(IP,num_Socket);\n \tout = new ObjectOutputStream(socket.getOutputStream());\n \tin = new ObjectInputStream(socket.getInputStream());\n \t\n }",
"public Echange_Client() throws UnknownHostException, IOException {\n start_Connexion(); \n }",
"public DownloadClient(String hostIP) {\n\t\tthis.IP = hostIP;\n\t}",
"public JSONClientAddress(int p, InetAddress a) {\n port = p;\n address = a;\n }",
"public EchoClient(String address) {\n try {\n socket = new DatagramSocket();\n } catch (SocketException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n try {\n inetAddress = InetAddress.getByName((address != null) ? address : \"localhost\");\n } catch (UnknownHostException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"Client(String destination, int sendPort, int myPort, String myIP) {\n\t\tthis.destination = destination;\n\t\tthis.sendPort = sendPort;\n\t\tthis.myPort = myPort;\n\t\tthis.myIP = myIP;\n\t}",
"public ClientManager(String ipAddress) {\n this.ipAddress = ipAddress;\n }",
"public TcpClient(OnMessageReceived listener, String ip) {\n this.serverIp = ip;\n this.messageListener = listener;\n }",
"public int getPort(){\r\n return localPort;\r\n }",
"public int getPort(){\r\n return localPort;\r\n }",
"public Cinit(String server_ip) {\n this.server_ip=server_ip;\n start();\n }",
"public Server(){\r\n \r\n this.m_Clients = new TeilnehmerListe();\r\n this.m_Port = 7575;\r\n }",
"java.lang.String getServerAddress();",
"public EthernetStaticIP() {\n }",
"public InetAddress getIPAddress ( ) { return _IPAddress; }",
"@Override\n \tpublic void setOutboundInterface(InetSocketAddress arg0) {\n \t\t\n \t}",
"String getAddr();",
"@Override\n \tpublic void setOutboundInterface(InetAddress arg0) {\n \t}",
"private void print_addr() {\n try(final DatagramSocket socket = new DatagramSocket()){\n socket.connect(InetAddress.getByName(\"8.8.8.8\"), 10002);\n System.out.println(socket.getLocalAddress().getHostAddress()+\":\"+port);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public String getIp();",
"public CoronosClient(String ip){\n //GUI creator\n loginBuilder();\n uiBuilder();\n\n //create Socket + Streams\n try {\n s = new Socket(ip, 16789);\n oos = new ObjectOutputStream(s.getOutputStream());\n ois = new ObjectInputStream(s.getInputStream());\n serverListener();\n } catch (UnknownHostException e) {\n e.printStackTrace();\n } catch (BindException be) {\n be.printStackTrace();\n } catch(ConnectException ce){\n JOptionPane.showMessageDialog(loginButton, \"Failed to connect to server, please contact your System Administrator\", \"Connection Error\", JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }",
"public ServidorSocket() throws IOException {\n\t\tservidor = new ServerSocket(PUERTO);\n\t\tcliente = new Socket();\n\t}",
"public ServerSide(Config config, InetAddress inetAddress, int port) {\n super(config);\n this.inetAddress = inetAddress;\n this.port = port;\n }",
"public InetAddress getIP();",
"public void init(){\n taskClient.connect(\"127.0.0.1\", 9123);\n }",
"@Override\r\n\tpublic String getIp() {\n\t\treturn null;\r\n\t}",
"public TCPReceiver(NetWorkInterface ni){\n\t\tthis.ni = ni;\n\t\ttry {\n\t\t\tmySocket = new ServerSocket(NetWorkInterface.portReceiver);\n\t\t} catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public abstract InetSocketAddress listeningAddress();",
"private static InetAddress getBootstrapServer(InetAddress hostIP) {\n\t\tSocket socket = null;\n\t\tInputStream in = null;\n\t\tOutputStream out = null;\n\t\ttry {\n\t\t\t//socket = new Socket();\n\t\t\tsocket = new Socket(JoinHOST,OW_PORT);\n\t\t\t//socket.connect(iSock, 3000);\n\t\t\tout = socket.getOutputStream();\n\t\t\tObjectOutputStream oout = new ObjectOutputStream(out);\n\t\t\toout.writeObject(hostIP.getHostName());\n\t\t\t//oout.writeObject(hostIP.getHostAddress());\n\t\t\t//oout.writeObject(\"hakkoudasan.matlab.nitech.ac.jp\");\n\t\t\t\n\t\t\tin = socket.getInputStream();\n\t\t\tObjectInputStream oin = new ObjectInputStream(in);\n\t\t\tString bsIP = (String)oin.readObject();\n\t\t\tif(bsIP.equals(hostIP.getHostName())) {\n//\t\t\t\tif(bsIP.equals(\"10.192.41.113\")) {\n\t\t\t\t//if(bsIP.equals(\"hakkoudasan.matlab.nitech.ac.jp\")) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tInetAddress iNetAddr = InetAddress.getByName(bsIP);\n\t\t\treturn iNetAddr;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (socket != null) {\n\t\t\t\t\tsocket.close();\n\t\t\t\t\tsocket = null;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t/* ignore */\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}",
"private static void selectCordinator() throws NumberFormatException, UnknownHostException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tRandom randomGen = new Random();\n\t\tSystem.out.println(\"Size: \"+allReplicaAddrs.size());\n\t\tint index = randomGen.nextInt(allReplicaAddrs.size());\n\t\tString arrayItem = allReplicaAddrs.get(index);\n\t\tString[] ipPort = arrayItem.split(\" \");\n\t\tcoordIp = ipPort[0];\n\t\tcoordPort = Integer.parseInt(ipPort[1]);\n\t\t//socket = new Socket(coordIp,coordPort);\n\t}",
"public Servidor(Socket s) {\r\n\t\tconexao = s;\r\n\t}",
"public ClientThread(String ip, String port){ // initiate with IP and port\n this.Port = port;\n this.IP = ip;\n }",
"public Client() {\n _host_name = DEFAULT_SERVER;\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }",
"public IPConnection() {\n\t\tbrickd = new BrickDaemon(\"2\", this);\n\t}",
"private static String getSlaveIpPort() {\n\t\treturn \"\";\n\t}",
"public void createClient() {\n client = new UdpClient(Util.semIp, Util.semPort, this);\n\n // Le paso true porque quiero que lo haga en un hilo nuevo\n client.connect(true);\n }",
"public ServeurGestion(int portClient){\r\n try {\r\n ecoute=new ServerSocket(portClient);\r\n appels=new Vector<>();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ServeurGestion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"public InetAddress getHost();",
"public static InetAddress getServerInet(){\n return thisServer.getIp();\n }",
"public int getIp() {\n return ip_;\n }",
"private static void getTcpPublicAddress() {\n\n\t\tString address = readFileString(FileConstant.FILE_NAME_TCP_ADDRESS_PUBLIC);\n\n\t\tif (Utils.isNotEmpty(address)) {\n\n\t\t\tint start = 0;\n\t\t\tint end = address.indexOf(FileConstant.FILE_STRING_SPLIP_SYMBOL, start);\n\n\t\t\tif (end < address.length()) {\n\n\t\t\t\tConfigureVariable.Tcp_Address_Ip_Public = address.substring(start, end);\n\n\t\t\t\tstart = end + 1;\n\t\t\t\tend = address.length();\n\n\t\t\t\tConfigureVariable.Tcp_Address_Port_Public = address.substring(start, end);\n\t\t\t}\n\t\t}\n\t}",
"int getAddr();",
"@Override\n public int getClientBroadcastPort() {\n return 10082;\n }",
"public JBossControllerAddress() {\n\n super(PROTOCOL, null, null, DEFAULT_HOST, DEFAULT_PORT);\n }",
"public LoadBalancer(int port) throws IOException {\n super(port);\n tabServerssout = new Vector();\n tabServerssin = new Vector();\n //On se connecte aux serveurs\n addServers(8010,8013);\n }",
"@Override\n\tpublic String getArduinoIP() {\n\t\treturn ipaddress;\n\t}",
"public MClient (MACAddress hwAddress, InetAddress ipAddress, Svap svap) \n\t{\n\t\tthis.hwAddress = hwAddress;\n\t\tthis.ipAddress = ipAddress;\n\t\tthis.svap = svap;\n\t}",
"@Override\n\tpublic String getIp() {\n\t\treturn ip;\n\t}",
"@Override\n public int getServerBroadcastPort() {\n return 10081;\n }",
"@Override\n\t\tpublic String getRemoteAddr() {\n\t\t\treturn null;\n\t\t}",
"public String getIP() {\n return this.IP;\n }",
"public ClientRouter(String ipAddress, int port) {\n try {\n this.socket = new SocketWrapper(new Socket(ipAddress, port));\n this.parser = new JsonParser();\n this.totalHumanPlayers = 0;\n start();\n } catch (IOException e) {\n log.error(\"Could not obtain connection to host\", e);\n System.exit(-1);\n }\n }",
"String getIp();",
"String getIp();",
"public String getServerIP()\n\t{\n\t\treturn this.serverIP;\n\t}",
"public ChatRoomServer(int portNumber){\n this.ClientPort = portNumber;\n }",
"private void init(String ip, int port, String name) {\n this.settings = new Settings(ip, port, name);\n this.network = new Network(this);\n this.clientGUI = new ClientGUI(this);\n //\n new Thread(network::start).start();\n }",
"public String getNiceServerIP(){\n\t\treturn(niceServerAddress);\n\t}",
"public cliente(String host, int portNumber, String dirDownload){\r\n \r\n if (dirDownload != null){\r\n this.dirDownload = dirDownload; \r\n \r\n }\r\n this.IP = host;\r\n try {\r\n InetAddress inet = InetAddress.getByName(host);\r\n socket = new Socket(inet, portNumber);\r\n System.out.println(\"Puerto del cliente: \" + socket);\r\n \r\n this.clientIn= new BufferedReader(new InputStreamReader(socket.getInputStream())); \r\n this.clientOut = new PrintWriter(socket.getOutputStream(), true);\r\n }\r\n catch (IOException e) {\r\n System.out.println(\"Excepcion de E/S : \" + e);\r\n }\r\n \r\n}",
"public String getIPAddress()\n {\n return fIPAddress;\n }",
"public PeerToPeerConnection(GameController controller, String ip, int port){\n this.controller = controller;\n this.ip = ip;\n this.port = port;\n clientID = \"ConnectingClient\";\n isHost = false;\n System.out.println(\"PeerToPeerConnection: Constructor: ConnectingClient\");\n }",
"int getIp();",
"int getIp();",
"int getIp();",
"public Configuration() {\r\n\t\tthis.serverAddress = \"127.0.0.1\";\r\n\t\tthis.serverPort = \"2586\";\r\n\t}",
"public String getTcpAddress() {\n\t\tfinal String key = ConfigNames.ADDRESS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn getJson().getString(key);\n\t}",
"public ServerConnecter() {\r\n\r\n\t}",
"public void socketConnect(String ip, int port) throws UnknownHostException, \n IOException{\n System.out.println(\"[Connecting to socket...]\"); \n SSocket.socket= new Socket(ip, port); \n \n System.out.println(\"CORRIENDO EN EL PUERTO:\"+SSocket.socket.getLocalAddress()+\":\"+SSocket.socket.getPort());\n }",
"public Client(String serverIP) {\n if (!connectToServer(serverIP)) {\n System.out.println(\"XX. Failed to open socket connection to: \" + serverIP);\n }\n }",
"public String getIp() {\n return ip;\n }",
"public EchoClient(String address, int port) {\n try {\n inetAddress = InetAddress.getByName((address != null) ? address : \"localhost\");\n } catch (UnknownHostException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n try {\n socket = new DatagramSocket(port, inetAddress);\n } catch (SocketException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public int getIp() {\n return ip_;\n }",
"public int getIp() {\n return ip_;\n }",
"public int getIp() {\n return ip_;\n }",
"public String getServerIP() {\n\t\treturn serverIP;\n\t}",
"default String getHost() {\n return \"localhost\";\n }",
"public ClientTSap() {\n socketFactory = SocketFactory.getDefault();\n }",
"public Client (String ipAdresse, int port) {\n\t\tthis(\"Unbenannter Client\", ipAdresse, port);\n\t}",
"public Gossip_server() throws IOException {\n\t\t//creo socket\n\t\tsocket = new ServerSocket(Gossip_config.TCP_PORT);\n\t\t\n\t\t//creo thread pool\n\t\tpool = (ThreadPoolExecutor)Executors.newCachedThreadPool();\n\t\t\n\t\t//ininzializzo struttura dati\n\t\tdata = new Gossip_data();\n\t\t\n\t}",
"public ControlCenter(){\n serverConnect = new Sockets();\n serverConnect.startClient(\"127.0.0.1\", 5000);\n port = 5000;\n }",
"public MessageReceiver(String ip, int port) throws UnknownHostException, IOException {\r\n\t\tsuper();\r\n\t\tthis.ip = ip;\r\n\t\tthis.port = port;\r\n\t\tSocket mainSocket = new Socket(this.ip, this.port);\r\n\t\tsetSocket(mainSocket);\r\n\t}",
"@Override\n\tInetSocketAddress remoteAddress();",
"@Override\n\tpublic String getRemoteAddr() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getRemoteAddr() {\n\t\treturn null;\n\t}",
"public String getHost();",
"public String getHost();",
"String getIntegHost();",
"public static String getIPCliente(){//192.168, 172.16. o 10.0.\n\t\tString ipAddress=\"\";\n\t\ttry{\n\t\t\tHttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\n\t\t\tipAddress = request.getHeader(\"X-FORWARDED-FOR\");\n\t\t\tif ( ipAddress == null ) {\n\t\t\t\tipAddress = request.getRemoteAddr();\n\t\t\t\tif(ipAddress.equals(\"127.0.0.1\")){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tipAddress = InetAddress.getLocalHost().getHostAddress();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tipAddress = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tString[] ips = ipAddress.split(\",\");\n\t\t\tfor(String ip : ips){\n\t\t\t\tif(!ip.trim().startsWith(\"127.0.\")){\n\t\t\t\t\tipAddress = ip;\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn ipAddress;\n\t}",
"java.lang.String getAgentIP();",
"public String getIp(){\n\treturn ip;\n }",
"@Override\n\tpublic void BootStrapNode(String ip) throws RemoteException {\n\t\tnodeIp = ip;\n\t\thasNeighbours = true;\n\t}"
]
| [
"0.6702812",
"0.66442037",
"0.652145",
"0.6343684",
"0.6340324",
"0.6310315",
"0.6161871",
"0.60895413",
"0.6081581",
"0.60570735",
"0.60479516",
"0.6047344",
"0.59895235",
"0.59818596",
"0.5978714",
"0.59628457",
"0.59308946",
"0.59298426",
"0.59298426",
"0.5910162",
"0.5908249",
"0.5900655",
"0.5900193",
"0.5874922",
"0.58597803",
"0.58593804",
"0.5849716",
"0.58413845",
"0.5831991",
"0.5823081",
"0.58225304",
"0.58087295",
"0.58058935",
"0.5799681",
"0.57739204",
"0.57621336",
"0.5761236",
"0.57507634",
"0.5746348",
"0.57355106",
"0.57293993",
"0.5709609",
"0.5692705",
"0.5684194",
"0.56841373",
"0.56802493",
"0.56755775",
"0.5674096",
"0.5669743",
"0.5661649",
"0.56540036",
"0.56405574",
"0.563521",
"0.5630417",
"0.56295544",
"0.56286585",
"0.56285685",
"0.5623696",
"0.5619692",
"0.5617305",
"0.5617201",
"0.5611984",
"0.5611984",
"0.5609333",
"0.5598958",
"0.55960804",
"0.5593756",
"0.55925226",
"0.5582704",
"0.55781263",
"0.5577517",
"0.5577517",
"0.5577517",
"0.55764556",
"0.55717164",
"0.5570158",
"0.55700636",
"0.5568261",
"0.55642545",
"0.55637556",
"0.5562483",
"0.5562483",
"0.5562483",
"0.556196",
"0.5561245",
"0.55591905",
"0.5556575",
"0.55544275",
"0.5550382",
"0.55484885",
"0.5539536",
"0.55388474",
"0.55388474",
"0.55382395",
"0.55382395",
"0.5537264",
"0.5532817",
"0.5532135",
"0.55317104",
"0.55269146"
]
| 0.6042307 | 12 |
/ Devuelve un string con la fecha actual | public String dar_fecha(){
Date date = new Date();
DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
return dateFormat.format(date).toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String ObtenerFechaActual() {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/mm/yyyy\");\n Calendar calendar = GregorianCalendar.getInstance();\n return String.valueOf(simpleDateFormat.format(calendar.getTime()));\n }",
"public static String fechaActual() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(calendario.getTime());\n }",
"public static String getFechaActual() {\n Date ahora = new Date();\n SimpleDateFormat formateador = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formateador.format(ahora);\n }",
"public static String obtenerFechaActual() {\n\t\tCalendar date = Calendar.getInstance();\n\t\treturn date.get(Calendar.DATE) + \"_\" + (date.get(Calendar.MONTH) < 10 ? \"0\" + (date.get(Calendar.MONTH) + 1) : (date.get(Calendar.MONTH) + 1) + \"\") + \"_\" + date.get(Calendar.YEAR);\n\t}",
"private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t;\r\n\t}",
"private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}",
"java.lang.String getDate();",
"String getDate();",
"String getDate();",
"private String getFecha() {\n\t\tLocalDateTime myDateObj = LocalDateTime.now();\n\t\tDateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n\t\tString formattedDate = myDateObj.format(myFormatObj);\n \n\t\treturn formattedDate;\n }",
"public abstract java.lang.String getFecha_inicio();",
"public abstract java.lang.String getFecha_termino();",
"public String getFechaFinal(){\n\n\t\treturn campoFinal.getText();\n\n\t}",
"private static String fechaMod(File imagen) {\n\t\tlong tiempo = imagen.lastModified();\n\t\tDate d = new Date(tiempo);\n\t\tCalendar c = new GregorianCalendar();\n\t\tc.setTime(d);\n\t\tString dia = Integer.toString(c.get(Calendar.DATE));\n\t\tString mes = Integer.toString(c.get(Calendar.MONTH));\n\t\tString anyo = Integer.toString(c.get(Calendar.YEAR));\n\t\tString hora = Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\tString minuto = Integer.toString(c.get(Calendar.MINUTE));\n\t\tString segundo = Integer.toString(c.get(Calendar.SECOND));\n\t\treturn hora+\":\"+minuto+\":\"+segundo+\" - \"+ dia+\"/\"+mes+\"/\"+\n\t\tanyo;\n\t}",
"public String getFechatxt(Date d){\n \n try {\n String formato = selectorfecha.getDateFormatString();\n //Formato\n \n SimpleDateFormat sdf = new SimpleDateFormat(formato);\n String txtfechap = sdf.format(d);\n return txtfechap;\n } catch (NullPointerException ex) {\n JOptionPane.showMessageDialog(this, \"Al menos selecciona una fecha válida!\", \"Error!\", JOptionPane.INFORMATION_MESSAGE);\n return null;\n\n }\n\n\n \n }",
"public String formatoCortoDeFecha(Date fecha){\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n return format.format(fecha);\n }",
"public void setTextFechaModificacionEd(String text) { doSetText(this.$element_FechaModificacionEd, text); }",
"public String getFechaEntrada(){\n\t\treturn fecha.substring(0,10);\n\t}",
"java.lang.String getToDate();",
"public String formatDate(Object valor) {\r\n\t\tString aux = valor.toString();\r\n\t\tif (!aux.equalsIgnoreCase(\" \") && !aux.equalsIgnoreCase(\"\")) {\r\n\t\t\tString anio = aux.substring(0, 4);\r\n\t\t\tString mes = aux.substring(4, 6);\r\n\t\t\tString dia = aux.substring(6);\r\n\t\t\treturn dia + \"/\" + mes + \"/\" + anio;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn aux;\r\n\t}",
"public String getFechaSistema() {\n Date date = new Date();\n DateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n //Aplicamos el formato al objeto Date y el resultado se\n //lo pasamos a la variable String\n fechaSistema = formato.format(date);\n \n return fechaSistema;\n }",
"public void fechahoy(){\n Date fecha = new Date();\n \n Calendar c1 = Calendar.getInstance();\n Calendar c2 = new GregorianCalendar();\n \n String dia = Integer.toString(c1.get(Calendar.DATE));\n String mes = Integer.toString(c2.get(Calendar.MONTH));\n int mm = Integer.parseInt(mes);\n int nmes = mm +1;\n String memes = String.valueOf(nmes);\n if (nmes < 10) {\n memes = \"0\"+memes;\n }\n String anio = Integer.toString(c1.get(Calendar.YEAR));\n \n String fechoy = anio+\"-\"+memes+\"-\"+dia;\n \n txtFecha.setText(fechoy);\n \n }",
"public static String strToDateFormToDB(String fecha){ \n\t\tString dateValue = fecha;\n\t\tint index = dateValue.indexOf(\"/\");\n\t\tString day = dateValue.substring(0,index);\n\t\tint index2 = dateValue.indexOf(\"/\",index+1);\n\t\tString month = dateValue.substring(index+1,index2);\n\t\tString year = dateValue.substring(index2+1,index2+5);\n\t\tdateValue=year+\"-\"+month+\"-\"+day;\n\t\treturn dateValue;\n\t}",
"private void updateDateTxtV()\n {\n String dateFormat =\"EEE, d MMM yyyy\";\n SimpleDateFormat sdf = new SimpleDateFormat(dateFormat, Locale.CANADA);\n dateStr = sdf.format(cal.getTime());\n dateTxtV.setText(dateStr);\n\n //unix datetime for saving in db\n dateTimeUnix = cal.getTimeInMillis() / 1000L;\n }",
"public String getDateString(){\n return Utilities.dateToString(date);\n }",
"public String getFecha(){\r\n return fechaInicial.get(Calendar.DAY_OF_MONTH)+\"/\"+(fechaInicial.get(Calendar.MONTH)+1)+\"/\"+fechaInicial.get(Calendar.YEAR);\r\n }",
"public String obtenerFechaSistema() {\n Calendar fecha = new GregorianCalendar();\r\n//Obtenemos el valor del año, mes, día,\r\n//hora, minuto y segundo del sistema\r\n//usando el método get y el parámetro correspondiente\r\n int anio = fecha.get(Calendar.YEAR);\r\n int mes = fecha.get(Calendar.MONTH)+1;\r\n int dia = fecha.get(Calendar.DAY_OF_MONTH);\r\n// int hora = fecha.get(Calendar.HOUR_OF_DAY);\r\n// int minuto = fecha.get(Calendar.MINUTE);\r\n// int segundo = fecha.get(Calendar.SECOND);\r\n// String ff = \"\" + dia + \"/\" + (mes + 1) + \"/\" + anio;\r\n String ff;\r\n// = System.out.println(\"Fecha Actual: \"\r\n// + dia + \"/\" + (mes + 1) + \"/\" + año);\r\n// System.out.printf(\"Hora Actual: %02d:%02d:%02d %n\",\r\n// hora, minuto, segundo);\r\n// ff = hora + \":\" + minuto + \":\" + segundo + \".0\";\r\n ff = anio + \"-\" + mes + \"-\" + dia;\r\n return ff;\r\n }",
"java.lang.String getFoundingDate();",
"public void mostrarHora(String formato){\n Date objDate = new Date();\n SimpleDateFormat objSDF = new SimpleDateFormat(formato);\n //este sera el resultado de la fechas\n fecha=objSDF.format(objDate);\n }",
"public String convierteFormatoFecha(String fecha) {\n\t\tString resultado = \"\";\n\t\tresultado = fecha.substring(6,8)+\"/\"+fecha.substring(4,6)+\"/\"+fecha.substring(0, 4);\n\t\treturn resultado;\n\t}",
"private String getDateString(Calendar cal) {\n Calendar current = Calendar.getInstance();\n String date = \"\";\n if (cal.get(Calendar.DAY_OF_YEAR) == current.get(Calendar.DAY_OF_YEAR)) {\n date = getResources().getString(R.string.content_today) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else if ((cal.get(Calendar.DAY_OF_YEAR) - 1) == current.get(Calendar.DAY_OF_YEAR)) {\n date = getResources().getString(R.string.content_yesterday) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else if ((cal.get(Calendar.DAY_OF_YEAR) - 2) == current.get(Calendar.DAY_OF_YEAR)\n && getResources().getConfiguration().locale.equals(new Locale(\"vn\"))) {\n date = getResources().getString(R.string.content_before_yesterday) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else {\n date = String.format(\"%02d-%02d-%02d %02d:%02d\", mCal.get(Calendar.DAY_OF_MONTH), mCal.get(Calendar.MONTH) + 1, mCal.get(Calendar.YEAR), cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n }\n\n return date;\n }",
"public String getFechaModificacion() { return (this.fechaModificacion == null) ? \"\" : this.fechaModificacion; }",
"public String getFechaModificacion() { return (this.fechaModificacion == null) ? \"\" : this.fechaModificacion; }",
"public Date getFechaActual() {\r\n\t\treturn controlador.getFechaActual();\r\n\t}",
"public static String formartDateMpesa(String mDate) {\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tSimpleDateFormat outSDF = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n\t\t\t String outDate = \"\";\n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}",
"public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }",
"public String getFechaFinal() {\n return fechaFinal;\n }",
"public String getDateFinStr() {\n\t\tif (dateFin != null)\n\t\t\treturn sdf.format(dateFin);\n\t\telse\n\t\t\treturn \"\";\n\t}",
"public static String DiaActual(){\n java.util.Date fecha = new Date();\n int dia = fecha.getDay();\n String myDia=null;\n switch (dia){\n case 1:\n myDia=\"LUNES\";\n break;\n case 2:\n myDia=\"MARTES\";\n break;\n case 3:\n myDia=\"MIERCOLES\";\n break;\n case 4:\n myDia=\"JUEVES\";\n break;\n case 5:\n myDia=\"VIERNES\";\n break;\n case 6:\n myDia=\"SABADO\";\n break;\n case 7:\n myDia=\"DOMINGO\";\n break; \n }\n return myDia;\n }",
"public String getFecha() {\n return Fecha;\n }",
"public void setTextFechaInsercionEd(String text) { doSetText(this.$element_FechaInsercionEd, text); }",
"private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }",
"public static String formatFechaMascara(String fecha, String formatoFecha) {\n SimpleDateFormat sdf = new SimpleDateFormat(formatoFecha);\n String response = \"\";\n // format BD\n SimpleDateFormat sdfBD = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date fechaParse = null;\n try {\n\n fechaParse = sdfBD.parse(fecha.substring(0, 10));\n\n } catch (java.text.ParseException e) {\n try {\n fechaParse = sdf.parse(fecha);\n } catch (java.text.ParseException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }\n\n if (fechaParse == null) return \"\";\n\n response = sdf.format(fechaParse);\n return response;\n }",
"private static String adaptarFecha(int fecha) {\n\t\tString fechaFormateada = String.valueOf(fecha);\n\t\twhile(fechaFormateada.length()<2){\n\t\t\tfechaFormateada = \"0\"+fechaFormateada;\n\t\t}\n\n\t\treturn fechaFormateada;\n\t}",
"public void setFechaModificacion(String p) { this.fechaModificacion = p; }",
"public void setFechaModificacion(String p) { this.fechaModificacion = p; }",
"protected String getDateString() {\n String result = null;\n if (!suppressDate) {\n result = currentDateStr;\n }\n return result;\n }",
"public final String obtenerFechaFormateada() {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\");\n return fechaDeLaVisita.get().format(formatter);\n }",
"public abstract void setFecha_inicio(java.lang.String newFecha_inicio);",
"private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}",
"private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}",
"private Date convertirStringEnFecha(String dia, String hora)\n {\n String fecha = dia + \" \" + hora;\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy hh:mm\");\n Date fecha_conv = new Date();\n try\n {\n fecha_conv = format.parse(fecha);\n }catch (ParseException e)\n {\n Log.e(TAG, e.toString());\n }\n return fecha_conv;\n }",
"private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}",
"public String getFechaInicio(){\n\n\t\treturn campoInicio.getText();\n\n\t}",
"public String getDate()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"EE d MMM yyyy\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }",
"public String getFecha() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(calendario.getTime());\n }",
"Date getFechaNacimiento();",
"public String Get_date() \n {\n \n return date;\n }",
"public String getDataNascimentoString() {\r\n\r\n\t\tSimpleDateFormat data = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t\treturn data.format(this.dataNascimento.getTime());\r\n\r\n\t}",
"public abstract void setFecha_termino(java.lang.String newFecha_termino);",
"public String retrieveDate() {\n // Check if there's a valid event date.\n String date = _dateET.getText().toString();\n if (date == null || date.equals(\"\")) {\n Toast.makeText(AddActivity.this, \"Please enter a valid date.\", Toast.LENGTH_LONG).show();\n return \"\";\n }\n Pattern p = Pattern.compile(\"^(0[1-9]|1[012])/(0[1-9]|[12][0-9]|3[01])/(19|20)\\\\d\\\\d$\");\n Matcher m = p.matcher(date);\n if (!m.find()) {\n Toast.makeText(AddActivity.this, \"Please input a valid date in mm/dd/yyyy format.\", Toast.LENGTH_LONG).show();\n return \"\";\n }\n return date;\n }",
"public String getDataNastereString(){\n\t\tDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tString sd = df.format(new Date(data_nastere.getTime()));\n\t\treturn sd;\n\t\t\n\t}",
"public String getDateAsString(){\n\t\t//\tGet Date\n Date date = getDate();\n if(date != null)\n \treturn backFormat.format(date);\n\t\treturn null;\n\t}",
"@Test\n public void dateUtilTest() {\n String orgStr = \"2016-01-05 10:00:17\";\n Date orgDate = new Date(1451959217000L);\n Assert.assertTrue(DateStrValueConvert.dateFormat(orgDate).equals(orgStr));\n Assert.assertTrue(DateStrValueConvert.dateConvert(orgStr).equals(orgDate));\n }",
"private String getDateTime() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.GERMANY);\n Date date = new Date();\n return dateFormat.format(date);\n }",
"@Test\n\tpublic void systemDate_Get()\n\t{\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM-dd-yyyy\");\n\t\t\n\t\t// Created object of Date, to get system current date\n\t\tDate date = new Date();\n\t\t\n\t\tString currDate = dateFormat.format(date);\n\t\t\n\t\tSystem.out.println(\"Today's date is : \"+currDate);\n\n\t}",
"private void getDate() {\t// use the date service to get the date\r\n String currentDateTimeText = theDateService.getDateAndTime();\r\n this.send(currentDateTimeText);\r\n }",
"private static String timeFor(Date date)\n\t{\n\t\tDateFormat df = new InternetDateFormat();\n\t\tString theTime = df.format(date);\n\t\treturn theTime;\n\t}",
"public LocalDate GetFechaActual() throws RemoteException;",
"public static String getDate()\r\n {\r\n Date now = new Date();\r\n DateFormat df = new SimpleDateFormat (\"yyyy-MM-dd'T'hh-mm-ss\");\r\n String currentTime = df.format(now);\r\n return currentTime; \r\n \r\n }",
"public String getCurrentDate(String dateForm) {\n DateFormat dateFormat = new SimpleDateFormat(dateForm);\n\n //get current date time with Date()\n Date date = new Date();\n\n // Now format the date\n String date1= dateFormat.format(date);\n\n return date1;\n }",
"public static String getDate(String fromatstr) {\n\t\tString\ttoday=\"\";\n\t\t\n\t\tCalendar Datenow=Calendar.getInstance();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(fromatstr);\n\t today = formatter.format(Datenow.getTime());\n\n\t return today;\n\t}",
"public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}",
"public void setFechaFinal(String fechaFinal) {\n this.fechaFinal = fechaFinal;\n }",
"public static Date stringToDate(String fecha, String formato){\n if(fecha==null || fecha.equals(\"\")){\n return null;\n } \n GregorianCalendar gc = new GregorianCalendar();\n try {\n fecha = nullToBlank(fecha);\n SimpleDateFormat df = new SimpleDateFormat(formato);\n gc.setTime(df.parse(fecha));\n } catch (Exception e) {\n e.printStackTrace();\n }\n return gc.getTime();\n }",
"public static String convertDateToSend(String gotdate){\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(Long.parseLong(gotdate));\n SimpleDateFormat inputFormat = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n SimpleDateFormat outputFormat = new SimpleDateFormat(\"dd MMM yyyy\");\n /*Date parsedDate = null;\n try {\n parsedDate = inputFormat.parse(gotdate);\n } catch (ParseException e) {\n e.printStackTrace();\n }*/\n String formattedDate = outputFormat.format(calendar.getTime());\n return formattedDate;\n }",
"public String getDateConvert() {\n SimpleDateFormat dateFormat1 = new SimpleDateFormat(\"MMM dd yyyy - hh:mm\");\n SimpleDateFormat dateFormat2 = new SimpleDateFormat(\"a\");\n String date = dateFormat1.format(this.timePost) + dateFormat2.format(this.timePost).toLowerCase();\n return date;\n }",
"public String getMyDatePosted() {\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\", Locale.US);\n try {\n Date date = format.parse(myDatePosted);\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n cal.add(Calendar.HOUR, -7);\n Date temp = cal.getTime();\n format.applyPattern(\"MMM dd, yyyy hh:mm a\");\n return format.format(temp);\n } catch (ParseException e) {\n return myDatePosted;\n }\n }",
"public String getEmotionDate() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\", Locale.CANADA);\n return dateFormat.format(emotionDate);\n }",
"static String getRefreshDate(){\n if (updateTime == null){\n updateTime = \"ERROR RETRIEVING CURRENT RATES\";\n }\n return conversionRates.get(\"date\").getAsString() + \" \" + updateTime;\n\n }",
"public String getDateCreationLibelle() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy hh:mm:ss\");\n\t\treturn this.dateCreation.format(format);\n\t}",
"private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }",
"private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }",
"private void updateDatedeparture() {\n String myFormat = \"MM/dd/yy\";\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.FRANCE);\n\n departureDate.setText(sdf.format(myCalendar.getTime()));\n }",
"String getSpokenDateString(Context context) {\n int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE;\n return DateUtils.formatDateTime(context, mDeliveryTime, flags);\n }",
"private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }",
"public String getDateString() {\n DateFormat format = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault());\n return format.format(mDate);\n }",
"private boolean compararFechaActualCon(String fecha_obtenida) {\n boolean fecha_valida = false;\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n Date date = new Date();\n String fecha_actual = dateFormat.format(date);\n\n try {\n Date date2 = dateFormat.parse(fecha_obtenida);\n Date date1 = dateFormat.parse(fecha_actual);\n\n Log.i(\"COMPARANDO FECHAS\", \"F_ACTUAL: \" + date1 + \", F_OBTENIDA: \" + date2);\n\n if (date2.after(date1) ) {\n fecha_valida = true;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: TRUE\");\n } else {\n fecha_valida = false;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: FALSE\");\n\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return fecha_valida;\n }",
"private boolean compararFechaActualCon(String fecha_obtenida) {\n boolean fecha_valida = false;\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n Date date = new Date();\n String fecha_actual = dateFormat.format(date);\n\n try {\n Date date2 = dateFormat.parse(fecha_obtenida);\n Date date1 = dateFormat.parse(fecha_actual);\n\n Log.i(\"COMPARANDO FECHAS\", \"F_ACTUAL: \" + date1 + \", F_OBTENIDA: \" + date2);\n\n if (date2.after(date1) ) {\n fecha_valida = true;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: TRUE\");\n } else {\n fecha_valida = false;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: FALSE\");\n\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return fecha_valida;\n }",
"public static String getDateTime(){\n String pattern = \"MM/dd/yyyy HH:mm:ss\";\n DateFormat df = new SimpleDateFormat(pattern);\n Date today = Calendar.getInstance().getTime();\n String todayAsString = df.format(today);\n return todayAsString;\n }",
"static String localDate(String date){\n Date d = changeDateFormat(date, \"dd/MM/yyyy\");\n DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault());\n return dateFormat.format(d);\n }",
"java.lang.String getTime();",
"public Date getDateDembauche() {\r\n return dateEmbauche.copie();\r\n }",
"private Date stringToSQLDate(String fecha){\n\t\t\n\t\t\n\t\tint ano=Integer.parseInt(fecha.substring(0,4));\n\t\tint mes =Integer.parseInt(fecha.substring(5,7));\n\t\tint dia =Integer.parseInt( fecha.substring(8));\n\t\t\n\t\t@SuppressWarnings(\"deprecation\")\n\t\tDate tmp = new Date(ano-1900,mes-1,dia);\n\t\t\n\t\treturn tmp;\n\t}",
"private void updateTimeTxtV()\n {\n String timeFormat =\"hh:mm aaa\";//12:08 PM\n SimpleDateFormat stf = new SimpleDateFormat(timeFormat, Locale.CANADA);\n timeStr = stf.format(cal.getTime());\n timeTxtV.setText(timeStr);\n\n //unix datetime for saving in db\n dateTimeUnix = cal.getTimeInMillis() / 1000L;\n }",
"String getDateString(Context context) {\n int flags = DateUtils.FORMAT_NO_NOON_MIDNIGHT | DateUtils.FORMAT_SHOW_TIME |\n DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE |\n DateUtils.FORMAT_CAP_AMPM;\n return DateUtils.formatDateTime(context, mDeliveryTime, flags);\n }",
"public void setFecha(String fecha) {\r\n\t\tthis.fecha = fecha;\r\n\t}",
"java.lang.String getFromDate();",
"public void get_fecha(){\n //Obtenemos la fecha\n Calendar c1 = Calendar.getInstance();\n fecha.setCalendar(c1);\n }",
"protected String getReturnDateString() { return \"\" + dateFormat.format(this.returnDate); }"
]
| [
"0.76390636",
"0.7530866",
"0.7464792",
"0.71684235",
"0.7139787",
"0.66954535",
"0.66903657",
"0.66329736",
"0.66329736",
"0.66103995",
"0.65582794",
"0.64196444",
"0.64023435",
"0.6318412",
"0.6237833",
"0.6236237",
"0.6233031",
"0.6215238",
"0.6210151",
"0.6143083",
"0.60962975",
"0.60952026",
"0.6083103",
"0.60817236",
"0.6056479",
"0.6046771",
"0.6044116",
"0.60320914",
"0.60199004",
"0.60185444",
"0.601793",
"0.59959704",
"0.59959704",
"0.59882456",
"0.59552675",
"0.59197265",
"0.5895239",
"0.58928585",
"0.5888533",
"0.5885838",
"0.58691686",
"0.5860067",
"0.585034",
"0.5849525",
"0.58431935",
"0.58431935",
"0.5825123",
"0.5816843",
"0.5801116",
"0.5792797",
"0.5782722",
"0.577937",
"0.5757448",
"0.5749451",
"0.57457924",
"0.5744552",
"0.5743622",
"0.574149",
"0.5739733",
"0.5732849",
"0.57223266",
"0.5721397",
"0.57128525",
"0.57005835",
"0.5695282",
"0.5692521",
"0.56913394",
"0.56871206",
"0.56831074",
"0.5679702",
"0.56744665",
"0.567141",
"0.5667237",
"0.5663139",
"0.56394714",
"0.56368816",
"0.5634309",
"0.5631934",
"0.5628172",
"0.562346",
"0.5623289",
"0.56004584",
"0.56004584",
"0.56000966",
"0.55958706",
"0.559507",
"0.5589194",
"0.55890286",
"0.55890286",
"0.5582312",
"0.55815536",
"0.5579045",
"0.5560917",
"0.5560401",
"0.5550742",
"0.5549202",
"0.5548207",
"0.5540484",
"0.5540006",
"0.553644"
]
| 0.6193807 | 19 |
/ Devuelve un string con la hora actual | public String dar_hora(){
Date date = new Date();
DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
return dateFormat.format(date).toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequiresApi(api = Build.VERSION_CODES.O)\n public String obtenerHora(){\n this.hora = java.time.LocalDateTime.now().toString().substring(11,13);\n return this.hora;\n }",
"public String getHora() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n return sdf.format(calendario.getTime());\n }",
"public String retornaHora(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat hora = new SimpleDateFormat(\"HH\");\n\t\tSimpleDateFormat minuto = new SimpleDateFormat(\"mm\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn hora.format(calendar.getTime()) + \"h\" + minuto.format(calendar.getTime());\n\t}",
"java.lang.String getTime();",
"public String calculateHour() {\n\t\tString hora;\n\t\tString min;\n\t\tString seg;\n\t\tString message;\n\t\tCalendar calendario = new GregorianCalendar();\n\t\tDate horaActual = new Date();\n\t\tcalendario.setTime(horaActual);\n\n\t\thora = calendario.get(Calendar.HOUR_OF_DAY) > 9 ? \"\" + calendario.get(Calendar.HOUR_OF_DAY)\n\t\t\t\t: \"0\" + calendario.get(Calendar.HOUR_OF_DAY);\n\t\tmin = calendario.get(Calendar.MINUTE) > 9 ? \"\" + calendario.get(Calendar.MINUTE)\n\t\t\t\t: \"0\" + calendario.get(Calendar.MINUTE);\n\t\tseg = calendario.get(Calendar.SECOND) > 9 ? \"\" + calendario.get(Calendar.SECOND)\n\t\t\t\t: \"0\" + calendario.get(Calendar.SECOND);\n\n\t\tmessage = hora + \":\" + min + \":\" + seg;\n\t\treturn message;\n\n\t}",
"public String getHoraInicial(){\r\n return fechaInicial.get(Calendar.HOUR_OF_DAY)+\":\"+fechaInicial.get(Calendar.MINUTE);\r\n }",
"public void mostrarHora(String formato){\n Date objDate = new Date();\n SimpleDateFormat objSDF = new SimpleDateFormat(formato);\n //este sera el resultado de la fechas\n fecha=objSDF.format(objDate);\n }",
"private static String timeFor(Date date)\n\t{\n\t\tDateFormat df = new InternetDateFormat();\n\t\tString theTime = df.format(date);\n\t\treturn theTime;\n\t}",
"public String getHoraFinal(){\r\n return fechaFinal.get(Calendar.HOUR_OF_DAY)+\":\"+fechaFinal.get(Calendar.MINUTE);\r\n }",
"private String getDate() {\n\t\tSimpleDateFormat parseFormat = new SimpleDateFormat(\"hh:mm a\");\n\t\tDate date = new Date();\n\t\tString s = parseFormat.format(date);\n\t\treturn s;\n\t}",
"static String timeConversion1(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2);\n\n int hour = Integer.parseInt(hours);\n\n int differential = 0;\n if (\"PM\".equals(ampm) && hour != 12) {\n differential = 12;\n }\n\n\n hour += differential;\n hour = hour % 24;\n\n hours = String.format(\"%02d\", hour);\n\n return hours + \":\" + minutes + \":\" + seconds;\n\n }",
"private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date = (raw[30]) & 0x1F;\n month = ((raw[30] & 0xE0) >> 5) + ((raw[31] & 0x01) << 3);\n year = (((raw[31] & 0xFE) >> 1) & 255) + 2000;\n\n\n\n return hR(month) + \"/\" + hR(date) + \"/\" + year + \" \" + hR(hours) + \":\" + hR(minutes) + \":\" + hR(seconds) + \":00\";\n }",
"private String FormatoHoraDoce(String Hora){\n String HoraFormateada = \"\";\n\n switch (Hora) {\n case \"13\": HoraFormateada = \"1\";\n break;\n case \"14\": HoraFormateada = \"2\";\n break;\n case \"15\": HoraFormateada = \"3\";\n break;\n case \"16\": HoraFormateada = \"4\";\n break;\n case \"17\": HoraFormateada = \"5\";\n break;\n case \"18\": HoraFormateada = \"6\";\n break;\n case \"19\": HoraFormateada = \"7\";\n break;\n case \"20\": HoraFormateada = \"8\";\n break;\n case \"21\": HoraFormateada = \"9\";\n break;\n case \"22\": HoraFormateada = \"10\";\n break;\n case \"23\": HoraFormateada = \"11\";\n break;\n case \"00\": HoraFormateada = \"12\";\n break;\n default:\n int fmat = Integer.parseInt(Hora);\n HoraFormateada = Integer.toString(fmat);\n }\n return HoraFormateada;\n }",
"static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String res = \"\";\n String hrs = s.substring(0, 2);\n String min = s.substring(3, 5);\n String sec = s.substring(6, 8);\n String ampm = s.substring(8);\n int hr = Integer.parseInt(hrs);\n if((ampm.equalsIgnoreCase(\"PM\")) && (hr != 12)) {\n hr += 12;\n if(hr >= 24) {\n hr = 24 - hr;\n }\n }\n else if(ampm.equalsIgnoreCase(\"AM\")) {\n if(hr == 12) {\n hr = 0;\n }\n }\n if(hr < 10) {\n res = res + \"0\" + Integer.toString(hr);\n }\n else {\n res += Integer.toString(hr);\n }\n res = res +\":\" +min +\":\" + sec;\n return res;\n }",
"public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}",
"java.lang.String getServerTime();",
"private String getTimingt(Long pastvalue) {\n DateTime zulu = DateTime.now(DateTimeZone.UTC);\n // DateTimeFormatter formatter = DateTimeFormat.forPattern(\"HH:mm:ss am\");\n Date date = new Date(pastvalue);\n// formattter\n SimpleDateFormat formatter= new SimpleDateFormat(\"hh:mm a\");\n formatter.setTimeZone(TimeZone.getDefault());\n// Pass date object\n return formatter.format(date );\n /*\n long mint = TimeUnit.MILLISECONDS.toMinutes(zulu.toInstant().getMillis() - pastvalue);\n\n if (mint < 60) {\n if (mint > 1)\n return \"Hace \" + mint + \" minutos\";\n else\n return \"Hace \" + mint + \" minuto\";\n } else {\n long horas = TimeUnit.MILLISECONDS.toHours(zulu.toDate().getTime() - pastvalue);\n\n if (horas < 24) {\n if (horas > 1)\n return \"Hace \" + horas + \" horas\";\n else\n return \"Hace \" + horas + \" hora\";\n } else {\n long dias = TimeUnit.MILLISECONDS.toDays(zulu.toDate().getTime() - pastvalue);\n\n if (dias > 1) {\n return \"Hace \" + dias + \" dias\";\n } else\n return \"Hace \" + dias + \" dia\";\n }\n\n\n }*/\n }",
"private void updateTimeTxtV()\n {\n String timeFormat =\"hh:mm aaa\";//12:08 PM\n SimpleDateFormat stf = new SimpleDateFormat(timeFormat, Locale.CANADA);\n timeStr = stf.format(cal.getTime());\n timeTxtV.setText(timeStr);\n\n //unix datetime for saving in db\n dateTimeUnix = cal.getTimeInMillis() / 1000L;\n }",
"public static long toTime(String sHora) throws Exception {\n\n if (sHora.indexOf(\"-\") > -1) {\n sHora = sHora.replace(\"-\", \"\");\n }\n\n final SimpleDateFormat simpleDate = new SimpleDateFormat(CalendarParams.FORMATDATEENGFULL, getLocale(CalendarParams.LOCALE_EN));\n final SimpleDateFormat simpleDateAux = new SimpleDateFormat(CalendarParams.FORMATDATEEN, getLocale(CalendarParams.LOCALE_EN));\n\n final StringBuffer dateGerada = new StringBuffer();\n try {\n dateGerada.append(simpleDateAux.format(new Date()));\n dateGerada.append(' ');\n\n dateGerada.append(sHora);\n\n if (sHora.length() == 5) {\n dateGerada.append(\":00\");\n }\n\n return simpleDate.parse(dateGerada.toString()).getTime();\n } catch (ParseException e) {\n throw new Exception(\"Erro ao Converter Time\", e);\n }\n }",
"private static String time() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH-mm-ss \");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}",
"public java.lang.String getHora_desde();",
"private static String dateChange(int time) {\n int hour = time / 3600;\n time %= 3600;\n int minute = time / 60;\n int second = time % 60;\n\n String strHour = hour > 9 ? String.valueOf(hour) : \"0\" + hour;\n String strMinute = minute > 9 ? String.valueOf(minute) : \"0\" + minute;\n String strSecond = second > 9 ? String.valueOf(second) : \"0\" + second;\n\n return String.join(\":\", strHour, strMinute, strSecond);\n }",
"private static String timeHandler(String date) {\n SimpleDateFormat dbFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n SimpleDateFormat dayFormat = new SimpleDateFormat(\"MM-dd\");\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n dbFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n String today = dayFormat.format(new Date());\n String day = \"\";\n String time = \"\";\n try {\n time = timeFormat.format(dbFormat.parse(date));\n day = dayFormat.format(dbFormat.parse(date));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (day.equals(today)) {\n return \"Today \" + time;\n } else if (day.equals(dayFormat.format(yesterday()))) {\n return \"Yesterday \" + time;\n } else {\n return day + \" \" + time;\n }\n }",
"@RequiresApi(api = Build.VERSION_CODES.O)\n private String obtenerSegundos(){\n try{\n this.minutos = java.time.LocalDateTime.now().toString().substring(17,19);\n }catch (StringIndexOutOfBoundsException sioobe){\n this.segundos = \"00\";\n }\n return this.minutos;\n }",
"public String getTime(){\n String mt=\"\";\n String hr=\"\";\n if(minute<10){\n mt=0+(String.valueOf(minute));\n }\n\n else{\n mt=String.valueOf(minute);\n }\n\n if(hour<10){\n hr=0+(String.valueOf(hour));\n }\n else{\n hr=String.valueOf(hour);\n }\n //return hour:minute\n return (hr+\":\"+mt);\n }",
"public java.lang.String getHora_hasta();",
"static String timeConversion(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2, 4);\n\n String newHours;\n if (ampm.equals(\"AM\")) {\n newHours = hours.equals(\"12\") ? \"00\" : hours;\n\n } else {\n newHours = hours.equals(\"12\") ? hours : String.valueOf(Integer.parseInt(hours) + 12);\n }\n\n return newHours + \":\" + minutes + \":\" + seconds;\n\n }",
"static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String conversion = \"\";\n String time = s.substring(s.length()-2,s.length());\n String hour = s.substring(0,2);\n if(time.equals(\"AM\")){\n if(Integer.parseInt(hour)==12){\n conversion = \"00\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = s.substring(0,s.length()-2);\n }\n }else{\n if(Integer.parseInt(hour)==12){\n conversion = \"12\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = (Integer.parseInt(hour)+12) + s.substring(2,s.length()-2);\n }\n }\n\n return conversion;\n }",
"public static String ShowDate(){\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss.SS a\");\n String HH_MM = sdf.format(date);\n return HH_MM;\n }",
"public static String getHoraMinutoSegundoTimestamp(Timestamp timestamp) {\r\n\t\tLong time = timestamp.getTime();\r\n\r\n\t\tString retorno = new SimpleDateFormat(\"HH:mm:ss\", new Locale(\"pt\", \"BR\")).format(new Date(time));\r\n\r\n\t\treturn retorno;\r\n\t}",
"public String formatTime() {\n if ((myGameTicks / 16) + 1 != myOldGameTicks) {\n myTimeString = \"\";\n myOldGameTicks = (myGameTicks / 16) + 1;\n int smallPart = myOldGameTicks % 60;\n int bigPart = myOldGameTicks / 60;\n myTimeString += bigPart + \":\";\n if (smallPart / 10 < 1) {\n myTimeString += \"0\";\n }\n myTimeString += smallPart;\n }\n return (myTimeString);\n }",
"private String formatTime(String dateObject){\n\n SimpleDateFormat input = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\"); // format kita \"HARUS SAMA TIDAK BOLEH FORMATNYA BEDA BAHKAN 1 CHAR PUN\n SimpleDateFormat output= new SimpleDateFormat(\"h:mm a\");\n Date jam = null;\n try {\n jam = input.parse(dateObject);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return output.format(jam);\n }",
"static String getTime(int time) {\r\n\t\tint hours = time / 60;\r\n\t\tint minutes = time % 60;\r\n\r\n\t\tString ampm;\r\n\t\tif (time >= 720) ampm = \"PM\";\r\n\t\telse ampm = \"AM\";\r\n\r\n\t\treturn (String.format(\"%d:%02d%s\", hours, minutes, ampm));\r\n\t}",
"public static void main(String[] args) {\n\n String time =\"16:49:40\".substring(0,2);\n System.out.println(time);\n\n }",
"public static String TimeFormate() {\n\t\tString time;\n\t\tSimpleDateFormat dateFormat1 = new SimpleDateFormat();\n\t dateFormat1.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t Calendar cal = Calendar.getInstance();\n\t cal.add(Calendar.MINUTE, 3);\n String n=dateFormat1.format(cal.getTime());\n //n=\"03/09/20 8:30 AM\";\n System.out.println(\"Full Date = \" +n);\n int colonindex=n.indexOf(\":\");\n //System.out.println(\": placed= \" +colonindex);\n //String tt =n.substring(colonindex, n.length());\n //System.out.println(\"tt= \" +tt);\n String tt1 =n.substring(colonindex-2,colonindex-1);\n System.out.println(\"tt1= \" +tt1);\n if(tt1.equals(\"1\")) {\n \t time=n.substring(colonindex-2, n.length());\n \t System.out.println(\"Time with two digits in hours= \" +time);\n }\n else {\n \t time=n.substring(colonindex-1, n.length());\n \t System.out.println(\"Time with one digit in hours= \" +time);\n }\n return time;\n\t}",
"public static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\n }",
"private static String formatTime(String time) {\n\t\treturn String.format(\"%s:%s\", time.substring(0, 2), time.substring(2));\n\t}",
"private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }",
"public static void showMeswithTime(String str){\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tString date = df.format(new Date());\r\n\t\tSystem.out.println(date+\" : \"+str);\r\n\t}",
"public static void main(String[] args) {\n\t\t long ms = 671684;\r\n\t\t long ms1 = 607222 ;\r\n\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\r\n\t formatter.setTimeZone(TimeZone.getTimeZone(\"GMT+00:00\"));\r\n\t String hms = formatter.format(416970);\r\n\t String hms1 = formatter.format(710036);\r\n\t System.out.println(hms);\r\n\t System.out.println(hms1);\r\n\t //��ʦ���������ExecutorService������һ��\r\n\t}",
"public String getTime() {\n boolean pastNoon = hour >= 12;\n if(pastNoon && hour == 12) {\n return hour + \"pm\";\n }\n else if(pastNoon) {\n return (hour - 12) + \"pm\";\n }\n else if(hour == 0) {\n return \"12am\";\n }\n else {\n return hour + \"am\";\n }\n }",
"public static String hourOfBetween(final String sFormaTime, final String horaInicial, final String horaFinal,\n final Locale locale) throws Exception {\n final SimpleDateFormat sdf = new SimpleDateFormat(sFormaTime, locale == null ? getLocale(CalendarParams.LOCALE_PT) : locale);\n Date datEntrada;\n Date datSaida;\n final StringBuffer returnHora = new StringBuffer();\n\n try {\n datEntrada = sdf.parse(horaInicial);\n datSaida = sdf.parse(horaFinal);\n\n final long diferencaHoras = (datSaida.getTime() - datEntrada.getTime()) / (1000 * 60 * 60);\n final long diferencaMinutos = (datSaida.getTime() - datEntrada.getTime()) / (1000 * 60);\n final long diferencaSeg = (datSaida.getTime() - datEntrada.getTime()) / (1000);\n\n long difHoraMin = diferencaMinutos % 60;\n long diferencaSegundos = diferencaSeg % 60;\n\n if (difHoraMin < 0 || diferencaSegundos < 0) {\n returnHora.append('-');\n difHoraMin = difHoraMin * -1;\n diferencaSegundos = diferencaSegundos * -1;\n }\n\n if (diferencaHoras <= 9) {\n returnHora.append('0');\n returnHora.append(diferencaHoras);\n } else {\n returnHora.append(String.valueOf(diferencaHoras));\n }\n\n returnHora.append(':');\n\n if (difHoraMin <= 9) {\n returnHora.append('0');\n returnHora.append(String.valueOf(difHoraMin));\n } else {\n returnHora.append(String.valueOf(difHoraMin));\n }\n\n returnHora.append(':');\n\n if (diferencaSegundos <= 9) {\n returnHora.append('0');\n returnHora.append(String.valueOf(diferencaSegundos));\n } else {\n returnHora.append(String.valueOf(diferencaSegundos));\n }\n\n } catch (ParseException e) {\n throw new Exception(\"Erro na Conversao das datas: \", e);\n }\n\n return returnHora.toString();\n\n }",
"public String gameTimeToText()\n {\n // CALCULATE GAME TIME USING HOURS : MINUTES : SECONDS\n if ((startTime == null) || (endTime == null))\n return \"\";\n long timeInMillis = endTime.getTimeInMillis() - startTime.getTimeInMillis();\n return timeToText(timeInMillis);\n }",
"public static String timeConversion(String s) {\n // Write your code here\n String end = s.substring(2, s.length() - 2);\n String ans = s.substring(0, s.length() - 2);\n if (s.charAt(8) == 'A') {\n return s.startsWith(\"12\") ? \"00\" + end : ans;\n }\n\n return s.startsWith(\"12\") ? ans : (Integer.parseInt(s.substring(0, 2)) + 12) + end;\n }",
"public static String getTimeString() {\n\t\treturn getTimeString(time);\n\t}",
"@Override\n\tpublic String convertTime(String aTime) {\n\n\t\tif (aTime == null)\n\t\t\tthrow new IllegalArgumentException(NO_TIME);\n\n\t\tString[] times = aTime.split(\":\", 3);\n\n\t\tif (times.length != 3)\n\t\t\tthrow new IllegalArgumentException(INVALID_TIME);\n\n\t\tint hours, minutes, seconds = 0;\n\n\t\ttry {\n\t\t\thours = Integer.parseInt(times[0]);\n\t\t\tminutes = Integer.parseInt(times[1]);\n\t\t\tseconds = Integer.parseInt(times[2]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException(NUMERIC_TIME);\n\t\t}\n\n\t\tif (hours < 0 || hours > 24)\n\t\t\tthrow new IllegalArgumentException(\"Invalid value of Hour\");\n\t\tif (minutes < 0 || minutes > 59)\n\t\t\tthrow new IllegalArgumentException(\"Invalid value of Minutes\");\n\t\tif (seconds < 0 || seconds > 59)\n\t\t\tthrow new IllegalArgumentException(\"Invalid value of Seconds\");\n\n\t\tString line1 = (seconds % 2 == 0) ? \"Y\" : \"O\";\n\t\tString line2 = rowString(hours / 5, 4, \"R\").replace('0', 'O');\n\t\tString line3 = rowString(hours % 5, 4, \"R\").replace('0', 'O');\n\t\tString line4 = rowString(minutes / 5, 11, \"Y\").replaceAll(\"YYY\", \"YYR\").replace('0', 'O');\n\t\tString line5 = rowString(minutes % 5, 4, \"Y\").replace('0', 'O');\n\n\t\tString cTime = String.join(NEW_LINE, Arrays.asList(line1, line2, line3, line4, line5));\n\n\t\tSystem.out.println(cTime);\n\n\t\treturn cTime;\n\t}",
"public static String getTime()\n {\n Date time = new Date();\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return timeFormat.format(time);\n }",
"public String[] getHora()\r\n\t{\r\n\t\treturn this.reloj.getFormatTime();\r\n\t}",
"String timeModified();",
"public static String getHHMM()\r\n/* 74: */ {\r\n/* 75: 94 */ String nowTime = \"\";\r\n/* 76: 95 */ Date now = new Date();\r\n/* 77: 96 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 78: 97 */ nowTime = formatter.format(now);\r\n/* 79: 98 */ return nowTime;\r\n/* 80: */ }",
"public String getCurrentTimeHourMinSec() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"public String getTimeString() {\n int hour = date.get(Calendar.HOUR);\n int minute = date.get(Calendar.MINUTE);\n\n String AM_PM = \"PM\";\n if (date.get(Calendar.AM_PM) == Calendar.AM) AM_PM = \"AM\";\n\n String hour_fixed = String.valueOf(hour);\n if (hour == 0) hour_fixed = \"12\";\n\n String minute_fixed = String.valueOf(minute);\n while (minute_fixed.length() < 2) {\n minute_fixed = \"0\" + minute_fixed;\n }\n\n return hour_fixed + \":\" + minute_fixed + ' ' + AM_PM;\n }",
"public String parseTime(String time) {\n Date date = null;\n try {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.getDefault());\n String todaysDate = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.getDefault()).format(new Date());\n date = simpleDateFormat.parse(todaysDate + \" \" + time.split(\" \")[0]);\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.getDefault());\n sdf.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n return sdf.format(date);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"public String getDateHourRepresentation()\n\t{\n\t\tchar[] charArr = new char[13];\n\t\tcharArr[2] = charArr[5] = charArr[10] = '/';\n\t\tint day = m_day;\n\t\tint month = m_month;\n\t\tint year = m_year;\n\t\tint hour = m_hour;\n\t\tfor(int i = 0; i < 2; i++)\n\t\t{\n\t\t\tcharArr[1 - i] = Character.forDigit(day % 10, 10);\n\t\t\tcharArr[4 - i] = Character.forDigit(month % 10, 10);\n\t\t\tcharArr[12 - i] = Character.forDigit(hour % 10, 10);\n\t\t\tday /= 10;\n\t\t\tmonth /= 10;\n\t\t\thour /=10;\n \t\t}\n\t\tfor(int i = 0; i < 4; i++)\n\t\t{\n\t\t\tcharArr[9 - i] = Character.forDigit(year % 10, 10);\n\t\t\tyear /= 10;\n\t\t}\n\t\treturn new String(charArr);\n\t}",
"public String getTime()\r\n\t{\r\n\t\treturn displayString;\r\n\t}",
"public String getTime()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"HH:mm\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }",
"public static Date convert_string_time_into_original_time(String hhmmaa) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"HH:mm aa\");\n Date convertedDate = new Date();\n try {\n convertedDate = dateFormat.parse(hhmmaa);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return convertedDate;\n }",
"public String getTimeString() {\n DateFormat format = new SimpleDateFormat(\"HH:mm\");\n return format.format(mDate);\n }",
"public String getTime(){\r\n String time = \"\";\r\n return time;\r\n }",
"static String timeConversion(String s) {\n if(s.indexOf('P') >= 0 && s.substring(0, 2).equals(\"12\")){\n }\n else if(s.indexOf('P') >= 0){\n Integer n = Integer.parseInt(s.substring(0, 2));\n s = removeHour(s);\n n += 12;\n String hour = Integer.toString(n);\n s = hour + s;\n }\n else if (s.indexOf('A') >= 0 && s.substring(0, 2).equals(\"12\")){\n s = \"00\" + s.substring(2);\n }\n return removeHourFormat(s);\n }",
"static String timeConversion(String s) throws ParseException {\n SimpleDateFormat to = new SimpleDateFormat(\"HH:mm:ss\");\n SimpleDateFormat from = new SimpleDateFormat(\"hh:mm:ssa\");\n Date parse = from.parse(s);\n return to.format(parse);\n\n }",
"private void formatTime() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat ft = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\tm_timeSent = ft.format(date).toString();\r\n\t}",
"private String intTime(long l){\r\n String s=\"\";\r\n s+=(char)(((l/1000)/60)+'0')+\":\"+(char)((((l/1000)%60)/10)+'0')+(char)((((l/1000)%60)%10)+'0'); \r\n return s;\r\n }",
"private String timeToAgo(Long timestamp){\n\n\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n Log.d(TAG, \"timeToAgo:TimeZone :\"+TimeZone.getTimeZone(\"GMT\"));\n long time = cal.getTimeInMillis();\n Log.d(TAG, \"timeToAgo: time with cal : \"+time);\n long curTime = System.currentTimeMillis() / 1000 + 32400;\n Log.d(TAG, \"timeToAgo: curTime : \" + curTime);\n long diffTime = (curTime - timestamp); //1000으로 나눠주는 이유는 millisecond가 아닌 second만 신경을 써줄 것이므로\n Log.d(TAG, \"timeToAgo: diffTime \" + diffTime);\n long hour =diffTime/3600;\n Log.d(TAG, \"timeToAgo: hour \"+ hour);\n Log.d(TAG, \"timeToAgo: timestamp : \"+timestamp);\n diffTime =diffTime%3600;\n long min = diffTime/60;\n long sec = diffTime%60;\n\n String ret = \"\";\n\n\n if(hour > 24){\n ret = new SimpleDateFormat(\"MM/dd\").format(new Date(timestamp));\n\n if (hour>8760){\n ret = new SimpleDateFormat(\"MM/dd/yyyy\").format(new Date(timestamp));\n }\n }\n else if(hour > 0){\n ret = hour+\" hours ago\";\n }\n else if(min > 0){\n ret = min+\" mins ago\";\n }\n else if(sec > 0){\n ret = \"just now!\";\n }\n else{\n ret = new SimpleDateFormat(\"MM/dd\").format(new Date(timestamp));\n }\n\n return ret;\n }",
"public static String minChangeDayHourMinS(String time) {\n long mss;\n if (!\"\".equals(time) && time != null) {\n mss = Integer.parseInt(time) * 60;\n } else {\n return \"\";\n }\n String DateTimes = null;\n long days = mss / (60 * 60 * 24);\n long hours = (mss % (60 * 60 * 24)) / (60 * 60);\n long minutes = (mss % (60 * 60)) / 60;\n long seconds = mss % 60;\n// Logger.d(\"minChangeDayHourMinS days:\" + days);\n// Logger.d(\"minChangeDayHourMinS hours:\" + hours);\n// Logger.d(\"minChangeDayHourMinS minutes:\" + minutes);\n// Logger.d(\"minChangeDayHourMinS seconds:\" + seconds);\n\n if (days > 0) {\n DateTimes = days + \"天\" + hours + \"小时\" + minutes + \"分钟\"\n + seconds + \"秒\";\n } else if (hours > 0) {\n DateTimes = hours + \"小时\" + minutes + \"分钟\"\n + seconds + \"秒\";\n } else if (minutes > 0) {\n DateTimes = minutes + \"分钟\"\n + seconds + \"秒\";\n } else {\n DateTimes = seconds + \"秒\";\n }\n // Log.d(\"minChangeDayHourMinS DateTimes:\" + DateTimes);\n\n return DateTimes;\n }",
"public static String m128354a(String str) {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd-HHmmssSSS\", Locale.US);\n Calendar instance = Calendar.getInstance(TimeZone.getTimeZone(\"GMT+8\"));\n C7573i.m23582a((Object) instance, \"calendar\");\n Date time = instance.getTime();\n StringBuilder sb = new StringBuilder();\n sb.append(simpleDateFormat.format(time));\n sb.append(str);\n return sb.toString();\n }",
"public String getTime() {\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tString time = dateFormat.format(cal.getTime());\n\t\t\treturn time;\n\t\t}",
"@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}",
"private String calculaTempo(Date dtTileLine) {\n\t\treturn \"2 minutos atrás (\"+dtTileLine.toString()+\")\";\n\t}",
"public String getEndTime();",
"public String getEndTime();",
"public String getTime(){\r\n\t\tDate date = new GregorianCalendar().getTime();\r\n\r\n\t\tString time= new SimpleDateFormat(\"HH:mm:ss\").format(date.getTime());\r\n\t\t\r\n\t\treturn time;\r\n\t}",
"public String formatoCortoDeFecha(Date fecha){\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n return format.format(fecha);\n }",
"public String getTimeInString() {\n int minutes = (time % 3600) / 60;\n int seconds = time % 60;\n String timeString = String.format(\"%02d:%02d\", minutes, seconds);\n\n return timeString;\n }",
"String getDate();",
"String getDate();",
"public String getTimeString() {\n // Converts slot to the minute it starts in the day\n int slotTimeMins =\n SlopeManagerApplication.OPENING_TIME * 60 + SESSION_LENGTHS_MINS * getSlot();\n\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, slotTimeMins/60);\n cal.set(Calendar.MINUTE, slotTimeMins % 60);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm\");\n return sdf.format(cal.getTime());\n }",
"static String timeConversion(String s) {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean isAm = s.contains(\"AM\");\n\t\t\n\t\ts = s.replace(\"AM\", \"\");\n\t\ts = s.replace(\"PM\", \"\");\n\t\t\n\t\tString str[] = s.split(\":\");\n\t\tint time = Integer.parseInt(str[0]);\n\t\t\n\t\t\n\t\tif(time < 12 && !isAm) {\n\t\t\ttime = time + 12;\n\t\t\tsb.append(time).append(\":\");\n\t\t}else if(time == 12 && isAm) {\n\t\t\tsb.append(\"00:\");\n\t\t}else {\n\t\t\tif (time < 10) sb.append(\"0\").append(time).append(\":\");\n\t\t\telse sb.append(time).append(\":\");\n\t\t}\n\n\t\tsb.append(str[1]).append(\":\").append(str[2]);\n\t\treturn sb.toString();\n\t}",
"java.lang.String getArrivalTime();",
"java.lang.String getArrivalTime();",
"public int getHora(){\n return minutosStamina;\n }",
"public static void main(String[] args) throws Exception {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat simpleformat = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss Z\");\n System.out.println(\"Today's date and time = \"+simpleformat.format(cal.getTime()));\n // displaying date\n simpleformat = new SimpleDateFormat(\"dd/MMMM/yyyy\");\n String str = simpleformat.format(new Date());\n System.out.println(\"Current Date = \"+str);\n // current time\n simpleformat = new SimpleDateFormat(\"HH:mm:ss\");\n String strTime = simpleformat.format(new Date());\n System.out.println(\"Current Time = \"+strTime);\n // displaying hour in HH format\n simpleformat = new SimpleDateFormat(\"HH\");\n String strHour = simpleformat.format(new Date());\n System.out.println(\"Hour in HH format = \"+strHour);\n\n\n\n //formato ideal\n simpleformat = new SimpleDateFormat(\"dd/MM/yyyy - HH:mm:ss\");\n String strTimeDay = simpleformat.format(new Date());\n System.out.println(\"Dia e Hora = \" + strTimeDay);\n\n }",
"private void CompararTiempo(String HoraInicio, String HoraFin){\n String[] TiempoInicial = HoraInicio.split(\":\");\n int horaI = Integer.valueOf(TiempoInicial[0]);\n int minuteI = Integer.valueOf(TiempoInicial[1]);\n\n String[] TiempoFinal = HoraFin.split(\":\");\n int horaF = Integer.valueOf(TiempoFinal[0]);\n int minuteF = Integer.valueOf(TiempoFinal[1]);\n\n if (horaF >= horaI){\n if (horaF == horaI && minuteF<=minuteI) {\n Toast.makeText(getApplicationContext(), \"La Hora de finalizacion no puede ser menor a la Hora de Inicio.\", Toast.LENGTH_SHORT).show();\n }\n else{\n etHoraFin.setText(HoraFin);\n }\n\n }else{\n Toast.makeText(getApplicationContext(), \"La Hora de finalizacion no puede ser menor a la Hora de Inicio.\", Toast.LENGTH_SHORT).show();\n }\n\n }",
"public java.lang.String getLocalizaHoraHasta() {\n\t\treturn localizaHoraHasta;\n\t}",
"private String readableTime(Integer minutes) {\r\n String time = \"\";\r\n if (minutes / 60.0 > 1) {\r\n time = (minutes / 60) + \" hrs, \"\r\n + (minutes % 60) + \" min\";\r\n } else {\r\n time = minutes + \" min\";\r\n }\r\n return time;\r\n }",
"private String formatTime(long length) {\n\t\tString hms = \"\";\n\t\tif(length < 3600000) {\n\t\t\thms = String.format(\"%02d:%02d\",\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t} else {\n\t\t\thms = String.format(\"%02d:%02d:%02d\", TimeUnit.MILLISECONDS.toHours(length),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t}\n\n\t\treturn hms;\n\t}",
"public String getTime() {\n\t}",
"int getTime();",
"int getTime();",
"String getCurTime();",
"private static String fromWebSafe(String webSafe) {\n checkArgument(webSafe.length() > MINUTE_SEPARATOR_INDEX + 2,\n \"The passed string is not in web-safe date/time format: \\\"%s\\\".\",\n webSafe);\n var chars = webSafe.toCharArray();\n chars[HOUR_SEPARATOR_INDEX] = COLON;\n chars[MINUTE_SEPARATOR_INDEX] = COLON;\n return String.valueOf(chars);\n }",
"public String getTimeString(){\n StringBuilder sBuilder = new StringBuilder();\n sBuilder.append(hourPicker.getValue())\n .append(':')\n .append(minutePicker.getValue())\n .append(':')\n .append(secondsPicker.getValue())\n .append('.')\n .append(decimalPicker.getValue());\n return sBuilder.toString();\n }",
"public static String timeCalc(String createdAt){\n String relativeDate = Utility.relativeTime(createdAt);\n String d = Utility.formatDate(createdAt);\n return d;\n\n }",
"public static String getYYYYMMDDHHMMSS()\r\n/* 56: */ {\r\n/* 57: 68 */ String nowTime = \"\";\r\n/* 58: 69 */ Date now = new Date();\r\n/* 59: 70 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n/* 60: 71 */ nowTime = formatter.format(now);\r\n/* 61: 72 */ return nowTime;\r\n/* 62: */ }",
"public String getTime(){\n return time;\n }",
"public static boolean isPassOneHour(String pass)\n {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date date = new Date();\n String current = dateFormat.format(date);\n\n //Extract current data time all values\n\n int current_year = Integer.parseInt(current.substring(0, 4));\n int current_month = Integer.parseInt(current.substring(5,7))-1;\n int current_day = Integer.parseInt(current.substring(8,10));\n\n int current_hour = Integer.parseInt(current.substring(11,13));\n int current_minute = Integer.parseInt(current.substring(14,16));\n int current_seconds = Integer.parseInt(current.substring(17));\n\n //String pass = \"2016-10-05 10:14:00\";\n\n //Extract last update data (pass from parameter\n\n int year = Integer.parseInt(pass.substring(0, 4));\n int month = Integer.parseInt(pass.substring(5,7))-1;\n int day = Integer.parseInt(pass.substring(8,10));\n\n int hour = Integer.parseInt(pass.substring(11,13));\n int minute = Integer.parseInt(pass.substring(14,16));\n int seconds = Integer.parseInt(pass.substring(17));\n\n\n System.out.println(\"CURRENT: \" + current_year+\"/\"+current_month+\"/\"+current_day+\" \"+current_hour+\":\"+current_minute+\":\"+current_seconds);\n\n System.out.println(\"PASS: \" + year+\"/\"+month+\"/\"+day+\" \"+hour+\":\"+minute+\":\"+seconds);\n\n if (current_year == year)\n {\n if (current_month == month)\n {\n if (current_day == day)\n {\n if (current_hour > hour)\n {\n if ((current_hour - hour > 1))\n {\n //Bi ordu gutxienez\n System.out.println(\"Bi ordu gutxienez: \" + (current_hour) + \" / \" + hour);\n return true;\n }\n else\n {\n if (((current_minute + 60) - minute ) < 60)\n {\n //Ordu barruan dago\n System.out.println(\"Ordu barruan nago ez delako 60 minutu pasa: \" + ((current_minute + 60) - minute ));\n return false;\n }\n else\n {\n //Refresh\n System.out.println(\"Eguneratu, ordu bat pasa da gutxienez: \" + ((current_minute + 60) - minute ));\n return true;\n }\n }\n\n }\n }\n }\n }\n return false;\n }",
"public static String formatTime(long time) {\n long tmp = time;\n int hour = (int) (time / 3600);\n tmp -= hour * 3600;\n int min = (int) (tmp / 60);\n int sec = (int) (tmp - min * 60);\n\n String hourText = hour < 10 ? \"0\" + hour : \"\" + hour;\n String minText = min < 10 ? \"0\" + min : \"\" + min;\n String secText = sec < 10 ? \"0\" + sec : \"\" + sec;\n\n\n return hourText + \":\" + minText + \":\" + secText;\n }",
"public String convertDateToTime(String date){\n Date test = null;\n if(date !=null) {\n try {\n test = sdf.parse(date);\n } catch (ParseException e) {\n System.out.println(\"Parse not working: \" + e);\n }\n calendar.setTime(test);\n return String.format(\"%02d:%02d\",\n calendar.get(Calendar.HOUR_OF_DAY),\n calendar.get(Calendar.MINUTE)\n );\n }\n return \"n\";\n }",
"private static void m1() {\n\n String d = \"2019/03/22 10:00-11:00\";\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm-HH:mm\");\n try {\n Date parse = df.parse(d);\n System.out.println(df.format(parse));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }",
"public static String converTimeToReadable(long time) {\n // check if its in the last minute:\n long diff = (new Date()).getTime() - time;\n // TimeUnit.MILLISECONDS.toMinutes(diff)\n\n if (diff / 60000 < 1) {\n return \"now\";\n }\n\n // if its more then a minute, then write time\n String str = \"\";\n Date date = new Date(time);\n\n try {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date currentDay = sdf.parse(sdf.format(new Date()));\n Date lastLocationDay = sdf.parse(sdf.format(time));\n long daysDifference = TimeUnit.MILLISECONDS\n .toDays(currentDay.getTime() - lastLocationDay.getTime());\n\n // ispis:\n str += getNameOfTheDay(daysDifference, lastLocationDay);\n\n } catch (ParseException ex) {\n // if something fails, just write the date\n str += new SimpleDateFormat(\"dd.MM.yyyy\").format(date);\n }\n\n /*\n String dayOfTheWeek = (String) DateFormat.format(\"EEEE\", date); // Thursday\n String day = (String) DateFormat.format(\"dd\", date); // 20\n String monthString = (String) DateFormat.format(\"MMM\", date); // Jun\n String monthNumber = (String) DateFormat.format(\"MM\", date); // 06\n String year = (String) DateFormat.format(\"yyyy\", date); // 2013\n */\n\n str += \", \";\n str += new SimpleDateFormat(\"HH:mm\").format(date);\n\n return str;\n }"
]
| [
"0.73671526",
"0.7128469",
"0.6980577",
"0.65961474",
"0.6440645",
"0.6395144",
"0.628922",
"0.62697476",
"0.6268237",
"0.6246771",
"0.6203634",
"0.61625326",
"0.6106786",
"0.6102544",
"0.609471",
"0.6090362",
"0.60873544",
"0.6043516",
"0.60405034",
"0.6027133",
"0.59860945",
"0.5985693",
"0.5962289",
"0.59523994",
"0.59310615",
"0.59257346",
"0.5925425",
"0.5920584",
"0.591207",
"0.5911044",
"0.5893653",
"0.58908665",
"0.58799165",
"0.5875409",
"0.5853039",
"0.58479035",
"0.58475786",
"0.58333397",
"0.58295625",
"0.5829249",
"0.5801715",
"0.57494485",
"0.5748256",
"0.5729708",
"0.57256407",
"0.57188004",
"0.57106704",
"0.57088333",
"0.5704655",
"0.5702049",
"0.5690141",
"0.5685174",
"0.56850755",
"0.56709856",
"0.5670772",
"0.5669419",
"0.5668876",
"0.5657736",
"0.5654543",
"0.5653115",
"0.5651457",
"0.5645732",
"0.564218",
"0.5638531",
"0.5635633",
"0.5635057",
"0.5628122",
"0.5626246",
"0.56249565",
"0.5624494",
"0.5624494",
"0.56129324",
"0.5611292",
"0.5609789",
"0.5609063",
"0.5609063",
"0.5606806",
"0.5602783",
"0.5600988",
"0.5600988",
"0.55991066",
"0.55953515",
"0.5591551",
"0.55910933",
"0.5588256",
"0.5583027",
"0.5571122",
"0.5554682",
"0.5554682",
"0.5551177",
"0.5549535",
"0.5544528",
"0.5540264",
"0.5539939",
"0.5537564",
"0.5524013",
"0.55195755",
"0.5518446",
"0.5501142",
"0.5499703"
]
| 0.73302263 | 1 |
/ Metodo Main del servidor A. Registra el servidor en el registro RMI | public static void main(String[] args){
try{
// El servidor se registra en RMI
IP = args[0];
IPBroker = args[1];
Registry registryA = LocateRegistry.getRegistry();
ServerAInterface sA = new ServerA();
ServerAInterface stub = (ServerAInterface) UnicastRemoteObject.exportObject(sA,0);
System.setProperty("java.rmi.server.hostname",IP);
registryA.rebind("//"+IP+":ServerA",stub);
System.out.println("Servidor A registrado correctamente.");
// Obtenemos el Broker
Registry registry = LocateRegistry.getRegistry(IPBroker);
ServicesBrokerInterface s = (ServicesBrokerInterface) registry.lookup("//"+IPBroker+":ServicesBroker");
Scanner teclado = new Scanner(System.in);
boolean finalizar = false;
String entrada = "";
while (!finalizar) {
System.out.println("\n--------------------------------------\n");
System.out.println("LISTA DE SERVICIOS DEL SERVIDOR B:\n" +
" - Nombre: introducir_libro; Parametros: String nombreLibro; Return: Void \n" +
" - Nombre: lista_libros; Parametros: none; Return: ArrayList<String> \n");
System.out.println("¿Que desea hacer? \n"+
" 1 - Introducir libro\n"+
" 2 - Obtener lista de libros\n");
System.out.print("Accion: ");
entrada = teclado.nextLine();
if (entrada.equals("1")) {
System.out.println("Introduzca el titulo del libro que desea almacenar:");
System.out.print("Titulo:");
entrada = teclado.nextLine();
System.out.println(s.ejecutar_servicio("introducir_libro", entrada));
} else if (entrada.equals("2")) {
System.out.println(s.ejecutar_servicio("lista_libros",""));
} else System.out.println("Accion no existente.");
}
}catch (RemoteException e){
System.out.println(e);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println("Es necesario pasar como parametro la IP del servidor donde se hostea el registro RMI y la IP del Broker.");
} catch (NotBoundException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String args[]) {\n try {\n LocateRegistry.createRegistry(80);\n OperacoesImpl obj = new OperacoesImpl();\n Naming.rebind(\"ServerRMI\", obj);\n System.out.println(\"Server RMI pronto.\");\n } catch (Exception e) {\n System.out.println(\"Server erro\" + e.getMessage());\n }\n }",
"public static void main(String[] args) throws RemoteException{\n \r\n Registry registry= LocateRegistry.createRegistry(5099); //registrar a nuestro cliente \r\n registry.rebind(\"hello\", new ObjectRemote());\r\n }",
"public static void main(String args[]) {\n try {\n //Cria HelloImpl\n //Runtime.getRuntime().exec(\"rmiregistry 1010\");\n //Registry registry = LocateRegistry.getRegistry(2001);\n \tSystem.setProperty(\"java.rmi.server.hostname\",\"192.168.0.30\");\n Registry registry = LocateRegistry.createRegistry(2001);\n Implementation obj = new Implementation();\n registry.bind(\"HelloServer\", obj);\n System.out.println(\"Hello Server pronto.\");\n } catch (Exception e) {\n System.out.println(\"HelloServer erro \" + e.getMessage());\n }\n }",
"public void registerWithServer();",
"public static void main(String[] args) {\n\n try {\n\n Registry registry = LocateRegistry.createRegistry( 1888);\n registry.rebind(\"YStudentServerImpl\", new YStudentServerImpl());\n\n\n }\n catch (Exception ex){\n System.err.println(\"YStudentServerImpl exeption\");\n ex.printStackTrace();\n }\n\n\n }",
"public static void main(String[] args) {\n /* obtenção da localização do serviço de registo RMI */\n \n // nome do sistema onde está localizado o serviço de registos RMI\n String rmiRegHostName;\n \n // port de escuta do serviço\n int rmiRegPortNumb; \n\n RegistryConfig rc = new RegistryConfig(\"config.ini\");\n rmiRegHostName = rc.registryHost();\n rmiRegPortNumb = rc.registryPort();\n \n /* instanciação e instalação do gestor de segurança */\n if (System.getSecurityManager() == null) {\n System.setSecurityManager(new SecurityManager());\n }\n \n /* instanciação do objecto remoto que representa o referee site e geração de um stub para ele */\n RefereeSite referee_site = null;\n RefereeSiteInterface refereeSiteInterface = null;\n referee_site = new RefereeSite();\n \n try {\n refereeSiteInterface = (RefereeSiteInterface) UnicastRemoteObject.exportObject(referee_site, rc.refereeSitePort());\n } catch (RemoteException e) {\n System.out.println(\"Excepção na geração do stub para o referee site: \" + e.getMessage());\n System.exit(1);\n }\n \n System.out.println(\"O stub para o referee site foi gerado!\");\n\n /* seu registo no serviço de registo RMI */\n String nameEntryBase = RegistryConfig.registerHandler;\n String nameEntryObject = RegistryConfig.refereeSiteNameEntry;\n Registry registry = null;\n RegisterInterface reg = null;\n\n try {\n registry = LocateRegistry.getRegistry(rmiRegHostName, rmiRegPortNumb);\n } catch (RemoteException e) {\n System.out.println(\"Excepção na criação do registo RMI: \" + e.getMessage());\n System.exit(1);\n }\n \n System.out.println(\"O registo RMI foi criado!\");\n\n try {\n reg = (RegisterInterface) registry.lookup(nameEntryBase);\n } catch (RemoteException e) {\n System.out.println(\"RegisterRemoteObject lookup exception: \" + e.getMessage());\n System.exit(1);\n } catch (NotBoundException e) {\n System.out.println(\"RegisterRemoteObject not bound exception: \" + e.getMessage());\n System.exit(1);\n }\n\n try {\n reg.bind(nameEntryObject, refereeSiteInterface);\n } catch (RemoteException e) {\n System.out.println(\"Excepção no registo do referee site: \" + e.getMessage());\n System.exit(1);\n } catch (AlreadyBoundException e) {\n System.out.println(\"O referee site já está registado: \" + e.getMessage());\n System.exit(1);\n }\n \n System.out.println(\"O referee site foi registado!\");\n }",
"public void initRMI() {\n\t\ttry {\n\t\t\t//creo RMI handler\n\t\t\tGossip_RMI_handler handler = new Gossip_RMI_handler(data);\n\t\t\t//esporto l'interfaccia\n\t\t\tGossip_RMI_server_interface stub = (Gossip_RMI_server_interface)UnicastRemoteObject.exportObject(handler, 0);\n\t\t\tLocateRegistry.createRegistry(Gossip_config.RMI_PORT);\n\t\t\tRegistry r = LocateRegistry.getRegistry(Gossip_config.RMI_PORT);\n\t\t\tr.rebind(Gossip_config.RMI_NAME, stub);\n\t\t\t\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void conectServer() {\n\n\t}",
"public static void main(String[] args) throws RemoteException {\n\t\tServidorRMI server = new ServidorRMI();\n\t}",
"private void initRMI() throws RemoteException {\n log.info(\"Registering with RMI\");\n Registry registry = LocateRegistry.getRegistry();\n registry.rebind(address, this);\n }",
"public void run() {\n\t try{\n \t\tRegistry registry = LocateRegistry.createRegistry(1099);\n \t\tTestUnitImpl testUnit = new TestUnitImpl();\n \t\tProxyMonitoringUnit proxyUnit= new ProxyMonitoringUnit();\n\t registry.rebind(\"TestingUnit\", testUnit);\n\t registry.rebind(\"ProxyUnit\", proxyUnit);\n\t System.out.println(\"server.RMI Server is ready.\");\n \t}catch(RemoteException e){\n \t\te.printStackTrace();\n \t}\n \t\n }",
"public void startClient() throws RemoteException {\n\t\t\n\t\t// object to be passed to server\n\t\tString[] details = { name, dob, country, clientServiceName, hostName };\n\n\t\t// creating server stub \n\t\ttry {\n\t\t\tNaming.rebind(\"rmi://\" + hostName + \"/\" + clientServiceName, this);\n\t\t\tIServer = (IChatServer) Naming.lookup(\"rmi://\" + hostName + \"/\" + serviceName);\n\t\t} catch (ConnectException e) {\n\t\t\tJOptionPane.showMessageDialog(chatGUI.frame, \"The server seems to be unavailable\\nPlease try later\",\n\t\t\t\t\t\"Connection problem\", JOptionPane.ERROR_MESSAGE);\n\t\t\tconnectionProblem = true;\n\t\t\te.printStackTrace();\n\t\t} catch (NotBoundException | MalformedURLException me) {\n\t\t\tconnectionProblem = true;\n\t\t\tme.printStackTrace();\n\t\t}\n\t\t// if no problem sends details object to the server to be processed\n\t\tif (!connectionProblem) {\n\t\t\tIServer.initiateRegister(details);\n\n\t\t}\n\t\t// print this if it was able to reach this point\n\t\tSystem.out.println(\"Client Listen RMI Server is running...\\n\");\n\t}",
"@Override\n\tpublic void run() {\n\t\t\t\n\t\t\ttry {\n\t\t\tLocateRegistry.createRegistry(port);\n\t\t\t}catch(RemoteException e){\n\t\t\t\tSystem.out.println(\"Another peer is running in this machine\");\n\t\t\t}\n\t\t\t\n\t\t\tInterfaceUI rmi;\n\t\t\ttry {\n\t\t\t\trmi = (InterfaceUI)UnicastRemoteObject.exportObject(this, 0);\n\t\t\t\tRegistry registry = LocateRegistry.getRegistry();\n\t\t\t\tregistry.rebind(this.id, rmi);\n\t\t\t\n\t\t\t\n\t\t\t} catch (RemoteException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String args[]) {\n ContentServer cs = new ContentServer();\n try {\n // Bind the RMI Object\n ContentServerIntf stub =\n (ContentServerIntf) UnicastRemoteObject.exportObject(cs, 0);\n LocateRegistry.createRegistry(40000);\n Registry registry = LocateRegistry.getRegistry(InetAddress.getLocalHost().getHostAddress(), 40000);\n registry.rebind(cs.getCsPublicIp(), stub);\n\n // start the ContentServer\n cs.setUp();\n cs.start();\n\n // register with proxy\n NodeData nodeData = new NodeData();\n nodeData.setIpAddress(cs.getCsPublicIp());\n Registry masterReg = LocateRegistry.getRegistry(\"52.7.96.47\", 50000);\n MasterInter masterInter = (MasterInter) masterReg.lookup(\"master\");\n masterInter.join(nodeData);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public RMIServer() {\n System.setProperty(\"java.security.policy\", \"AllPermission.policy\");\n this.config = RMIConfiguration.getInstance();\n }",
"public static void main(String[] args) {\n Servidor s = new Servidor();\n try{\n VoteSystem channel = (VoteSystem) UnicastRemoteObject.exportObject(s, 0);\n Registry register = LocateRegistry.createRegistry(1099);\n register.bind(\"VoteSystem\", channel);\n ServerGUI sgui= new ServerGUI();\n ServerThread st = new ServerThread(sgui);\n st.setDaemon(true);\n st.start();\n sgui.setVisible(true);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }",
"public static void main(String args[])\r\n {\n System.setSecurityManager(new RMISecurityManager());\r\n\r\n try\r\n {\r\n // Create ResultRMIImpl\r\n ResultRMIImpl myResult = new ResultRMIImpl(\"//Binita/myResultRMI\");\r\n System.out.println(\"ResultRMI Server ready.\");\r\n } \r\n catch (Exception e)\r\n { \r\n System.out.println(\"Exception: \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"public static void main(String[] args) {\n System.out.println(\"Begin Server...\");\n\n\n\n try {\n Remote r = Naming.lookup(\"UniversalRegistry\");\n IUniversalRegistry iur = (IUniversalRegistry)r;\n\n //on ajoute des voitures dans le registre universel\n Voiture v1 = new Voiture(1);\n iur.bind(\"v1\",v1);\n Voiture v2 = new Voiture(2);\n iur.bind(\"v2\",v2);\n\n\n //On ajoute des voitures electrique dans le registre universel\n VoitureElectrique ve = new VoitureElectrique(4,0);\n iur.bind(\"ve\",ve);\n VoitureElectrique ve1 = new VoitureElectrique(4,1);\n iur.bind(\"ve1\",ve1);\n\n VoitureElectrique ve3 = new VoitureElectrique(4,1);\n iur.bind(\"ve3\",ve3);\n\n ClassTest classTest = new ClassTest();\n iur.bind(\"cl\",classTest);\n\n\n }\n\n catch(Exception e){\n e.printStackTrace();\n }\n\n\n\n }",
"public static void main(String[] args) throws NotBoundException, ClassNotFoundException, SQLException {\n\t\ttry {\n\t\t\tRegistry registry = LocateRegistry.createRegistry(1099);\n\t\t\tregistry.rebind(\"server\", (RMIServerInterface) new RMIServer());\n\t\t\tSystem.out.println(\"Rmi Server Running...\");\n\t\t} catch (AccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void main ( String args [] )\n {\n // Variable deceleration\n String hostname = \"localhost\" ; // Default host to use\n \n // Override the default values for hostname if passed through command line.\n if ( args [0].length () != 0 ) { hostname = args [0] ; }\n \n try\n {\n // Set the system property for \"java.rmi.server.hostname\".\n System.setProperty ( \"java.rmi.server.hostname\", hostname ) ;\n \n // Initialize the interface to access all the remote functions.\n HelloServerImplementation registerObject = new HelloServerImplementation () ;\n\n // Declare registry variable\n Registry registry ;\n \n // This try catch is to make sure that the registry is created\n try \n {\n // Try to get the remote object Registry for the local host on the default registry port of 1099.\n registry = LocateRegistry.getRegistry() ;\n registry.list() ; // Fetch the names bounded to the registry\n }\n // Catch the exception where communication with the registry fails and create the registry.\n catch ( RemoteException e ) \n {\n // Create the registry on the default rmi port 1099\n System.out.println ( \"RMI registry cannot be located at port \" + Registry.REGISTRY_PORT ) ;\n registry = LocateRegistry.createRegistry ( Registry.REGISTRY_PORT ) ;\n System.out.println ( \"RMI registry created at port \" + Registry.REGISTRY_PORT ) ;\n }\n \n // Once the registry is successfully created, rebind the HelloServerInterface to the remote reference created above.\n registry.rebind ( \"HelloServerInterface\", registerObject ) ;\n System.out.println ( \"Callback Server ready.\" ) ;\n }\n // Catch the exception and provide the necessary information to the user. \n catch ( Exception e ) { System.out.println ( \"Exception: \" + e.getMessage () ) ; e.printStackTrace () ; }\n }",
"private void startServer() throws RemoteException, AlreadyBoundException{\n\t\ttry{\n\t\t\tInsuranceImplementation impl = new InsuranceImplementation();\n\t\t\timpl.setIPAddress(ipHospital.getText());\n\t\t\timpl.setPortNumebr(Integer.parseInt(portHospital.getText()));\n\t\t\t\n\t\t\tRegistry registry = LocateRegistry.createRegistry(Integer.parseInt(portInsurance.getText()));\n\t\t\tregistry.bind(Constants.RMI_ID, impl); \n\t\t\t\n\t\t\tlogMessage(\"Insurance Server Started\");\n\t\t\t\n\t\t} catch (Exception exp)\n\t\t{\n\t\t\tlogMessage(\"ObjID already in use.\\nPlease kill the process running at port 5002\");\n\t\t\texp.printStackTrace();\n\t\t} \n\t\t\n\t}",
"public static void main(String[] args) {\n\n\t\tString registryHost;\n\t\tint registryPort;\n\t\tString localIP = \"127.0.1.1\";\n\t\ttry {\n\t\t\tlocalIP = Inet4Address.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(args.length == 2) {\n\t\t\tregistryHost = args[0];\n\t\t\tregistryPort = Integer.parseInt(args[1]);\n\t\t} else if (args.length == 3) {\n\t\t\tregistryHost = args[0];\n\t\t\tregistryPort = Integer.parseInt(args[1]);\n\t\t\tlocalIP = args[2];\n\t\t} else {\n\t\t\tSystem.out.print(\"Usage: java RMIserver <Registry host> <Registry port> [ServerIP]\");\n\t\t\treturn;\t\t\t\n\t\t}\n\t\tRMIserver myserver = new RMIserver(localIP);\n\n\t\tRegistry registry;\n\t\tregistry = LocateRegistry.getRegistry(registryHost, registryPort);\n\n\t\twhile (true) {\n\t\t\tSystem.out.print(myserver.getPrompt());\n\t\t\tString cmdl = System.console().readLine();\n\t\t\tString cmdargs[] = cmdl.split(\" \");\n\t\t\tif (cmdargs[0].equals(\"register\")) {\n\t\t\t\tString class_name = cmdargs[1];\n\t\t\t\tString class_stub_name = cmdargs[1] + \"_stub\";\n\t\t\t\t// start a new thread to handle this particular server\n\t\t\t\t// object\n\t\t\t\tRunnable job = new ServerHandler(registry, class_name,\n\t\t\t\t\t\tclass_stub_name, localIP);\n\t\t\t\tThread t = new Thread(job);\n\t\t\t\tt.start();\n\t\t\t} else if (cmdargs[0].equals(\"exit\")) {\n\t\t\t\tSystem.out.println(\"Server Exisiting...\");\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tmyserver.printUsage();\n\t\t\t}\n\t\t}\n\t}",
"public void connect() throws RemoteException, NotBoundException {\n\t\t//RMI starten & Binden\n\t\tRegistry registry = null;\n\t\tregistry = LocateRegistry.getRegistry(\"127.0.0.1\", Constant.RMI_PORT);\n\t\tserver = (ServerInterface) registry.lookup(Constant.RMI_ID);\n\t\tserver.login(client);\n\t\tSystem.out.println(\"[DEBUG] Spielernummer: \" + spielerNummer);\n\t\t//Mehr als 2 Spieler sind nicht zulaessig\n\t\tif(spielerNummer==-1) {\n\t\t\tSystem.out.println(\"[DEBUG] ungueltige Spielernummer!\");\n\t\t\tSystem.out.println(\"[DEBUG] Gute Nacht :(\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n try {\n //创建一个远程对象\n\n String ip = args[0];\n String port = args[1];\n Integer totalSpace = args[2] == null ? 100 :Integer.valueOf(args[2]);\n ChunkServerProperties properties = new ChunkServerProperties();\n properties.setIp(ip);\n properties.setPort(port);\n\n IChunkServerService chunkServer = new BFSChunkServer(totalSpace,0,\"/\",ip);\n\n LocateRegistry.createRegistry(Integer.parseInt(port));\n\n String rmi = \"rmi://\"+properties.getServerIpPort()+\"/chunk_server\";\n Printer.println(rmi);\n Naming.bind(rmi,chunkServer);\n\n String masterRMI =\"rmi://127.0.0.1:8888/master\";\n\n IMasterService masterService =(IMasterService) Naming.lookup(\"rmi://127.0.0.1:8888/master\");\n\n\n masterService.registerChunkServer(properties);\n\n Printer.println(\"register to master \"+masterRMI + \" succcess\");\n\n } catch (RemoteException e) {\n e.printStackTrace();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (AlreadyBoundException e) {\n e.printStackTrace();\n } catch (NotBoundException e) {\n e.printStackTrace();\n }\n }",
"public void registerServer() {\n log.info(\"Registering service {}\", serviceName);\n cancelDiscovery = discoveryService.register(\n ResolvingDiscoverable.of(new Discoverable(serviceName, httpService.getBindAddress())));\n }",
"public interface Server {\n void register(String serverName, Class impl) throws Exception;\n\n void start() throws IOException;\n\n\n}",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tRegistryInterface rInterface = new RegistryServer();\n\t\t\tint portnum=Integer.parseInt(args[1]);\n\t\t\tInetAddress iAddress=InetAddress.getByName(args[0]);\n\t\t\tSocketFactory sFactory=new SocketFactory(iAddress);\n\t\t\tRegistry registry = LocateRegistry.createRegistry(portnum,null,sFactory);\n\t\t\tregistry.bind(\"registryServer\", rInterface);\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (AlreadyBoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public interface ILamportServer extends Remote {\n public String SERVICE_NAME = \"LAMPORT_RMI\"; // Nom du service\n \n /**\n * Envoie un Message REQUEST aux autres serveurs pour annoncer le fait de \n * vouloir rentrer dans la section critique\n * @param message Le message envoyé avec une requête\n * @throws RemoteException \n */\n public void request(Message message) throws RemoteException;\n \n /**\n * Envoi du Message RESPONSE après avoir Reçu le Message REQUEST\n * @param message Le message envoyé avec une réponse\n * @throws RemoteException \n */\n public void response(Message message) throws RemoteException;\n \n /**\n * Envoie du message FREE pour indiquer aux autres serveur que l'on sort de\n * la section critique\n * @param message Le message envoyé pour libérer la section critique\n * @throws RemoteException \n */\n public void freeSC(Message message) throws RemoteException;\n \n /**\n * Métode pour modifier la variable globalle dans tous les serveurs\n * @param newValue La nouvelle valeur de la variable\n * @throws RemoteException \n */\n public void setVariableGlobally(int newValue) throws RemoteException;\n}",
"private static void createServer(final IChordNode node, int localPort)\n throws Exception {\n LocateRegistry.createRegistry(localPort);\n Naming.rebind(\n String.format(\"//localhost:%d/%s\", localPort, CHORDNODE),\n node\n );\n System.out.printf(\n \"New server started on localhost:%d with ID %d%n\",\n localPort, node.getID()\n );\n\n // Make nodes leave cleanly if the JVM is terminated\n Runtime.getRuntime().addShutdownHook( new Thread() {\n public void run() {\n try {\n node.leave();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n } );\n\n\n // Continuously print network information, keeping server alive\n while (true) {\n System.out.printf(\"### %4d ####%n\", node.getID());\n System.out.println( node.ringToString() );\n System.out.println();\n Thread.sleep(3000);\n }\n }",
"@Override\n public boolean serverRegister(String ip, int port, int id) throws RemoteException {\n try {\n if(this.ip.equals(ip) && this.port == port){\n return false;\n }else if(this.id == id){\n return false;\n }\n \n String url = \"rmi://\"+ip+\":\"+port+\"/mytube\";\n ServerInterface server = (ServerInterface) Naming.lookup(url);\n \n if(server.acceptRegister(this.ip, this.port, this.id)){\n servers.add(server);\n //Check if servers are really bidirectionally connected.\n if(server.serverPing(this) == this.id){\n System.out.println(\"CONNECT: Bidirectionally connected to the server \"+url);\n return true;\n }\n }\n return false;\n } catch (NotBoundException | MalformedURLException | RemoteException e){\n return false;\n }\n }",
"public void connexionServeur() {\r\n\r\n\t\tString serverIp = JOptionPane\r\n\t\t\t\t.showInputDialog(\"Entrez le nom du serveur.\");\r\n\t\ttry {\r\n\t\t\tsocket = new Socket(serverIp, 4456);\r\n\t\t\tlogger.info(\"Connexion au socket serveur.\");\r\n\r\n\t\t\tThread t = new Thread(new EnvoiPresence(socket));\r\n\t\t\tt.start();\r\n\r\n\t\t\tThread t2 = new Thread(new ReceptionListUser(socket, mainView));\r\n\t\t\tt2.start();\r\n\r\n\t\t} catch (ConnectException e) {\r\n\t\t\tJOptionPane.showMessageDialog(new Frame(),\r\n\t\t\t\t\t\"Le serveur Draw Me An Idea n'est pas lancé\", \"Erreur\", 1);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (UnknownHostException e) {\r\n\r\n\t\t\te.printStackTrace();\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 static void main(String[] args) throws RemoteException, MalformedURLException {\n\t\tAddC add = new AddC(); \r\n\t\tNaming.rebind(\"ADD\", add);\r\n\t\tSystem.out.println(\"Server Up and running\");\r\n\t}",
"public static void main(String[] args) throws Exception{\n /* get location of the generic registry service */\n String rmiRegHostName;\n int rmiRegPortNumber;\n \n Scanner sc = new Scanner(System.in);\n int listeningPort = 22324;\n String nameEntry = RegistryConfig.bettingCenterNameEntry;\n \n System.out.println(\"Node process host name(RMI Service Host Name): \");\n rmiRegHostName = sc.nextLine();\n System.out.println(\"Node process port number(RMI Service Port Number): \");\n rmiRegPortNumber = sc.nextInt();\n \n /* Instanciate and install security manager */\n if(System.getSecurityManager() == null){\n System.setSecurityManager(new SecurityManager());\n }\n \n /* Get Central Registry */\n Registry registry = null;\n try{\n registry = LocateRegistry.getRegistry(rmiRegHostName, rmiRegPortNumber);\n }catch(RemoteException e){\n System.err.println(\"Wrong registry location!!!\");\n System.exit(1);\n }\n System.out.println(\"RMI Registry created!\");\n \n /* Get LogRepository register */\n Log_Interface log_itf = null;\n try{\n log_itf = (Log_Interface) registry.lookup(RegistryConfig.logRepositoryNameEntry);\n } catch (NotBoundException e){\n System.out.println(\"LogRepository lookup exception: \" + e.getMessage());\n e.printStackTrace();\n System.exit(1);\n }\n \n /* Create Betting Center Stub */\n Betting_Center betting_center = new Betting_Center(log_itf, GlobalInfo.numSpec, rmiRegHostName, rmiRegPortNumber);\n BettingCenter_Itf betting_center_itf = null;\n \n try{\n betting_center_itf = (BettingCenter_Itf) UnicastRemoteObject.exportObject(betting_center, listeningPort);\n } catch (RemoteException e) {\n System.out.println(\"Betting stub create exception: \" + e.getMessage());\n e.printStackTrace();\n System.exit(1);\n }\n System.out.print(\"Betting Center Stub created!\\n\");\n \n /* Register RMI register */\n Register register = null;\n String nameEntryBase = RegistryConfig.rmiRegisterName;\n try {\n register = (Register) registry.lookup(nameEntryBase);\n } catch (RemoteException | NotBoundException ex) {\n System.out.println(\"Wrong register location!\");\n System.exit (1);\n }\n \n try {\n register.bind(nameEntry, betting_center_itf);\n } catch (RemoteException e) {\n System.out.println(\"Betting Center register exception \" + e.getMessage());\n e.printStackTrace();\n System.exit(1);\n } catch (Exception e) {\n System.out.println(\"Betting Center is already registered: \" + e.getMessage());\n e.printStackTrace();\n System.exit(1);\n }\n System.out.println(\"Betting Center module has been registered!\");\n }",
"public static void main(String[] args) {\n\t\t//System.setSecurityManager(new RMISecurityManager());\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Server is starting...\");\n\t\t\n\t\ttry {\n\t\t\tServer server = new Server(sPort);\n\t\t\tserver.start();\n\t\t\tSystem.out.println(\"Press Enter to exit.\") ;\n\t\t\t\n\t\t\tin.nextLine() ;\n\t\t\t\n\t\t\t//Naming.rebind(Utilities.SERVER_NAME, gc);\n\t\t\tSystem.out.println(\"Server is started\");\n\t\t} catch (RemoteException | UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tin.close(); \n\t}",
"public Server(){\r\n \r\n this.m_Clients = new TeilnehmerListe();\r\n this.m_Port = 7575;\r\n }",
"private static void abrirPuerto() {\n try {\n serverSocket = new ServerSocket(PUERTO);\n System.out.println(\"Servidor escuchando por el puerto: \" + PUERTO);\n } catch (IOException ex) {\n Logger.getLogger(ServidorUnicauca.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public interface IServer extends Remote {\n /**\n * @param auction\n * @throws RemoteException\n */\n void placeAuction(AuctionBean auction) throws RemoteException;\n\n /**\n * @param client\n * @throws RemoteException\n * @throws InterruptedException\n */\n void register(IClient client) throws RemoteException, InterruptedException;\n\n void disconnect(IClient client) throws RemoteException;\n\n /**\n * @param client\n * @param newBid\n * @throws RemoteException\n */\n void raiseBid(IClient client, int newBid) throws RemoteException;\n\n /**\n * @param client\n * @throws RemoteException\n * @throws InterruptedException\n */\n void timeElapsed(IClient client) throws RemoteException, InterruptedException;\n\n\tvoid registerCredentials(String username, String password) throws RemoteException, InterruptedException;\n\n\tboolean verifyCredentials(String username, String password) throws RemoteException, InterruptedException;\n\t\n}",
"public void runServer(){\n\t\tServer.pool = Executors.newFixedThreadPool(Server.user_limit );\n\t\t\n\t\ttry {\n\t server = new ServerSocket(Server.port, Server.user_limit); \n\t logger.logdate(\"Servidor habilitado: Esperando conexiones...\");\n\t \n\t while (Server.active) {\n\t \ttry {\n\t \tSocket serversocket = server.accept();\n\t \tServerThread connection = new ServerThread(serversocket);\n\t \tpool.execute(connection);\n\t \tServer.clients.addLast(connection);\n\t \tString hostname = connection.getConnection().getInetAddress().getHostName();\n\t \tlogger.logdate(hostname+\" entro al servidor\");\n\t \t} catch ( EOFException eofException ) {\n\t \t\tlogger.logdate( \"Error al aceptar la conexión\" );\n\t } catch(SocketException e){\n\t \n\t } \n\t \n\t }\n\t \n\t } catch ( IOException ioException ) {\n\t \tioException.printStackTrace();\n\t } \n\t \n\t}",
"public static void cargarRecursos(Map<Class,Class> mapRecursos,String host)\n {\n try {\n Registry registro=LocateRegistry.createRegistry(ParametrosSistemaCodefac.PUERTO_COMUNICACION_RED);\n //String host=InetAddress.getLocalHost().getHostAddress();\n \n for (Map.Entry<Class, Class> entry : mapRecursos.entrySet()) {\n Class claseImplementacion=entry.getKey();\n LOG.log(Level.INFO,\"Load RMI server: \"+host+\":\"+ParametrosSistemaCodefac.PUERTO_COMUNICACION_RED+\":\"+claseImplementacion.getName());\n UnicastRemoteObject remoteObject=(UnicastRemoteObject) claseImplementacion.newInstance();\n \n Class claseInterfaz=entry.getValue();\n \n String nombreRecurso=claseInterfaz.getName();\n \n //Lanza el recurso para que este disponible por la red\n //registro.rebind(\"rmi://\"+host+\":\"+ParametrosSistemaCodefac.PUERTO_COMUNICACION_RED+\"/\"+nombreRecurso,remoteObject); \n registro.rebind(nombreRecurso,remoteObject); \n \n }\n \n } catch (RemoteException ex) {\n Logger.getLogger(ServiceFactory.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null,ex.getMessage(),\"Error\",JOptionPane.ERROR_MESSAGE);\n System.exit(0);\n } catch (InstantiationException ex) {\n Logger.getLogger(ServiceFactory.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n Logger.getLogger(ServiceFactory.class.getName()).log(Level.SEVERE, null, ex);\n } /*catch (UnknownHostException ex) {\n Logger.getLogger(ServiceFactory.class.getName()).log(Level.SEVERE, null, ex);\n }*/\n }",
"public static void main(String args[]) throws Exception {\n\t\tLocateRegistry.createRegistry(1099);\n\t\tServer remote = new ServerImpl();\n\t\t//将远程服务对象绑定到指定JNDI。\n\t\tNaming.rebind(\"rmi://localhost:1099/HelloServiceImpl\", remote);\n\t}",
"public ClientMain() throws RemoteException, MalformedURLException, NotBoundException\r\n\t{\r\n\t\t//server = (IServer) Naming.lookup(\"rmi://10.152.206.74:1099/bankingServer\");\r\n\t\tserver = (IServer) Naming.lookup(\"rmi://localhost:1099/bankingServer\");\r\n\r\n\t\tmodel = new BankModel();\r\n\r\n\t\tSystem.out.println(\"Client running\");\r\n\t}",
"private void runServer()\n\t{\n\t\tif(sm == null)\n\t\t{\n\t\t\tsm = new ServerManager();\n\t\t}\n\t\t\n\t\tint port = 1209;\n\t\ttry \n\t\t{\n\t\t\twaitUser(sm, port);\n\t\t\t//이 아래 로직이 실행된다는건 유저가 다 들어왔다는 뜻임. 즉 게임 시작할 준비 되었음을 의미함\t\t\t\n\t\t\tGame.getInstance().runGame();\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"[Server.runServer()] error >>> : \" + e.getMessage());\n\t\t}\n\t}",
"public MorpionServerImpl() throws RemoteException {\r\n\t\tmorpionClients = new HashMap<String, MorpionClientInterface>();\r\n\t}",
"public static void main(String[] args) throws Exception {\n CenterServerImp mtlServer = new CenterServerImp(Location.MTL);\n CenterServerImp lvlServer = new CenterServerImp(Location.LVL);\n CenterServerImp ddoServer = new CenterServerImp(Location.DDO);\n Registry registry = LocateRegistry.createRegistry(Constants.REGISTRY_PORT);\n registry.bind(\"MontrealServer\", mtlServer);\n registry.bind(\"LavalServer\", lvlServer);\n registry.bind(\"DDOServer\", ddoServer);\n System.out.println(\"#================= Server is up and running =================#\");\n }",
"@Override\n public void run() {\n\n Message registerMessage = new Message(REGISTER_SATELLITE, satelliteInfo);\n try\n {\n\n Socket server = new Socket(serverInfo.getHost(), serverInfo.getPort());\n ObjectOutputStream toServer = new ObjectOutputStream(server.getOutputStream());\n System.out.println(\"[Satellite.run] registering satellite with server\");\n toServer.writeObject(registerMessage);\n }\n catch(IOException e)\n {\n System.err.println(e);\n }\n\n\n // create server socket with port in properties\n // ---------------------------------------------------------------\n try\n {\n ServerSocket serverSocket = new ServerSocket(satelliteInfo.getPort());\n System.out.println(\"[Satellite] successfully set up ServerSocket.\");\n // start taking job requests in a server loop\n // ---------------------------------------------------------------\n while (true)\n {\n Socket socket = serverSocket.accept();\n (new SatelliteThread(socket, this)).start();\n }\n }\n catch(IOException e)\n {\n System.err.println(e);\n }\n }",
"public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }",
"public RMIClient() {\n if(ipAdress == null){\n ipAdress = \"127.0.0.1\";\n }\n try {\n loginRegistry = LocateRegistry.getRegistry(ipAdress, 421);\n mainScreenRegistry = LocateRegistry.getRegistry(ipAdress, 422);\n } catch (RemoteException ex) {\n StageController.getInstance().popup(\"Server connection\", false, \"server connection failed.\");\n Logger.getLogger(RMIClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n if (loginRegistry != null) {\n try {\n loginProvider = (ILoginProvider) loginRegistry.lookup(\"loginProvider\");\n } catch (RemoteException | NotBoundException ex) {\n StageController.getInstance().popup(\"Server connection\", false, \"server connection failed.\");\n Logger.getLogger(RMIClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n if (mainScreenRegistry != null) {\n try {\n mainScreenProvider = (IMainScreenProvider) mainScreenRegistry.lookup(\"mainScreenProvider\");\n } catch (RemoteException | NotBoundException ex) {\n StageController.getInstance().popup(\"Server connection\", false, \"server connection failed.\");\n Logger.getLogger(RMIClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}",
"private void init() {\n System.out.println(\"Binding to RMIRegistry...\");\n String theName = getConfigManager().getString(\"REMOTE_NAME\");\n if (null != theName) {\n bind(theName, this);\n } else {\n LoggingServices.getCurrent().logMsg(getClass().getName(), \"init()\"\n , \"Could not find name to bind to in registry.\"\n , \"Make sure loyalty.cfg contains a RMIREGISTRY entry.\", LoggingServices.MAJOR);\n }\n }",
"public static void main(String[] args) throws Exception{\n\t\tDicService dicService = new DicServiceImpl();\n\t\tdicService.loadDic();\n\t\t// Start on port 1099\n\t\tLocateRegistry.createRegistry(1099);\n\t\tNaming.rebind(\"dicService\", dicService);\n\t\t//Print server is ready\n\t\tSystem.out.println(\"Server ready.\");\n\t}",
"public SyncServer() throws RemoteException\r\n\t{\r\n\t\ttry {\r\n\t\t\tinit(SYNC);\r\n\t\t} catch (Exception e) {\r\n\t\t\tDebug.ErrorMessage(\"SyncServer initialization error\",\"Exception\" + e);\r\n\t\t}\r\n\t}",
"public boolean connect() throws RemoteException {\n\t\ttry {\n\t\t\t// Get remote object reference\n\t\t\tthis.registry = LocateRegistry.getRegistry(host, port);\n\t\t\tthis.server = (ServerInterface) registry.lookup(\"Server\");\n\t\t\tid = this.server.getNewClientId();\n\t\t\tClientInterface c_strub = (ClientInterface) UnicastRemoteObject.exportObject(this, 0);\n\t\t\tregistry.bind(id, c_strub);\n\t\t\treturn this.server.addClient(username, password, id);\n\t\t}\n\t\tcatch (AlreadyBoundException | NotBoundException e) {\n\t\t\tSystem.err.println(\"Error on client :\" + e);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"@Override\n public void connecterFibreOptique() throws ConnecteurException, RemoteException, MalformedURLException, NotBoundException {\n Naming.rebind(url, (ConnecteurRemoteInterface) this);\n \n // Enregistrement de tous les autres connecteurs\n // et notification a tous les autres connecteurs\n for (String name : Naming.list(\"rmi://localhost:1099/\")) {\n name = \"rmi:\" + name;\n if (!name.equals(url)) {\n Remote o = Naming.lookup(name);\n if (o instanceof ConnecteurRemoteInterface) {\n // Enregistrement du connecteur courant\n System.out.println(url + \": \\tEnregistrement auprès de \" + name);\n ((ConnecteurRemoteInterface) o).enregistrerConnecteur(url, controleurUrl);\n // Enregistrement d'un connecteur distant\n enregistrerConnecteur(name, (ConnecteurRemoteInterface) o);\n }\n else if (o instanceof PrismeRemoteInterface) {\n if (prisme == null) {\n this.prismeUrl = name;\n prisme = (PrismeRemoteInterface) o;\n prisme.enregisterConnecteur(url);\n }\n else {\n throw new ConnecteurException(\"Plusieurs prismes semblent exister.\");\n }\n }\n }\n }\n connecteur.connecter();\n }",
"public ServerService(){\n\t\tlogger.info(\"Initilizing the ServerService\");\n\t\tservers.put(1001, new Server(1001, \"Test Server1\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1002, new Server(1002, \"Test Server2\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1003, new Server(1003, \"Test Server3\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1004, new Server(1004, \"Test Server4\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tlogger.info(\"Initilizing the ServerService Done\");\n\t}",
"public void start() {\n\n // server 환경설정\n EventLoopGroup bossGroup = new NioEventLoopGroup(bossCount);\n EventLoopGroup workerGroup = new NioEventLoopGroup();\n\n try {\n\n ServerBootstrap b = new ServerBootstrap();\n b.group(bossGroup, workerGroup)\n .channel(NioServerSocketChannel.class)\n .childHandler(new ChannelInitializer<SocketChannel>() {\n @Override\n public void initChannel(SocketChannel ch) throws Exception {\n ChannelPipeline pipeline = ch.pipeline();\n pipeline.addLast(new StringDecoder(CharsetUtil.UTF_8));\n pipeline.addLast(new StringEncoder(CharsetUtil.UTF_8));\n pipeline.addLast(new LoggingHandler(LogLevel.INFO));\n pipeline.addLast(SERVICE_HANDLER);\n }\n })\n .option(ChannelOption.SO_BACKLOG, backLog)\n .childOption(ChannelOption.SO_KEEPALIVE, true);\n\n ChannelFuture channelFuture = b.bind(tcpPort).sync();\n channelFuture.channel().closeFuture().sync();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n\n }",
"public void init(ServletConfig conf) throws ServletException {\n super.init(conf);\n \n MBeanServer mBeanServer = null;\n\n Registry reg=null;\n \n // TODO: use config to get the registry port, url, pass, user\n\n \n try {\n if( reg==null )\n reg=LocateRegistry.createRegistry(1099);\n } catch( Throwable t ) {\n log(\"Can't start registry - it may be already started: \" + t);\n }\n \n try {\n mBeanServer = null;\n if (MBeanServerFactory.findMBeanServer(null).size() > 0) {\n mBeanServer =\n (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);\n } else {\n mBeanServer = MBeanServerFactory.createMBeanServer();\n }\n } catch( Throwable t ) {\n log(\"Can't get the mbean server \" + t);\n return;\n }\n \n try {\n JMXServiceURL address = new JMXServiceURL(\"service:jmx:rmi://rmiHost/jndi/rmi://localhost:1099/jndiPath\");\n cntorServer = \n JMXConnectorServerFactory.newJMXConnectorServer(address, null, mBeanServer);\n cntorServer.start();\n } catch (Throwable e) {\n log(\"Can't register jmx connector \", e);\n }\n }",
"protected RMIclientHandler(String s, Registry r) throws RemoteException {\r\n\t\tFile serverStorage = new File (s);\r\n\t\tserverStorage.mkdir();\r\n\t\tthis.registry=r;\r\n\t}",
"public void register(IObserver obj);",
"private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }",
"public interface RegistrationInterface extends Remote {\n public int registraUtente(String nickname, String password) throws RemoteException;\n}",
"public static void main(String[] args) {\n\n try {\n MyRemote service = new MyRemoteImp1();\n Naming.rebind(\"Remote Hello\", service);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"private Main startJndiServer() throws Exception {\n\t\tNamingServer namingServer = new NamingServer();\n\t\tNamingContext.setLocal(namingServer);\n\t\tMain namingMain = new Main();\n\t\tnamingMain.setInstallGlobalService(true);\n\t\tnamingMain.setPort( -1 );\n\t\tnamingMain.start();\n\t\treturn namingMain;\n\t}",
"public static void main(String[] args) throws Exception {\n LocateRegistry.createRegistry(DBRASSchemeInterface.PORT, new SslRMIClientSocketFactory(), new SslRMIServerSocketFactory(null,null, true));\n System.out.println(\"RMI registry running on port \"+DBRASSchemeInterface.PORT);\n // Sleep forever\n Thread.sleep(Long.MAX_VALUE);\n }",
"public static void main(String[] args) throws Exception {\n\n List<RequestHandle> requestHandleList = new ArrayList<RequestHandle>();\n requestHandleList.add(new LsfRequestServerHandle());\n\n final Server server = new Server(new DefaultServerRoute(),new ServerHandler(requestHandleList), GlobalManager.serverPort);\n Thread t= new Thread(new Runnable() {\n public void run() {\n //start server\n try {\n server.run();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n t.start();\n\n ServerConfig serverBean = new ServerConfig();\n serverBean.setAlias(\"test\");\n serverBean.setInterfaceId(IService.class.getCanonicalName());\n serverBean.setImpl(new IServerImpl());\n server.registerServer(serverBean);\n\n\n }",
"public void start(){\n log.debug(\"Starting Host Router\");\n lobbyThread = pool.submit(new Runnable() {\n public void run() {\n waitForClients();\n }\n });\n }",
"public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }",
"public void ejecutar() throws IOException {\n ServerSocket serverSocket = null;\n\n try {\n serverSocket = new ServerSocket(4444);\n } catch (IOException e) {\n System.err.println(\"No se puede abrir el puerto: 4444.\");\n System.exit(1);\n }\n System.out.println(\"Puerto abierto: 4444.\");\n\n while (listening) {\n \t\n \tTCPServerHilo hilo = new TCPServerHilo(serverSocket.accept(), this);\n hilosClientes.add(hilo);\n hilo.start();\n }\n\n serverSocket.close();\n }",
"private void initJMX() throws Exception{\n\t\tMap env = new HashMap<String, Object>();\r\n\t\tenv.put(Context.INITIAL_CONTEXT_FACTORY,\"com.sun.jndi.rmi.registry.RegistryContextFactory\");\r\n\t\tenv.put(RMIConnectorServer.JNDI_REBIND_ATTRIBUTE, \"true\");\r\n\t\tJMXServiceURL url = new JMXServiceURL(\"service:jmx:rmi:///jndi/rmi://127.0.0.1:1099/server\");\r\n\t\tObjectName objectName=ObjectName.getInstance(\"test:name=test\");\r\n\t\tManagementFactory.getPlatformMBeanServer().registerMBean(MBeanHandler.createJMXMBean(new AdminAgent(),objectName), objectName);\r\n\t\t\r\n\t\tRegion region=CacheFactory.getAnyInstance().getRegion(\"/CHECK\");\t\r\n\t\tObjectName regionObjectName=ObjectName.getInstance(\"region:name=region\");\r\n\t\tManagementFactory.getPlatformMBeanServer().registerMBean(MBeanHandler.createJMXMBean(new RegionAgent(region),regionObjectName), regionObjectName);\r\n\t\tJMXConnectorServer connectorServer = JMXConnectorServerFactory\r\n\t\t.newJMXConnectorServer(url, env, ManagementFactory.getPlatformMBeanServer());\r\n connectorServer.start();\r\n\t\t\r\n//\t\tMBeanHandler.createJMXMBean(new AdminAgent(), ObjectNameFactory.resolveFromClass(AdminAgent.class));\r\n//\t\tjmxserver.registerMBean(new AdminAgent(), ObjectNameFactory.resolveFromClass(AdminAgent.class));\r\n\t\tSystem.out.println(\"JMX connection is established on: service:jmx:rmi:///jndi/rmi://127.0.0.1:1099/server\");\r\n\t\t\r\n\t}",
"@Override\r\n public void init() throws ServletException {\r\n try {\r\n s_server =\r\n Server.getInstance(new File(Constants.FEDORA_HOME), false);\r\n s_management =\r\n (Management) s_server\r\n .getModule(\"fedora.server.management.Management\");\r\n if (s_management == null) {\r\n throw new ServletException(\"Unable to get Management module from server.\");\r\n }\r\n } catch (InitializationException ie) {\r\n throw new ServletException(\"Unable to get Fedora Server instance.\"\r\n + ie.getMessage());\r\n }\r\n }",
"public void send(){ \n\t\tserverAddress=tfTxtIpServer.getText();\n\t\tserverPort=\"3232\";\n\t\ttext=tfTxtMsg.getText();\n try{\n\t\t\t// get the \"registry\"\n registry=LocateRegistry.getRegistry(\n serverAddress,\n (new Integer(serverPort)).intValue()\n );\n\t\t // look up the remote object\n rmiServer=(ReceiveMessageInterface)(registry.lookup(\"rmiServer\"));\n\t\t\t// call the remote method\n rmiServer.receiveMessage(text);\n }\n catch(RemoteException e){\n e.printStackTrace();\n }\n catch(NotBoundException e){\n e.printStackTrace();\n } \n }",
"public static void main(String[] args) {\n\t\ttry { NetworkServerControl server = new NetworkServerControl(InetAddress.getByName(\"localhost\"),1527);\n\t\tserver.start(null);\n\t\tSystem.out.println(\"DB Server Started!\");\n\t\t//server.shutdown();\n\t\t//cn = DriverManager.getConnection(dbURL);\n\t\t} catch(Exception e) {System.out.println(\"Cannot Start DB Server!\"); }\n\t\t\n\t\tfinal JettyServer jettyServer = new JettyServer();\n\t\tString jetty_home = System.getProperty(\"jetty.home\",\".\");\n Server server = new Server(8080);\n WebAppContext webapp = new WebAppContext();\n webapp.setContextPath(\"/\");\n //webapp.setWar(jetty_home+\"/target/vrscloud-1.war\");\n webapp.setWar(\"ROOT.war\");\n server.setHandler(webapp);\n // server.start();\t\n\t\t\n\t\t\n jettyServer.setHandler(webapp);\t\n\t\t\n\t\tRunnable runner = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tnew ServerRunner(jettyServer);\n\t\t\t}\n\t\t};\n\t\tEventQueue.invokeLater(runner);\n\t}",
"public void start() {\n\t\trmiUtils.startRMI(IRMI_Defs.CLASS_SERVER_PORT_CLIENT);\n\n\t\ttry {\n\t\t\tview.setRemoteHost(rmiUtils.getLocalAddress()); //TODO Is this stored somewhere?\n\t\t\tuser = new User(\"default\", rmiUtils.getLocalAddress(), this);\n\t\t\tview.append(\"Create User \" + user.getName() + \"\\n\");\n\n\t\t\tregistry = rmiUtils.getLocalRegistry();\n\t\t\tIUser stub = (IUser) UnicastRemoteObject.exportObject(user, IUser.BOUND_PORT);\n\t\t\tview.append(\"Found registry: \" + registry + \"\\n\");\n\n\t\t\tregistry.rebind(IUser.BOUND_NAME, stub);\n\t\t\tview.append(\"IUser bound to \" + IUser.BOUND_NAME + \"\\n\");\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error getting local address: \" + e);\n\t\t}\n\t}",
"public void startServer() throws Exception\n {\n\t\t\tString SERVERPORT = \"ServerPort\";\n\t\t\tint serverport = Integer.parseInt(ConfigurationManager.getConfig(SERVERPORT));\n\t\t\t\n \n Srvrsckt=new ServerSocket ( serverport );\n while ( true )\n {\n Sckt =Srvrsckt.accept();\n new Thread ( new ConnectionHandler ( Sckt ) ).start();\n }\n \n \n\n\n }",
"private void connection() {\n boolean connect;\n try {\n connect = true;\n this.jTextArea1.setText(\"Server starts...\");\n server = new MultiAgentServer(this);\n String ip = \"\";\n int errorBit = 256;\n for (int i = 0; i < server.getIpAddr().length; i++) {\n int currentIP = server.getIpAddr()[i];\n if (currentIP < 0) {\n currentIP += errorBit;\n }\n ip += currentIP + \".\";\n }\n ip = ip.substring(0, ip.length() - 1);\n System.out.println(ip);\n Naming.rebind(\"//\" + ip + \"/server\", server);\n this.jTextArea1.setText(\"Servername: \" + ip);\n this.jTextArea1.append(\"\\nServer is online\");\n } catch (MalformedURLException | RemoteException e) {\n this.jTextArea1.append(\"\\nServer is offline, something goes wrong!!!\");\n connect = false;\n }\n if (dialog.getMusicBox().isSelected()) {\n sl = new SoundLoopExample();\n }\n reconnectBtn.setEnabled(!connect);\n }",
"private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}",
"public void run(){\n\n\t\tServerSocket socketEcoute;\n\t\ttry {\n\t\t\tsocketEcoute = new ServerSocket();\n\t\t\tsocketEcoute.bind(new InetSocketAddress(this.defaultPort));\n\t\t\tSystem.out.println(\"Port manager started on : \"+this.defaultPort);\n\t\t\twhile(true){\n\t\t\t\tSocket socketConnexion = socketEcoute.accept();\n\t\t\t\tSystem.out.println(\"Someone is connected on PortManager\");\n\t\t\t\t\n\t\t\t\tnew PortManagerThread(socketConnexion,this.ctrl).start();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void run() {\n\t\ttry {\n\t\t\tSystem.err.println(\"Lancement du serveur au port \" + this.listen_socket.getLocalPort());\n\t\t\twhile (true) {\n\t\t\t\tif (listen_socket.getLocalPort() == PORT_RESERVATION) {\n\t\t\t\t\tnew Thread(new ServiceReservation(listen_socket.accept())).start();\n\t\t\t\t} else if (listen_socket.getLocalPort() == PORT_EMPRUNT) {\n\t\t\t\t\tnew Thread(new ServiceEmprunt(listen_socket.accept())).start();\n\t\t\t\t} else if (listen_socket.getLocalPort() == PORT_RETOUR) {\n\t\t\t\t\tnew Thread(new ServiceRetour(listen_socket.accept())).start();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\ttry {\n\t\t\t\tthis.listen_socket.close();\n\t\t\t} catch (IOException e1) {\n\t\t\t}\n\t\t\tSystem.err.println(\"Arręt du serveur au port \" + this.listen_socket.getLocalPort());\n\t\t}\n//\t\ttry {\n//\t\t\tthis.finalize();\n//\t\t} catch (Throwable e) {\n//\t\t\te.printStackTrace();\n//\t\t}\n\t}",
"public ServeurGestion(int portClient){\r\n try {\r\n ecoute=new ServerSocket(portClient);\r\n appels=new Vector<>();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ServeurGestion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"public interface Service extends AsyncRunnable, Remote {\n\n\tint registryPort() throws RemoteException;\n\n\tString name() throws RemoteException;\n}",
"@Override\r\n\tpublic void initial() {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// System.out.println(\"LocalProxy run on \" + port);\r\n\t}",
"Server remote(Server bootstrap, Database<S> vat);",
"@Override\n public void run() {\n try {\n registerWithServer();\n initServerSock(mPort);\n listenForConnection();\n\t} catch (IOException e) {\n Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, e);\n setTextToDisplay(\"run(): \" + e.getMessage());\n setConnectedStatus(false);\n\t}\n }",
"private static void esperarCliente() {\n try {\n socket = serverSocket.accept();\n System.out.println(\"Cliente conectado...\");\n } catch (IOException ex) {\n Logger.getLogger(ServidorUnicauca.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void connect(){\n // Averiguem quina direccio IP hem d'utilitzar\n InetAddress iAddress;\n try {\n iAddress = InetAddress.getLocalHost();\n String IP = iAddress.getHostAddress();\n\n //Socket sServidor = new Socket(\"172.20.31.90\", 33333);\n sServidor = new Socket (String.valueOf(IP), 33333);\n doStream = new DataOutputStream(sServidor.getOutputStream());\n diStream = new DataInputStream(sServidor.getInputStream());\n } catch (ConnectException c){\n System.err.println(\"Error! El servidor no esta disponible!\");\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private boolean startupProcedure()\n\t{\n\t\t//Start RMI-server\n\t\tnetworkinterface.startRMIServer();\n\t\tboolean RMIRunning = networkinterface.bindRMIServer(nodeManager, \"NodeServer\");\n\t\t\n\t\t//Start multicastservice\n\t\tif(networkinterface.setupMulticastservice())\n\t\t{\n\t\t\tnetworkinterface.runMulticastservice();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn RMIRunning;\n\t}",
"@Override\n\tpublic void addServer(String arg0) throws IOException {\n\n\t}",
"public static void main(String[] args) {\n\t\tserverManager = new ServerManager(8031);\n\t\t\n\t}",
"public interface ServerController extends java.rmi.Remote{\r\n\t// abstract classes\r\n\tpublic int connect() throws RemoteException;\r\n\tpublic String getPath() throws RemoteException;\r\n\tpublic String echo(String message) throws RemoteException;\r\n\tpublic String isFileExists(String fname) throws RemoteException;\r\n\tpublic int[] sortList(int[] a) throws RemoteException;\r\n\tpublic int[][] mMultiplication(int[][] a, int[][] b, int row, int col) throws RemoteException;\r\n}",
"private RMIRegistrator() {\n\t// nothing\n }",
"void startAIGame() {\n int status = gameServer.restartServer( true, settingsMenu.getMapSize(),\n settingsMenu.getPlayFor(), settingsMenu.getFirstMove(),\n settingsMenu.getServerName() );\n if( status != 0 ) {\n JOptionPane.showMessageDialog( frame, Language.ERROR_STARTUP,\n Language.CAPTION_ERROR, JOptionPane.PLAIN_MESSAGE );\n } else {\n host = \"127.0.0.1\";\n role = \"admin\";\n password = gameServer.getServerPassword();\n ( new Thread( this ) ).start();\n }\n }",
"void startServer(String name, Config.ServerConfig config);",
"public void startServer() {\n System.out.println(\"Inicie\");\n httpServer = new HttpServer();\n httpServer.registerProessor(\"/App\", this);\n try {\n httpServer.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n/**\n * Communication Tester method\n */\npublic String Communicate() throws RemoteException {\n\treturn \"Server Says Hi\";\n}",
"@Override\n public void run()\n {\n close(false);\n try\n {\n if (!isConnected())\n connectMS(msServer.getIp(), msServer.getPort());\n }\n catch (Exception e)\n {\n Log.e(\"Dudu_SDK\",\n \"getServer ...failed ...user default server... \");\n }\n }",
"public static void main(String[] args) {\n try {\n\n path_config = args[0];\n\n Servidor server = new Servidor(args[2],args[3]);\n\n server.agregar_servidores_backup(args[1]);\n\n\n\n\n \n while (server.active) {\n server.run();\n }\n System.exit(0);\n\n\n } catch (RemoteException ex) {\n Logger.getLogger(Servidor.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public SimpleGUI(String p_host, String p_name) {\r\n super();\r\n initialize();\r\n int porti=1099;\r\n String adresa=\"192.165.43.195\"; \r\n try\r\n {\r\n this.rem = (ServerInterface)Naming.lookup(\"rmi://\"+adresa+\":\"+porti+\"/RMD\");\r\n \t\r\n this.id = rem.EnterGame(p_name);\r\n System.out.println(\"Your id is : \"+ id);\r\n \t\r\n if(id == 0)\r\n {\r\n System.out.println(\"Max Connection reached\");\r\n \t\r\n }\r\n else\r\n {\r\n this.name = rem.getName(id);\r\n this.setTitle(\"Welcome \" + name);\r\n \t\r\n GiveCards();\r\n \t\r\n }\r\n \r\n }\r\n catch (MalformedURLException e)\r\n {\r\n System.err.println(\"MalformedURLException: \"+e.getMessage());\r\n }\r\n catch (RemoteException e)\r\n {\r\n System.err.println(\"RemoteException: \" + e.getMessage());\r\n }\r\n catch (NotBoundException e)\r\n {\r\n System.err.println(\"NotBoundException: \"+e.getMessage());\r\n }\r\n }",
"public static void main(String[] args) {\n\t\tnew Servidor();\n\t}",
"public static void main(String[] args) throws Exception {\n\n if(System.getSecurityManager() == null) {\n System.setSecurityManager(new SecurityManager());\n }\n\n if(args.length < 1) {\n System.exit(-1);\n }\n\n String domain = args[0];\n\n System.setProperty(\"java.rmi.server.hostname\", domain);\n\n SpaceImpl spaceImpl = getInstance();\n\n // Unexport to ensure no exceptions\n UnicastRemoteObject.unexportObject(spaceImpl, true);\n\n Space stub = (Space) UnicastRemoteObject.exportObject(spaceImpl, 0);\n\n Registry registry = LocateRegistry.createRegistry(Space.PORT);\n registry.rebind(Space.SERVICE_NAME, stub);\n\n System.out.println(\"SpaceImpl.main Registered and Ready.\");\n }",
"private RepositorioOrdemServicoHBM() {\n\n\t}",
"private void runRemotely() {\n if (!isDas())\n return;\n\n List<Server> remoteServers = getRemoteServers();\n\n if (remoteServers.isEmpty())\n return;\n\n try {\n ParameterMap paramMap = new ParameterMap();\n paramMap.set(\"monitor\", \"true\");\n paramMap.set(\"DEFAULT\", pattern);\n ClusterOperationUtil.replicateCommand(\"get\", FailurePolicy.Error, FailurePolicy.Warn, remoteServers,\n context, paramMap, habitat);\n }\n catch (Exception ex) {\n setError(Strings.get(\"admin.get.monitoring.remote.error\", getNames(remoteServers)));\n }\n }"
]
| [
"0.73900545",
"0.7312897",
"0.7192309",
"0.7187257",
"0.7140742",
"0.71342367",
"0.7123782",
"0.70051914",
"0.7000186",
"0.688472",
"0.6861395",
"0.6829134",
"0.6741962",
"0.67328715",
"0.6715259",
"0.6705653",
"0.6702795",
"0.66907865",
"0.6683228",
"0.6674167",
"0.6661989",
"0.6648554",
"0.66265804",
"0.6485308",
"0.64535457",
"0.6409977",
"0.64045334",
"0.6378806",
"0.63526696",
"0.6332268",
"0.6331615",
"0.6293138",
"0.6283992",
"0.62669903",
"0.6254654",
"0.62450874",
"0.62433195",
"0.62408906",
"0.6228603",
"0.622779",
"0.621399",
"0.6210945",
"0.61996055",
"0.619861",
"0.6187672",
"0.6183845",
"0.6180438",
"0.61698407",
"0.6166464",
"0.6158013",
"0.61472857",
"0.61158705",
"0.6096188",
"0.6092701",
"0.60897076",
"0.6085889",
"0.6078265",
"0.6078133",
"0.6065668",
"0.6048905",
"0.6038858",
"0.6038491",
"0.60358685",
"0.60349643",
"0.60270077",
"0.6015499",
"0.5961436",
"0.5960363",
"0.59548897",
"0.59471804",
"0.5938186",
"0.5919392",
"0.59168994",
"0.59026873",
"0.5900655",
"0.5895802",
"0.588744",
"0.58703977",
"0.5861998",
"0.58609366",
"0.58397824",
"0.5836082",
"0.5828341",
"0.58268577",
"0.58250636",
"0.58162504",
"0.58112055",
"0.57999957",
"0.5798418",
"0.5797686",
"0.57964927",
"0.5795234",
"0.5794044",
"0.57912254",
"0.5790675",
"0.5790228",
"0.57900274",
"0.57791144",
"0.5777541",
"0.57744014"
]
| 0.6854584 | 11 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.adicionar_treino, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\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 boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\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.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
]
| [
"0.72461367",
"0.7201596",
"0.7195268",
"0.7177002",
"0.71069986",
"0.7039653",
"0.70384306",
"0.70115715",
"0.7010647",
"0.69803435",
"0.6945406",
"0.69389313",
"0.6933442",
"0.69172275",
"0.69172275",
"0.6890826",
"0.6883689",
"0.687515",
"0.6874831",
"0.68615955",
"0.68615955",
"0.68615955",
"0.68615955",
"0.68522274",
"0.6846375",
"0.68189865",
"0.68165565",
"0.68124795",
"0.6812267",
"0.6812267",
"0.68056566",
"0.6800461",
"0.6797465",
"0.6790805",
"0.6789039",
"0.6787885",
"0.6782993",
"0.67597246",
"0.67570525",
"0.6747535",
"0.6743268",
"0.6743268",
"0.6740546",
"0.67395175",
"0.67256093",
"0.6723954",
"0.6722248",
"0.6722248",
"0.6720444",
"0.67118156",
"0.6706721",
"0.6704184",
"0.66993994",
"0.66988564",
"0.669681",
"0.66943884",
"0.66860807",
"0.668306",
"0.668306",
"0.6682587",
"0.668012",
"0.6678661",
"0.6676379",
"0.6668044",
"0.66669863",
"0.66628903",
"0.6657356",
"0.6657356",
"0.6657356",
"0.66565585",
"0.665397",
"0.665397",
"0.665397",
"0.66525495",
"0.66518986",
"0.66496557",
"0.6648199",
"0.6646489",
"0.66462386",
"0.6646177",
"0.6645531",
"0.66453475",
"0.66446036",
"0.66438025",
"0.6642411",
"0.6641632",
"0.6638948",
"0.6634394",
"0.66336566",
"0.6632082",
"0.66315377",
"0.66315377",
"0.66315377",
"0.6628936",
"0.6627818",
"0.6627061",
"0.66256744",
"0.6623986",
"0.661993",
"0.6618369",
"0.6618369"
]
| 0.0 | -1 |
Instantiates a new Iterator 1. | public Iterator1(String nums) {
this.nums = nums;
this.numsMass = nums.split("");
this.iterReverse = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Iterator iterator () {\n return new MyIterator (first);\n }",
"public Iterator()\n {\n this(null, null, true);\n }",
"public Iterator()\n {\n this(null, null, true);\n }",
"public Iterator()\n {\n this(null, null, true);\n }",
"@Override\n public Iterator<Integer> iterator() {\n return new IteratorImplementation();\n }",
"public abstract Iterator<E> createIterator();",
"IteratorExp createIteratorExp();",
"public IteratorSpliterator(Iterator<? extends T> param1Iterator, int param1Int) {\n/* 1747 */ this.collection = null;\n/* 1748 */ this.it = param1Iterator;\n/* 1749 */ this.est = Long.MAX_VALUE;\n/* 1750 */ this.characteristics = param1Int & 0xFFFFBFBF;\n/* */ }",
"public Iterator <item_t> iterator () {\n return new itor ();\n }",
"public ArrayIterator() {\n next = first;\n }",
"@Override\r\n public Iterator iterator(){\n return new MyIterator(this);\r\n }",
"public IteratorSpliterator(Iterator<? extends T> param1Iterator, long param1Long, int param1Int) {\n/* 1729 */ this.collection = null;\n/* 1730 */ this.it = param1Iterator;\n/* 1731 */ this.est = param1Long;\n/* 1732 */ this.characteristics = ((param1Int & 0x1000) == 0) ? (param1Int | 0x40 | 0x4000) : param1Int;\n/* */ }",
"public Iterator<T> iterator() {\r\n \r\n return new Iteration();\r\n }",
"@Override\n public Iterator<Object> iterator() {\n return new MyIterator();\n }",
"public Iterator<Item> iterator() {\n return new AIterator();\n }",
"public SList_Iterator<T> iterator() {\n return new iterator();\n }",
"public SimpleDuplicateableIterator(Iterator<E> iterator)\r\n\t{\r\n\t\tthis.currentIndex = 0;\r\n\t\tthis.oldElements = new ArrayList<E>();\r\n\t\tthis.iterator = iterator;\r\n\t}",
"public IterI(){\n }",
"public Iterator<Object[]> getIterator()\n\t{\n\t\tinit();\n\t\t\n\t\treturn new SimpleIterator();\n\t}",
"@Override\n\tpublic Iterator<NumberInterface> createIterator() {\n\t\treturn numbers.iterator();\n\t}",
"public FlightIterator createIterator() {\r\n\t\treturn new FlightIterator(flights);\r\n\t}",
"public Iterator<Item> iterator(){\n return new Iterator<Item>(); //Iterator interface implementation instance(has all Iterator methods)\n }",
"public ListIterator() {current=first.next;}",
"@Override\n public Iterator<T> iterator() {\n return new Itr();\n }",
"@Override\n public Iterator<T> iterator() {\n return new Itr();\n }",
"<C, PM> IteratorExp<C, PM> createIteratorExp();",
"@Override\n public Iterator<T> iterator() {\n return new MyArrayList.MyIterator();\n }",
"public Iterator<E> iterator()\n {\n return new MyListIterator();\n }",
"public IntIteratorSpliterator(PrimitiveIterator.OfInt param1OfInt, int param1Int) {\n/* 1879 */ this.it = param1OfInt;\n/* 1880 */ this.est = Long.MAX_VALUE;\n/* 1881 */ this.characteristics = param1Int & 0xFFFFBFBF;\n/* */ }",
"@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}",
"public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }",
"iterator(){current = start;}",
"public Iterator<Item> iterator() {\n return new Iterator<Item>() {\n public boolean hasNext() {\n return false;\n }\n\n public Item next() {\n return null;\n }\n };\n }",
"public Iterator<Item> iterator() { return new RandomIterator();}",
"public RunIterator iterator() {\n // Replace the following line with your solution.\n return new RunIterator(runs.getFirst());\n // You'll want to construct a new RunIterator, but first you'll need to\n // write a constructor in the RunIterator class.\n \n \n }",
"@Override\n public Iterator<Integer> iterator() {\n return new Iterator<>() {\n int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < Set.this.count;\n }\n\n @Override\n public Integer next() {\n return Set.this.arr[i++];\n }\n };\n }",
"public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }",
"protected EmptyIterator() {\n\t\t\tsuper();\n\t\t}",
"private IteratorImpl() {\r\n\t\t\titeratorModificationCount = modificationCount;\r\n\r\n\t\t\tnextEntry = table[0] == null ? findNextNonNullTableRowEntry() : table[0];\r\n\t\t}",
"Iterator<T> iterator();",
"public Iterator<Item> iterator() {\n return new RandomIterator(N, a);\n }",
"public ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }",
"public Iterator<Integer> iterator() {\n\t\treturn new WrappedIntIterator(intIterator());\n\t}",
"public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }",
"@Override\n public Iterator<E> iterator() {\n return new SimpleArrayListIterator<E>();\n }",
"public Iterator<Item> iterator() {\n return new RandomizedIterator();\n }",
"@Override\n\t\tpublic T1 next() {\n\t\t\treturn (T1)_items[getindex(++_current)];\n\t\t}",
"public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }",
"private DocumentOrderIterator() {}",
"public DupFilterIterator(NodeIterator source) {\n\t_source = source;\n\n\tif (source instanceof KeyIndex) setStartNode(DOM.ROOTNODE);\n }",
"public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}",
"public Iterator<Item> iterator() { return new ListIterator(); }",
"public Iterator<Type> iterator();",
"public Iterator<Item> iterator() {\n return new CustomIterator<Item>(head);\n }",
"@Override\n public Iterator<T> iterator() {\n return new Iterator<T>() {\n int index = 0;\n\n @Override\n public boolean hasNext() {\n return index < size;\n }\n\n @Override\n public T next() {\n return genericArrayList[index++];\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }",
"public Iterator<T> getIterator() {\n return new Iterator(this);\n }",
"public Iterator<Item> iterator() { \n return new ListIterator(); \n }",
"@Test\n public void test1() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(545,\"org.apache.commons.collections4.iterators.IteratorIterableEvoSuiteTest.test1\");\n IteratorIterable<Object> iteratorIterable0 = null;\n try {\n iteratorIterable0 = new IteratorIterable<Object>((Iterator<?>) null, true);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Iterator must not be null\n //\n }\n }",
"public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"RandomizedIterator(String className, TypeTree tree) {\n\t super(init(className, tree));\n\t}",
"public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}",
"public Iterator iterator() {\n maintain();\n return new MyIterator(collection.iterator());\n }",
"public Iterator<Item> iterator() {\n return new RandomIterator();\n }",
"@Test\r\n public void iteratorWorksInFirst() throws Exception {\r\n Iterator<Integer> it = sInt.iterator();\r\n assertTrue(it.hasNext());\r\n assertEquals(1, (int) it.next());\r\n Iterator<String> it2 = sStr.iterator();\r\n assertTrue(it2.hasNext());\r\n assertEquals(\"kek\", it2.next());\r\n }",
"@Override\n public Iterator<Item> iterator() {\n return new HeadFirstIterator();\n }",
"public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }",
"@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }",
"@Test\n public void whenAddOneToEmptyTreeThenIteratorHasNext() {\n tree.add(1);\n\n Iterator<Integer> iterator = this.tree.iterator();\n\n assertThat(iterator.next(), is(1));\n }",
"public T iterator();",
"public Iterator<BigInteger> iterator() {\n // return new FibIterator();\n return new Iterator<BigInteger>() {\n private BigInteger previous = BigInteger.valueOf(-1);\n private BigInteger current = BigInteger.ONE;\n private int index = 0;\n \n \n @Override\n //if either true will stop, evaluates upper < 0 first (short circuit)\n public boolean hasNext() {\n return upper < 0 || index < upper;\n }\n\n @Override\n //Creating a new value called next\n public BigInteger next() {\n BigInteger next = previous.add(current);\n previous = current;\n current = next;\n index++;\n return current;\n }\n \n };\n }",
"public IteratorForXML(String i, String tag)\r\n/* 25: */ {\r\n/* 26:30 */ this(i, tag, tag);\r\n/* 27: */ }",
"public synchronized static Incremental getInstance1() {\n\t\tif (instance == null) {\n\t\t\tinstance = new Incremental();\n\t\t}\n\t\treturn instance;\n\t}",
"public Iterator2Iterador(Iterator<E> iterator) {\r\n\t\tthis.iterator = iterator;\r\n\t}",
"public Iterator<E> iterator() {\n\t\treturn new Itr();\n\t}",
"public void setIteratorBegin() {\n iter = (next > 0 ? 0 : -1);\n }",
"@Override\n\tpublic Iterator createIterator() {\n\t\treturn new WeaponListIterator(weaponList);\n\t}",
"@Override\r\n\tpublic Iterator<T> iterator() {\n\t\treturn new Iterator<T>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic boolean hasNext() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tnodo<T> sig = sentinel;\r\n\t\t\t\tsentinel = sentinel.getNext();\r\n\t\t\t\treturn (sentinel != null) ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic T next() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn sentinel.getValue();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t}",
"@Override\n public Iterator<Piedra> iterator() {\n return piedras.iterator();\n \n //crear un iterator propio\n// return new Iterator<Piedra>(){\n// int index=0;\n// @Override\n// public boolean hasNext() {\n// return piedras.size()>index;\n// }\n//\n// @Override\n// public Piedra next() {\n// return piedras.get(index++);\n// }\n// \n// };\n }",
"public Iterator<Item> iterator(){\n return new ArrayIterator();\n }",
"IterateExp createIterateExp();",
"@Override\n public Iterator<E> iterator() {\n return new ArrayIterator(); // create a new instance of the inner class\n }",
"SingelIterator() {\n neste = listehode;\n forrige = listehode;\n }",
"@Override\n public Iterator<E> iterator() {\n return new ElementIterator();\n }",
"@Override\r\n\tpublic Iterator<Item> iterator() \r\n\t{\r\n\t\treturn new rqIterator();\r\n\t}",
"public MyIterator(ExperimentList exp){ // experiment list constructor.\r\n this.exp = exp;\r\n }",
"public zzeiu iterator() {\n return new zzeio(this);\n }",
"@Override\n\tpublic Iterator<Integer> iterator() {\n\t\treturn null;\n\t}",
"public AIter next() {\n int p;\n return (p = start + 1) < size ? new Iter(p) : null;\n }",
"public abstract DBIterator NewIterator(ReadOptions options);",
"public Iterator<T> iterator()\n\t{\n\t\treturn new LinkedListIterator();\n\t}",
"@Override\n public Iterator<T> iterator() {\n return new CLITableIterator<T>(createNew(tables, cursor, rowIndex));\n }",
"public Iterator<V> iterator()\n {\n return new Iterator<V>()\n {\n public boolean hasNext()\n {\n // STUB\n return false;\n } // hasNext()\n\n public V next()\n {\n // STUB\n return null;\n } // next()\n\n public void remove()\n throws UnsupportedOperationException\n {\n throw new UnsupportedOperationException();\n } // remove()\n }; // new Iterator<V>\n }",
"public Iterator<Item> iterator() {\n return new RandomizedIterator();\n }",
"public static Iterator createdIterator(Object o) {\r\n checkSmartContainer(o);\r\n SmartContainer sc = (SmartContainer) o;\r\n return new SmartIterator(sc.getIterator(), VersionableFilters.CREATED);\r\n }",
"private Iterator<Integer> intIterator() {\n return new Iterator<Integer>() {\n\n @Override\n public boolean hasNext() {\n return rowNumber < table.getRowCount() - 1;\n }\n\n @Override\n public Integer next() {\n rowNumber++;\n return rowNumber;\n }\n };\n }",
"public MyListIter(int index) {\n super();\n //iter.current = index;\n current = index;\n }"
]
| [
"0.7153429",
"0.70570856",
"0.70570856",
"0.70570856",
"0.68016726",
"0.6725864",
"0.6724752",
"0.67049253",
"0.66384715",
"0.6589927",
"0.64680576",
"0.6458902",
"0.64147687",
"0.640727",
"0.6387957",
"0.6367787",
"0.6338922",
"0.6287652",
"0.6283475",
"0.62713116",
"0.62358576",
"0.62257653",
"0.6224285",
"0.6203326",
"0.6203326",
"0.6175551",
"0.6168993",
"0.6156244",
"0.61343086",
"0.6126567",
"0.61257696",
"0.61036146",
"0.6093558",
"0.6080725",
"0.60213697",
"0.6013928",
"0.60028714",
"0.6001388",
"0.59812576",
"0.5955403",
"0.59419334",
"0.59342575",
"0.59327567",
"0.59312725",
"0.59223115",
"0.5922283",
"0.59199333",
"0.5914146",
"0.5912265",
"0.59121025",
"0.59053546",
"0.5905209",
"0.5896468",
"0.58738905",
"0.5864363",
"0.5827162",
"0.58241403",
"0.5822649",
"0.58064413",
"0.5796294",
"0.5796294",
"0.5796294",
"0.5796294",
"0.57955563",
"0.57874817",
"0.57696325",
"0.5759191",
"0.5755519",
"0.5742476",
"0.57402086",
"0.57356405",
"0.5734757",
"0.57321805",
"0.5717931",
"0.57177305",
"0.5715393",
"0.5707924",
"0.5702444",
"0.56875044",
"0.5687032",
"0.5686293",
"0.56775916",
"0.5674949",
"0.56736887",
"0.5669126",
"0.56681275",
"0.56631064",
"0.5662771",
"0.5657003",
"0.56553227",
"0.56481814",
"0.56420374",
"0.5641824",
"0.56413525",
"0.5640103",
"0.56385505",
"0.56351393",
"0.5633343",
"0.5628294",
"0.56226534"
]
| 0.5649237 | 90 |
The entry point of application. | public static void main(String[] args) {
var x = new Iterator1("123456789101112");
System.out.println(x.getNums());
for (String d : x) {
System.out.println(d);
}
x.iterReverse = false;
System.out.println("*****");
for (String d : x) {
System.out.println(d);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\trunApplication();\n\t}",
"public static void main(String[] args) {\n startApplication();\n }",
"public static void main(String arg[]) {\n\n\t\tUtility.runApplication();\n\t}",
"public static void main(String[] args) {\r\n \t\r\n // Creates new controller named the main controller\r\n GlobalResources.MainControl = new Control();\r\n // Starts main application\r\n GlobalResources.MainControl.StartApplication();\r\n }",
"public static void main( String[] args )\n\t{\n\t\trunApp();\n\t}",
"public static void main(String[] args){\n // app.run(args);\r\n new SpringApplicationBuilder(MainApplication.class).web(true).run(args);\r\n }",
"public static void main(String[] args){\n\n MyApp myApp = new MyApp(); //1\n myApp.runMyApp(); //2\n System.out.println(\"End of Program\"); //3\n }",
"public MainEntryPoint() {\r\n\r\n }",
"public static void main(String[] args)\n { \n // Create a new instance of the application and make the currently\n \tEntryPoint theApp = new EntryPoint(); \n \t// running thread the application's event dispatch thread.\n theApp.enterEventDispatcher();\n }",
"@Override\n public void run(ApplicationArguments args) {\n }",
"public static void main() {\n \n }",
"@Override public void run(ApplicationArguments args) {\n }",
"public static void main(String[] args) {\n new MyApp();\n }",
"public static void main(String[] args) {\n\t\tnew App();\r\n\t}",
"public static void main(String[] args) {\r\n\t\t/* application object */\r\n\t\tCustomersApp myAp = new CustomersApp();\r\n\t\t/* run the application */\r\n\t\tmyAp.run();\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n // Start App\n EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() { new App(); }\n });\n }",
"public AuctionApp() {\r\n runAuctionApp();\r\n }",
"public static void main(String args[]){\n\n createConnection();\n\n if (conn == null) {\n System.err.println(\"Failed to establish connection!\");\n }\n\n new App();\n\n }",
"public static void main(String[] args) {\n App.main(args);\n }",
"public static void main(final String... args) {\n\n Application.launch();\n }",
"public static void main(String[] args) {\r\n SunSpotHostApplication app = new SunSpotHostApplication();\r\n app.run();\r\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"*** START MAIN() ***\");\n\t\tSpringApplication.run(BeshstoreApplication.class, args);\n\t\tSystem.out.println(\"*** END MAIN() ***\");\n\t}",
"public void startApp()\r\n\t{\n\t}",
"public ParkingApp() {\n runApp();\n }",
"public static void main(String[] args)\n {\n Injector guice = Guice.createInjector(new DiscountGuiceModule());\n\n // Inject the application which contains a separate object graph which contains all the business logic\n // When we call the top level class, BasicApplication, guice will inject every static dependency that we request\n // via @Inject\n BasicApplication basicApplication = guice.getInstance(BasicApplication.class);\n\n // now start the application\n basicApplication.start();\n }",
"public static void main(String[] args) {\n Startup.main(args);\n }",
"public static void main(String[] args) throws Exception {\n URL webRootLocation = MainView.class.getResource(\"/webapp/\"); //src/masin\n URI webRootUri = webRootLocation.toURI();\n\n WebAppContext context = new WebAppContext();\n context.setBaseResource(Resource.newResource(webRootUri));\n context.setContextPath(\"/\");\n context.setAttribute(\"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern\", \".*\");\n context.setConfigurationDiscovered(true);\n context.setConfigurations(new Configuration[]{\n new AnnotationConfiguration(),\n new WebInfConfiguration(),\n new WebXmlConfiguration(),\n new MetaInfConfiguration()\n });\n context.getServletContext().setExtendedListenerTypes(true);\n context.addEventListener(new ServletContextListeners());\n\n Server server = new Server(8080);\n server.setHandler(context);\n server.start();\n server.join();\n }",
"public void run() {\n\t\tport(8080);\n\n\t\t// Main Page, welcome\n\t\tget(\"/\", (request, response) -> \"Welcome!\");\n\n\t\t// Date\n\t\tget(\"/date\", (request, response) -> {\n\t\t\tDate d = new Date(\"frida.org\", Calendar.getInstance().get(Calendar.YEAR),\n\t\t\t\t\tCalendar.getInstance().get(Calendar.MONTH), Calendar.getInstance().get(Calendar.DAY_OF_MONTH));\n\t\t\treturn om.writeValueAsString(d);\n\t\t});\n\n\t\t// Time\n\t\tget(\"/time\", (request, response) -> {\n\t\t\tTime t = new Time(\"frida.org\", Calendar.getInstance().get(Calendar.HOUR),\n\t\t\t\t\tCalendar.getInstance().get(Calendar.MINUTE), Calendar.getInstance().get(Calendar.SECOND));\n\t\t\treturn om.writeValueAsString(t);\n\t\t});\n\t}",
"public static void main(String[] args) {\n // Configure MongoDB and Morphia\n \n \n // Define route handlers\n get(\"/\", PersonController.sayHello);\n }",
"public static void main(String[] args) {\n WeatherApplication gui = new WeatherApplication( );\n \n // make window visible\n gui.setVisible( true );\n \n }",
"public static void main(String[] args) {\n Application.launch(App.class, args);\n }",
"public static void main(String[] args) {\n\t\tnew LoipeApp();\n\t}",
"public static void main(String[] args) {\n\n Application.launch(args);\n }",
"public static void main(String[] args) {\n \n SpringApplication.run(App.class, args);\n }",
"public static void main(String[] args) {\n Application.launch(args);\n }",
"@Override\n\t public void run(ApplicationArguments args) throws Exception {\n\n\t }",
"public static void main(String args[]){\r\n Application theApp = new Application();\r\n theApp.createAccounts();\r\n theApp.processAccounts();\r\n theApp.outputAccounts();\r\n\r\n }",
"public static void main(String[] args) {\n\t\tSpringApplication.run(HimalayanKitchenBackendStarter.class, args);\t\t\n\t}",
"public static void main(String[] args) { \n\t\t//we are calling a static method and passing it the name of the class where we have our Main method.\t\t\n\t\tSpringApplication.run(CourseApiApp.class, args);\n\t}",
"public static void main(String[] args) {\n staticFiles.location(\"/public\");\n\n //This will listen to GET requests to /model and return a clean new model\n get(\"/model/:Version\", (req, res) -> newModel( req ));\n\n //This will listen to POST requests and expects to receive a game model, as well as location to fire to\n post(\"/fire/:Version/:row/:col/:hard\", (req, res) -> fireAt( req ));\n //This will handle the scan feature\n post(\"/scan/:Version/:row/:col/:hard\", (req, res) -> scan( req ));\n\n //This will listen to POST requests and expects to receive a game model, as well as location to place the ship\n post(\"/placeShip/:Version/:id/:row/:col/:orientation/:hard\", (req, res) -> placeShip( req ));\n }",
"public static void main ( String[] args ) {\n PhoneBook myApp = new PhoneBook(); \r\n }",
"public static void main(String[] args) {\n\t\tAbstractDataHandlerFactory dataHandlerFactory = DataHandler.getDataHandlerInstance(); \n\t\t\n\t\t// Create a Controller object to begin the application and control code flow \n\t\tController control = new Controller(dataHandlerFactory);\t\n\t}",
"public static void main(String[] args){\n\t\tView view = new View();\r\n\t\tDatabaseInteraction model = new DatabaseInteraction();\r\n\r\n\t\t//Initialize controller. \r\n\t\tController controller = new Controller(view,model);\r\n\r\n\t\t//Connect database, start user interaction, and let the controller respond to user options. \r\n\t\tmodel.connectDatabase();\r\n\t\tcontroller.userInteracion();\r\n\t\tcontroller.respondToUserOption();\r\n\r\n\t}",
"public static void main(String[] args) {\n staticFiles.location(\"/public\");\n //This will listen to GET requests to /model and return a clean new model\n get(\"/model\", (req, res) -> newModel());\n //This will listen to POST requests and expects to receive a game model, as well as location to fire to\n post(\"/fire/:row/:col\", (req, res) -> fireAt(req));\n //This will listen to POST requests and expects to receive a game model, as well as location to place the ship\n post(\"/placeShip/:id/:row/:col/:orientation\", (req, res) -> placeShip(req));\n }",
"public static void main(String[] args) {\n\r\n Starter starter = new Starter();\r\n starter.start();\r\n\r\n\r\n }",
"public static void main(String[] args) {\n MainController mainController = new MainController();\n mainController.showView();\n SessionManager.getSessionManager().getSession();\n }",
"public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }",
"public static void main(String[] args) {\n\t\tSpringApplication.run(StwwmakerApplication.class, args);\n\t}",
"public static void main(String[] args) {\n\t\tSpringApplication.run(Application.class, args);\n\n\t\t\n\t}",
"public static void main(String[] args) {\n Injector guice = Guice.createInjector(new DiscountGuiceModule());\n\n // Creates separate object graph with business logic, etc. Instantiate the main object on that\n MainAppWithCustomFactory application = guice.getInstance(MainAppWithCustomFactory.class);\n\n // Start your app\n application.start();\n }",
"public static void main(String[] args) {\n InitStart.Init();\r\n new MainMenuView().displayMenu();\r\n\r\n }",
"public static void main(String[] args) {\n new GraphicStudyApp();\n }",
"public Main() {\n \n \n }",
"public static void main(String[] args) {\n\t\tSpringApplication.run(PatyalApplication.class, args);\n\t}",
"public static void main(String[] args)\n {\n MyApp theApp = new MyApp(); \n theApp.enterEventDispatcher();\n }",
"public static void main(String[] args) {\n\t\tSpringApplication.run(ResturantAppApplication.class, args);\n\t}",
"public static void main(String[] args) {\n if (Config.Api.URL.contains(\"localhost\")) {\n Server.main(new String[0]);\n }\n Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();\n config.setTitle(Config.Game.TITLE);\n config.setWindowedMode(Config.Game.WIDTH, Config.Game.HEIGHT);\n config.setWindowIcon(Config.Game.ICON);\n config.setResizable(false);\n new Lwjgl3Application(new BubbleSpinner(), config);\n }",
"public static void main(String[] args) {\r\n // TODO code application logic here\r\n ObjectFactory.getUIinstance().getHomeInstance().setVisible(true);\r\n }",
"public MainEntry() {\n\t\tthis.taskController = new Controller();\n\t}",
"public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }",
"public static void main(String[] args) {\n\t\tSpringApplication.run(AnzEngineeringApplication.class, args);\n\t}",
"public static void main(String args[]) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tnew AppStarter();\n\t\t\t}\n\t\t});\t\n\t}",
"public static void main(String[] args){\n FinagoController finagoController = new FinagoController();\n finagoController.run();\n }",
"private Main() {\n\n super();\n }",
"public static void main(String... args) {\n\t\tApplication.launch(View.class, args);\n\t}",
"public static void main(String[] args) {\n\t\tHelloAiming app = new HelloAiming();\n app.setConfigShowMode(ConfigShowMode.AlwaysShow);\n\t\tapp.start();\n\n\t}",
"public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }",
"public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }",
"public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }",
"public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }",
"public static void main(final String[] args) {\n\n System.setProperty(\"org.restlet.engine.loggerFacadeClass\", \"org.restlet.ext.slf4j.Slf4jLoggerFacade\");\n\n // Start application with the command line arguments\n Bootstrapper.launchApp(new OImaging(args));\n }",
"public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tApplication.launch(args);\r\n\t}",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"public static void main(String []args){\n\n }",
"public DefaultApplication() {\n\t}",
"public static void main(String[] args) {\n\t\tApplication.launch(args); // Not needed for running from the command line\n\t}",
"public static void main(String[] args) {\n SpringApplication.run(ArtworkApplication.class, args);\n }",
"public static void main(String[] args) {\n\t\tSpringApplication.run(Application.class, args);\n\t}",
"public static void main(String[] args) {\n\t\tSpringApplication.run(Application.class, args);\n\t}",
"public static void main(String[] args) {\n\n SpringApplication.run(Application.class, args);\n // AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n }",
"public static void main(String[] args){\n System.setProperty(\"spring.jackson.serialization.INDENT_OUTPUT\", \"true\");\n\n SpringApplication application = new SpringApplication(Application.class);\n application.addListeners(new ApplicationPidFileWriter(\"ms-recommendation.pid\"));\n application.run(args);\n }",
"public static void main(final String[] args) throws Exception {\n new ApiApplication().run(args);\n }",
"public static void main(String[] args) {\n launch(RestaurantManagementApp.class, args);\n }",
"public static void main(String[] args) {\n\t\tnew SpringApplicationBuilder(Application.class).web(true).run(args);\n\t}",
"public static void main(String[] args)\r\n {\r\n Ipoki app = new Ipoki();\r\n app.enterEventDispatcher();\r\n }",
"@Override\n protected void appStart() {\n }",
"public static void main(String args[]) {\n Greeting.ToyApp toyApp = DaggerGreeting_ToyComponent.builder().build().toyApp();\n toyApp.greeting.sayHello();\n }",
"public static void main(String[] args) {\n \n \n \n \n }",
"public static void main(String[] args) {\n\t\t\n\t\tApplication.launch(args);\n\t\t\n\t\t\n\t\t\n\n\t}",
"public MainApp() {\n initComponents();\n }",
"public static void main(String[] args) {\n AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n ctx.register(ApplicationConfig.class);\n ctx.register(ApplicationContext.class);\n ctx.register(PersistenceContext.class);\n ctx.register(ProductionContext.class);\n ctx.register(SwaggerConfig.class);\n\n SpringApplication.run(Application.class);\n }",
"public static void main(String[] args) {\n SpringApplication.run(MyLotoApplication.class, args);\n }",
"public static void main(String[] args) {\n\t\tSpringApplication.run(ApiApplication.class, args);\n\t}",
"Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}",
"public static void main(String[] args) {\n\t\tSpringApplication.run(ManolitoBackApplication.class, args);\n\t\t//SpringApplication.run(ManolitoBackApplication.class, \"--debug\");\n\t\n\t}",
"public static void main(String[] args) {\n\t\tApplication.launch(Main.class, args);\n\t}",
"public static void main(String[] args) {\n LogInController logInController = new LogInController();\n logInController.initController();\n \n }",
"public static void main(String[] args) {\n // Create the system.\n Application.launch( args );\n }",
"public static void main (String []args){\n }",
"public static void main(String[] args) {\n\t\tApplication.launch(args);\n\n\t}",
"public static void main(String[] args)\r\n {\n\t\t System.out.println(\"************* Welocome To My Application ************* \");\r\n\t\t MainMenu();\r\n }"
]
| [
"0.73630613",
"0.7347031",
"0.7215883",
"0.71634805",
"0.71544456",
"0.71317524",
"0.7123426",
"0.7119055",
"0.70908254",
"0.7038634",
"0.7020937",
"0.7018889",
"0.70058846",
"0.7001001",
"0.69867754",
"0.6964717",
"0.6941777",
"0.693072",
"0.69003654",
"0.6891231",
"0.68892854",
"0.68789196",
"0.6877498",
"0.6848687",
"0.684384",
"0.6834209",
"0.680974",
"0.6806298",
"0.6799862",
"0.6798445",
"0.67952025",
"0.6758019",
"0.6750142",
"0.67395455",
"0.6735814",
"0.6730339",
"0.67196625",
"0.67109424",
"0.6710178",
"0.670756",
"0.66934216",
"0.66886985",
"0.6685946",
"0.6664809",
"0.6657899",
"0.66574305",
"0.66540635",
"0.6649639",
"0.66483486",
"0.66476285",
"0.6647542",
"0.66465086",
"0.6635075",
"0.6633407",
"0.6631268",
"0.66275764",
"0.6617482",
"0.6614574",
"0.6607494",
"0.659264",
"0.6589237",
"0.6585533",
"0.6582555",
"0.65814507",
"0.6580764",
"0.65743166",
"0.65720123",
"0.65720123",
"0.65720123",
"0.65720123",
"0.6567401",
"0.655267",
"0.6550088",
"0.65488786",
"0.6548491",
"0.65484685",
"0.6543597",
"0.653707",
"0.653707",
"0.6532345",
"0.6531918",
"0.6531708",
"0.6531565",
"0.65314555",
"0.65293294",
"0.65292287",
"0.6526775",
"0.65242136",
"0.6516836",
"0.6515459",
"0.65075153",
"0.6506322",
"0.6505312",
"0.65042216",
"0.65009314",
"0.6498618",
"0.6498417",
"0.64978623",
"0.6493323",
"0.6490639",
"0.64902043"
]
| 0.0 | -1 |
TODO: Move to an upper/separate generic class | @Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
Map<String, String> parametersMap = event.getParameterMap();
Logger.getLogger(this).info("Parameters map " + Arrays.toString(parametersMap.entrySet().toArray()));
this.selectedCustomerId = Integer.parseInt(parametersMap.getOrDefault("customer", "0"));
this.selectedSiteId = Integer.parseInt(parametersMap.getOrDefault("site", "0"));
this.selectedVehicleId = Integer.parseInt(parametersMap.getOrDefault("vehicle", "0"));
super.enter(event);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testGenericMethod() {\n \n }",
"@Override\n public boolean isGeneric() { \n return false;\n }",
"abstract public T getInfo();",
"public abstract Result<T> mo66250a();",
"public interface ComplexDataObjectParser extends IKeyValueObjectParser<Object, ComplexDataObject> {\r\n\r\n}",
"public abstract void mo33222b(T t) throws IOException;",
"public interface _t<FROM, TO> {\n\tTO call(FROM f, int index, Iterable<FROM> list);\n}",
"public interface MulitiTypeSupport<T> {\n public int getLayoutId(T item);\n}",
"abstract T build();",
"public interface Parsable {\n\n <T, E> List<E> parseObjects(Class<? extends T> entityClass);\n\n}",
"T getData();",
"public interface Generified {\n\n\n /**\n * @return The information about this entity generification.<br>\n * The generics metadata for this element\n */\n Generics generic();\n\n}",
"public interface AbstractC7641o0oOoO<T> {\n boolean OooO00o(@NonNull T t, @NonNull File file, @NonNull C7648o0oOoOo o0ooooo);\n}",
"interface Retrieve {}",
"void mo16691c(T t);",
"protected abstract Set method_1559();",
"public interface IStrategy<T extends Object> {\n\n static final String BITCOIN_BASE64 = \"1NwaKCqfb532vVRFmBAixPbGQJhTfwpbzk\";\n static final String BITCOIN = \"BITCOIN\";\n SimpleDateFormat SDF_DDMMYYYY_HHMMSS = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n SimpleDateFormat SDF_DDMMYYYY = new SimpleDateFormat(\"yyyy/MM/dd\");\n\n\n LinkedList<T> getObjects(String dados);\n}",
"protected abstract T getThis();",
"public interface Extractor<T extends Serializable> extends Serializable {\n}",
"public interface GenericParadigmService<T> {\n}",
"public interface CustomObjectExpansionModel<T> {\n\n static <T> CustomObjectExpansionModel<CustomObject<T>> of(){\n return new CustomObjectExpansionModelImpl<>();\n }\n}",
"public interface ValueReader extends RestletTeleReader<Object> {\n\n}",
"public interface IFunctionService extends IBaseService<Function, Long> {\r\n\r\n\r\n}",
"@Override\n protected abstract SecondOrderCollection wrapped();",
"private void constructionHelper(GenericServiceResult genericServiceResult) {\n\n assertEquals(this.string, genericServiceResult.get(\"string\"));\n assertEquals(this.integer, genericServiceResult.get(\"integer\"));\n assertEquals(this.floats, genericServiceResult.get(\"floats\"));\n\n assertTrue(checkIndices(0, \"string\"));\n assertTrue(checkIndices(1, \"integer\"));\n assertTrue(checkIndices(2, \"floats\"));\n }",
"public interface IFile<T> extends IProgress<T>{\n\n T filePath(String filePath);\n\n T fileName(String fileName);\n\n}",
"public interface CommentLikeService extends GenericService<CommentLike,Integer>{\r\n}",
"public abstract T getValue();",
"public abstract T getValue();",
"public interface GenericDAO<T extends BaseEntity, K extends Number> {\r\n\r\n\t/**\r\n\t * inserir\r\n\t * @param entidade\r\n\t */\r\n void inserir(T entidade);\r\n\r\n /**\r\n * atualizar\r\n * @param entidade\r\n * @return\r\n */\r\n T atualizar(T entidade);\r\n\r\n /**\r\n * deletar\r\n * @param id\r\n */\r\n void deletar(K id);\r\n\r\n /**\r\n * buscarPorId\r\n * @param id\r\n * @return\r\n */\r\n T buscarPorId(K id);\r\n \r\n /**\r\n * buscarTodos\r\n * @return\r\n */\r\n List<T> buscarTodos();\r\n \r\n /**\r\n * buscaPorNome\r\n * @param nomeEntidade\r\n * @return\r\n */\r\n T buscaPorNome(String nomeEntidade);\r\n\r\n /**\r\n * contar\r\n * @return\r\n */\r\n int contar();\r\n \r\n /**\r\n * retorna todos os resultados de entidades que tem o atributo nome\r\n * @return\r\n */\r\n List<T> buscarTodosComNomeLower();\r\n\r\n}",
"public interface StringTranslation<T> {\n\n /**\n * Method defines hos to change string representation to instance of object.\n * @param stringRepresentation string that will be dispatched into object.\n * @return instance of expected object.\n */\n T translate(final String stringRepresentation);\n\n /**\n * Helper method that gives a hint, in case when during reading a null indicator would be found\n * what will should be returned. It can look kind of artificial, but this was introduced to solve problem\n * with raw types, and define behaviour of such translation, externally and give ability of control for user.\n *\n * To understand please have a look for example StringToDoubleTranslation vs StringToRawDoubleTranslation.\n * @return null representation.\n */\n T getNullRepresentation();\n}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\n public void get() {}",
"abstract T generate();",
"T value();",
"public interface C7438j<T> extends C6851a<T> {\n}",
"public interface EtsyJobBuilder<Result extends BaseModel> {\n void m1556a(EtsyResult<Result> etsyResult);\n}",
"public interface GenericTemp<T extends GenericTemp> {\n public Boolean dosomething( T one);\n\n //上界限定的List进行处理\n public void doTwo(List<? extends T> w);\n}",
"abstract Function get(Object arg);",
"public interface TypeConvert<T> {\n\n /**\n * 1 byte = 8 bit\n */\n int BIT = 8;\n\n static Class<?> getTypeClazz(Class<? extends TypeConvert> typeConvert){\n return ClassUtils.getGenericsType(typeConvert);\n }\n\n static short getTypeIndex(Class<?> clazz) {\n return clazz.getAnnotation(Typed.class).index();\n }\n\n static TypeCache getTypeCache(Class<? extends TypeConvert> typeConvert, int index) {\n Class<?> genericsType = ClassUtils.getGenericsType(typeConvert);\n TypeCache typeCache = TypeCache.builder().index(index).typeClass(genericsType).typeConvert(typeConvert).build();\n return typeCache;\n }\n\n /**\n * 将{@code t}解码为字节流\n *\n * @param t obj\n * @return 字节流\n */\n ByteBuf encode(T t);\n\n /**\n * 将字节流编码为{@link T}\n *\n * @param byteBuf 字节流\n * @return obj\n */\n T decode(ByteBuf byteBuf);\n}",
"public interface IConverter<T, S> {\r\n\r\n public T convert(S input);\r\n}",
"void mo83698a(T t);",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"public interface Apilable<T> {\n \n /**\n * Método para apilar un elemento a la pila.\n * @param elemento Objeto que se agregará a la pila.\n */\n public void push(T elemento) throws IllegalArgumentException;\n\n /**\n * Método para desapilar un elemento de la pila.\n * @return El elemento que fue sacado de la pila\n */\n public T pop() throws NoSuchElementException;\n \n /**\n * Método para mirar lo que hay al inicio de la Pila\n * @return El elemento que esta al inicio de la Pila\n */\n public T top() throws NoSuchElementException;\n \n}",
"protected abstract O getResult();",
"public interface UserInfoMapper extends BaseMapper<UserInfoE> {\n}",
"void mo83696a(T t);",
"public interface ResponseValue<T extends Serializable> extends Serializable {\r\n\r\n T getValue();\r\n\r\n class NoValue implements ResponseValue {\r\n\r\n private static final long serialVersionUID = -1582436423522968513L;\r\n\r\n @Override\r\n public Serializable getValue() {\r\n return null;\r\n }\r\n }\r\n\r\n class SingleObjectValue<T extends Serializable> implements ResponseValue<T> {\r\n\r\n private static final long serialVersionUID = -4292349638680803106L;\r\n private final T value;\r\n\r\n public SingleObjectValue(T value) {\r\n this.value = value;\r\n }\r\n\r\n @Override\r\n public T getValue() {\r\n return value;\r\n }\r\n }\r\n\r\n class Status implements ResponseValue<HashMap<String, String>> {\r\n\r\n private static final long serialVersionUID = -1520252080975424543L;\r\n private final HashMap<String, String> statusMap;\r\n public Status() {\r\n statusMap = new HashMap<>();\r\n }\r\n\r\n public String getStatus(final String key) {\r\n return statusMap.get(key);\r\n }\r\n\r\n public void putStatus(final String key, final String value) {\r\n statusMap.put(key, value);\r\n }\r\n\r\n @Override\r\n public HashMap<String, String> getValue() {\r\n return statusMap;\r\n }\r\n }\r\n}",
"T getResult();",
"T getResult();",
"public List<String> getT();",
"@Override\n Iterator<T> iterator();",
"public abstract Object getUnderlyingObject();",
"public abstract <T> T readObject();",
"public interface BackendGroup<Q> {\n\n public default <ES extends BackendGroup<Q>> ES as(Class<? super ES> type){\n return (ES) type.cast(this);\n }\n\n}",
"@Override\n boolean hasGenericInformation() {\n return super.hasGenericInformationInternal();\n }",
"void mo40877a(T t);",
"public interface IBTreeF<X,Y> {\r\n\t\r\n\t//Purpose: Returns type Y given the root value v of type X.\r\n\tpublic Y f(X v);\r\n\r\n}",
"public interface IEventType<T> {\n\n /**\n * It sets the event name for an event instance.\n * @param name A simple name for the event instance.\n */\n public void setEventName(String name);\n\n /**\n * It returns the event name for an event instance.\n * @return A simple name for the event instance.\n */\n public String getEventName();\n\n /**\n * It sets the class name for the event type.\n * @param clazz The full class name for the event instance.\n */\n public void setClazzName(String clazz);\n\n /**\n * It returns the class name for the event type.\n * @return The full class name for the event instance.\n */\n public String getClazzName();\n\n /**\n * It returns the super types for a specific event.\n * @return array of the super types.\n */\n public IEventType<T>[] getSuperTypes();\n\n /**\n * It returns the deep super types.\n * @return an iteration of the deep super types.\n */\n public Iterator<IEventType<T>> getDeepSuperTypes();\n\n /**\n * It sets the properties for the event type.\n * @param propSchema minimum schema for a property.\n */\n public void setProperties(List<IPropertyDescriptor<T>> propSchema);\n\n /**\n * It returns the properties for the event type.\n * @param propSchema minimum schema for a property.\n */\n public List<IPropertyDescriptor<T>> getProperties();\n}",
"public interface CreateData<T extends SaveableData> {\r\n T createElement();\r\n}",
"public interface C7495v<T> {\n void subscribe(C47870u<T> uVar) throws Exception;\n}",
"public interface C0056a<T> {\n}",
"public interface Callback<T,P> {\n\n List<T> getData(P param);\n\n List<T> sorted(List<T> data,P param);\n\n default Map<String,T> toMap(List<T> data){\n return data.stream().collect(Collectors.toMap(o -> BeanUtil.getFieldValue(o,\"id\").toString(), v -> v));\n }\n\n}",
"public interface T {\n File T(String str);\n\n void T();\n\n boolean T(String str, Bitmap bitmap) throws IOException;\n\n boolean T(String str, InputStream inputStream, Tr.T t) throws IOException;\n}",
"public interface IPostProcessor<R, T> {\r\n\r\n public R postProcess(ClientRequest clientRequest, T processedResult, String userId) throws Exception;\r\n}",
"public interface IGroupService<Group> extends GenericManager<Group> {\n\n}",
"public abstract <T> T mo33265b(Class<T> cls) throws Exception;",
"<C> CollectionItem<C> createCollectionItem();",
"void mo11495a(T t);",
"public interface T93 {\n\n void get2(List<String> stringList);\n\n void get(List<Integer> integerList);\n}",
"void mo83695a(T t);",
"@Override\n\tpublic void accept(Visitor visitor) {\n\t\t\n\t}",
"public interface Generic extends Reference\n{\n}",
"public interface RVConverter<H> {\n void convert(Holder holder, H item,int position);\n\n}",
"public interface HashRedisService<T> {\n\n public <T> boolean addHash(final String key, final String field, final T value);\n\n public <T> boolean addHash(final String key, final Map<String, T> filedValueMap);\n\n public <T> T getHashField(final String key, final String field);\n\n public boolean deleteHashField(final String key, final List<String> field);\n\n\n}",
"public interface CustomObjectSerializer <T> {\n\n Class<T> type();\n\n void serializeObject(JsonSerializerInternal serializer, T instance, CharBuf builder );\n\n}",
"public interface KeyLoader {\n\n <T> T getKey();\n\n}",
"public interface VideoScrapper extends Scrapper<Video> {\n\n}",
"@Override\n\tprotected void interr() {\n\t}",
"abstract public T doSomething();",
"public interface TypePoll {\n /**\n * ddd\n * @param clazz\n * @param itemViewBinder\n * @param linker\n * @param <T>\n */\n <T> void register(@NonNull Class<? extends T> clazz,\n @NonNull BaseItemViewBinder<?,T> itemViewBinder,\n @NonNull Linker<T> linker);\n\n int indexOf(@NonNull Class<?> clazz);\n\n\n @NonNull\n BaseItemViewBinder getItemBinder(int index);\n\n @NonNull\n BaseItemViewBinder getBinderByClass(@NonNull int index);\n\n\n @NonNull\n Linker<?> getLinker(int index);\n}",
"public interface IConnectorService<T extends Node> {\r\n\tMap<String, Integer> connect(List<Node> nodes);\r\n\r\n}",
"public interface Data<type> {\n public type get() throws Exception;\n public void set(ResultSet data) throws Exception;\n}",
"@Override\n\tpublic void test(T1 t) {\n\t\t\n\t}",
"public interface DataConverter<JAVATYPE,METATYPE extends FieldDefinition> {\n /** Method invoked for a single JAVATYPE */\n JAVATYPE convert(JAVATYPE oldValue, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE List. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE Set. This can be used to alter the set size / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n Set <JAVATYPE> convertSet(Set<JAVATYPE> oldSet, final METATYPE meta);\n\n /** Method invoked for an array of JAVATYPEs. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the array itself, not on the individual elements. */\n JAVATYPE [] convertArray(JAVATYPE [] oldArray, final METATYPE meta);\n\n /** Map-type methods. The tree walker converses the value parts of the map only. */\n public <K> Map<K, JAVATYPE> convertMap(Map<K, JAVATYPE> oldMap, final METATYPE meta);\n}",
"T getValue();",
"T getValue();",
"T getValue();",
"T getValue();",
"T getValue();",
"T getValue();",
"public Image getImage(T anItem) { return null; }",
"Element getGenericElement();",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public interface IViewBasicObj<T> {\n public void loadObjSuc(T obj);\n public void loadObjFail(String msg);\n}",
"public interface StatusMapper extends BaseMapper<Status> {\n\n}",
"public interface IMetadataEntityTupleTranslator<T> {\n\n /**\n * Transforms a metadata entity of type T from a given tuple to a Java\n * object (deserializing the appropriate field(s) in the tuple as\n * necessary).\n * \n * @param tuple\n * Tuple containing a serialized representation of a metadata\n * entity of type T.\n * @return A new instance of a metadata entity of type T.\n * @throws MetadataException\n * @throws IOException\n */\n public T getMetadataEntityFromTuple(ITupleReference tuple) throws MetadataException, IOException;\n\n /**\n * Serializes the given metadata entity of type T into an appropriate tuple\n * representation (i.e., some number of fields containing bytes).\n * \n * @param metadataEntity\n * Metadata entity to be written into a tuple.\n * @throws IOException\n */\n public ITupleReference getTupleFromMetadataEntity(T metadataEntity) throws MetadataException, IOException;\n}",
"protected CombinatoricsUtils() {\n super();\n }",
"public interface AccountTypeService extends GenericService<AccountType, Long> {\n}"
]
| [
"0.59038025",
"0.5574628",
"0.5522019",
"0.55065256",
"0.5456803",
"0.5400349",
"0.5382727",
"0.52244306",
"0.5216885",
"0.5208066",
"0.5201286",
"0.5172014",
"0.5168909",
"0.5166891",
"0.5160411",
"0.5141181",
"0.5131972",
"0.51222366",
"0.51186806",
"0.5117865",
"0.5116069",
"0.5115355",
"0.5109894",
"0.51037437",
"0.50915086",
"0.5091483",
"0.5086669",
"0.50832754",
"0.50832754",
"0.50576466",
"0.50550395",
"0.5053269",
"0.5053269",
"0.5053269",
"0.5050034",
"0.504759",
"0.50312746",
"0.5031199",
"0.5022724",
"0.50192153",
"0.5017123",
"0.5015107",
"0.50095034",
"0.50012773",
"0.49945617",
"0.49911174",
"0.4990229",
"0.49869794",
"0.4984867",
"0.49812275",
"0.49793115",
"0.49793115",
"0.49790254",
"0.4974241",
"0.49712196",
"0.49693155",
"0.4966963",
"0.49662068",
"0.4965058",
"0.49633032",
"0.4959793",
"0.4956039",
"0.49513853",
"0.49511394",
"0.4950692",
"0.49504024",
"0.4949323",
"0.4948601",
"0.49480292",
"0.49435663",
"0.49387556",
"0.4938018",
"0.49357975",
"0.4928661",
"0.4927287",
"0.4924898",
"0.49245074",
"0.49237397",
"0.49200246",
"0.49197817",
"0.49160612",
"0.49157232",
"0.49150702",
"0.49134248",
"0.49109656",
"0.49092382",
"0.49086028",
"0.49061006",
"0.49061006",
"0.49061006",
"0.49061006",
"0.49061006",
"0.49061006",
"0.4903962",
"0.49039036",
"0.48987216",
"0.4895857",
"0.48922724",
"0.48887306",
"0.488463",
"0.48834428"
]
| 0.0 | -1 |
New instance car list fragment. | public static CarListFragment newInstance() {
return new CarListFragment();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void carlist() {\n Cars xx = new Cars();\n System.out.println(\"You have \" + String.valueOf(listcars.size())+ \" cars\");\n System.out.println(\"List of all your cars \");\n for (int i = 0; i < listcars.size();i++) {\n xx = listcars.get(i);\n System.out.println(xx.getBrand()+ \" \"+ xx.getModel()+ \" \"+ xx.getReference()+ \" \"+ xx.getYear()+ \" \");\n }\n }",
"public CarModifyFragment() {\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}",
"public void populateCarList(View v) {\n String[] carList = new String[singleton.getCars().size()];\n for (int i = 0; i < singleton.getCars().size(); i++) {\n carList[i] = singleton.getCars().get(i).getMake() + \" \" + singleton.getCars().get(i).getModelName()\n + \" \" + singleton.getCars().get(i).getYearMade() + \" \" + singleton.getCars().get(i).getTransmission()\n + \" \" + singleton.getCars().get(i).getEngineDisplacement() + \" L\";\n }\n\n ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), R.layout.car_list_dialog, R.id.carList, carList);\n\n ListView list = (ListView) v.findViewById(R.id.listOfCarData);\n list.setAdapter(adapter);\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View viewClicked, int position, long id) {\n carPosition = position;\n }\n });\n }",
"private void initCarsListView() {\n mCarsRecyclerView.setHasFixedSize(true);\n LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);\n mCarsRecyclerView.setLayoutManager(mLayoutManager);\n getExecutor().submit(new ListCarsDbAction(getApp()));\n }",
"public static TVListFragment newInstance() {\n TVListFragment fragment = new TVListFragment();\n return fragment;\n }",
"public Car createListings(int year, String brand, String model, int mileage, int bidPrice) {\r\n\r\n car = new Car(year, brand, model, mileage, bidPrice);\r\n\r\n cars.addCar(car);\r\n\r\n return car;\r\n\r\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 addcar() {\n initComponents();\n }",
"public static RecipesFragment newInstance(ArrayList<Recipe> recipeList) {\n RecipesFragment fragment = new RecipesFragment();\n Bundle args = new Bundle();\n args.putParcelableArrayList(ARG_RECIPE_LIST, recipeList);\n fragment.setArguments(args);\n return fragment;\n }",
"public CarShowroom() {\n initialiseShowroom();\n calculateAveragePrice();\n setOldestCar();\n getPriciestCar();\n }",
"public static TravelListFragment newInstance()\n {\n TravelListFragment fragment = new TravelListFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public RelayListFragment() {\n }",
"public TournListFragment (){\n }",
"public ShowList(String title) {\n id = title;\n initComponents();\n updateListModel();\n }",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.fragment_car);\n\t}",
"public void setCarList(List<VehicleVO> carList) {\n this.carList = carList;\n }",
"public BookListFragment() {\n }",
"public ShoppingListFragment() {\n }",
"public RestaurantsListFragment() {\n }",
"public VehicleFragment() {\r\n }",
"public ServiceItemFragmentNew() {\n }",
"public KematianListFragment() {\n\t}",
"public SpeciesItemListFragment() {\n\t\tLog.d(\"SILF.LC\", \"SpeciesItemListFragment\");\n\t}",
"@Override\n\tprotected Fragment createFragment() {\n\t\t// TODO Auto-generated method stub\n\t\t//Log.d(TAG, \"this is CrimeListActivity \", new Exception());\n\t\treturn new CrimeListFragment();\n\t\t\n\t}",
"public VehicleList() {\n\t\tvehicles = new ArrayList<Vehicle>();\n\t}",
"static ArrayListFragment newInstance(int num) {\n\t\t\tArrayListFragment f = new ArrayListFragment();\n\n\t\t\t// Supply num input as an argument.\n\t\t\tBundle args = new Bundle();\n\t\t\targs.putInt(\"num\", num);\n\t\t\tLog.i(\"TAG\", num + \"\");\n\t\t\tf.setArguments(args);\n\n\t\t\treturn f;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_my_cars, container, false);\n mRecyclerView = (RecyclerView) view.findViewById(R.id.RecyclerAuto);\n mRecyclerView.setHasFixedSize(true);\n mLayoutManager = new LinearLayoutManager(getContext());\n initLijst();\n allMyCars();\n mAdapter = new RecyclerViewAdapter( mIds,mLicense,mKind,getContext());\n\n mRecyclerView.setAdapter(mAdapter);\n\n mRecyclerView.setLayoutManager(mLayoutManager);\n\n goToCar = view.findViewById(R.id.btnGoToCar);\n\n goToCar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(getContext(),AddCarActivity.class);\n startActivity(intent);\n }\n });\n\n\n return view;\n }",
"public HorizontalCardAdapter(List<SuperCar> superCars, Context context){\n super();\n //Getting all superheroes\n this.superCars = superCars;\n this.context = context;\n }",
"public ItemListFragment() {\n }",
"public NewShopFragment() {\n }",
"public CreateJPanel(Car car) {\n initComponents();\n this.car=car;\n }",
"private void createList() {\n List<City> list = new ArrayList<>();\n final RecyclerView recyclerView =\n (RecyclerView) findViewById(R.id.city_list);\n recyclerView.setHasFixedSize(true);\n adapter =\n new MyRecyclerAdapter(this, list, R.layout.city_item);\n LinearLayoutManager linearLayoutManager =\n new LinearLayoutManager(this);\n linearLayoutManager\n .setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView.setLayoutManager(linearLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(adapter);\n }",
"public list() {\r\n }",
"public AlbumListFragment() {\n setFragmentname(this.getClass().getSimpleName());\n }",
"public TeamListFragment() {\n\t}",
"public SwapListFragment() {\n }",
"public MovieListFragment() {\n }",
"@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 CollectionFragment() {\n }",
"public CustomerListFragment() {\n }",
"public RecipeStepsListFragment() {\n }",
"public InfoShowChecklistFragment() {\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_newlist, container, false);\n }",
"public AddVehicleShowPage() {\n initComponents();\n }",
"public RestaurantDetailFragment() {\n }",
"public static MyCarsFragment newInstance(String param1, String param2) {\n MyCarsFragment fragment = new MyCarsFragment();\n\n return fragment;\n }",
"public Car() {\r\n super();\r\n }",
"public PersonDetailFragment() {\r\n }",
"public NewItems() {\n super();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_queenb_embassy, container, false);\n\n\n //initialization of the list view (list of buttons)\n listview = v.findViewById(R.id.listview);\n\n for (int i = 0; i < names.length ; i++){\n ItemsModel itemsModel = new ItemsModel(names[i], ages[i], locations[i], images[i],\n phone_numbers[i], instagram_links[i], loved_about_queenb[i], recommendQueenb[i]); //todo try1+2\n listItem.add(itemsModel);\n }\n //required for handling the listView\n customAdapter = new CustomAdapter(listItem, getActivity());\n listview.setAdapter(customAdapter);\n return v;\n }",
"public ShopList(MainForm mf) {\n super(mf);\n ItemList = recordSeeker.getShopList();\n setTable();\n }",
"public VantaggiFragment() {\n // Required empty public constructor\n }",
"public VenueDetailFragment() {\r\n\t}",
"public Car() {\n super();\n }",
"public ToReadItemListFragment() {\n }",
"private void setCarList(){\n List<com.drife.digitaf.ORM.Database.CarModel> models = new ArrayList<>();\n\n if(nonPackageGrouping != null && nonPackageGrouping.size()>0){\n //cars = CarController.getAllAvailableCarInPackage(nonPackageGrouping.get(0).getCategoryGroupId());\n for (int i=0; i<nonPackageGrouping.size(); i++){\n List<com.drife.digitaf.ORM.Database.CarModel> carModels = CarController.getAllAvailableCarInPackage(nonPackageGrouping.get(i).getCategoryGroupId());\n for (int j=0; j<carModels.size(); j++){\n com.drife.digitaf.ORM.Database.CarModel model = carModels.get(j);\n models.add(model);\n }\n }\n }\n\n TextUtility.sortCar(models);\n\n for (int i=0; i<models.size(); i++){\n com.drife.digitaf.ORM.Database.CarModel model = models.get(i);\n String car = model.getCarName();\n if(!carModel.contains(car)){\n carModel.add(car);\n cars.add(model);\n }\n }\n\n /*for (int i=0; i<cars.size(); i++){\n com.drife.digitaf.ORM.Database.CarModel carModel = cars.get(i);\n String model = carModel.getCarName();\n this.carModel.add(model);\n }*/\n\n atModel.setAdapter(new ArrayAdapter<com.drife.digitaf.ORM.Database.CarModel>(this, android.R.layout.simple_list_item_1, this.cars));\n\n //SpinnerUtility.setSpinnerItem(getApplicationContext(), spinModel, this.carModel);\n }",
"public ListTemplate() {\n }",
"public void carDetails() {\n\t\t\r\n\t}",
"public static SMSListFragment newInstance() {\n Bundle args = new Bundle();\n SMSListFragment fragment = new SMSListFragment();\n fragment.setArguments(args);\n return fragment;\n }",
"public CarritoListAdapter(List<ItemCarrito> list, CarritoHolder.Events events){\n this.list = list;\n this.events = events;\n idEditable=new ArrayList<>();\n }",
"public static RestaurantsListFragment newInstance() {\n RestaurantsListFragment fragment = new RestaurantsListFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n // args.putString(ARG_PARAM2, param2);\n args.putString(REST1, rest1);\n args.putString(REST2, rest2);\n args.putString(REST3, rest3);\n args.putString(REST4, rest4);\n args.putString(REST5, rest5);\n\n fragment.setArguments(args);\n return fragment;\n }",
"public NoteListFragment() {\n }",
"ListItem createListItem();",
"public AddToCardFragment() {\n }",
"public Lista() {\r\n }",
"public JsfVenda() {\r\n litem = new ArrayList();\r\n }",
"private void add() {\n\t\tlist = new ArrayList<Fragment>();\n\t\tlist.add(new HomeFragment());\n\t\tlist.add(new MenuFragment());\n\t\tlist.add(new FriendsFragment());\n\t\tlist.add(new MineFragment());\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.fragment_inquilinos, container, false);\n ListView listView= view.findViewById(R.id.listView);\n\n inquilinos_list.add(new Inquilino_item(\"37505068\",\"Martin\",\"colombo\",\"san martin 827\",\"2657601495\"));\n inquilinos_list.add( new Inquilino_item(\"34505068\",\"Valeria\",\"Veneciano\",\"muelleady 163 depto 30\",\"2657601495\"));\n ArrayAdapter<Inquilino_item> adapter = new InquilinoAdapter(getContext(),R.layout.inquilino_item,inquilinos_list,getLayoutInflater());\n listView.setAdapter(adapter);\n ((Principal) getActivity()).getSupportActionBar().setTitle(\"Inquilinos\");\n return view ;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_list, container, false);\n initiate(view);\n return view;\n }",
"public void addListItem(Car c, int position){\n mList.add(c);\n notifyItemInserted(position);\n }",
"public CarEdition() {\n ELContext context = FacesContext.getCurrentInstance().getELContext();\n app = (CarsaleApplication) FacesContext.getCurrentInstance().getApplication().getELResolver().getValue(context, null, \"carsaleApplication\");\n try {\n this.carId = Integer.valueOf(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"carId\"));\n this.car = searchCar(this.carId);\n } catch (Exception ex) {\n Logger.getLogger(CarDetail.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public Car(){\n\t\t\n\t}",
"private void createNewListSection() {\n\t\tImageIcon image10 = new ImageIcon(sURLFCL1);\n\t\tImageIcon image11 = new ImageIcon(sURLFCL2);\n\t\tImageIcon image12 = new ImageIcon(sURLFCL3);\n\t\tjbCreateLists = new JButton(\"New PlayList\");\n\t\tjbCreateLists.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbCreateLists.setForeground(new Color(150,100,100));\n\t\tjbCreateLists.setIcon(image10);\n\t\tjbCreateLists.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setRolloverIcon(image11);\n\t\tjbCreateLists.setRolloverSelectedIcon(image12);\t\n\t\tjbCreateLists.setContentAreaFilled(false);\n\t\tjbCreateLists.setFocusable(false);\n\t\tjbCreateLists.setBorderPainted(false);\n\t}",
"public ListaCliente() {\n initComponents();\n carregarTabela();\n }",
"public CardAdapter(Context context, List<information> informationList){\n this.context = context;\n this.informationList = informationList;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_car_details, container, false);\n }",
"void initialiseShowroom(){\n currentCars.put(\"Aston Martin\", new Car(\"Aston Martin\", 50000, 2012));\n currentCars.put(\"BMW\", new Car(\"BMW\", 30000, 2014));\n currentCars.put(\"Chevrolet\", new Car(\"Chevrolet\", 20000, 2013));\n currentCars.put(\"Datsun\", new Car(\"Datsun\", 2000, 2001));\n }",
"public void configureListFragment() {\n\n\t\tmListFragment = new SIMContactsPickerFragment();\n\n\t\tmListFragment.setLegacyCompatibilityMode(mRequest\n\t\t\t\t.isLegacyCompatibilityMode());\n\t\tmListFragment.setDirectoryResultLimit(DEFAULT_DIRECTORY_RESULT_LIMIT);\n\n\t\tgetFragmentManager().beginTransaction()\n\t\t\t\t.replace(R.id.list_container, mListFragment)\n\t\t\t\t.commitAllowingStateLoss();\n\t}",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_place_list, container, false);\n\n // Create our final {@link ArrayList} of Work Spaces\n final ArrayList<Place> places = new ArrayList<>();\n places.add(new Place(getContext().getString(R.string.staying_active_ymca),\n getContext().getString(R.string.staying_active_ymca_address),\n getContext().getString(R.string.place_description_ymca_description)));\n places.add(new Place(getContext().getString(R.string.staying_active_planet_fitness),\n getContext().getString(R.string.staying_active_planet_fitness_address),\n getContext().getString(R.string.place_description_planet_fitness_description)));\n places.add(new Place(getContext().getString(R.string.staying_active_yoga_to_the_people),\n getContext().getString(R.string.staying_active_yoga_to_the_people_address),\n getContext().getString(R.string.place_description_ymca_description)));\n\n // Add our {@link ArrayList} to our custom {@link ArrayAdapter} so that we can pass it\n // to our {@link ListView} hence populating it with our {@link Place} objects correctly\n PlaceAdapter placeAdapter = new PlaceAdapter(getContext(), places);\n\n // Find our chosen {@link ListView} so that we can set our chosen adapter to have it get\n // populated. It is going to be in our already inflated rootView\n ListView listView = rootView.findViewById(R.id.places_list);\n\n // Set it to our custom adapter to give it the data\n listView.setAdapter(placeAdapter);\n\n\n // Set the {@link OnItemClickListener} so that clicking on an item creates a new Activity\n // showing info about the place\n listView.setOnItemClickListener(new PlaceOnItemClickListener(getContext(), places));\n\n // Return our rootView object that has been filled with data\n return rootView;\n }",
"public ListHospFragment() {\n // Required empty public constructor\n }",
"public static CollectionFragment newInstance() {\n CollectionFragment fragment = new CollectionFragment();\n return fragment;\n }",
"@Override\n public void Create() {\n\n initView();\n }",
"public ItemDetailFragment() {\n }",
"public ItemDetailFragment() {\n }",
"public ItemDetailFragment() {\n }",
"public ItemDetailFragment() {\n }",
"public BookList(){\n\n }",
"public static HoursList newInstance() {\n HoursList fragment = new HoursList();\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 }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_new_car);\n\n // Set up variables for accessing the elements of the view\n nameTextView = (TextView) findViewById(R.id.nickname_text);\n yearSpinner = (Spinner) findViewById(R.id.year_spinner);\n makeSpinner = (Spinner) findViewById(R.id.make_spinner);\n modelSpinner = (Spinner) findViewById(R.id.model_spinner);\n trimSpinner = (Spinner) findViewById(R.id.trim_spinner);\n textView = (TextView) findViewById(R.id.car_info);\n\n // Create a blank car object and object for accessing CarQueryAPI\n newCar = new Car();\n cars = new Cars(this);\n carQuery = new CarQueryAPI();\n\n // Listen for changes to the spinners\n yearSpinner.setOnItemSelectedListener(this);\n makeSpinner.setOnItemSelectedListener(this);\n modelSpinner.setOnItemSelectedListener(this);\n trimSpinner.setOnItemSelectedListener(this);\n\n // Start by populating the year spinner\n try {\n populateYearSpinner();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_restraunts_list, container, false);\n //productList.setAdapter(new RestrauntAdapter());\n return view;\n }",
"@Override\n public void onEstadoCambiado() {\n fragment = new ListadoPeticionesRecibidasVista();\n getFragmentManager().beginTransaction().replace(R.id.content_main, fragment ).commit();\n\n }",
"public LVInfo() {\r\n }",
"public void populateVehicleList() {\n\t\tfor (int i = 0; i < VEHICLE_LIST_SIZE; i++) {\n\t\t\tvehicleList[i] = createNewVehicle();\n\t\t}\n\t}",
"public static ArticleCardsFragment newInstance() {\n return new ArticleCardsFragment();\n }",
"public GeneralListVueController() {\n\n\t}",
"public void add (Car car){\n\t\t}",
"private void createListView()\n {\n itens = new ArrayList<ItemListViewCarrossel>();\n ItemListViewCarrossel item1 = new ItemListViewCarrossel(\"Guilherme Biff\");\n ItemListViewCarrossel item2 = new ItemListViewCarrossel(\"Lucas Volgarini\");\n ItemListViewCarrossel item3 = new ItemListViewCarrossel(\"Eduardo Ricoldi\");\n\n\n ItemListViewCarrossel item4 = new ItemListViewCarrossel(\"Guilh\");\n ItemListViewCarrossel item5 = new ItemListViewCarrossel(\"Luc\");\n ItemListViewCarrossel item6 = new ItemListViewCarrossel(\"Edu\");\n ItemListViewCarrossel item7 = new ItemListViewCarrossel(\"Fe\");\n\n ItemListViewCarrossel item8 = new ItemListViewCarrossel(\"iff\");\n ItemListViewCarrossel item9 = new ItemListViewCarrossel(\"Lucini\");\n ItemListViewCarrossel item10 = new ItemListViewCarrossel(\"Educoldi\");\n ItemListViewCarrossel item11 = new ItemListViewCarrossel(\"Felgo\");\n\n itens.add(item1);\n itens.add(item2);\n itens.add(item3);\n itens.add(item4);\n\n itens.add(item5);\n itens.add(item6);\n itens.add(item7);\n itens.add(item8);\n\n itens.add(item9);\n itens.add(item10);\n itens.add(item11);\n\n //Cria o adapter\n adapterListView = new AdapterLsitView(this, itens);\n\n //Define o Adapter\n listView.setAdapter(adapterListView);\n //Cor quando a lista é selecionada para ralagem.\n listView.setCacheColorHint(Color.TRANSPARENT);\n }",
"public RestaurantFragment() {\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_listar, container, false);\n ListView l = (ListView)view.findViewById(R.id.lista);\n //Agregar ListView\n SQLite sqlite;\n sqlite= new SQLite(getContext());\n sqlite.abrir();\n Cursor cursor = sqlite.getRegistro();\n ArrayList<String> reg = sqlite.getAnimal(cursor);\n\n ArrayAdapter<String> adaptador = new ArrayAdapter<String>(getContext(),android.R.layout.simple_list_item_1,reg);\n l.setAdapter(adaptador);\n\n return view;\n\n }"
]
| [
"0.6577033",
"0.6553929",
"0.64459383",
"0.62912846",
"0.6169122",
"0.6107836",
"0.6100356",
"0.60767925",
"0.5947404",
"0.59257615",
"0.5908195",
"0.5901835",
"0.5890855",
"0.5886863",
"0.5781075",
"0.5766637",
"0.57567304",
"0.5737009",
"0.5735818",
"0.57343924",
"0.57240456",
"0.57219666",
"0.57160187",
"0.57107514",
"0.57081866",
"0.5707971",
"0.57077736",
"0.569924",
"0.56948924",
"0.5685622",
"0.56629086",
"0.5654775",
"0.5645538",
"0.5627811",
"0.5627582",
"0.5624176",
"0.5621015",
"0.5613489",
"0.5603696",
"0.5597509",
"0.55937016",
"0.5539813",
"0.5535609",
"0.552326",
"0.5512747",
"0.5488585",
"0.5482153",
"0.5475635",
"0.5451522",
"0.5446653",
"0.54451954",
"0.54417056",
"0.5439769",
"0.5437772",
"0.543757",
"0.54337454",
"0.5433603",
"0.54273754",
"0.5422447",
"0.54115826",
"0.5410072",
"0.54087317",
"0.5408065",
"0.5407679",
"0.54031456",
"0.5400017",
"0.53970575",
"0.5387178",
"0.53864664",
"0.538303",
"0.5373078",
"0.5372211",
"0.537219",
"0.53674483",
"0.5363728",
"0.5361188",
"0.53592515",
"0.53576434",
"0.5356027",
"0.5346375",
"0.5344493",
"0.53426003",
"0.5339265",
"0.53370976",
"0.53370976",
"0.53370976",
"0.53370976",
"0.5334961",
"0.5334241",
"0.53321165",
"0.5330622",
"0.53224903",
"0.5313874",
"0.5313707",
"0.5308203",
"0.5307865",
"0.5306154",
"0.53032285",
"0.5302055",
"0.52987695"
]
| 0.7499565 | 0 |
This function hide progress wheel | private void hideProgress() {
if(null != mErrorTextView) {
mErrorTextView.setVisibility(View.GONE);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void hideMainLoadingWheel();",
"void hideProgress();",
"void hideProgress() {\n removeProgressView();\n removeScreenshotView();\n }",
"void hideNextEventsLoadingWheel();",
"private void hideProgressIndicator() {\n setProgressBarIndeterminateVisibility(false);\n setProgressBarIndeterminate(false);\n }",
"@Override\n\tpublic void hideProgress() {\n\t\twaitDialog(false);\n\t}",
"void hidePreviousEventsLoadingWheel();",
"@Override\n public void hideProgressBar() {\n MainActivity.sInstance.hideProgressBar();\n }",
"private void toggleProgress() {\n if (progWheel.getVisibility() == View.VISIBLE) {\n // Needs its own thread for timing control\n Handler handler = new Handler();\n final Runnable r = new Runnable() {\n public void run() {\n if (progWheel.getVisibility()\n == View.VISIBLE) {\n progWheel.setVisibility(View.GONE);\n }\n }\n };\n handler.postDelayed(r, 1);\n } else if (progWheel.getVisibility() == View.GONE) {\n progWheel.spin();\n progWheel.setVisibility(View.VISIBLE);\n }\n }",
"void hideModalProgress();",
"public void infoProgressOff (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.GONE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.VISIBLE);\n }\n }\n });\n }",
"private void hideProgress() {\n \tif(mProgress!=null){\n \t\tmProgress.dismiss();\n \tmProgress=null;\n \t}\n }",
"public void goneProgress(){\n mProgressBar.setVisibility(View.GONE);\n }",
"@Override\n\tpublic void hideProgress() {\n\t\tprogress.dismiss();\n\t}",
"public void hideProgress() {\n search_progress.setVisibility(View.GONE);\n img_left_action.setAlpha(0.0f);\n img_left_action.setVisibility(View.VISIBLE);\n ObjectAnimator.ofFloat(img_left_action, \"alpha\", 0.0f, 1.0f).start();\n }",
"private void hideProgress() {\n if (dialogProgress != null) {\n dialogProgress.dismiss();\n dialogProgress = null;\n }\n }",
"public void hideProgress() {\n // if (progressDialog != null && progressDialog.isShowing())\n try {\n progressDialog.dismiss();\n } catch (Exception e) {\n\n }\n }",
"public void hideProgressDialog() {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (progress.isShowing())\r\n\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t} catch (Throwable e) {\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"@Override\n public void run() {\n mZoomSeekBar.setVisibility(View.GONE);\n }",
"public void disable(){\n\n bar.setVisible(false);\n bar.removeAll();\n\n }",
"@Override\n public void run() {\n mZoomSeekBar.setVisibility(View.GONE);\n }",
"@Override\n public void hideProgressBar() {\n if (getActivity() != null) {\n getActivity().runOnUiThread(() -> {\n if (progressBarLayout != null && progressBar != null) {\n progressBar.setVisibility(View.GONE);\n progressBarLayout.setVisibility(View.GONE);\n }\n });\n }\n }",
"@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tprogressBar.setVisibility(View.GONE);\n\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tprogressBar.setVisibility(View.GONE);\n\t\t\t\t\t}",
"@Override\n\t\tpublic void onShutter() {\n\t\t\tmProgressContainer.setVisibility(View.VISIBLE);\n\t\t}",
"public void hideProgress() {\n if (progressDialog != null && progressDialog.isShowing())\n progressDialog.dismiss();\n }",
"public void onShutter()\n {\n mProgressContainer.setVisibility(View.VISIBLE);\n }",
"protected void hideLoader() {\n\n if (progressBar != null) {\n progressBar.setVisibility(View.INVISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n\n }",
"public void mapImageProgressOff (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourMapImageBinding.tourMapImageProgress.getVisibility() != View.GONE) {\n tabTourMapImageBinding.tourMapImageProgress.setVisibility(View.GONE);\n }\n if (tabTourMapImageBinding.tourMapImageLayout.getVisibility() != View.VISIBLE) {\n tabTourMapImageBinding.tourMapImageLayout.setVisibility(View.VISIBLE);\n }\n }\n });\n }",
"@Override\n public void disableProgressBar() {\n et_log_email.setEnabled(true);\n et_log_password.setEnabled(true);\n acb_login.setVisibility(View.VISIBLE);\n acb_register.setVisibility(View.VISIBLE);\n\n //Disable progressbar\n pb_login.setVisibility(View.GONE);\n }",
"public void setProgress( boolean onOff );",
"@Override\n public void stop() {\n f.setVisible(false);\n }",
"public void hideDownloadProgressDialog()\n {\n if(mDownloadProgress != null)\n {\n mDownloadProgress.dismiss();\n }\n mDownloadProgress = null;\n }",
"void showMainLoadingWheel();",
"@Override\n public void esconderBarraProgresso(){\n progressbar.setVisibility(View.GONE);\n listView.setVisibility(View.VISIBLE);\n }",
"@Override\n public void hideLoading() {\n if (progressDialog!=null && progressDialog.isShowing()){\n progressDialog.dismiss();\n }\n }",
"void hideQueuingBuildProgress();",
"public void mapProgressOff (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourMapBinding.mapProgress.getVisibility() != View.GONE) {\n tabTourMapBinding.mapProgress.setVisibility(View.GONE);\n }\n if (tabTourMapBinding.mapLayout.getVisibility() != View.VISIBLE) {\n tabTourMapBinding.mapLayout.setVisibility(View.VISIBLE);\n }\n }\n });\n }",
"private void startProgressBar() {\n\t b_buscar.setVisibility(View.GONE);\n\t // wi_progreso.setVisibility(View.VISIBLE);\n\t ly_progreso.setVisibility(View.VISIBLE);\n\t}",
"private void hideDialog() {\n if (progressDialog.isShowing())\n progressDialog.dismiss();\n }",
"private void hideLoadingAndUpdate() {\n image.setVisibility(View.VISIBLE);\n loadingBar.setVisibility(View.INVISIBLE);\n shareBtn.setVisibility(shareBtnVisibility);\n\n }",
"public void stopProgressAnimation(){\n if(progressAnimator!=null){\n progressAnimator.cancel();\n progressAnimator = null;\n }\n }",
"private void hideLoading()\n {\n relLoadingPanel.setVisibility(View.GONE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, true);\n }",
"public static void hideProgressDialog() {\n try {\n if (PROGRESS_DIALOG != null) {\n PROGRESS_DIALOG.dismiss();\n }\n } catch(Exception ignored) {}\n }",
"public void removeProgressListener() {\n this.listener = new SilentProgressListener();\n }",
"public void dismissProgressBar() {\n\t\tmProgressBarVisible = false;\n\t\tif (getView() != null) {\n\t\t\tLinearLayout progressLayout = (LinearLayout) getView()\n\t\t\t\t\t.findViewById(R.id.severity_list_progress_layout);\n\t\t\tif (progressLayout != null) {\n\t\t\t\tprogressLayout.setVisibility(View.GONE);\n\t\t\t}\n\t\t\tProgressBar listProgress = (ProgressBar) getView().findViewById(\n\t\t\t\t\tR.id.severity_list_progress);\n\t\t\tlistProgress.setProgress(0);\n\t\t}\n\t}",
"public void vanish() {\n\t\t\r\n\t\tlpanel.addMouseMotionListener(new MouseAdapter() {\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tchecker.setEnabled(false);\r\n\t\t\t\tchecker.setVisible(false);\r\n\t\t\t\trequestL.setEnabled(false);\r\n\t\t\t\trequestL.setVisible(false);\r\n\t\t\t\tpatientL.setEnabled(false);\r\n\t\t\t\tpatientL.setVisible(false);\r\n\t\t\t\treport.setEnabled(false);\r\n\t\t\t\treport.setVisible(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t}",
"public void hideInderactIndicator() {\n if (interactIndicator != null) {\n interactIndicator.remove();\n interactIndicator = null;\n }\n }",
"public void hideUnpauseButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.HIDE_UNPAUSE_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }",
"private void hideTemporaryUntilFixed() {\n //\n// jButton8.setVisible(false);// Add cursors button (cursors for the graph to the right)\n// jButton9.setVisible(false);// Remove cursors button (cursors for the graph to the right)\n //\n }",
"private void hideProgressDialogWithTitle() {\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressDialog.dismiss();\n }",
"@Override\n public void hideProgressIndicator() {\n ProgressDialogFragment.dismissDialog(getChildFragmentManager());\n }",
"@Override\n\tpublic void hide() {\n\t\tmDismissed = true;\n\t\tremoveShowCallback();\n\t\tlong diff = System.currentTimeMillis() - mStartTime;\n\t\tif (diff >= mShowTime || mStartTime == -1) {\n\t\t\t// The progress spinner has been shown long enough\n\t\t\t// OR was not shown yet. If it wasn't shown yet,\n\t\t\t// it will just never be shown.\n\t\t\tsuper.hide();\n\t\t} else {\n\t\t\t// The progress spinner is shown, but not long enough,\n\t\t\t// so put a delayed message in to hide it when its been\n\t\t\t// shown long enough.\n\t\t\tif (!mPostedHide) {\n\t\t\t\tpostDelayed(mDelayedHide, mShowTime - diff);\n\t\t\t\tmPostedHide = true;\n\t\t\t}\n\t\t}\n\t}",
"private void hideComputation() {\r\n\t\tshiftLeftSc.hide();\r\n\t\tshiftRowSc.hide();\r\n\t\ttmpMatrix.hide();\r\n\t\ttmpText.hide();\r\n\t}",
"@Override\n\tpublic void unsetVisible() {\n\t\tviewer.setVisible(false);\n\t\tscrollbar.setVisible(false);\n\t}",
"void unsetWheel();",
"public void hidePauseButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.HIDE_PAUSE_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }",
"@Override\n public void setSupportProgressBarIndeterminateVisibility(boolean visible) {\n getSupportActionBar().getCustomView().setVisibility(visible ? View.VISIBLE : View.GONE);\n }",
"public void setIndeterminate(final boolean b){\n\t\tRunnable changeValueRunnable = new Runnable(){\n\t\t\tpublic void run(){\n\t\t\t\tloadBar.setIndeterminate(b);\n\t\t\t}\n\t\t};\n\t\tSwingUtilities.invokeLater(changeValueRunnable);\n\t}",
"@Override\n public void showProgress() {\n mCircleProgressThemeDetail.setVisibility(View.VISIBLE);\n mCircleProgressThemeDetail.spin();\n mRecyclerThemeDaily.setVisibility(View.GONE);\n }",
"public void onFinish() {\n\n tvGroupSwipingBar.setVisibility(View.GONE);\n }",
"public void stopLoadAnim() {\n avi.smoothToHide();\n loadTv.setVisibility(View.INVISIBLE);\n loginContainer.setVisibility(View.VISIBLE);\n }",
"public void hideStatsButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.HIDE_STATS_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }",
"private void showProgressIndicator() {\n setProgressBarIndeterminateVisibility(true);\n setProgressBarIndeterminate(true);\n }",
"@Override\n public void hide() {\n \n }",
"@Override\n\t\t\tpublic void onLoadingCancelled(String imageUri, View view) {\n\t\t\t\tif (progressbar != null)\n\t\t\t\t\tprogressbar.setVisibility(View.GONE);\n\t\t\t}",
"protected void hideNotify() {\n try {\n myJump.systemPauseThreads();\n } catch (Exception oe) {\n myJump.errorMsg(oe);\n }\n }",
"private void hide() {\n\t}",
"void hide();",
"public void hideIt(){\n this.setVisible(false);\n }",
"void showPreviousEventsLoadingWheel();",
"@Override\r\n public void done() {\r\n \t\r\n \tjdp.setVisible(false);\r\n }",
"public void hide(){\n background.setOpacity(0);\n text.setOpacity(0);\n }",
"@Override\r\n public void hide() {\r\n\r\n }",
"public void removeProgressListener(ProgressListener pol);",
"@Override\r\n public void hide() {\n }",
"@Override\n\tpublic void hide() {\n\t\tdispose();\n\t}",
"@Override\n\tpublic void hide() {\n\t\tdispose();\n\n\t}",
"@Override\r\n public void onStopTrackingTouch(SeekBar seekBar) {\n mImgView.setImageBitmap(null);\r\n //softskin\r\n mImgView.setImageBitmap(mFaceEditor.BFSoftskin(Math.abs(seekBar.getProgress()/10), GlobalDefinitions.whiteRatio));//));//change to 0-100\r\n\r\n }",
"@Override\r\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(MainActivity.this, \"Error\", Toast.LENGTH_SHORT).show();\r\n hideProgress();\r\n }",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"public void hideProgressDialog() {\n if (mProgressDialog != null) {\n mProgressDialog.dismiss();\n }\n }",
"public void hideLoadingScreen() {\n setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n getSelectGameScreenIfActive().ifPresent((gameScreen) -> gameScreen.setEnabled());\n }",
"@Override\n public void hide() {\n\n }",
"@Override\n public void hide() {\n\n }",
"@Override\n public void hide() {\n\n }",
"public void offProgressDialog(){\n if(dialogProgresIndeterminate != null && dialogProgresIndeterminate.isShowing()){\n dialogProgresIndeterminate.dismiss();\n }\n }",
"public void hide() {\n \t\tmContext.unregisterReceiver(mHUDController.mConfigChangeReceiver);\n \t\tmHighlighter.hide();\n \t\tmHUDController.hide();\n \t}",
"public void hide() {\n }",
"public static void showIndeterminateProgress(int id) {\n showProgress(id, 0, 0, true);\n }",
"void showNextEventsLoadingWheel();",
"private static void waitForProgressBarToDisappear(){\n\t\tBy androidProgressBar = By.xpath(\"//*[@class=\\\"android.widget.ProgressBar\\\"]\");\n\t\tSystem.out.println(\"----->inside waitForProgressBarToDisappear\");\n\t\t//progress may flicker causing failures\n\t\ttry {\n\t\t\tThread.sleep(500);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(LocalDriverManagerMobile.INSTANCE.getDriver().findElements(androidProgressBar).size() > 0){\n\t\t\tSystem.out.println(\"----->inside waitForProgressBarToDisappear - progress Bar found and waiting for it to clear\");//TODO delete\n\t\t\ttry{\n\t\t\t\tnew WebDriverWait(LocalDriverManagerMobile.INSTANCE.getDriver(),20)\n\t\t\t\t\t\t.until(ExpectedConditions.invisibilityOfElementLocated(androidProgressBar));\n\t\t\t}catch (TimeoutException t){\n\t\t\t\tSystem.err.println(\"-----> Progress bar flickered or got stucked!!!\");\n\t\t\t}\n\t\t}\n\t}",
"public void hide() {\n visible=false;\n }"
]
| [
"0.8111602",
"0.8027625",
"0.77144605",
"0.771163",
"0.76943547",
"0.76055384",
"0.7518389",
"0.7408465",
"0.7404047",
"0.7302505",
"0.7225287",
"0.7173753",
"0.71697074",
"0.71625334",
"0.711526",
"0.7066975",
"0.70260996",
"0.70088816",
"0.69979745",
"0.6986823",
"0.6981812",
"0.6908712",
"0.6885155",
"0.6861576",
"0.681889",
"0.67314297",
"0.66709924",
"0.66380006",
"0.6610943",
"0.6557059",
"0.65278935",
"0.6524362",
"0.6492109",
"0.6487036",
"0.6457511",
"0.64353895",
"0.6430539",
"0.64218843",
"0.64160347",
"0.6410015",
"0.6359541",
"0.6325509",
"0.62604344",
"0.6226506",
"0.62129563",
"0.6209159",
"0.62044084",
"0.6199627",
"0.61591727",
"0.6154051",
"0.6136689",
"0.61365986",
"0.6129955",
"0.61228204",
"0.6075358",
"0.60667455",
"0.60629743",
"0.6039045",
"0.60336363",
"0.6027284",
"0.60238314",
"0.6002808",
"0.5986147",
"0.59833854",
"0.59802324",
"0.59686327",
"0.5954244",
"0.5947928",
"0.59410113",
"0.5937024",
"0.59238094",
"0.5918853",
"0.5918663",
"0.5908121",
"0.5890686",
"0.5874154",
"0.5868476",
"0.5859677",
"0.5852837",
"0.5847183",
"0.5846793",
"0.5846793",
"0.5846793",
"0.5846793",
"0.5846793",
"0.5846793",
"0.5846793",
"0.5846793",
"0.58395207",
"0.58292145",
"0.58235407",
"0.58235407",
"0.58235407",
"0.5823172",
"0.5822376",
"0.5819897",
"0.58181816",
"0.58030015",
"0.5802148",
"0.5800665"
]
| 0.67880094 | 25 |
This function bring some hacks to JStorm, this isn't a good way | @Deprecated
public static StormZkClusterState mkStormZkClusterState(Map conf) throws Exception {
Map realConf = getFullConf(conf);
return new StormZkClusterState(realConf);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void jugar() {}",
"public void method_4270() {}",
"public void m9741j() throws cf {\r\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"Compatibility compatibility();",
"private void m50366E() {\n }",
"protected boolean func_70041_e_() { return false; }",
"protected boolean func_70814_o() { return true; }",
"public final void mo91715d() {\n }",
"public abstract void mo56925d();",
"public void mo21785J() {\n }",
"private JacobUtils() {}",
"private void strin() {\n\n\t}",
"public final void mo51373a() {\n }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"private void level7() {\n }",
"private void kk12() {\n\n\t}",
"@Test\n public void needCustomFix() {\n final Context ctx = ContextFactory.getGlobal().enterContext();\n final ScriptableObject topScope = ctx.initStandardObjects();\n \n topScope.put(\"str\", topScope, str_);\n topScope.put(\"text\", topScope, text_);\n topScope.put(\"expected\", topScope, expected_);\n \n assertEquals(begin_ + end_, text_.replaceAll(str_, \"\"));\n try {\n ctx.evaluateString(topScope, src_, \"test script\", 0, null);\n }\n catch (final JavaScriptException e) {\n assertTrue(e.getMessage().indexOf(\"Expected >\") == 0);\n }\n }",
"public void smell() {\n\t\t\n\t}",
"public void m23075a() {\n }",
"protected void thoroughInspection() {}",
"public abstract void mo27386d();",
"private String jsf22Bugfix() {\n return \"\";\n }",
"public void mo38117a() {\n }",
"public void mo23813b() {\n }",
"public abstract void mo70713b();",
"void m1864a() {\r\n }",
"public abstract void mo27385c();",
"@Test(timeout = 4000)\n public void test118() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.CHAR_TYPE;\n Class<Integer> class0 = Integer.class;\n Class<Object> class1 = Object.class;\n Type.getType(class1);\n Type.getType(class0);\n Type.getObjectType(\"The prefix must not be null\");\n Type type1 = Type.INT_TYPE;\n int[] intArray0 = new int[6];\n intArray0[0] = 4;\n type1.getDescriptor();\n intArray0[1] = 2;\n intArray0[2] = 7;\n intArray0[3] = 4;\n intArray0[4] = 1;\n intArray0[5] = 0;\n frame0.inputStack = intArray0;\n Item item0 = classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"The prefix must not be null\", \"The prefix must not be null\");\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n // Undeclared exception!\n try { \n frame0.execute(192, 4, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n public void perish() {\n \n }",
"public abstract void mo42330e();",
"default boolean isSpecial() { return false; }",
"@Override\n\tprotected void testForOpenDoubleQuotes() {\n\t}",
"public void testGRECLIPSE731f() throws Exception {\n String contents = \"class X { String xxx\\ndef foo() { }\\ndef meth() { xxx = foo()\\nxxx } }\";\n int start = contents.lastIndexOf(\"xxx\");\n int end = start + \"xxx\".length();\n assertType(contents, start, end, \"java.lang.String\");\n }",
"protected String method_4266() {\r\n String[] var10000 = field_3418;\r\n return \"mob.enderdragon.growl\";\r\n }",
"public abstract void mo42331g();",
"@Override\r\n \tprotected boolean supportInterpreter() {\n \t\treturn false;\r\n \t}",
"public abstract void mo2624j();",
"static void feladat9() {\n\t}",
"private boolean isInternal(String name) {\n return name.startsWith(\"java.\")\n || name.startsWith(\"javax.\")\n || name.startsWith(\"com.sun.\")\n || name.startsWith(\"javax.\")\n || name.startsWith(\"oracle.\");\n }",
"public abstract String mo13682d();",
"public abstract void mo42329d();",
"public abstract void mo6549b();",
"private static void cajas() {\n\t\t\n\t}",
"protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }",
"@Deprecated\n\tprivate void oldCode()\n\t{\n\t}",
"public void mo21877s() {\n }",
"public abstract void mo30696a();",
"@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}",
"public void mo21878t() {\n }",
"zzafe mo29840Y() throws RemoteException;",
"@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 mo21779D() {\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"private Util() { }",
"public void mo56167c() {\n }",
"public void mo21825b() {\n }",
"public void mo44053a() {\n }",
"@Override\r\n\tpublic String swim() {\n\t\treturn null;\r\n\t}",
"private void level6() {\n }",
"public void mo2740a() {\n }",
"static void feladat7() {\n\t}",
"public void mo12930a() {\n }",
"void mo57277b();",
"protected void setupLocal() {}",
"public abstract void mo27464a();",
"public void testGRECLIPSE731e() throws Exception {\n String contents = \"def foo() { } \\nString xxx\\nxxx = foo()\\nxxx\";\n int start = contents.lastIndexOf(\"xxx\");\n int end = start + \"xxx\".length();\n assertType(contents, start, end, \"java.lang.String\");\n }",
"static void feladat6() {\n\t}",
"public abstract boolean mo2163j();",
"public void mo21792Q() {\n }",
"static void ignore() {\n }",
"public void mo21787L() {\n }",
"public void mo97908d() {\n }",
"boolean m25333a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = this;\n java.lang.Class.forName(r1);\t Catch:{ ClassNotFoundException -> 0x0005 }\n r1 = 1;\n return r1;\n L_0x0005:\n r1 = 0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mapbox.android.core.location.c.a(java.lang.String):boolean\");\n }",
"public void mo3376r() {\n }",
"@Override\r\n \tprotected void handlePossibleInterpreterChange() {\n \t\t\r\n \t}",
"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 }",
"protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private CanonizeSource() {}",
"protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }",
"@Test(timeout = 4000)\n public void test099() throws Throwable {\n DBCatalog dBCatalog0 = new DBCatalog(\"c56KWC#%&((\");\n DBSchema dBSchema0 = new DBSchema((String) null, dBCatalog0);\n String string0 = SQLUtil.ownerDotComponent(dBSchema0);\n assertEquals(\"c56KWC#%&((.null\", string0);\n }",
"default void refactoring() {\n templateBuilder.set(new StringBuilder());\n }",
"void m5769c() throws C0841b;",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public abstract String mo41079d();",
"void m5771e() throws C0841b;",
"public void mo21782G() {\n }",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n String string0 = SQLUtil.ownerDotComponent(dBUniqueConstraint0);\n assertEquals(\"null.null\", string0);\n }",
"public boolean method_2434() {\r\n return false;\r\n }",
"private JadTool() { }",
"private BuilderUtils() {}",
"protected void mo6255a() {\n }",
"public void mo3749d() {\n }",
"public void mo6081a() {\n }",
"void m5770d() throws C0841b;"
]
| [
"0.5777844",
"0.57271785",
"0.5537556",
"0.5532021",
"0.545308",
"0.53939646",
"0.53845745",
"0.53626966",
"0.53617775",
"0.5358974",
"0.53339905",
"0.53323823",
"0.526796",
"0.5260452",
"0.5256198",
"0.5252159",
"0.5251791",
"0.5249202",
"0.5249202",
"0.52417356",
"0.5220636",
"0.5211866",
"0.521026",
"0.5185814",
"0.51725346",
"0.5156516",
"0.51563555",
"0.5156222",
"0.5142416",
"0.51369613",
"0.51339984",
"0.512609",
"0.51229954",
"0.51180017",
"0.5115691",
"0.5106202",
"0.5105634",
"0.5103586",
"0.5088431",
"0.50879693",
"0.50857085",
"0.5083838",
"0.5078205",
"0.5068524",
"0.5068326",
"0.504232",
"0.5039075",
"0.50373423",
"0.50341773",
"0.50196415",
"0.5017651",
"0.50117534",
"0.5011522",
"0.50109005",
"0.50047344",
"0.5001066",
"0.49992695",
"0.49992695",
"0.49982843",
"0.49944487",
"0.49896815",
"0.49864912",
"0.49740776",
"0.49707857",
"0.4967554",
"0.49606583",
"0.4959658",
"0.49588615",
"0.4955013",
"0.4951171",
"0.49490246",
"0.49482659",
"0.49478304",
"0.49454582",
"0.4942459",
"0.4940304",
"0.4937149",
"0.49341857",
"0.4932226",
"0.49239603",
"0.49233595",
"0.49202916",
"0.49195167",
"0.49145722",
"0.49099433",
"0.49094188",
"0.49086776",
"0.49028215",
"0.48975176",
"0.48945707",
"0.4893663",
"0.48917672",
"0.4887842",
"0.48868605",
"0.4885896",
"0.48855686",
"0.48841754",
"0.48838776",
"0.48787874",
"0.48780918",
"0.48776144"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
ArrayList<String> clist=getCode();
ArrayList<String> clist1=getCode1();
for(String code:clist){
if(clist1.contains(code)){
continue;
}
System.out.println(code);
MongoCollection<Document> collection=mongo.getShardConn("ss_all_speak");
BasicDBObject find=new BasicDBObject();
find.put("stock_code",code);
// find.put("website","同花顺");
MongoCursor<Document> cursor =collection.find(find).batchSize(1000).noCursorTimeout(true).iterator();
HashMap<String, HashMap<String, Object>> dmap=new HashMap<String, HashMap<String,Object>>();
while(cursor.hasNext()){
Document doc=cursor.next();
Object list=doc.get("list");
String time=doc.getString("timedel").trim();
HashMap<String, Object> map=countNamesAndComments(list,time);
map.put("time",time);
if(dmap.containsKey(time)){
HashMap<String, Object> tmp=dmap.get(time);
int a1=Integer.parseInt(map.get("names").toString());
int b1=Integer.parseInt(map.get("comments").toString());
int a2=Integer.parseInt(tmp.get("names").toString());
int b2=Integer.parseInt(tmp.get("comments").toString());
tmp.put("names", a1+a2);
tmp.put("comments", b1+b2);
dmap.put(time, tmp);
}else{
dmap.put(time, map);
}
}
cursor.close();
ArrayList<HashMap<String, Object>> dlist=new ArrayList<HashMap<String,Object>>();
for(String key:dmap.keySet()){
HashMap<String, Object> tmp=dmap.get(key);
dlist.add(tmp);
}
Collections.sort(dlist, new Comparator<HashMap<String, Object >>() {
public int compare(HashMap<String, Object > a, HashMap<String, Object > b) {
String one =a.get("time").toString();
String two = b.get("time").toString();
int time=str2TimeMuli(one);
int time1=str2TimeMuli(two);
return time - time1;
}
});
if(!dlist.isEmpty()){
HashMap<String, Object> lastmap=new HashMap<String, Object>();
lastmap.put("id", code);
lastmap.put("list", dlist);
// System.out.println(lastmap.toString());
try {
mongo.upsertMapByTableName(lastmap, "ss_data_count1");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Get stabbed or shot and health is reduced by dmg. | public void takeDamage(int dmg) {
health -= dmg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void getDamaged(float dmg) {\n\t\tStagePanel.addValueLabel(parentGP,dmg,Commons.cAttack);\n\t\tif(shield - dmg >= 0) {\n\t\t\tshield-=dmg;\n\t\t\tdmg = 0;\n\t\t}else {\n\t\t\tdmg-=shield;\n\t\t\tshield = 0;\n\t\t}\n\t\tif(health-dmg > 0) {\n\t\t\thealth-=dmg;\n\t\t}else {\n\t\t\thealth = 0;\n\t\t}\n\t\tSoundEffect.play(\"Hurt.wav\");\n\t}",
"AbilityDamage getAbilityDamage();",
"public short getSiegeWeaponDamage();",
"int getDamage();",
"int getDamage();",
"int getDamage();",
"int getDamage();",
"int getDamage();",
"public int takeDmg(int dmg) {\n //grabs the hp\n HpComponent health = this.findHpComponent();\n\n boolean returnVal = health.takeDmg(dmg); //take dmg\n if (returnVal) { //obj is alive\n return 1;\n }\n\n return 0; //obj is ded\n }",
"public float getHungerDamage();",
"public DamageType getDamagetype();",
"public int getDamage() {\n //TODO\n return 1;\n }",
"boolean takeDamage(int dmg);",
"public int getDamage () {\n\t\treturn (this.puissance + stuff.getDegat());\n\t}",
"public int getDamage() {\n \t\treturn damage + ((int) 0.5*level);\n \t}",
"public short getHandThrowDamage();",
"public int getWeaponDamage()\n {\n \t\treturn mystuff.getWepDmg();\n }",
"public int getEquippedWeaponDamage() {\n return 0;\n }",
"public short getBowDamage();",
"public double getDamage() {\n return damage;\n }",
"public double getDamage() {\r\n\t\treturn damage;\r\n\t}",
"@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}",
"public int getDmg(){\r\n return enemyDmg;\r\n }",
"public int getSelectedWeaponDamage() {\n return 0;\n }",
"public int getDamage() {\n return damage;\n }",
"public float getDamage() {\n return damage;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getWeaponDamage() {\n return Math.round(type.getWeaponDamage()*type.getItemLevelMultipliers()\n\t\t\t\t[level - 1]);\n }",
"public void takedmg(int dmg){\n curHp -= dmg;\n }",
"public int getDamage() {\r\n\t\treturn damage;\r\n\t}",
"public int getDamage()\n\t{\n\t\treturn Damage;\n\t}",
"public int getDamageTaken() {\n return this.damageTaken;\n }",
"public int getDamage() {\r\n\t\treturn myDamage;\r\n\t}",
"public int getGetDamage() {\r\n\t\treturn getDamage;\r\n\t}",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"Float getHealth();",
"public int getHealth();",
"public int giveDamage();",
"@Override\n\tpublic int getMetricInternal() {\n// Util.runToAddressNoLimit(0, 0, 0x3d702, 0x3e77f);\n// missed_ = curGb.readMemory(curGb.pokemon.fightAttackMissedAddress);\n// System.out.println(\"missed: \" + missed_);\n\n\t\tEflUtil.runToAddressNoLimit(0, 0, curGb.pokemon.fightBattleCommand0a);\n\t\tint crit = curGb.readMemory(curGb.pokemon.fightCriticalHitAddress);\n\t\tint missed = curGb.readMemory(curGb.pokemon.fightAttackMissedAddress);\n//\t\tSystem.out.println(\"EflCheckMoveDamage crit: \" + crit + \" missed: \" + missed);\n\t\tif (missed != 0 || criticalHit != (crit != 0))\n\t\t return Integer.MIN_VALUE;\n\t\tif (thrashAdditionalTurns > 0 && curGb.readMemory(curGb.pokemon.thrashNumTurnsAddress) < thrashAdditionalTurns) {\n\t\t\tSystem.out.println(\"caught bad thrash \"+ curGb.readMemory(curGb.pokemon.thrashNumTurnsAddress));\n return Integer.MIN_VALUE;\n\t\t}\n\t\tif (PokemonUtil.isGen2()) {\n\t\t\tint effectMissed = curGb.readMemory(curGb.pokemon.fightEffectMissedAddress);\n\t\t\tif (this.effectMiss != (effectMissed != 0))\n\t\t\t return Integer.MIN_VALUE;\n\t\t}\n\t\tint dmg = Util.getMemoryWordBE(curGb.pokemon.fightCurDamageAddress);\n// System.out.println(\"EflCheckMoveDamage dmg: \" + dmg);\n\t\tif (dmg < minDamage || dmg > maxDamage)\n return Integer.MIN_VALUE;\n//\t\t\tSystem.out.println(crit+\" \"+missed+\" \"+effectMissed+\" \"+dmg);\n//\t\tSystem.out.println(\"atk: \"+atk+\", def: \"+def+\", pow: \"+pow+\", lvl: \"+lvl);\n//\t\tSystem.out.println(\"max damage: \"+maxdmg+\", dmg: \"+dmg);\n\t\treturn negateOutputDamage ? -dmg : dmg;\n\t}",
"public int getWeaponDamage()\r\n\t{\t\r\n\t\tint damageValue = 0; //damage for superclass / unspecified weapon type; overwritten if the referenced weapon is specified/exists\r\n\t\t\r\n\t\t//passes the subclass name of the referenced Weapon object and get its specified damage\r\n\t\t\r\n\t\tif (this.getClass ( ).getName().equals(\"Stick\"))\r\n\t\t{\r\n\t\t\tdamageValue = ((Stick)this).getWeaponDamage();\r\n\t\t}\r\n\t\t\r\n\t\telse if (this.getClass ( ).getName().equals(\"Sword\"))\r\n\t\t{\r\n\t\t\tdamageValue = ((Sword)this).getWeaponDamage();\r\n\t\t}\r\n\t\t\r\n\t\telse if (this.getClass ( ).getName().equals(\"Bazooka\"))\r\n\t\t{\r\n\t\t\tdamageValue = ((Bazooka)this).getWeaponDamage();\r\n\t\t}\r\n\t\t\r\n\t\telse if (this.getClass ( ).getName().equals(\"AtomicBomb\"))\r\n\t\t{\r\n\t\t\tdamageValue = ((AtomicBomb)this).getWeaponDamage();\r\n\t\t}\r\n\t\t\r\n\t\telse if (this.getClass ( ).getName().equals(\"PotatoCannon\"))\r\n\t\t{\r\n\t\t\tdamageValue = ((PotatoCannon)this).getWeaponDamage();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn damageValue;\r\n\t}",
"int getHealth();",
"@org.junit.Test\n public void getDamage() {\n Weapon sword = new Sword();\n int dmg = sword.getDamage();\n assertEquals(\"Normal Sword.getDamage() failed\",5,dmg);\n\n Weapon stick = new WoodStick();\n dmg = stick.getDamage();\n assertEquals(\"Normal WoodStick.getDamage() failed\",1,dmg);\n }",
"public Entity getDamageDealer();",
"public Integer getHealth();",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"@Override\n public double getDamageAmount() {\n return this.getStrength().getAbilityValue();\n }",
"public int getDamage() {\n\t\treturn (int) (Math.random() * damageVariance) + damage;\n\t}",
"public int getWeaponDamage()\n\t{\n\t\treturn weaponDamage;\n\t}",
"public int getDamage() {\n\t\treturn this.damage;\n\t}",
"public int getDamage() {\n\t\treturn itemDamage;\n\t}",
"String getDamage() {\n return damage;\n }",
"public int getDamage() {\n\t\t\treturn damage;\n\t\t}",
"public int getHealth() {\n return getStat(health);\n }",
"@Override\n public int doDamage() {\n if (difficulty <5)\n return damage;\n else \n return damage*2;\n }",
"public int getDamageTaken () {\r\n\t\treturn this.damageTaken;\r\n\t}",
"public int getDamageDealt () {\r\n\t\treturn this.damageDealt;\r\n\t}",
"public float getHealth(){\n return health.getHealth();\n }",
"public int getTempDmg(){\r\n return tDmg;\r\n }",
"private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }",
"public static double getWeaponDamage(Item weapon, Skill attStrength) {\n/* 2348 */ if (weapon.isBodyPart() && weapon.getAuxData() != 100) {\n/* */ \n/* */ try {\n/* */ \n/* 2352 */ float f = Server.getInstance().getCreature(weapon.getOwnerId()).getCombatDamage(weapon);\n/* */ \n/* 2354 */ return (f + Server.rand.nextFloat() * f * 2.0F);\n/* */ }\n/* 2356 */ catch (NoSuchCreatureException nsc) {\n/* */ \n/* 2358 */ logger.log(Level.WARNING, \"Could not find Creature owner of weapon: \" + weapon + \" due to \" + nsc.getMessage(), (Throwable)nsc);\n/* */ \n/* */ }\n/* 2361 */ catch (NoSuchPlayerException nsp) {\n/* */ \n/* 2363 */ logger.log(Level.WARNING, \"Could not find Player owner of weapon: \" + weapon + \" due to \" + nsp.getMessage(), (Throwable)nsp);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 2368 */ float base = 6.0F;\n/* 2369 */ if (weapon.isWeaponSword()) {\n/* */ \n/* 2371 */ base = 24.0F;\n/* */ }\n/* 2373 */ else if (weapon.isWeaponAxe()) {\n/* 2374 */ base = 30.0F;\n/* 2375 */ } else if (weapon.isWeaponPierce()) {\n/* 2376 */ base = 12.0F;\n/* 2377 */ } else if (weapon.isWeaponSlash()) {\n/* 2378 */ base = 18.0F;\n/* 2379 */ } else if (weapon.isWeaponCrush()) {\n/* 2380 */ base = 36.0F;\n/* 2381 */ } else if (weapon.isBodyPart() && weapon.getAuxData() == 100) {\n/* */ \n/* 2383 */ base = 6.0F;\n/* */ } \n/* 2385 */ if (weapon.isWood()) {\n/* 2386 */ base *= 0.1F;\n/* 2387 */ } else if (weapon.isTool()) {\n/* 2388 */ base *= 0.3F;\n/* */ } \n/* 2390 */ base = (float)(base * (1.0D + attStrength.getKnowledge(0.0D) / 100.0D));\n/* */ \n/* 2392 */ float randomizer = (50.0F + Server.rand.nextFloat() * 50.0F) / 100.0F;\n/* */ \n/* 2394 */ return base + (randomizer * base * 4.0F * weapon.getQualityLevel() * weapon.getDamagePercent()) / 10000.0D;\n/* */ }",
"public boolean getDamage(){\n\t\tdie();\n\t\treturn false;\n\t}",
"public double getHealth() { return health; }",
"int getArmor();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"@Override\n public int getEffectiveDamage(Hero hero){\n return (hero.getDex() + hero.getBonusDex()) * 2 + this.damage;\n }",
"@Basic @Immutable\n\tpublic int getDamage() {\n\t\treturn this.damage;\n\t}",
"@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }",
"public void takeDamage(int dmg){\r\n this.currHP -= dmg;\r\n }",
"public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }",
"int getDefenseStatStage();",
"private int calculateHeroDamageDone(Hero h, GenericMonster m){\n\t\t// Take into account armor, magic resist, thoughness, that kind of thing..\n\t\thDmg = h.getWeapon().calculateDamageDelt();\n\t\tcalcDef = new CalculateDefence(h.getWeapon(), m);\n\t\tint def = calcDef.getMonsterDefense();\n\t\t// Getting the defense value and type\n\t\tmResistance = calcDef.getMonsterDefType();\n\t\tmResistanceValue = calcDef.getMonsterDefValue();\n\t\treturn (hDmg - def);\n\t}",
"float getBonusItemDrop();",
"public int[] getDamage(){\n\t\treturn shipDamage;\n\t}",
"public double getItemDamageLevel(Material mat)\r\n\t{\treturn this.itemDamageLevel.containsKey(mat) ? (this.itemDamageLevel.get(mat)) : 0.0D;\t}",
"public int getHealthGain();",
"public int dmg(){\r\n dmg = rand.nextInt(att);\r\n if(att == 1)\r\n dmg = 1;\r\n return dmg;\r\n }",
"public int getMaxHealth();",
"public int getHealth() { return this.health; }",
"int getMana();",
"public void takeDamage(int dmg) {\r\n\t\thp -= dmg;\r\n\t\tif (hp < 0) {\r\n\t\t\thp = 0;\r\n\t\t}\r\n\t\tSystem.out.println(getName() + \" has taken \" + dmg + \" damage\");\r\n\t}",
"public int takeDamage(int damage) \r\n\t{\r\n\t\t//Pre: an int damage\r\n\t\t//Post: reduces health variable by damage\r\n\t\tif(health - damage > 0) \r\n\t\t{\r\n\t\t\thealth -= damage;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t\treturn health;\r\n\t}",
"public int takeDamage(int damage) {\n damage -= ARMOR;\r\n // set new hp\r\n return super.takeDamage(damage);\r\n }",
"public double getHealth() {\n return classData.getHealth(level);\n }"
]
| [
"0.71346617",
"0.70251745",
"0.7024118",
"0.6940777",
"0.6940777",
"0.6940777",
"0.6940777",
"0.6940777",
"0.6829581",
"0.68080705",
"0.67488635",
"0.6696305",
"0.6684921",
"0.6568678",
"0.6547043",
"0.6493446",
"0.64917105",
"0.6467781",
"0.6439283",
"0.6433815",
"0.6419933",
"0.64069444",
"0.6394247",
"0.6384134",
"0.6367509",
"0.6338752",
"0.6308581",
"0.6308581",
"0.6308581",
"0.6308581",
"0.6308581",
"0.63055164",
"0.63049376",
"0.62761277",
"0.6263492",
"0.6255069",
"0.6248406",
"0.6236075",
"0.623309",
"0.623309",
"0.623309",
"0.623309",
"0.623309",
"0.62259465",
"0.62237996",
"0.6219645",
"0.62073815",
"0.62007487",
"0.6193996",
"0.6178682",
"0.6167411",
"0.61376715",
"0.6135087",
"0.6135087",
"0.6135087",
"0.6135087",
"0.6135087",
"0.6130082",
"0.6124882",
"0.6111204",
"0.60845757",
"0.6062996",
"0.6062487",
"0.605749",
"0.6051487",
"0.60493606",
"0.60446995",
"0.6030581",
"0.60135645",
"0.59950656",
"0.59906423",
"0.5989374",
"0.59686786",
"0.5953889",
"0.5951973",
"0.5948618",
"0.5948618",
"0.5948618",
"0.5948618",
"0.5948618",
"0.5948618",
"0.59485877",
"0.5916002",
"0.5914351",
"0.58711267",
"0.5860175",
"0.5859036",
"0.5858335",
"0.5852149",
"0.58390146",
"0.58321756",
"0.58261913",
"0.58223057",
"0.58168924",
"0.5814358",
"0.58094764",
"0.5808707",
"0.5802671",
"0.579151",
"0.57892084"
]
| 0.59848964 | 72 |
Constructor que crea una canasta de productos alimenticios | public Basket(double price, String name, int quantityForSold, double priceOfProvider, Quantity quantity) {
super(price, name, quantityForSold, priceOfProvider, quantity);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Alojamiento() {\r\n\t}",
"public Productos() {\n super();\n // TODO Auto-generated constructor stub\n }",
"public Aritmetica(){ }",
"public Funcionalidad() {\n Cajero cajero1 = new Cajero(\"Pepe\", 2);\n empleados.put(cajero1.getID(), cajero1);\n Reponedor reponedor1 = new Reponedor(\"Juan\", 3);\n empleados.put(reponedor1.getID(), reponedor1);\n Producto producto1 = new Producto(\"Platano\", 10, 8);\n productos.add(producto1);\n Perecedero perecedero1 = new Perecedero(LocalDateTime.now(), \"Yogurt\", 10, 8);\n }",
"public Puerto()\n {\n alquileres = new ArrayList<Alquiler>();\n }",
"public Producto() {\r\n }",
"public Puerto()\n {\n alquileres = new ArrayList<>();\n }",
"public Mazo()\n {\n cartasBaraja = new ArrayList<>();\n for(Palo paloActual: Palo.values()){ \n String palo = paloActual.toString().toLowerCase();\n for(int i = 1; i < 13; i ++){\n\n if(i > 7 && i < 10){\n i = 10;\n }\n Carta carta = new Carta(i, paloActual);\n cartasBaraja.add(carta);\n }\n }\n }",
"public Equipas() {\r\n\t\t\r\n\t}",
"public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }",
"public Alumnos(String nombre, String apellido, Condicion condicion, Genero genero, Vector<Asignatura> asignaturas) {\n\t\t//super();\n\t\tthis.nombre = nombre;\n\t\tthis.apellido = apellido;\n\t\tthis.condicion = condicion;\n\t\tthis.genero = genero;\n\t\tthis.asignaturas = new Vector<Asignatura>(asignaturas);\n\t\tthis.calculadorNotaFinal();\t\t\n\t}",
"protected Asignatura()\r\n\t{}",
"public Asiakas(){\n\t\tid++;\n\t\tbussiNumero = new Random().nextInt(OmaMoottori.bussienMaara);\n\t\tsaapumisaika = Kello.getInstance().getAika();\n\t}",
"public Almacen(){}",
"public abstract Anuncio creaAnuncioTematico();",
"public Manusia() {}",
"public void create(Alien a1) {\n\t\t\r\n\t\taliens.add(a1);\r\n\t}",
"public Aliases( ) {\n\t}",
"public Producto (){\n\n }",
"public Hipermercado(){\r\n this.clientes = new CatalogoClientes();\r\n this.produtos = new CatalogoProdutos();\r\n this.numFiliais = 3;\r\n this.faturacao = new Faturacao(this.numFiliais);\r\n this.filial = new ArrayList<>(this.numFiliais);\r\n for (int i = 0; i < this.numFiliais; i++){\r\n this.filial.add(new Filial());\r\n }\r\n \r\n this.invalidas = 0;\r\n }",
"public ProductoA2() {\n\t\tSystem.out.println(\"Hola yo soy el producto A2\");\n\t\t\n\t}",
"public Cromosoma(ArrayList<Integer> itinerario,int horaAcumulada) {\n\t\tthis._gen = itinerario;\n this._horaAcumulada = horaAcumulada;\n\t\tthis.aptitud = calcularAptitud(itinerario,horaAcumulada);\n }",
"public Factura4(Zapatos listaZapatos[]){\n /*al no darle parámetros se inicializa, según el enunciado, en cero por defecto*/\n this.totalZapatos=0;\n this.totalZapatosNacional=0;\n this.totalZapatosArtesanal=0;\n this.listaZapatos = listaZapatos;\n }",
"public imageAlphaClass()\n {\n array_lineas = new ArrayList<>();\n array_modelos = new ArrayList<>();\n array_productos = new ArrayList<>();\n }",
"public Producto() {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tnombre = \"\";\r\n\t\tvendedor = \"\";\r\n\t\tprecio = 0;\r\n\t\tcantidad = 0;\r\n\t\tenVenta = false;\r\n\t\tdescripcion = \"\";\r\n\t\tcategorias = new Categoria();\r\n\t\tcaracteristicas = null;//TODO CORREGIR\r\n\t}",
"public Asiento() {\n\t\tthis(\"asiento\", null);\n\t}",
"public Celula() { // Sentinela\n\t\tthis.item = new Jogador();\n\t\tproximo = null;\n\t}",
"private IOferta buildOfertaEjemplo7() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoEnSegundoProducto(\"11-111-1111\", \"11-111-1112\", 50);\n\t\treturn new OfertaDinero(\"50% en Sprite, comprando 1 Coca\", condicion,\tdescuento);\n\t}",
"public Persona(){\n /*super(nombresPosibles\n [r.nextInt(nombresPosibles.length)],(byte)r.nextInt(101));\n */\n super(\"Anónimo\",(byte)5);\n String[] nombresPosibles={\"Patracio\",\"Eusequio\",\"Bartolo\",\"Mortadelo\",\"Piorroncho\",\"Tiburcio\"};\n String[] apellidosPosibles={\"Sánchez\",\"López\",\"Martínez\",\"González\",\"Páramos\",\"Jiménez\",\"Parra\"};\n String[] nacionalidadesPosibles={\"Española\",\"Francesa\",\"Alemana\",\"Irlandesa\",\"Japonesa\",\"Congoleña\",\"Bielorrusa\",\"Mauritana\"};\n Random r=new Random();\n this.apellido=apellidosPosibles\n [r.nextInt(apellidosPosibles.length)];\n this.nacionalidad=nacionalidadesPosibles\n [r.nextInt(nacionalidadesPosibles.length)];\n mascota=new Mascota[5];\n this.saldo=r.nextInt(101);\n }",
"public AntrianPasien() {\r\n\r\n }",
"public AzioneProgrammata(ArrayList<Attuatore> attuatori, String azione) {\n this.attuatori = attuatori;\n this.azione = azione;\n }",
"public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"Petunia() {\r\n\t\t}",
"private Productos(int codigo, String descripcion, double precio) {\n this.codigo = codigo;\n this.descripcion = descripcion;\n this.precio = precio;\n }",
"public abstract Anuncio creaAnuncioGeneral();",
"public Cgg_jur_anticipo(){}",
"public Profesor (String apellidos, String nombre, String nif, Persona.sexo genero, int edad, int expediente){\n this.apellidos = apellidos;\n this.nombre = nombre;\n this.nif = nif;\n this.genero = genero;\n this.edad = edad;\n this.expediente = expediente;\n }",
"private void populaAlimento()\n {\n Alimento a = new Alimento(\"Arroz\", 100d, 5d, 0.4d, 30d, 100d, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Abacaxi\", 96.2d, 1.2d, 2.3d, 6d, 100d, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Carne moida - Acem\", 212.4d, 26.7d, 9.8d, 0d, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Pernil Assado\", 262.3d, 32.1d, 13.1d, 0, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Pao de forma integral\", 253.2d, 9.4d, 2.9d, 49, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n }",
"public Aplicacion(String nombreAplicacion, double tamanioAplicacion,Categoria tipoCategoria)\n {\n //Invocamos al constructor de la clase Producto.\n super(nombreAplicacion);\n this.tamanioAplicacion = tamanioAplicacion;\n this.tipoCategoria = tipoCategoria;\n\t\tprecioAplicacion = 0.99;\n }",
"public Conta(String numero, String agencia) { // Construtor 1\n this.numero = numero;\n this.agencia = agencia;\n this.saldo = 0.0;\n }",
"public JudokaCreator() {\n\t\tsuper();\n\t\ttechniques = new Technique[]{\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA\n\t\t};\n\t}",
"public MiAlmacenN(int tamaño) {\n\t\tproductos = new Producto[tamaño];\n\t\tthis.tamaño = tamaño;\n\t\tthis.inserted = 0;\n\t\tthis.extracted = 0;\n\t\tthis.insertIn = 0;\n\t\tthis.extractFrom = 0;\n\t}",
"public DABeneficios() {\n }",
"AliciaLab createAliciaLab();",
"public clsEquipacion() {\n\t\tString color1P = \"\";\n\t\tString color2P = \"\";\n\t\tString color1S = \"\";\n\t\tString color2S = \"\";\n\t\tString publicidadP = \"\";\n\t\tString publicidadS = \"\";\n\t\tString serigrafiadoP = \"\";\n\t\tString serigrafiadoS = \"\";\n\t\tint dorsal = 0;\n\t}",
"public Aso() {\n\t\tName = \"Aso\";\n\t\ttartossag = 3;\n\t}",
"public Cartao() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"public abstract Anuncio creaAnuncioIndividualizado();",
"public Dinamica(){\n\t\tprimer=null;\n\t\tanterior=null;\n\t\tn_equips = 0;\n\t\t\n\t}",
"public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}",
"public void constructor() {\n setEdibleAnimals();\n }",
"public void crearAtracciones(){\n \n //Añado atracciones tipo A\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new A();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo B\n for (int i = 0; i < 6 ; i++){\n Atraccion atraccion = new B();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo C\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new C();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo D\n for (int i = 0; i < 3 ; i++){\n Atraccion atraccion = new D();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo E\n for (int i = 0; i < 7 ; i++){\n Atraccion atraccion = new E();\n atracciones.add(atraccion);\n }\n \n }",
"public Clasificacion (ArrayList<Jugador> jugadores)\n\t{\n\t\tthis.jugadores = jugadores;\n\t\tthis.numJug = jugadores.size();\n\t\tthis.podio = new ArrayList<Jugador>();\n\t\tthis.ganadores = new ArrayList<Jugador>();\n\t\tthis.baraja = new Baraja();\n\t\tbaraja.barajar(); baraja.barajar();\n\t\tbarajaDeCartas = baraja.getBaraja();\n\t}",
"public Coalition(Coalition coalition) {\n super();\n this.definedOn = coalition.getPlayer();\n for(int i : coalition){\n add(i);\n }\n }",
"public Mapa(int ancho, int alto) {\r\n this.ancho = ancho;\r\n this.alto = alto;\r\n cuadros = new int[ancho*alto];\r\n generarMapa();\r\n }",
"public void construirCargo() {\n persona.setCargo(Cargos.SUPERVISOR);\n }",
"public Product() {\n\t}",
"public figuras(int opcion) {\r\n this.opcion = opcion;\r\n // this.aleatorio = aleatorio;\r\n }",
"public Product() { }",
"public Product() { }",
"public Coloca_imagen(){\n \n \n }",
"public Arquero(){\n this.vida = 75;\n this.danioAUnidad = 15;\n this.danioAEdificio = 10;\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }",
"public ProductoNoElaborado() {\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public Prova() {}",
"public AfiliadoVista() {\r\n }",
"public Curso() {\n\t\tthis.alumnos = new ArrayList<Alumno>();\n\t\tcupo = 0;\n\t\tcreditos = 0;\n\t}",
"public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }",
"public InstanciaProductoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public BaseDatosProductos iniciarProductos() {\n\t\tBaseDatosProductos baseDatosProductos = new BaseDatosProductos();\n\t\t// construcion datos iniciales \n\t\tProductos Manzanas = new Productos(1, \"Manzanas\", 8000.0, 65);\n\t\tProductos Limones = new Productos(2, \"Limones\", 2300.0, 15);\n\t\tProductos Granadilla = new Productos(3, \"Granadilla\", 2500.0, 38);\n\t\tProductos Arandanos = new Productos(4, \"Arandanos\", 9300.0, 55);\n\t\tProductos Tomates = new Productos(5, \"Tomates\", 2100.0, 42);\n\t\tProductos Fresas = new Productos(6, \"Fresas\", 4100.0, 3);\n\t\tProductos Helado = new Productos(7, \"Helado\", 4500.0, 41);\n\t\tProductos Galletas = new Productos(8, \"Galletas\", 500.0, 8);\n\t\tProductos Chocolates = new Productos(9, \"Chocolates\", 3500.0, 806);\n\t\tProductos Jamon = new Productos(10, \"Jamon\", 15000.0, 10);\n\n\t\t\n\n\t\tbaseDatosProductos.agregar(Manzanas);\n\t\tbaseDatosProductos.agregar(Limones);\n\t\tbaseDatosProductos.agregar(Granadilla);\n\t\tbaseDatosProductos.agregar(Arandanos);\n\t\tbaseDatosProductos.agregar(Tomates);\n\t\tbaseDatosProductos.agregar(Fresas);\n\t\tbaseDatosProductos.agregar(Helado);\n\t\tbaseDatosProductos.agregar(Galletas);\n\t\tbaseDatosProductos.agregar(Chocolates);\n\t\tbaseDatosProductos.agregar(Jamon);\n\t\treturn baseDatosProductos;\n\t\t\n\t}",
"@Test\n public void Oriental()throws ParseException\n {\n System.out.println(\"Oriental Dish\");\n //Elementos del plato\n OrientalDish platoOriental;\n platoOriental = new OrientalDish(0.0);\n platoOriental.setBase(new Product(1, \"Shop Suey\", 5000d));\n platoOriental.addOption(new Product(4, \"Pollo Agridulce\", 5800d));\n platoOriental.setSize(Size.FAMILY);\n \n DishBuilder orientalBuilder = new OrientalDishBuilder();\n orientalBuilder.setDish(platoOriental);\n \n DishDirector director = new DishDirector(orientalBuilder);\n //director.create();\n Dish dish = director.getDish();\n assertEquals(32400, dish.getPrice()); \n }",
"public Produto() {}",
"public Cobra()\r\n {\r\n super();\r\n corpo = new ArrayList<CorpoCobra>();\r\n\r\n porCrescer = 0;\r\n ovosComidos = 0;\r\n vidas = 3;\r\n tonta = 0;\r\n }",
"public Caso_de_uso () {\n }",
"public Comida(String nombre){\n super(nombre);\n this.calorias = 10;\n }",
"public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}",
"public Product() {}",
"public Pasien() {\r\n }",
"public Fruitore()\r\n\t{\r\n\t\tthis.nomeUtente = Costanti.STRINGA_VUOTA;\r\n\t}",
"public Sesion(Object[] beneficiario,String idSesion,Calendar fechaInicial,int intentos,int aciertos){\r\n this.beneficiario = beneficiario;\r\n this.idSesion = idSesion;\r\n this.fechaInicial = fechaInicial;\r\n this.intentos = intentos;\r\n this.aciertos = aciertos;\r\n }",
"private UsineJoueur() {}",
"public static void main(String[] args) {\n Animal a1 = new Animal();\n \n //objeto animal parametrizado\n Animal a2 = new Animal(LocalDate.of(2020, 6, 4), \"Saphi\", Animal.Tipo.GATO, 400, Animal.Estado.DURMIENDO);\n \n //imprimir a1 y a2\n System.out.println(\"Animal a1:\\n \" + a1.toString());\n System.out.println(\"Animal a2:\\n \" + a2.toString());\n \n \n //clonar a2 en a3\n Animal a3 = Animal.clonar(a2);\n System.out.println(\"Animal a3:\\n\" + a3.toString());\n \n //contador de instancias\n System.out.println(\"N de instancias: \" + Animal.getContadorInstancias());\n \n //creacion de dos personas\n Persona p1 = new Persona(\"Juan\", 33);\n Persona p2 = new Persona(\"Alba\", 21);\n \n //p1 despierta a los animales\n p1.llamar(a1);\n p1.llamar(a2);\n p1.llamar(a3);\n\n //p2 juega con a2 12m min\n p2.jugar(a2, 120);\n System.out.println(\"Peso de a2 despues de jugar con p2: \" + a2.getGramos());\n \n \n //p1 alimenta a a1 1000 gramos, nuevo peso\n p1.alimentar(a1, 1000);\n System.out.println(\"Peso de a1 despues de comer: \" + a1.getGramos());\n \n //FALTA CONTROLAR EXCEPCION\n \n //p1 juega con a1 200 min, nuevo peso\n// p1.jugar(a1, 200);\n// System.out.println(\"El animal a1 pesa \" + a1.getGramos() + \" después de jugar\");\n \n \n }",
"public Pizza() {\n this(\"small\", 1, 1, 1);\n }",
"public Artemis(){\r\n super(\"Artemis\",\r\n new StandardWinCondition(),\r\n new DoubleNoBackMove(new StandardMove()), new StandardBuild(),\r\n false,\r\n false\r\n );\r\n }",
"public Mafia() {\n super(Side.MAFIA);\n }",
"public Encuesta(Persona persona, Distrito distrito){\n ID = IDautogenerado++;\n this.persona = persona;\n this.distrito = distrito;\n }",
"public TelaProduto() {\n initComponents();\n \n carregaProdutos();\n }",
"public Aktie() {\n }",
"public Product() {\n }",
"public Product() {\n }",
"public TutorIndustrial() {}",
"public SocioAdulto() {\n super();\n this.dirigente = DIRIGENTE_POR_DEFEITO;\n this.IDAdulto = tagAdulto + SAContador;\n SAContador ++;\n }",
"public ContaBancaria() {\n }",
"public Casa() { \n \n /* Cuando se crea la casa, tambien se debe crear la puerta */\n \n laPuerta = new Puerta();\n \n /* se pone la letra F por que son de tipo float */\n laPuerta.setAncho(2.3F);\n laPuerta.setAlto(1.5F);\n \n }",
"public Odontologo() {\n }",
"public PosicionArista() {\n this(new Posicion(), OrientacionArista.Este);\n }",
"public CrearQuedadaVista() {\n }",
"@Test\n public void testAddAss() {\n ArrayList<Association<String, String>> arrayAs = new ArrayList<>();\n String in=\"cat\";\n String es=\"gato\";\n Association h=new Association (in, es);\n arrayAs.add(h);\n in=\"ballon\";\n es=\"globo\";\n Association k=new Association (in, es);\n arrayAs.add(k);\n Diccionario instance = new Diccionario(arrayAs);\n }",
"public Perro() {\n// super(\"No define\", \"NN\", 0); en caso el constructor de animal tenga parametros\n this.pelaje = \"corto\";\n }",
"private DittaAutonoleggio(){\n \n }",
"public Carta(String face, String naipe) {\r\n this.face = face; // inicializa face da carta\r\n this.naipe = naipe; // inicializa naipe da carta\r\n }"
]
| [
"0.64074785",
"0.6394578",
"0.6354895",
"0.6304881",
"0.62772566",
"0.6236783",
"0.623474",
"0.6208335",
"0.618338",
"0.6145195",
"0.61176825",
"0.61157465",
"0.6104909",
"0.61029565",
"0.6102362",
"0.6084981",
"0.60702366",
"0.6067123",
"0.6064753",
"0.60602283",
"0.6051644",
"0.6034133",
"0.60171616",
"0.600641",
"0.5999224",
"0.5990004",
"0.59757864",
"0.597442",
"0.5968107",
"0.5960098",
"0.59598464",
"0.5956336",
"0.59410316",
"0.5939436",
"0.5909693",
"0.59088826",
"0.58961755",
"0.588916",
"0.5871689",
"0.58593184",
"0.5859172",
"0.58541155",
"0.5845721",
"0.5833808",
"0.58236295",
"0.58213574",
"0.581934",
"0.5818096",
"0.58083576",
"0.58042264",
"0.5791093",
"0.5790769",
"0.57861054",
"0.577567",
"0.5773791",
"0.577077",
"0.5759438",
"0.5759414",
"0.5750225",
"0.5745438",
"0.5745438",
"0.5737964",
"0.57346463",
"0.57345164",
"0.57234263",
"0.572175",
"0.5711116",
"0.57099646",
"0.5704929",
"0.5696972",
"0.56941104",
"0.56919503",
"0.56796503",
"0.567863",
"0.5671949",
"0.56686205",
"0.5661081",
"0.5661068",
"0.56581587",
"0.56574863",
"0.5656874",
"0.5655493",
"0.5649484",
"0.56354666",
"0.56343377",
"0.5633885",
"0.56329817",
"0.5629358",
"0.56286645",
"0.56286645",
"0.5628313",
"0.5627836",
"0.5618874",
"0.5618825",
"0.5615293",
"0.56131524",
"0.56130457",
"0.5612883",
"0.5609367",
"0.56078255",
"0.5607551"
]
| 0.0 | -1 |
con el atributo salario, | public Volunteer(int salarioBase) {
super();
this.setCoeficiente(this.COEFICIENTE);
try {
this.setSueldoBase(salarioBase);
}
catch (Throwable e) {
JOptionPane.showMessageDialog(null, "Volunteer no puede tener salario");
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void salarioAtual() {\n\t\tSystem.out.print(\"VALOR ATUAL\"+this.valor);\r\n\t\t\r\n\t}",
"@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }",
"void setSalario(double salario);",
"private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }",
"@Override\n public int getSalida() {\n return 0;\n }",
"public void setAnio(int anio){\r\n \r\n \r\n this.anio = anio;\r\n \r\n }",
"public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}",
"@Override\n\tpublic void attributeAdded(ServletContextAttributeEvent evento_sesion) {\n\t\t// CONTROL DEL NOMBRE DEL ATRIBUTO\n\t\tString nombre_atributo = evento_sesion.getName();\n//\t\tSystem.out.println(nombre_atributo);\n\t\tif (this.seguir_Proceso(nombre_atributo)) {\n\t\t\t// PROCESO DE CONTROL DE NUMERO DE ATRIBUTOS\n\t\t\tInteger contador_atributos_aplicacion = (Integer) evento_sesion.getServletContext().getAttribute(\"contador_atributos_aplicacion\");\n\t\t\tif (contador_atributos_aplicacion!=null)\n\t\t\t{\n\t\t\t\tint numero_atributos = (contador_atributos_aplicacion).intValue();\n\t\t\t\tnumero_atributos++;\n\t\t\t\tevento_sesion.getServletContext().setAttribute(\"contador_atributos_aplicacion\",\tnew Integer(numero_atributos));\n\t\t\t\t// PROCESO DE CONTROL DEL VALOR Y TIPO DE ATRIBUTO\n\t\t\t\tObject valor = evento_sesion.getValue();\n\t\t\t\tString valor_texto = this.coger_Valor(valor);\n\t\t\t\tString tipo = null;\n\t\t\t\ttipo = valor.getClass().getSimpleName();\n\t\t\t\tregistro(\"*** Aniadido el atributo de aplicacion del tipo \" + tipo + \" nombre: \" + nombre_atributo + \" valor: \" + valor_texto);\n\t\t\t}\n\t\t}\n\t}",
"public void setAnio(int p) { this.anio = p; }",
"private DittaAutonoleggio(){\n \n }",
"public void inicializar() {\n\t\t// TODO Auto-generated method stub\n\t\tISHORARIO_IDISHORARIO=\"\";\n\t\tISAULA_IDISAULA=\"\";\n\t\tISCURSO_IDISCURSO=\"\";\n\t\t\n\t}",
"public void attrito(){\n yCord[0]+=4;\n yCord[1]+=4;\n yCord[2]+=4;\n //e riaggiorna i propulsori (che siano attivati o no) ricalcolandoli sulla base delle coordinate dell'astronave, cambiate\n aggiornaPropulsori();\n \n }",
"public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }",
"@Override\n public void setExperiencia(){\n experiencia1=Math.random()*50*nivel;\n experiencia=experiencia+experiencia1;\n subida();\n }",
"public Asiakas(){\n\t\tid++;\n\t\tbussiNumero = new Random().nextInt(OmaMoottori.bussienMaara);\n\t\tsaapumisaika = Kello.getInstance().getAika();\n\t}",
"public int getTipoAtaque(){return tipoAtaque;}",
"public void setContrasena(String contrasena) {this.contrasena = contrasena;}",
"public int getAnio(){\r\n \r\n \r\n return this.anio;\r\n \r\n }",
"public void calcularSalario(){\n // 1% do lucro mensal\n double percentagemLucro = 0.01 * lucroMensal;\n // valor fixo igual ao dobro do dos empregados sem especialização, acrescido\n //de um prémio que corresponde a 1% do lucro mensal nas lojas da região.\n setSalario(1600 + percentagemLucro);\n\n }",
"public void Ordenamiento() {\n\n\t}",
"Reserva Obtener();",
"@Override\n public void cantidad_Defensa(){\n defensa=2+nivel+aumentoD;\n }",
"public void anulaAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAnulaAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n int CodRad = mBRadicacion.Radi.getCodAvaluo();\r\n mBRadicacion.Radi.AnulaRadicacion(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"El Avaluo N*: \" + CodRad + \" ha sido anulada\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n mbTodero.resetTable(\"FormMisAsignados:RadicadosSegTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DLGAnuAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".anulaAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }",
"protected Asignatura()\r\n\t{}",
"protected void incrementarSalario(){\n this.setSalario(getSalario() * 1.5);\n\n }",
"public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}",
"public void setObstaculo(int avenida, int calle);",
"public void asetaTeksti(){\n }",
"public void inicializar() {\n\t\t// TODO Auto-generated method stub\n\t\tIDISFICHA=\"\";\n\t\tNOTAS=\"\";\n\t\tANOTACIONES=\"\";\n\t\tNOTAS_EJERCICIOS=\"\";\n\t}",
"@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }",
"public telefono(){\n this.telefono =\"00000000\";\n this.saldo = 0.0;\n this.marca= \"Sin Marca\";\n }",
"public int getAnio() { return this.anio; }",
"public int getTamanio(){\r\n return tamanio;\r\n }",
"public Comida(String nombre){\n super(nombre);\n this.calorias = 10;\n }",
"public Arquero(){\n this.vida = 75;\n this.danioAUnidad = 15;\n this.danioAEdificio = 10;\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }",
"private void setSALIR(int opcionSalida){\n\t\tthis.opcionSalida = opcionSalida;\n\t}",
"public frmTaquilla() {\n initComponents();\n \n objSalaSecundaria.setCapacidad(250);\n objSalaSecundaria.setPrecioEntrada(180.0);//esto equivale a asignar los valores a través de de los metodos set\n libres1.setText(\"LIBRES \" + objSalaCentral.getCapacidad());\n }",
"protected int getTreinAantal(){\r\n return treinaantal;\r\n }",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override protected void eventoMemoriaModificata(Campo campo) {\n Campo tipoPrezzo;\n boolean acceso;\n\n try { // prova ad eseguire il codice\n// if (campo.getNomeInterno().equals(AlbSottoconto.CAMPO_FISSO)) {\n// tipoPrezzo = this.getCampo(AlbSottoconto.CAMPO_TIPO_PREZZO);\n// acceso = (Boolean)campo.getValore();\n// tipoPrezzo.setVisibile(acceso);\n// if (!acceso) {\n// tipoPrezzo.setValore(0);\n// }// fine del blocco if\n// }// fine del blocco if\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"public figuras(int opcion) {\r\n this.opcion = opcion;\r\n // this.aleatorio = aleatorio;\r\n }",
"void modificarSaldo(int cantidad){\n this.saldo = this.saldo + cantidad;\n }",
"void setTitolo(String titolo);",
"public Utilizador(){\r\n this.id = \"\";\r\n this.email = \"\";\r\n this.nome = \"\";\r\n this.password = \"\";\r\n this.morada = \"\";\r\n this.dataNasc = new GregorianCalendar();\r\n }",
"@Override\r\n\tpublic void salarioNovo(double salario) {\n\t\tthis.valor=salario;\r\n\r\n\t\t\r\n\t}",
"public void setAutorizacion(String autorizacion)\r\n/* 139: */ {\r\n/* 140:236 */ this.autorizacion = autorizacion;\r\n/* 141: */ }",
"public void setStatoCorrente(Stato prossimo)\r\n\t{\r\n\t\tif(!(corrente==null))\r\n\t\t\tfor(int i=0;i<corrente.getTransazioniUscenti().size();i++)\r\n\t\t\t{\r\n\t\t\t\t//System.out.println(\"Imposto NON attiva la \"+corrente.getTransazioniUscenti().get(i));\r\n\t\t\t\tcorrente.getTransazioniUscenti().get(i).setAttiva(false);\r\n\t\t\t}\r\n\t\t\r\n\t\t//System.out.println(\"Imposto lo stato corrente: \"+prossimo.toString());\r\n\t\tcorrente=prossimo;\r\n\t\tif(!(corrente==null))\r\n\t\t{\r\n\t\t\t//System.out.println(\"Attivo le transazioni \"+corrente.getTransazioniUscenti().size());\r\n\t\t\tfor(int i=0;i<corrente.getTransazioniUscenti().size();i++)\r\n\t\t\t{\r\n\t\t\t\t//System.out.println(\"Imposto ATTIVA la \"+corrente.getTransazioniUscenti().get(i));\r\n\t\t\t\tcorrente.getTransazioniUscenti().get(i).setAttiva(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }",
"@Override\r\n public void solicitarDatos(){\r\n Scanner lector = new Scanner(System.in);\r\n super.solicitarDatos(); //llamo al metodo solicitar datos de la clase padre\r\n this.setEstado(true);\r\n this.setNumeroLicencia(licencias);\r\n licencias++;\r\n System.out.println(\"Introduce el numero de taxistas que conducen este\"\r\n + \"taxi\");\r\n this.setNumeroTaxistas(lector.nextInt());\r\n \r\n }",
"public int getAtencionAlCliente(){\n return atencion_al_cliente; \n }",
"public Estudiante(String nom) // Constructor 1: Se le asigna un valor al atributo nombre cuando se cree el objeto.\r\n {\r\n this.nombre = nom;\r\n }",
"public SocioAdulto() {\n super();\n this.dirigente = DIRIGENTE_POR_DEFEITO;\n this.IDAdulto = tagAdulto + SAContador;\n SAContador ++;\n }",
"@Override\n public double calculaSalario() \n {\n double resultado = valor_base - ((acumulado * 0.05) * valor_base);\n resultado += auxilioProcriacao();\n //vale-coxinha\n resultado += 42;\n return resultado;\n }",
"public abstract void instalar(SistemaOperativo SO);",
"void mostrarAtributos() {\n\t\tString mensaje = \"nombre=\" + nombre + \", apellido=\" + apellido + \", tipoDocumento=\" + tipoDocumento\n\t\t\t\t+ \", numeroDocumento=\" + numeroDocumento + \", edad=\" + edad + \" y es \"\n\t\t\t\t+ (edad >= 18 ? \"mayor de edad\" : \"menor de edad\");\n\t\tSystem.out.println(mensaje);\n\t}",
"public void setStato(String stato) {\n\t\t\tthis.stato = stato;\n\t\t}",
"public void setComentario(Comentario comentario) {\n this.comentario = comentario;\n acutualizarInfo();\n }",
"@Override\r\n\tpublic void atualizar(Aluno pAluno) {\r\n\t}",
"public Cgg_res_oficial_seguimiento_usuario(){}",
"public Conway(AutomataCelular ac,int fila,int columna){\r\n super(ac,fila,columna);\r\n estadoActual=VIVA;\r\n //decida();\r\n estadoSiguiente=VIVA;\r\n edad=0;\r\n automata.setElemento(fila,columna,(Elemento)this); \r\n color=Color.blue;\r\n }",
"public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }",
"public abstract void setAcma_valor(java.lang.String newAcma_valor);",
"public int getTransportista(){\n return this.transportista;\n }",
"public Asignacion_usuario_Perfil1() {\n int CodigoAplicacion = 120;\n initComponents();\n llenadoDeCombos();\n llenadoDeTablas();\n \n\n \n }",
"public Socio() {\r\n\t\tsuper();\r\n\t\tthis.id = 0;\r\n\t\tthis.nombre = \"\";\r\n\t\tthis.apellido1 = \"\";\r\n\t\tthis.apellido2 = \"\";\r\n\t\tthis.email = \"\";\r\n\t\tthis.dni = \"\";\r\n\t\tthis.administrador = false;\r\n\t}",
"public int getId_anneeScolaire() {return id_anneeScolaire;}",
"public Summalista()\r\n\t{\r\n\t\tthis.summa = 0;\r\n\t\tthis.alkiot = 0;\r\n\t}",
"public void setIdacesso(int pIdacesso){\n this.idacesso = pIdacesso;\n }",
"public void setTipo(String x){\r\n tipo = x;\r\n }",
"void usada() {\n mazo.habilitarCartaEspecial(this);\n }",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"public void cambioEstadAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAvaluo()) || \"\".equals(mBRadicacion.Radi.getEstadoAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.CambioEstRad(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"La informacion ha sido guardada correctamente\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".cambioEstadAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }",
"public void operar() {\n\t\tOperacionMetodoRef op2 = MetRefApp::referenciaMedodoStatic;\n\t\top2.saludar();\n\t}",
"@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }",
"protected void agregarUbicacion(){\n\n\n\n }",
"public void setTransportista(int transportista){\n this.transportista = transportista;\n }",
"public int getAno(){\n return ano;\n }",
"public Mencacao()\r\n {\r\n texto = \"\";\r\n deUtilizador = \"\";\r\n data = new GregorianCalendar();\r\n }",
"public void setTarjeta(Payment cuenta){\n this.cuenta = cuenta;\n }",
"private void mostrarInformacionP(){\n System.out.println(\"Nombre: \"+this.nombre);\n System.out.println(\"Sexo: \"+ this.sexo);\n System.out.println(\"Edad: \" + edad);\n\n }",
"public String getAutorizacion()\r\n/* 134: */ {\r\n/* 135:226 */ return this.autorizacion;\r\n/* 136: */ }",
"public void setAnio(int anio)\r\n {\r\n this._anio = anio;\r\n this._has_anio = true;\r\n }",
"public void setDato(int dato) {\r\n this.dato = dato;\r\n }",
"public void mostrarAutomovil(){\r\n System.out.println(\"Marca: \" + automovil.getMarca());\r\n System.out.println(\"Modelo: \" + automovil.getModelo());\r\n System.out.println(\"Placa: \" + automovil.getPlaca());\r\n }",
"public int getArmadura(){return armadura;}",
"public RisultatiRicercaStampaAllegatoAttoModel() {\n\t\tsuper();\n\t\tsetTitolo(\"Risultati di ricerca stampe allegato atto\");\n\t}",
"public void validerSaisie();",
"public Contribuinte()\n {\n this.nif = \"\";\n this.nome = \"\";\n this.morada = \"\"; \n }",
"public void calculoSalarioBruto(){\n salarioBruto = hrTrabalhada * valorHr;\n }",
"public float getSalario() {\r\n return salario;\r\n }",
"@Override\n\tpublic void attributeReplaced(ServletContextAttributeEvent evento_atributo) {\n\t\t// CONTROL DEL NOMBRE DEL ATRIBUTO\n\t\tString nombre_atributo = evento_atributo.getName();\n\t\tif (this.seguir_Proceso(nombre_atributo)) {\n\t\t\tObject valor = evento_atributo.getValue();\n\t\t\tString valor_texto = this.coger_Valor(valor);\n\t\t\tString tipo = null;\n\t\t\ttipo = valor.getClass().getSimpleName();\n\t\t\tregistro(\"*** Modificado el atributo de aplicacion del tipo \" + tipo + \" nombre: \" + nombre_atributo + \" valor modificado: \" + valor_texto);\n\t\t}\n\t}",
"private void sumarEdificio(int tipo){\n int cantActual;\n //Buscar tipo\n switch(tipo){\n case vg.CHOZA:\n cantActual = Integer.parseInt(jTextFieldChoza.getText());\n jTextFieldChoza.setText(String.valueOf(cantActual+1));\n break;\n case vg.CAMPAMENTO:\n cantActual = Integer.parseInt(jTextFieldCampamento.getText());\n jTextFieldCampamento.setText(String.valueOf(cantActual+1));\n break;\n case vg.CUARTEL:\n cantActual = Integer.parseInt(jTextFieldCuartel.getText());\n jTextFieldCuartel.setText(String.valueOf(cantActual+1));\n break;\n case vg.MINA:\n cantActual = Integer.parseInt(jTextFieldMina.getText());\n jTextFieldMina.setText(String.valueOf(cantActual+1));\n break;\n case vg.RECOLECTOR:\n cantActual = Integer.parseInt(jTextFieldRecolector.getText());\n jTextFieldRecolector.setText(String.valueOf(cantActual+1));\n break;\n case vg.TORRE:\n cantActual = Integer.parseInt(jTextFieldTorre.getText());\n jTextFieldTorre.setText(String.valueOf(cantActual+1));\n break;\n case vg.CAÑON:\n cantActual = Integer.parseInt(jTextFieldCañon.getText());\n jTextFieldCañon.setText(String.valueOf(cantActual+1));\n break;\n case vg.MORTERO:\n cantActual = Integer.parseInt(jTextFieldMortero.getText());\n jTextFieldMortero.setText(String.valueOf(cantActual+1));\n break;\n default:\n break;\n }\n }",
"public void setAno( int ano ){\n this.ano = ano;\n }",
"public String balar() {\r\n return this.SONIDO;\r\n }",
"public void consultaDinero(){\r\n System.out.println(this.getMonto());\r\n }",
"public void setacto()\n\t\t{\n\t\t\tacto=1;\n\t\tavance=0;\n\t\t}",
"public void sumar() {\n Acumula.acumulador++;\n }",
"void establecerPuntoAM(int pos){\n this.emisoraAMActual = pos;\n }",
"@Override\r\n\tpublic void getRegimeAlimentaire() {\n\t\t\r\n\t}",
"public Tura() {\n\t\tLicznikTur = 0;\n\t}"
]
| [
"0.62715745",
"0.6248691",
"0.62246037",
"0.61742795",
"0.6171033",
"0.6168294",
"0.6153612",
"0.6137343",
"0.61329716",
"0.6083755",
"0.6037787",
"0.6031184",
"0.5997854",
"0.5981374",
"0.5978614",
"0.59505826",
"0.59056294",
"0.5901838",
"0.5900799",
"0.5900027",
"0.58996576",
"0.5875657",
"0.587166",
"0.5869618",
"0.5863925",
"0.58541244",
"0.58531314",
"0.5850841",
"0.5829925",
"0.58009624",
"0.57934624",
"0.57852113",
"0.5775047",
"0.5768482",
"0.5753041",
"0.5751526",
"0.57206506",
"0.5710378",
"0.5705599",
"0.569193",
"0.5690136",
"0.5684692",
"0.56781983",
"0.56664425",
"0.56611776",
"0.5654684",
"0.5652927",
"0.56513005",
"0.563963",
"0.5638352",
"0.5632231",
"0.56300694",
"0.5622624",
"0.562096",
"0.5619385",
"0.56147844",
"0.56102914",
"0.56096447",
"0.5608683",
"0.5607303",
"0.5606609",
"0.56022704",
"0.55936104",
"0.5585139",
"0.55796057",
"0.5578641",
"0.5578246",
"0.5575407",
"0.55713147",
"0.5570763",
"0.556916",
"0.5566559",
"0.5565078",
"0.55557936",
"0.55483043",
"0.55379736",
"0.55289483",
"0.55243444",
"0.5523457",
"0.5522443",
"0.5520623",
"0.5518514",
"0.5515402",
"0.551513",
"0.55115855",
"0.55065334",
"0.5503489",
"0.5499027",
"0.5495291",
"0.549373",
"0.5488747",
"0.54877806",
"0.54864264",
"0.54858506",
"0.54839545",
"0.5482364",
"0.5481938",
"0.54819375",
"0.54759026",
"0.54752576",
"0.5470953"
]
| 0.0 | -1 |
para controlar el salario de Volunteer, no cobra nada o recibe ayuda governal hasta 300 euros, | public void setSueldoBase(int salarioBase) throws Throwable {
int ayuda;
if (salarioBase <= 300) {
ayuda = JOptionPane.showOptionDialog(null, "Ayuda governal", "Tiene ayuda governal?",
JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[] { "No", "Sí" },
"Sí");
this.sueldoBase = ayuda > 0 ? salarioBase : 0;
}
else {
throw new Exception();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Volunteer(int salarioBase) {\n\n\t\tsuper();\n\t\tthis.setCoeficiente(this.COEFICIENTE);\n\n\t\ttry {\n\t\t\tthis.setSueldoBase(salarioBase);\n\t\t} \n\t\tcatch (Throwable e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Volunteer no puede tener salario\");\n\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }",
"public void calcularSalario(){\n // 1% do lucro mensal\n double percentagemLucro = 0.01 * lucroMensal;\n // valor fixo igual ao dobro do dos empregados sem especialização, acrescido\n //de um prémio que corresponde a 1% do lucro mensal nas lojas da região.\n setSalario(1600 + percentagemLucro);\n\n }",
"public void setAvailableduringbooking(int s, int e) {\n for (int i = s; i < e; ++i) {\n availableTime[i] = false;\n }\n\n }",
"@Override\r\n\tpublic void salarioAtual() {\n\t\tSystem.out.print(\"VALOR ATUAL\"+this.valor);\r\n\t\t\r\n\t}",
"@Override\n public void subida(){\n // si es mayor a la eperiencia maxima sube de lo contrario no\n if (experiencia>(100*nivel)){\n System.out.println(\"Acabas de subir de nivel\");\n nivel++;\n System.out.println(\"Nievel: \"+nivel);\n }else {\n\n }\n }",
"public void TemperaturaDentroDoPermitido() {\n\t\tSystem.out.println(\"Temperatura: \" + temperaturaAtual);\n\t\t// verifica se a temperatua esta abaixo do permitido\n\t\tif (temperaturaAtual < temperaturaMinimaPermitida) {\n\t\t\tSystem.out.println(\"Temperatura abaixo do permitido, Alerta!!\");\n\t\t}\n\t\t// verifica se a temperatura esta acima do permitido\n\t\telse if (temperaturaAtual > temperaturaMaximaPermitida) {\n\t\t\tSystem.out.println(\"Temperatura acima do permitido, Alerta!!\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Temperatura OK!!\");\n\t\t}\n\t}",
"@Override\n public void llenardeposito(){\n this.setCombustible(getTankfuel());\n }",
"public void setProvisionTime(java.util.Calendar param){\n localProvisionTimeTracker = true;\n \n this.localProvisionTime=param;\n \n\n }",
"public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }",
"private static void verifPayement(){\n\t\tint x,y, dime;\n\t\tx=jeu.getAssam().getXPion()-1;\n\t\ty=jeu.getAssam().getYPion()-1;\n\t\tint caseInfoTapis = jeu.cases[x][y].getCouleurTapis();\n\t\tif(caseInfoTapis == tour || caseInfoTapis == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tdime = jeu.payerDime(caseInfoTapis,x,y,0,new boolean[7][7]);\n\t\t\tJoueur payeur = jeu.getJoueurs()[tour-1];\n\t\t\tJoueur paye = jeu.getJoueurs()[caseInfoTapis-1];\n\t\t\tif(jeu.payerVraimentDime(payeur,paye,dime)){\n\t\t\t\tjoueurElimine++;\n\t\t\t}\n\t\t\tconsole.afficherPayeurPaye(payeur, paye, dime);\n\t\t}\n\t}",
"public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void testAddVolunteer() {\n\t\tassertEquals(initialJob.getEnrolledVolunteers().size(), 0);\n\t\tinitialJob.addVolunteer((Volunteer) volunteer, WorkLoad.MEDIUM);\n\t\tassertEquals(initialJob.getEnrolledVolunteers().size(), 1);\n\t\t\n\t\t// Attempt to exceed max job duty requirement\n\t\tinitialJob.addVolunteer((Volunteer) volunteer, WorkLoad.MEDIUM);\n\t\tassertEquals(initialJob.getEnrolledVolunteers().size(), 1);\n\t}",
"public static void editLoanCost() {\n //We can only edit loan cost on Videos.\n char[] type = {'v'};\n String oldID = getExistingID(\"Video\", type);\n\n //Validate ID\n if (oldID != null) {\n //Run input validation\n String[] choiceOptions = {\"4\", \"6\"};\n int newLoan = Integer.parseInt(receiveStringInput(\"Enter new Loan Fee:\", choiceOptions, true, 1));\n try {\n //Replace the loan fee\n inv.replaceLoan(oldID, newLoan);\n } catch (IncorrectDetailsException e) {\n System.out.println(Utilities.ERROR_MESSAGE + \" Adding failed due to \" + e + \" with error message: \\n\" + e.getMessage());\n }\n } else System.out.println(Utilities.INFORMATION_MESSAGE + \"Incorrect ID, nothing was changed.\");\n }",
"public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"public void ingresaAdministrativo() {\n\tEstableceDatosAdministrativos();\n\tint cambio=0;\n\tdo {\n\t\t\n\t\ttry {\n\t\t\tsetMontoCredito(Double.parseDouble(JOptionPane.showInputDialog(\"Ingrese el monto del credito (�3 600 000 maximo)\")));\n\t\t\tcambio=1;\n\t\t\tif(getMontoCredito()<0||getMontoCredito()>3600000) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"El monto debe ir de �0 a �3600000\");\n\t\t\t}\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Ingrese solo numeros\");\n\t\t}\n\t}while(getMontoCredito()<0||getMontoCredito()>3600000||cambio==0);\n\tsetInteres(12);\n\tsetPlazo(60);\n\tsetCuotaPagar(calculoCuotaEspecialOrdinario());\n\testableceEquipoComputo();\n}",
"public void daiMedicina() {\n System.out.println(\"Vuoi curare \" + nome + \" per 200 Tam? S/N\");\n String temp = creaturaIn.next();\n if (temp.equals(\"s\") || temp.equals(\"S\")) {\n puntiVita += 60;\n soldiTam -= 200;\n }\n checkStato();\n }",
"public String accionemergencia(){\n\t\tString resp=\"\";\n\t\tif(puntosvida<=5 && acc!=1){\n\t\t\tpuntosvida=puntosvida+15;\n\t\t\tresp=\"\\nAccion de emergencia \"+ tipo +\"activada vida +15\";\n\t\t\tacc=1;\n\t\t}\n\t\treturn resp;\n\t}",
"public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }",
"public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}",
"void Planificar(Reserva unaReserva);",
"protected void onSetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"protected void onSetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void sendeRate(String spieler);",
"private static void afisareSubsecventaMaxima() {\n afisareSir(citireSir().SecvMax());\n }",
"void setOverdraftLimit(double overdraftLimit) {\n\t\tSystem.out.println(\"Your account is not current account.\");\n\t}",
"public void startAgentTime() {\n Timer timer = new Timer(SIBAConst.TIME_AGENT_CHANGE_FOR_HOUR, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n \t\n \tCalendar c = Calendar.getInstance();\n int minutos = c.get(Calendar.MINUTE);\n int hora = c.get( (Calendar.HOUR_OF_DAY)); \n hora = hora * 60;\n if (minutos >= 30 && minutos <= 59)\n {hora +=30;\t\n }\n if (hora > ctrlHours)\n {ctrlHours = hora;\n //activada bandera de modificacion de programacion\n activatedScheduleChange = true;\n }\n else\n { if (hora < ctrlHours)\n \t ctrlHours = 0;\n }\n \t\n \t\n \n }\n });\n timer.start();\n }",
"@Override\n public void setExperiencia(){\n experiencia1=Math.random()*50*nivel;\n experiencia=experiencia+experiencia1;\n subida();\n }",
"public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }",
"void setSalario(double salario);",
"public void grantTickets(){\n //45mins\n if (tempTime >= 10){\n addTicket();\n }\n tempTime = 0;\n }",
"public void controllore() {\n if (puntiVita > maxPunti) puntiVita = maxPunti;\n if (puntiFame > maxPunti) puntiFame = maxPunti;\n if (puntiFelicita > maxPunti) puntiFelicita = maxPunti;\n if (soldiTam < 1) {\n System.out.println(\"Hai finito i soldi\");\n System.exit(3);\n }\n //controlla che la creatura non sia morta, se lo è mette sonoVivo a false\n if (puntiVita <= minPunti && puntiFame <= minPunti && puntiFelicita <= minPunti) sonoVivo = false;\n }",
"@Override\n\tpublic void landedOn() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(300);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 300 dollars by landing on Bonus Square\");\n\t\tMonopolyGameController.allowCurrentPlayerToEndTurn();\n\n\t}",
"@Test\n\tpublic void deveAtualizarSaldoAoEcluirMovimentacao(){\n\t\tAssert.assertEquals(\"534.00\", home.obterSaldoConta(\"Conta para saldo\"));\n\t\t\n\t\t//ir para resumo\n\t\tmenuSB.acessarResumo();\n\t\t\n\t\t//excluir Movimentacao 3\n\t\tresumo.excluirMovimentacao(\"Movimentacao 3, calculo saldo\");\n\t\t\n\t\t//validar a mensagem \"Movimentação removida com sucesso\"\n\t\tAssert.assertTrue(resumo.existeElementoPorTexto(\"Movimentação removida com sucesso!\"));\n\t\t\n\t\t//voltar home\n\t\tmenuSB.acessarHome();\n\t\t\n\t\t//atualizar saldos\n\t\tesperar(1000);\n\t\thome.scroll(0.2, 0.9);\n\t\t\n\t\t//verificar saldo = -1000.00\n\t\tAssert.assertEquals(\"-1000.00\", home.obterSaldoConta(\"Conta para saldo\"));\n\t}",
"protected void incrementarSalario(){\n this.setSalario(getSalario() * 1.5);\n\n }",
"public boolean ingresarNuevoArticuloAlTicket(Ticket ticket, Articulo articulo, Usuario usuario, boolean esArticuloInicial) {\n try {\n ticket.setFechaDeModificacion(new Date());\n //Se determina el tiempo de actualizacion segun el SLA\n int tiempoDeActualizacion = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTiempoDeActualizacionDeEscalacion();\n Calendar c = Calendar.getInstance();\n //c = Calendar.getInstance();\n c.add(Calendar.HOUR, tiempoDeActualizacion);\n //Se hacen verificaciones por tipo de disponibilidad es decir 24x7 o 8x5\n int horaActual = c.get(Calendar.HOUR_OF_DAY);\n int diaDeLaSemana = c.get(Calendar.DAY_OF_WEEK);\n if (ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTipoDisponibilidadid().getDisponibilidad().equals(\"8x5\") && (diaDeLaSemana == Calendar.SATURDAY || diaDeLaSemana == Calendar.SUNDAY || (diaDeLaSemana == Calendar.FRIDAY && horaActual > 17))) {\n if (diaDeLaSemana == Calendar.FRIDAY) {\n c.add(Calendar.DAY_OF_MONTH, 3);\n } else if (diaDeLaSemana == Calendar.SATURDAY) {\n c.add(Calendar.DAY_OF_MONTH, 2);\n } else {\n c.add(Calendar.DAY_OF_MONTH, 1);\n }\n c.set(Calendar.HOUR_OF_DAY, 8);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n } else if (ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTipoDisponibilidadid().getDisponibilidad().equals(\"8x5\") && (horaActual < 8 || horaActual > 17) && (diaDeLaSemana != Calendar.SATURDAY && diaDeLaSemana != Calendar.SUNDAY)) {\n if (horaActual > 17) {\n c.add(Calendar.DAY_OF_MONTH, 1);\n }\n c.set(Calendar.HOUR_OF_DAY, 8);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n }\n ticket.setFechaDeProximaActualizacion(c.getTime());\n this.ticketFacade.edit(ticket);\n //Se actualiza el notificador\n Timer tarea = this.notificadorServicio.getTareaInfoById(\"t_update\" + ticket.getTicketNumber());\n if (tarea != null) {\n TareaTicketInfo info = (TareaTicketInfo) tarea.getInfo();\n info.setStartDate(c.getTime());\n info.setHour(String.valueOf(c.get(Calendar.HOUR)));\n info.setMinute(String.valueOf(c.get(Calendar.MINUTE)));\n info.setSecond(String.valueOf(c.get(Calendar.SECOND)));\n this.notificadorServicio.updateJob(info);\n }\n articulo.setDe(usuario);\n articulo.setPara(ticket.getUsuarioidcreador());\n StringBuilder cc = new StringBuilder();\n List<String> emails = contactosDeTicket(ticket, true);\n int i = 0;\n for (String email : emails) {\n if (i++ < emails.size()) {\n cc.append(email).append(\";\");\n }\n }\n articulo.setCopia(cc.toString());\n articulo.setTicketticketNumber(ticket);\n articulo.setFechaDeCreacion(new Date());\n articulo.setOrden(this.articuloFacade.obtenerOrdenDeArticuloTicket(ticket));\n articuloFacade.create(articulo);\n HistorialDeTicket historialDeTicket = new HistorialDeTicket();\n historialDeTicket.setEventoTicketcodigo(this.eventoTicketFacade.find(2));\n historialDeTicket.setOrden(this.historialDeTicketFacade.obtenerOrdenDeHistorialDeTicket(ticket));\n historialDeTicket.setTicketticketNumber(ticket);\n historialDeTicket.setFechaDelEvento(new Date());\n historialDeTicket.setUsuarioid(usuario);\n\n //Se envía un correo por ticket nuevo\n UtilidadDeEmail utilidadDeCorreoElectronico = new UtilidadDeEmail();\n DatosSinetcom datosSinetcom = this.datosSinetcomFacade.find(\"1791839692001\");\n if (esArticuloInicial) {\n //Se envia el correo electrónico notificando a todos los interesados \n utilidadDeCorreoElectronico.enviarMensajeConAdjunto(datosSinetcom.getEmailNoResponder(), \"[email protected]\", \"Nueva incidencia - Caso# \" + ticket.getTicketNumber(), crearCuerpoDeCorreoNuevoTicket(ticket, articulo, false), contactosDeTicket(ticket, true), articulo.getContenidoAdjunto() != null ? articulo.getContenidoAdjunto() : null, articulo.getContenidoAdjunto() != null ? ticket.getTicketNumber() + \"_\" + articulo.getId() + \".\" + articulo.getExtensionArchivo() : null);\n //Se envia un correo a todos los tecnicos de Sinetcom\n utilidadDeCorreoElectronico.enviarMensajeConAdjunto(datosSinetcom.getEmailNoResponder(), \"[email protected]\", \"Nueva incidencia - Caso# \" + ticket.getTicketNumber(), crearCuerpoDeCorreoNuevoTicket(ticket, articulo, true), contactosDeTicket(ticket, false), articulo.getContenidoAdjunto() != null ? articulo.getContenidoAdjunto() : null, articulo.getContenidoAdjunto() != null ? ticket.getTicketNumber() + \"_\" + articulo.getId() + \".\" + articulo.getExtensionArchivo() : null);\n } else {\n //Se envia un correo electrónico del nuevo articulo\n utilidadDeCorreoElectronico.enviarMensajeConAdjunto(datosSinetcom.getEmailNoResponder(), \"[email protected]\", \"Actualización - Caso# \" + ticket.getTicketNumber(), crearCuerpoDeCorreoNuevoArticuloEnTicket(articulo), contactosDeTicket(ticket, true), articulo.getContenidoAdjunto() != null ? articulo.getContenidoAdjunto() : null, articulo.getContenidoAdjunto() != null ? ticket.getTicketNumber() + \"_\" + articulo.getId() + \".\" + articulo.getExtensionArchivo() : null);\n }\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n\n return true;\n }",
"@Override\n\tpublic void acelerar() {\n\t\t// TODO Auto-generated method stub\n\t\t\t\tvelocidadActual += 40;\n\t\t\t\tif(velocidadActual>250) {\n\t\t\t\t\tvelocidadActual = 250;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdepositoActual -= 10;\n\t\t\t\tSystem.out.println(\"Velocidad del ferrari: \"+velocidadActual);\n\t}",
"protected void onGetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"protected void onGetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"@Override\n public double salario() {\n return 2600 * 1.10;\n }",
"public void startAgentAlertChange() {\n // referencia la fecha que determina la alerta actual\n Timer timer = new Timer(SIBAConst.TIME_AGENT_ALERT_CHANGE, new ActionListener() {\n \t\n public void actionPerformed(ActionEvent e) {\n \t//System.out.println(\"Entro aqui general 900: \"+controlFlagGeneral.alerta());\n \t//System.out.println(\"Entro aqui personal 900: \"+controlFlagPersonal.alerta());\n //if (controlFlagGeneral.alerta() || getControlFlagPersonal().alerta()) {\n if (controlFlagGeneral.alerta().equals(true)) { \t\n // activada banderas de carga de nuevos archivos XML\n \tSystem.out.println(\"Se ha modificado la bandera General\");\n removeLastProgramation = true;\n alreadyChange = false;\n }\n else if(controlFlagPersonal.alerta().equals(true))\n {\n // activada banderas de carga de nuevos archivos XML\n \tSystem.out.println(\"Se ha modificado la bandera Personal\");\n removeLastProgramation = true;\n alreadyChange = false;\n }\n else\n {\n \tSystem.out.println(\"No se han modificado las banderas\");\n }\n }\n });\n timer.start();\n }",
"public void atualizarStatusSolicitacaoServicoSara() {\n\t\tList<SolicitacaoServico> solicitacoes = new ArrayList<>();\n\t\ttry {\n\t\tgetSolicitacaoServicoDAO().beginTransaction();\n\t\tsolicitacoes = getSolicitacaoServicoDAO().getSolicitacaoServicoNaoFinalizadas();\n\t\tgetSolicitacaoServicoDAO().closeTransaction();\n\t\t\n\t\tfor(SolicitacaoServico s : solicitacoes) {\n\t\t\tif(s.getStatusServicos() != StatusServicos.CRIA_OS_SARA) {\n\t\t\tString status = getSolicitacaoServicoDAO().getStatusServerSara(s.getSolicitacao().getNumeroATI(), s.getOS());\n\t\t\tif(status.equals(\"OS_GERADA\")) {\n\t\t\t\ts.setStatusServicos(StatusServicos.OS_GERADA);\n\t\t\t}else \n\t\t\t\tif(status.equals(\"OS_INICIADA\")) {\n\t\t\t\t\ts.setStatusServicos(StatusServicos.OS_INICIADA);\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t\tif(status.equals(\"FINALIZADO\")) {\n\t\t\t\t\t\ts.setStatusServicos(StatusServicos.FINALIZADO);\n\t\t\t\t\t}\n\t\t\tgetDAO().beginTransaction();\n\t\t\talterar(s.getSolicitacao(), \"Alteração de Status do serviço\",s.getSolicitacao().getUltResponsavel());\n\t\t\tgetDAO().commitAndCloseTransaction();\n\t\t\t}\n\t\t\n\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"public void verSesionAdministrador(Administrador actualadmin)\r\n\t{\r\n\t\tSesion sesio = new Sesion();\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tString fechasesion = calendario.get(Calendar.YEAR)+\"-\"+(calendario.get(Calendar.MONTH)+1)+\"-\"+calendario.get(Calendar.DAY_OF_MONTH);\r\n\t\tString horainicial = calendario.get(Calendar.HOUR_OF_DAY)+\":\"+calendario.get(Calendar.MINUTE)+\":\"+calendario.get(Calendar.SECOND);\r\n\t\tsesio.setFechasesion(fechasesion);\r\n\t\tsesio.setHorainicial(horainicial);\r\n\t\tsesio.setHorafinal(\"NULL\");\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tSesionBD.insertar(sesio, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tSesion sesioningr = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tsesioningr = SesionBD.buscarFechaHora(fechasesion, horainicial, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(sesioningr != null)\r\n\t\t{\r\n\t\t\tSesionAdministrador nuevasesion = new SesionAdministrador();\r\n\t\t\tnuevasesion.setIdsesion(sesioningr.getIdsesion());\r\n\t\t\tnuevasesion.setIdadministrador(actualadmin.getIdadmin());\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tConector conector = new Conector();\r\n\t\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\t\tSesionAdministradorBD.insertar(nuevasesion, conector);\r\n\t\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t\t\t\r\n\t\t\t\tsesionadministrador = new SesionAdministradorI(this, actualadmin, sesioningr);\r\n\t\t\t\tsesionadministrador.setVisible(true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void toilette() {\n if (!autoriseOperation()) {\n return;\n }\n incrSale(-3);\n incrHumeur(1);\n incrXp(1);\n\n setChanged();\n notifyObservers();\n }",
"private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }",
"public void IngresarGasolina() throws InterruptedException{\n System.out.println(\"Buen dia, lo atiende \"+nombre+\". Ingrese por favor la cantidad de litros que desea\");\r\n String litros = sc.nextLine();\r\n System.out.println(\"Muy bien\");\r\n Thread.sleep(1000);\r\n String tipo = null;\r\n do{\r\n System.out.println(\"¿Que tipo de gasolina desea?, indique magna o premium\");\r\n tipo = sc.nextLine();\r\n }while((!tipo.equalsIgnoreCase(\"magna\"))&&(!tipo.equalsIgnoreCase(\"premium\")));\r\n System.out.println(\"Por favor abra la tapa para ingresar la manguera\");\r\n Thread.sleep(2000);\r\n System.out.println(\"Se ha ingresado la manguera al carro\");\r\n Thread.sleep(2000);\r\n System.out.println(\"Inicia el deposito de gasolina\");\r\n Thread.sleep(2000);\r\n System.out.println(\"Se han cargado los \"+litros+\" que pidio\");\r\n \r\n }",
"public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }",
"public UserEmitirLicencia() {\n //Inicializacion de la ventana\n ImageIcon logo = new ImageIcon(\"src/res/drawable/sfc_logo.jpg\");\n Image icon = logo.getImage();\n this.setIconImage(icon);\n initComponents();\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n double width = screenSize.getWidth()/2;\n double height = screenSize.getHeight()/2;\n this.setLocation((int)width-this.getWidth()/2,(int)height-this.getHeight()/2);\n this.setLocationRelativeTo(null);\n \n radioGroup.add(radioA);\n radioGroup.add(radioB);\n radioGroup.add(radioC);\n radioGroup.add(radioD);\n radioGroup.add(radioE);\n radioGroup.add(radioF);\n radioGroup.add(radioG);\n \n txtAreaClaseLicencia.setBackground(Color.LIGHT_GRAY);\n \n tableTitulares.setRowSelectionAllowed(true);\n tableTitulares.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n tableTitulares.getTableHeader().setReorderingAllowed(false);\n \n tableTitulares.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\n public void valueChanged(ListSelectionEvent event) {\n \n if(tableTitulares.getSelectedRow() == -1) return;\n \n //btnEmitirLicencia.setEnabled(false);\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n txtFiltro.setText(\"\");\n txtFiltro.setEnabled(false);\n btnAplicarFiltro.setEnabled(false);\n btnLimpiarFiltro.setEnabled(true);\n \n radioA.setEnabled(true);\n radioB.setEnabled(true);\n radioC.setEnabled(true);\n radioD.setEnabled(true);\n radioE.setEnabled(true);\n radioF.setEnabled(true);\n radioG.setEnabled(true);\n \n radioGroup.clearSelection();\n txtAreaClaseLicencia.setText(\"\");\n \n Titular t = titulares.get(tableTitulares.getSelectedRow());\n labelNombre.setText(\"Nombre: \"+t.getNombre());\n labelApellido.setText(\"Apellido: \"+t.getApellido());\n labelTipoNroDocumento.setText(\"Documento: \"+t.getTipoDocumento().toString()+\" \"+t.getCodigoDocumento());\n labelDomicilio.setText(\"Domicilio: \"+t.getDomicilio());\n labelFechaNacimiento.setText(\"Fecha de nacimiento: \"+simpleDateFormat.format(t.getFechaNacimiento()));\n String factor;\n if(t.isFactor()) factor=\"+\";\n else factor=\"-\";\n labelGrupoFactorSanguineo.setText(\"Grupo Sanguineo: \"+t.getGrupoSanguineo().toString()+\" \"+factor);\n String donante;\n if(t.isDonanteOrganos()) donante=\"Donante de Órganos: SI\";\n else donante=\"Donante de Órganos: NO\";\n labelDonanteOrganos.setText(donante);\n lblObservaciones.setText(\"Observaciones: \"+t.getObservaciones());\n \n }\n });\n \n }",
"@Override\n\tpublic void passedBy() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(250);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 250 dollars by landing on Bonus Square\");\n\n\t}",
"public void becomePremium() {\n\t\tif (this.account >= 100 && this.premium == false) {\n\t\t\tthis.account -= 100;\n\t\t\tthis.premium = true;\n\t\t\tSystem.out.println(\"Premium transaction successful\");\n\n\t\t} else if (this.premium == true) {\n\t\t\tSystem.out.println(\"They are already a premium user!\");\n\n\t\t} else {\n\t\t\tSystem.err.println(\n\t\t\t\t\t\"Error - not enough funds in account.\\nPremium charge is $100\\nBalance: $\" + this.getBalance() + \"\\nPlease top up account manually.\\nReturning to main menu.\");\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tString[] horasSesiones = {};\r\n\t\tSala sala = new Sala(\"Tiburon\", horasSesiones, 9, 5);\r\n\r\n\t\tsala.incluirSesion(\"20:00\");\r\n\r\n\t\t/*for (String hora : sala.getHorasDeSesionesDeSala())\r\n\t\t\tSystem.out.println(hora);*/\r\n\t//\tsala.borrarSesion(\"15:00\"); // no hace nada\r\n\t\t//sala.borrarSesion(\"20:00\");\r\n\r\n\t\tfor (String hora : sala.getHorasDeSesionesDeSala())\r\n\t\t\tSystem.out.println(hora);\r\n\r\n\t\t// necesitamos la ventanilla para mostrar el estado de la sesion\r\n\t\tVentanillaVirtualUsuario ventanilla = new VentanillaVirtualUsuario(null, true);\r\nSystem.out.println(sala.sesiones.size());\r\nSystem.out.print(sala.getEstadoSesion(1));\r\n\t\tsala.comprarEntrada(1, 2, 1);\r\n\t\tsala.comprarEntrada(1, 9, 3);\r\n\r\n\t\tint idVenta = sala.getIdEntrada(1, 9, 3);\r\n\r\n\t\tSystem.out.println(\"Id de venta es:\" + idVenta);\r\n\r\n\t\tButacasContiguas butacas = sala.recomendarButacasContiguas(1, 1);\r\n\r\n\t\tsala.comprarEntradasRecomendadas(1, butacas);\r\n\r\n\t\tint idVenta1 = sala.getIdEntrada(1, butacas.getFila(), butacas.getColumna());\r\n\r\n\t\tsala.recogerEntradas(idVenta1, 1);\r\n\r\n\t\tventanilla.mostrarEstadoSesion(sala.getEstadoSesion(1));\r\n\r\n\t\tSystem.out.println(\"No. de butacas disponibles: \" + sala.getButacasDisponiblesSesion(1));\r\n\r\n\t\tSystem.out.println(\"Tickets :\" + sala.recogerEntradas(idVenta, 1));\r\n\r\n\t\tSystem.out.println(\"Tickets recomendados:\" + sala.recogerEntradas(idVenta1, 1));\r\n\t\t//System.out.println(sala.sesiones.size());\r\n\t\t//sala.incluirSesion(\"10:56\");\r\n\t\t//sala.incluirSesion(\"10:57\");\r\n\t\t//System.out.println(sala.sesiones.size());\r\n\t\t/*{\r\n\t\t\tfor (int i = 0; i < sala.getHorasDeSesionesDeSala().length; i++) {\r\n\t\t\t\tSystem.out.println(sala.getHorasDeSesionesDeSala()[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}*/\r\n\t\t\r\n\t}",
"public void setDetailsOfOwner(String ownerUserID, String status, boolean occasional, int membersAmount, int amountInoccasional) {// in status i want to know if\n\t\tArrayList<String> tempArrayList = new ArrayList<String>(); // the user owner is a\n\t\t// member user or guide\n\t\tm_ownerUserID = ownerUserID;\n\t\tm_status = status;\n\t\tm_occasional = occasional;\n\t\tm_amountOfPeople = membersAmount;\n\t\tif (m_occasional) {\n\t\t\ttxtCrumViaHomePage.setVisible(true);\n\t\t\ttempArrayList.add(m_parkName);\n\t\t\tsetParkCombo(tempArrayList);\n\t\t\tparkNameCombo.setValue(m_parkName);\n\t\t\tpickDatePicker.setValue(LocalDate.now());\n\t\t\tsetHourCombo(null, null);\n\n\t\t\tsetNumberOfVistors(amountInoccasional);\n\t\t\tpickDatePicker.setValue(LocalDate.now());\n\t\t\tpickDatePicker.setDayCellFactory(new Callback<DatePicker, DateCell>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic DateCell call(DatePicker param) {\n\t\t\t\t\treturn new DateCell() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void updateItem(LocalDate item, boolean empty) {\n\t\t\t\t\t\t\tsuper.updateItem(item, empty);\n\t\t\t\t\t\t\tLocalDate today = LocalDate.now();\n\t\t\t\t\t\t\tsetDisable(item.compareTo(today) != 0);\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\tif (status.equals(\"member\")) {\n\t\t\t\tMemberOrderlab.setVisible(true);\n\t\t\t}\n\n//\t\t\t setNumberOfVistors(\"free place\");//for occasional visit i need to set the number of visitors to the one i get from the previous page\n\n\t\t} else {\n\t\t\ttxtCrum.setVisible(true);\n\t\t\tsetHourCombo(new Time(8, 0, 0), new Time(16, 29, 0));//the time coustumer can enter to the patk\n\t\t\ttempArrayList.add(\"Carmel Park\");\n\t\t\ttempArrayList.add(\"Tal Park\");\n\t\t\ttempArrayList.add(\"Jordan Park\");\n\t\t\tsetParkCombo(tempArrayList);\n\t\t\tpickDatePicker.setDayCellFactory(new Callback<DatePicker, DateCell>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic DateCell call(DatePicker param) {\n\t\t\t\t\treturn new DateCell() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void updateItem(LocalDate item, boolean empty) {\n\t\t\t\t\t\t\tsuper.updateItem(item, empty);\n\t\t\t\t\t\t\tLocalDate today = LocalDate.now();\n\t\t\t\t\t\t\tLocalDate tommorow = today.minusDays(-2);\n\t\t\t\t\t\t\tsetDisable(item.compareTo(tommorow) < 0);\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\tif (status.equals(\"member\")) {\n\t\t\t\tsetNumberOfVistors(membersAmount);\n\t\t\t\tMemberOrderlab.setVisible(true);\n\t\t\t} else {\n\t\t\t\tsetNumberOfVistors(15);\n\t\t\t}\n\t\t}\n\t\tif (m_status.equals(\"guide\")) {\n\t\t\tguideWelcomeText.setVisible(true);\n\t\t\tif (occasional == false) {\n\t\t\t\tpayTimeCheckBox.setVisible(true);\n\t\t\t}\n\t\t}\n\t\tif(m_status.equals(Role.Member.toString().toLowerCase())) {\n\t\t\tsetNumberOfVistors(m_amountOfPeople);\n\t\t}\n\t}",
"private void modificarReserva() throws Exception {\r\n\t\tif (mngRes.existeReservaPeriodo(getSitio().getId())) {\r\n\t\t\tif (mayorEdad) {\r\n\t\t\t\tmngRes.modificarReserva(getEstudiante(), periodo.getPrdId(), getSitio(), null);\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t} else {\r\n\t\t\t\tmngRes.modificarReserva(getEstudiante(), periodo.getPrdId(), getSitio(),\r\n\t\t\t\t\t\tgetDniRepresentante() + \";\" + getNombreRepresentante());\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t}\r\n\t\t\tMensaje.crearMensajeINFO(\"Reserva realizada correctamente, no olvide descargar su contrato.\");\r\n\t\t} else {\r\n\t\t\tMensaje.crearMensajeWARN(\"El sitio seleccionado ya esta copado, favor eliga otro.\");\r\n\t\t}\r\n\t}",
"void setUserVoteSalaryWeeklyDayOfWeek(DayOfWeek voteSalaryDayOfWeek);",
"public void faiLavoro(){\n System.out.println(\"Scrivere 1 per Consegna lunga\\nSeleziona 2 per Consegna corta\\nSeleziona 3 per Consegna normale\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n soldiTam += 500;\n puntiVita -= 40;\n puntiFame -= 40;\n puntiFelicita -= 40;\n }\n case 2 -> {\n soldiTam += 300;\n puntiVita -= 20;\n puntiFame -= 20;\n puntiFelicita -= 20;\n }\n case 3 -> {\n soldiTam += 100;\n puntiVita -= 10;\n puntiFame -= 10;\n puntiFelicita -= 10;\n }\n }\n checkStato();\n }",
"private void ingresarReserva() throws Exception {\r\n\t\tif (mngRes.existeReservaPeriodo(getSitio().getId())) {\r\n\t\t\tif (mayorEdad) {\r\n\t\t\t\tmngRes.crearReserva(getEstudiante(), getSitio(), periodo.getPrdId(), null);\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t} else {\r\n\t\t\t\tmngRes.crearReserva(getEstudiante(), getSitio(), periodo.getPrdId(),\r\n\t\t\t\t\t\tgetDniRepresentante() + \";\" + getNombreRepresentante());\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t}\r\n\t\t\tMensaje.crearMensajeINFO(\"Reserva realizada correctamente, no olvide descargar su contrato.\");\r\n\t\t} else {\r\n\t\t\tMensaje.crearMensajeWARN(\"El sitio seleccionado ya esta copado, favor eliga otro.\");\r\n\t\t}\r\n\t}",
"public boolean crearNuevoTicket(Ticket ticket, Usuario usuario) {\n\n try {\n\n //Se determina el tiempo de vida del ticket según el SLA\n int tiempoDeVida = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTiempoDeSolucion();\n Calendar c = Calendar.getInstance();\n c.add(Calendar.HOUR, tiempoDeVida);\n ticket.setTiempoDeVida(c.getTime());\n //Se indica la fecha máxima de cierre\n ticket.setFechaDeCierre(c.getTime());\n //Se indica la fecha actual como fecha de creacion\n ticket.setFechaDeCreacion(new Date());\n //se ingresa la fecha de última modificación\n ticket.setFechaDeModificacion(ticket.getFechaDeCreacion());\n //Se determina el tiempo de actualizacion segun el SLA\n //int tiempoDeActualizacion = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTiempoDeActualizacionDeEscalacion();\n //Información del ticket y el sla\n Sla ticketSla = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid();\n PrioridadTicket prioridadTicket = ticket.getPrioridadTicketcodigo();\n int tiempoDeActualizacion = prioridadTicket.getValor() == 1 ? ticketSla.getTiempoRespuestaPrioridadAlta() : prioridadTicket.getValor() == 2 ? ticketSla.getTiempoRespuestaPrioridadMedia() : ticketSla.getTiempoRespuestaPrioridadBaja();\n //Se añade el tiempo de actualización para pos-validación según SLA\n c = Calendar.getInstance();\n c.add(Calendar.HOUR, tiempoDeActualizacion);\n //Se hacen verificaciones por tipo de disponibilidad es decir 24x7 o 8x5\n int horaActual = c.get(Calendar.HOUR_OF_DAY);\n int diaDeLaSemana = c.get(Calendar.DAY_OF_WEEK);\n if (ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTipoDisponibilidadid().getDisponibilidad().equals(\"8x5\") && (diaDeLaSemana == Calendar.SATURDAY || diaDeLaSemana == Calendar.SUNDAY || (diaDeLaSemana == Calendar.FRIDAY && horaActual > 17))) {\n if (diaDeLaSemana == Calendar.FRIDAY) {\n c.add(Calendar.DAY_OF_MONTH, 3);\n } else if (diaDeLaSemana == Calendar.SATURDAY) {\n c.add(Calendar.DAY_OF_MONTH, 2);\n } else {\n c.add(Calendar.DAY_OF_MONTH, 1);\n }\n c.set(Calendar.HOUR_OF_DAY, 8);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n } else if (ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTipoDisponibilidadid().getDisponibilidad().equals(\"8x5\") && (horaActual < 8 || horaActual > 17) && (diaDeLaSemana != Calendar.SATURDAY && diaDeLaSemana != Calendar.SUNDAY)) {\n if (horaActual > 17) {\n c.add(Calendar.DAY_OF_MONTH, 1);\n }\n c.set(Calendar.HOUR_OF_DAY, 8);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n }\n ticket.setFechaDeProximaActualizacion(c.getTime());\n if (ticket.getFechaDeProximaActualizacion().compareTo(ticket.getFechaDeCierre()) > 0) {\n Calendar cierre = Calendar.getInstance();\n cierre.setTime(c.getTime());\n cierre.add(Calendar.HOUR, tiempoDeVida);\n ticket.setFechaDeCierre(cierre.getTime());\n }\n //Se indica la persona que crea el ticket\n ticket.setUsuarioidcreador(usuario);\n //Se indica el usuario propietario por defecto y el responsable (Soporte HELPDESK)\n Usuario usuarioHelpdek = this.usuarioFacade.obtenerUsuarioPorCorreoElectronico(\"[email protected]\");\n ticket.setUsuarioidpropietario(usuarioHelpdek);\n ticket.setUsuarioidresponsable(usuarioHelpdek);\n //Se indica el estado actual del ticket\n EstadoTicket estadoNuevo = this.estadoTicketFacade.find(1);\n ticket.setEstadoTicketcodigo(estadoNuevo);\n //Creamos el ticket\n this.ticketFacade.create(ticket);\n //Creamos el Notificador\n TareaTicketInfo tareaTicketInfo = new TareaTicketInfo(\"t_sla\" + ticket.getTicketNumber(), \"Notificador SLA ticket# \" + ticket.getTicketNumber(), \"LoteTareaNotificarSLA\", ticket);\n //Información del ticket y el sla\n //Sla ticketSla = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid();\n //PrioridadTicket prioridadTicket = ticket.getPrioridadTicketcodigo();\n String hora = prioridadTicket.getValor() == 1 ? String.valueOf(ticketSla.getTiempoRespuestaPrioridadAlta()) : prioridadTicket.getValor() == 2 ? String.valueOf(ticketSla.getTiempoRespuestaPrioridadMedia()) : String.valueOf(ticketSla.getTiempoRespuestaPrioridadBaja());\n //Definir la hora de inicio\n //c = Calendar.getInstance();\n //c.add(Calendar.HOUR, Integer.parseInt(hora));\n c.add(Calendar.MINUTE, -30);\n tareaTicketInfo.setStartDate(c.getTime());\n tareaTicketInfo.setEndDate(ticket.getFechaDeCierre());\n tareaTicketInfo.setSecond(String.valueOf(c.get(Calendar.SECOND)));\n tareaTicketInfo.setMinute(String.valueOf(c.get(Calendar.MINUTE)) + \"/10\");\n tareaTicketInfo.setHour(String.valueOf(c.get(Calendar.HOUR_OF_DAY)));\n tareaTicketInfo.setMonth(\"*\");\n tareaTicketInfo.setDayOfMonth(\"*\");\n tareaTicketInfo.setDayOfWeek(ticketSla.getTipoDisponibilidadid().getDisponibilidad().equals(\"8x5\") ? \"Mon, Tue, Wed, Thu, Fri\" : \"*\");\n tareaTicketInfo.setYear(\"*\");\n tareaTicketInfo.setDescription(\"Tarea SLA para ticket# \" + ticket.getTicketNumber());\n this.notificadorServicio.createJob(tareaTicketInfo);\n\n //Se añade un historico del evento\n HistorialDeTicket historialDeTicket = new HistorialDeTicket();\n historialDeTicket.setEventoTicketcodigo(this.eventoTicketFacade.find(1));\n historialDeTicket.setFechaDelEvento(new Date());\n historialDeTicket.setOrden(this.historialDeTicketFacade.obtenerOrdenDeHistorialDeTicket(ticket));\n historialDeTicket.setUsuarioid(ticket.getUsuarioidcreador());\n historialDeTicket.setTicketticketNumber(ticket);\n this.historialDeTicketFacade.create(historialDeTicket);\n\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n\n return true;\n }",
"@Override\r\n\tpublic int registrarSalidaVehiculo(Vehiculo vehiculo) {\r\n\r\n\t\tSitioParqueoEntidad sitParEntidad = sitioParqueoEntidadService.obtenerSitioParqueo(vehiculo);\r\n\r\n\t\tsitParEntidad.setActivo(false);\r\n\t\tsitParEntidad.setFechaFin(new Date());\r\n\t\tSitioParqueoEntidad sitParEntRet = sitioParqueoEntidadService.liberar(sitParEntidad);\r\n\r\n\t\tadminEstacionamiento.removerSitioParqueo(sitParEntRet);\r\n\r\n\t\tTiempoEstadia tiempoEstadia = Temporizador.calcularTiempoEstadia(sitParEntidad.getFechaInicio());\r\n\t\treturn ReglaEstacionamiento.calcularPrecioParqueo(\r\n\t\t\t\tVehiculoAdapter.getVehiculo(sitParEntRet.getVehiculo()), tiempoEstadia);\r\n\r\n\t}",
"public void soin() {\n if (!autoriseOperation()) {\n return;\n }\n if (tamagoStats.getXp() >= 2) {\n incrFatigue(-3);\n incrHumeur(3);\n incrFaim(-3);\n incrSale(-3);\n incrXp(-2);\n\n if (tamagoStats.getPoids() == 0) {\n incrPoids(3);\n } else if (tamagoStats.getPoids() == TamagoStats.POIDS_MAX) {\n incrPoids(-3);\n }\n\n setEtatPiece(Etat.NONE);\n tamagoStats.setEtatSante(Etat.NONE);\n\n setChanged();\n notifyObservers();\n }\n }",
"public void updateCooldown(User u) {\r\n\t\tfor (int i = 0; i < Main.Bot.cooldown.size(); i++) \r\n\t\t\tif (Main.Bot.cooldown.get(i).hasUser(u) && Main.Bot.cooldown.get(i).t - System.currentTimeMillis() <= 0) \r\n\t\t\t\tMain.Bot.cooldown.remove(i);\r\n\t\t\t\r\n\t\t\r\n\t}",
"public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }",
"public void venceuRodada () {\n this.pontuacaoPartida++;\n }",
"public void sueldo(){\n if(horas <= 40){\n sueldo = horas * cuota;\n }else {\n if (horas <= 50) {\n sueldo = (40 * cuota) + ((horas - 40) * (cuota * 2));\n } else {\n sueldo = ((40 * cuota) + (10 * cuota * 2)) + ((horas - 50) + (cuota * 3));\n }\n }\n\n }",
"private void devolverLivro() throws Exception {\n try {\n long DAY_IN_MS = 1000 * 60 * 60 * 24; // formatar data entrega\n int codigo = Console.scanInt(\"Informe o código da retirada do livro: \");\n retiradaDao = new RetiradaDaoBd();\n Retirada retirada = retiradaDao.procurarPorId(codigo);\n try {\n devolucaoNegocio.salvar(retirada);\n System.out.println(\"Devolucao cadastrado com sucesso!\");\n } catch (Exception ex) {\n UIUtil.mostrarErro(ex.getMessage());\n }\n\n System.out.println(\"Livro \" + retirada.getLivro().getNome() + \" devolvido por \" + retirada.getCliente().getNome());\n } catch (InputMismatchException e) {\n System.err.println(\"ERRO! O ISBN deve ser numérico!\");\n }\n }",
"public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}",
"private void EnterChange() {\r\n\r\n //try block to check if the customer enters an except integer for the Time field\r\n try{\r\n // create a reservation\r\n Reservation p1 = new Reservation(textName.getText(), Integer.parseInt(textTime.getText()));\r\n // TODO: add obj to arraylist\r\n _ReservationList.saveData(p1);\r\n\r\n }\r\n catch (Exception e){\r\n Alert alert = new Alert(Alert.AlertType.ERROR, \"Please type an Integer only. For Example, to book for 7:00 p.m, type just 7.\");\r\n alert.showAndWait();\r\n return;\r\n }\r\n }",
"public void atualizarStatusAgendamento() {\n\n if (agendamentoLogic.editarStatusTbagendamento(tbagendamentoSelected, tbtipostatusagendamento)) {\n AbstractFacesContextUtils.addMessageInfo(\"Status atualizado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao alterar status do agendamento.\");\n }\n }",
"public void inativarMovimentacoes() {\n\n\t\ttry {\n\n\t\t\tif (((auxMovimentacao.getDataMovimentacao())\n\t\t\t\t\t.before(permitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao()))\n\t\t\t\t\t|| (auxMovimentacao.getDataMovimentacao()).equals(\n\t\t\t\t\t\t\tpermitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao())\n\t\t\t\t\t) {\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.MOVIMENTACOES_ANTERIORES);\n\t\t\t} else {\n\n\t\t\t\tDate dataFinal = auxMovimentacao.getDataMovimentacao();\n\t\t\t\tCalendar calendarData = Calendar.getInstance();\n\t\t\t\tcalendarData.setTime(dataFinal);\n\t\t\t\tcalendarData.add(Calendar.DATE, -1);\n\t\t\t\tDate dataInicial = calendarData.getTime();\n\n\t\t\t\tMovimentacao mov = new Movimentacao();\n\t\t\t\tmov = (Movimentacao) movimentacaoAlunoDAO.listarTodos(Movimentacao.class,\n\t\t\t\t\t\t\" a.dataMovimentacao = (select max(b.dataMovimentacao) \"\n\t\t\t\t\t\t\t\t+ \" from Movimentacao b where b.alunoTurma = a.alunoTurma) \"\n\t\t\t\t\t\t\t\t+ \" and a.status is true and a.alunoTurma.status = true and dataMovimentacaoFim = null and a.alunoTurma = \"\n\t\t\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId())\n\t\t\t\t\t\t.get(0);\n\n\t\t\t\tmov.setControle(false);\n\t\t\t\tmov.setDataMovimentacaoFim(dataInicial);\n\t\t\t\tmovimentacaoService.inserirAlterar(mov);\n\n\t\t\t\tAlunoTurma aluno = new AlunoTurma();\n\t\t\t\taluno = daoAlunoTurma.buscarPorId(AlunoTurma.class, movimentacao.getAlunoTurma().getId());\n\t\t\t\taluno.setControle(0);\n\t\t\t\t\n\n\t\t\t\tauxMovimentacao.setAlunoTurma(movimentacao.getAlunoTurma());\n\t\t\t\tauxMovimentacao.setStatus(true);\n\t\t\t\tauxMovimentacao.setControle(false);\n\n\t\t\t\tmovimentacaoService.inserirAlterar(auxMovimentacao);\n\t\t\t\t\n\t\t\t\tif(auxMovimentacao.getSituacao()==5){\n//\t\t\t\t\t\n//\t\t\t\t\tCurso cursoAluno = new Curso();\n//\t\t\t\t\tcursoAluno = daoCurso.buscarPorId(Curso.class, auxMovimentacao.getAlunoTurma().getTurma().getCurso().getId());\n\t\t\t\t\t\n\t\t\t\t\taluno.setSituacao(5);\n\t\t\t\t\taluno.setLiberado(false);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t\t\n\t\t\t\t\t//liberar para responder o questionário\n\t\t\t\t\tAluno alunoResponde = new Aluno(); \n\t\t\t\t\talunoResponde = daoAluno.buscarPorId(Aluno.class, aluno.getAluno().getId());\n\t\t\t\t\t \n\t\t\t\t // email.setCursos(auxMovimentacao.getAlunoTurma().getTurma().getCurso());\n\t\t\t\t\t//email.setTurma(auxMovimentacao.getAlunoTurma().getTurma());\n\t\t\t\t\temail.setEnviado(false);\n\t\t\t\t\temail.setStatus(true);\n\t\t\t\t\temail.setAlunoTurma(auxMovimentacao.getAlunoTurma());\n\t\t\t\t\t\n\t\t\t\t\t//email.setAluno(alunoResponde);\n\t\t\t\t\temailService.inserirAlterar(email);\n\t\t\t\t\t//enviar o email para responder \n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\taluno.setSituacao(0);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t}\n\t\t\t\taluno = new AlunoTurma();\n\t\t\t\temail = new Email();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFecharDialog.fecharDialogAlunoCursoEditar();\n\t\t\t\tFecharDialog.fecharDialogAlunoEditarCurso();\n\t\t\t\tFecharDialog.fecharDialogAlunoTrancamento();\n\t\t\t\talterar(movimentacao);\n\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\t\t\tauxMovimentacao = new Movimentacao();\n\n\t\t\t\talunoTurmaService.update(\" AlunoTurma set permiteCadastroCertificado = 2 where id = \"\n\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId());\n\n\t\t\t\n\t\t\t\tcriarNovoObjetoAluno();\n\t\t\t\tatualizarListas();\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tExibirMensagem.exibirMensagem(Mensagem.ERRO);\n\t\t}\n\n\t}",
"private void doReserve() {\n pickParkingLot();\n pickParkingSpot();\n pickTime();\n pickDuration();\n int amount = pickedparkinglot.getPrice() * pickedduration;\n if (pickedAccount.getBalance() >= amount) {\n currentReservation = new Reservation(pickedparkingspot, pickedAccount, pickedtime, pickedduration);\n validateReservation(currentReservation);\n } else {\n System.out.println(\"Insufficient balance\");\n }\n }",
"public static void main(String[] args) {\n LocalDateTime termino = LocalDateTime.now();\n if (termino.getHour() >= 17) {\n if(termino.getMinute() >= 31){\n System.out.println(\"Ar-Condicionado Ligado + produto.getSala()\");\n }\n }\n if(termino.getDayOfWeek().getValue() != 7){\n //depois de consultar no banco e dar o alerta, mudar o atributo leituraAlerta no banco para true\n \n }\n \n }",
"public void addTimetableButtonAction(final View v) {\n\t\tString personalNumber = ((EditText) findViewById(R.id.personalNumberEditText)).getText()\n\t\t\t\t.toString().toUpperCase();\n\t\tif (!personalNumber.trim().isEmpty()) {\n\t\t\tfinal ProgressDialog dialog = ProgressDialog.show(this, getString(R.string\n\t\t\t\t\t.downloading_dialog_title), getString(R.string.downloading_dialog_text));\n\t\t\t// Sets prefix and school for web address and folders\n\t\t\tString prefix = \"stag-ws\";\n\t\t\tString school = \"\";\n\t\t\tswitch (((Spinner) findViewById(R.id.schoolSpinner)).getSelectedItemPosition()) {\n\t\t\t\tcase 0:\n\t\t\t\t\tschool = \"zcu\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tschool = \"jcu\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tschool = \"avu\";\n\t\t\t\t\tprefix = \"stag\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tschool = \"zcu\";\n\t\t\t\t\tprefix = \"stag-mvso\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tschool = \"slu\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tschool = \"tul\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tschool = \"uhk\";\n\t\t\t\t\tprefix = \"stagws\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tschool = \"ujep\";\n\t\t\t\t\tprefix = \"ws\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tschool = \"upce\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\t\tschool = \"upol\";\n\t\t\t\t\tprefix = \"stagservices\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\t\tschool = \"utb\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\t\tschool = \"vfu\";\n\t\t\t\t\tprefix = \"stagweb\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\t\tschool = \"zcu\";\n\t\t\t\t\tprefix = \"stag-voscb\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 13:\n\t\t\t\t\tschool = \"zcu\";\n\t\t\t\t\tprefix = \"stag-vsss\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 14:\n\t\t\t\t\tschool = \"zcu\";\n\t\t\t\t\tprefix = \"stag-vske\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 15:\n\t\t\t\t\tschool = \"zcu\";\n\t\t\t\t\tprefix = \"stag-vsrr\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfinal String webPage = \"https://\" + prefix + \".\" + school + \"\" + \"\" +\n\t\t\t\t\t\".cz/ws/services/rest/\";\n\t\t\tfinal String timetablePostfix = \"rozvrhy/getRozvrhByStudent?osCislo=\" + personalNumber;\n\t\t\tfinal String finalPersonalNumber = prefix + File.separator + school + File.separator +\n\t\t\t\t\tpersonalNumber;\n\t\t\tfinal String dir = getFilesDir().getAbsolutePath() + File.separator +\n\t\t\t\t\tfinalPersonalNumber;\n\t\t\tnew AsyncTask<Object, Object, Integer>() {\n\n\t\t\t\t@Override\n\t\t\t\tprotected Integer doInBackground(Object... params) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Check network availability\n\t\t\t\t\t\tNetworkInfo info = ((ConnectivityManager) getSystemService(Context\n\t\t\t\t\t\t\t\t.CONNECTIVITY_SERVICE)).getActiveNetworkInfo();\n\t\t\t\t\t\tif (info != null && info.isConnected()) {\n\t\t\t\t\t\t\t// Download timetable and parse it\n\t\t\t\t\t\t\tdowloadFile(dir, \"timetable.xml\", webPage + timetablePostfix);\n\t\t\t\t\t\t\tArrayList<Subject> timetable = ParseXmls.parseTimetable(new\n\t\t\t\t\t\t\t\t\tFileInputStream(dir + File.separator + \"timetable.xml\"));\n\t\t\t\t\t\t\t// Check if it is empty. If so, remove it\n\t\t\t\t\t\t\tif (timetable.isEmpty()) {\n\t\t\t\t\t\t\t\tFile f = new File(dir, \"timetable.xml\");\n\t\t\t\t\t\t\t\tif (f.exists()) f.delete();\n\t\t\t\t\t\t\t\tcancel(false);\n\t\t\t\t\t\t\t\treturn -2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Download syllabuses for subjects in timetable\n\t\t\t\t\t\t\tdownloadSyllabus(dir, webPage, timetable);\n\t\t\t\t\t\t\tIntent result = new Intent();\n\t\t\t\t\t\t\teditTimetable(timetable, result);\n\t\t\t\t\t\t\tresult.putExtra(\"personalNumber\", finalPersonalNumber);\n\t\t\t\t\t\t\tsetResult(RESULT_OK, result);\n\n\t\t\t\t\t\t\t// Modify the config files\n\t\t\t\t\t\t\tSharedPreferences settings = getSharedPreferences(\"timetables\",\n\t\t\t\t\t\t\t\t\tMODE_PRIVATE);\n\t\t\t\t\t\t\tSharedPreferences.Editor editor = settings.edit();\n\t\t\t\t\t\t\tString timetables = settings.getString(\"timetables\", null);\n\t\t\t\t\t\t\tif (timetables != null && !timetables.equals(\"null\")) {\n\t\t\t\t\t\t\t\tif (!timetables.contains(finalPersonalNumber))\n\t\t\t\t\t\t\t\t\ttimetables += \",\" + finalPersonalNumber;\n\t\t\t\t\t\t\t} else timetables = finalPersonalNumber;\n\t\t\t\t\t\t\teditor.remove(\"timetables\").putString(\"timetables\", timetables);\n\t\t\t\t\t\t\teditor.apply();\n\t\t\t\t\t\t\tsettings = PreferenceManager.getDefaultSharedPreferences\n\t\t\t\t\t\t\t\t\t(getApplicationContext());\n\t\t\t\t\t\t\teditor = settings.edit();\n\t\t\t\t\t\t\teditor.remove(\"personalNumber\").putString(\"personalNumber\",\n\t\t\t\t\t\t\t\t\tfinalPersonalNumber);\n\t\t\t\t\t\t\teditor.apply();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcancel(false);\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException | XmlPullParserException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tprotected void onPostExecute(Integer o) {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tprotected void onCancelled(Integer result) {\n\t\t\t\t\tsuper.onCancelled(result);\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t// No internet connection available dialog\n\t\t\t\t\tif (result == -1) {\n\t\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(v.getContext());\n\t\t\t\t\t\tbuilder.setTitle(R.string.error_no_connection).setNeutralButton\n\t\t\t\t\t\t\t\t(android.R.string.ok, null);\n\t\t\t\t\t\tbuilder.create().show();\n\t\t\t\t\t} else if (result == -2) {\n\t\t\t\t\t\t// No timetable dialog\n\t\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(v.getContext());\n\t\t\t\t\t\tbuilder.setTitle(R.string.error_wrong_personal_number).setNeutralButton\n\t\t\t\t\t\t\t\t(android.R.string.ok, null);\n\t\t\t\t\t\tbuilder.create().show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}.execute();\n\t\t} else {\n\t\t\t// No personal number inserted dialog\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(v.getContext());\n\t\t\tbuilder.setTitle(R.string.error_no_personal_number).setNeutralButton\n\t\t\t\t\t(android.R.string.ok, null);\n\t\t\tbuilder.create().show();\n\t\t}\n\t}",
"public int Recebe_salario() {\n\t\treturn 8000;\r\n\t}",
"private void checkin() {\r\n\t\tif (admittedinterns < 20) {\r\n\t\t\tDoctorManage();\r\n\t\t\taddinterns(1);\r\n\t\t\tScreentocharge();\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Por el dia no se admiten mas pacientes\");\r\n\t\t\t\r\n\t\t}\r\n\t}",
"protected void onGetRatedPowerConsumptionOfHPUnitInSummertime(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void verSesionCandidato(Candidato actualcandidat)\r\n\t{\r\n\t\tSesion sesio = new Sesion();\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tString fechasesion = calendario.get(Calendar.YEAR)+\"-\"+(calendario.get(Calendar.MONTH)+1)+\"-\"+calendario.get(Calendar.DAY_OF_MONTH);\r\n\t\tString horainicial = calendario.get(Calendar.HOUR_OF_DAY)+\":\"+calendario.get(Calendar.MINUTE)+\":\"+calendario.get(Calendar.SECOND);\r\n\t\tsesio.setFechasesion(fechasesion);\r\n\t\tsesio.setHorainicial(horainicial);\r\n\t\tsesio.setHorafinal(\"NULL\");\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tSesionBD.insertar(sesio, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tSesion sesioningr = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tsesioningr = SesionBD.buscarFechaHora(fechasesion, horainicial, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(sesioningr != null)\r\n\t\t{\r\n\t\t\tSesionCandidato nuevasesion = new SesionCandidato();\r\n\t\t\tnuevasesion.setIdsesion(sesioningr.getIdsesion());\r\n\t\t\tnuevasesion.setIdcandidato(actualcandidat.getIdcandidato());\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tConector conector = new Conector();\r\n\t\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\t\tSesionCandidatoBD.insertar(nuevasesion, conector);\r\n\t\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t\t\t\r\n\t\t\t\tsesioncandidato = new SesionCandidatoI(this, actualcandidat, sesioningr);\r\n\t\t\t\tsesioncandidato.setVisible(true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n Calendar dataVencimento = Calendar.getInstance();\n System.out.printf(\"A data de vencimento do boleto é: %tF\\n\", dataVencimento);\n\n // Pegando a data do vencimento do boleto e adicionando 10 dias para que seja a data limite de pagamento sem juros.\n dataVencimento.add(Calendar.DATE, 10);\n System.out.printf(\"A data limite para fazer o pagamento sem juros é: %tF\\n\", dataVencimento);\n\n /*\n Fazendo a verificação de quando ocorrerá o vencimento\n Caso seja em um sábado, a data de vencimento terá um acréscimo de 2 dias, para que seja no próximo dia útil (segunda-feira).\n Caso seja em um domingo, a data de vencimento terá um acréscimo de 1 dia, para que seja no próximo dia últil (segunda-feira).\n Caso seja em qualquer outro dia, continua valendo a data inicial.\n */\n if (dataVencimento.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY) {\n dataVencimento.add(Calendar.DATE, 2);\n System.out.printf(\"O vencimento seria em um sábado. Data alterada para a próxima segunda-feira, dia %tF\\n\", dataVencimento.getTime());\n } else if (dataVencimento.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\n dataVencimento.add(Calendar.DATE, 1);\n System.out.printf(\"O vencimento seria em um domingo. Data alterada para a próxima segunda-feira, dia %tF\\n\", dataVencimento.getTime());\n }\n }",
"void passivate();",
"public static void main(String[] args){\n \r\n Log.registroTraza( \"Iniciando ejecución de la tarea SolicitudesAVencerse\");\r\n \r\n String strSQL, strFechaRecibo, strReqRpta, strRadicado, strIdResp = \"\";\r\n int totalSolAlertadas=0, totalSolVencidas=0;\r\n String[] strTemp = null;\r\n int lgTiempoRpta, lgRestante, lgTiempoConfig; \r\n Vector arrConsecutivos = new Vector();\r\n Vector arrFechasCreacion = new Vector();\r\n Vector arrReqRpta = new Vector();\r\n Vector arrTiempoRpta = new Vector();\r\n Vector arrIdsResp = new Vector();\r\n Comunes comun = new Comunes();\r\n Notificacion n = new Notificacion();\r\n Calendar fechaRecibo = null;\r\n Calendar fechaRpta = null;\r\n Calendar fechaActual = null;\r\n \r\n try{\r\n strSQL = \"select g.txtNroDiasAlerta from buzon.buzon_generales g where g.txtCodigo = 'frmGeneral'\";\r\n String[] strDatosGral = GestionSQL.getFila(strSQL, \"Buzon\");\r\n lgTiempoConfig = Integer.parseInt(strDatosGral[0]);\r\n \r\n strSQL = \"select DISTINCT p.txtRadicado, p.dtFechaCreacion, r.txtReqRpta, r.txtTiempoRpta, p.txtNomCargo from buzon_pqrs p INNER JOIN buzon_retroalimentacion r on (p.txtTipoPQRS = r.txtCodigo) where (p.txtIdEstado <> 'AT' and p.txtIdEstado <> 'CPU') ORDER BY CAST(p.txtRadicado AS SIGNED)\";\r\n Vector arrSols = GestionSQL.consultaSQL(strSQL,\"Buzon\",\"ALERTASSOLS\");\r\n \r\n if (arrSols != null){ \r\n for (int i=0;i<arrSols.size();i++){\r\n strTemp = arrSols.get(i).toString().split(\",\");\r\n arrConsecutivos.add(strTemp[0]);\r\n arrFechasCreacion.add(strTemp[1]);\r\n arrReqRpta.add(strTemp[2]);\r\n arrTiempoRpta.add(strTemp[3]); \r\n arrIdsResp.add(strTemp[4]);\r\n } \r\n\r\n //Obtener los feriados.\r\n\r\n Vector arrFechas = new Vector();\r\n strSQL = \"SELECT d.dtFecha from users.users_dias_no_habiles d order by d.dtFecha\";\r\n arrFechas = GestionSQL.consultaSQL(strSQL, \"Users\", \"FECHAS\"); \r\n\r\n for(int i=0;i<arrConsecutivos.size();i++){\r\n strRadicado = arrConsecutivos.get(i).toString(); \r\n strReqRpta = arrReqRpta.get(i).toString();\r\n strIdResp = arrIdsResp.get(i).toString();\r\n lgRestante = 0; \r\n fechaRecibo = null;\r\n fechaRpta = null;\r\n fechaActual = comun.calcularFechaActual();\r\n\r\n if (strReqRpta.equals(\"S\")){ \r\n lgTiempoRpta = Integer.parseInt(arrTiempoRpta.get(i).toString());\r\n fechaRecibo = Calendar.getInstance(); \r\n\r\n strFechaRecibo = arrFechasCreacion.get(i).toString();\r\n strTemp = strFechaRecibo.split(\"-\"); \r\n fechaRecibo.set(Integer.parseInt(strTemp[0]),(Integer.parseInt(strTemp[1])-1),Integer.parseInt(strTemp[2]));\r\n fechaRecibo.set(Calendar.SECOND, 0);\r\n fechaRecibo.set(Calendar.MILLISECOND, 0); \r\n\r\n fechaRpta= Calendar.getInstance();\r\n fechaRpta.set(Calendar.SECOND, 0);\r\n fechaRpta.set(Calendar.MILLISECOND, 0); \r\n fechaRpta = comun.incrementarDiasHabiles(fechaRecibo, lgTiempoRpta, arrFechas); \r\n\r\n lgRestante = (comun.getDiasHabiles(fechaActual, fechaRpta, arrFechas)-1); \r\n\r\n if ((lgRestante <= lgTiempoConfig) && (lgRestante > 0)){ \r\n n.NotificacionSolAVencer(strRadicado, Long.valueOf(lgRestante + 1), strIdResp); \r\n totalSolAlertadas = totalSolAlertadas + 1;\r\n }else{\r\n if (lgRestante<0){\r\n n.NotificacionSolVencidas(strRadicado, fechaRpta, strIdResp);\r\n totalSolVencidas = totalSolVencidas + 1;\r\n } \r\n } \r\n } \r\n }\r\n }\r\n }catch(Exception e){\r\n Log.registroTraza(\"Se generó un error en la tarea SolicitudesAVencerse: \" + e.getMessage());\r\n }\r\n\r\n SimpleDateFormat formato = new SimpleDateFormat(\"hh:mm:ss\");\r\n Log.registroTraza( \"Tarea SolicitudesAVencerse invocada a la hora: \" + formato.format(new Date()) + \". Solicitudes alertadas: \" + totalSolAlertadas + \". Solicitudes vencidas: \" + totalSolVencidas);\r\n\r\n }",
"public void CobaHitung()\n {\n\n\n PrayTimeCounter prayers = new PrayTimeCounter();\n\n prayers.setTimeFormat(prayers.getTime24());\n prayers.setCalcMethod(prayers.getMWL());\n prayers.setAsrJuristic(prayers.getShafii());\n prayers.setAdjustHighLats(prayers.getAngleBased());\n int[] offsets = {0, 0, 0, 0, 0, 0, 0}; // {Fajr,Sunrise,Dhuhr,Asr,Sunset,Maghrib,Isha}\n prayers.tune(offsets);\n\n Date now = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(now);\n\n ArrayList<String> prayerTimes = prayers.getPrayerTimes(cal,\n Anshitu.getApp().getLatitude(), Anshitu.getApp().getLongitude(), Anshitu.getApp().getTimezone());\n subuh.setText(prayerTimes.get(0));\n terbit.setText(prayerTimes.get(1));\n duhur.setText(prayerTimes.get(2));\n ashar.setText(prayerTimes.get(3));\n maghrib.setText(prayerTimes.get(4));\n isya.setText(prayerTimes.get(prayerTimes.size()-1));\n /*ArrayList<String> prayerNames = prayers.getTimeNames();\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerNames);\n jeda.setAdapter(adapter);\n ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerTimes);\n durasi.setAdapter(adapter1);*/\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n return;\n }\n CashierPayment cashierPayment = mVoucherAdapter.getItem(position);\n if (-1 == cashierPayment.id) {\n voucherService = new ChooseVoucherDialog(getActivity(), checkPresenterImpl, cashierParam, cashierResult, new Listener.OnChooseVoucherListener() {\n\n @Override\n public void onSure() {\n // TODO Auto-generated method stub\n\n }\n\n @Override\n public void onCancel() {\n // TODO Auto-generated method stub\n\n }\n\n });\n voucherService.show();\n }\n }",
"protected void onSetOffTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"@Override\n public void onClick(DialogInterface dialog, int which)\n {\n String b = customtime.getText().toString().trim();\n \n Toast.makeText(RadioUi.this, b +getString(R.string.closeradio), Toast.LENGTH_SHORT).show();\n sleeptime = b;\n // time=0;\n time = Integer.parseInt(b)*100000;\n // TinyDB tb = new TinyDB(getApplicationContext());\n\t\t\t\t// tb.putString(\"sleep_time\", sleeptime);\n\t\t\t\t \n\t\t\t\t alarm();\n\t\t\t\t \n }",
"@FXML\n\tvoid approveActionButton(ActionEvent event) {\n\t\t// change the duration\n\t\tboolean res = false;\n\t\tMessage messageToServer = new Message();\n\t\tmessageToServer.setMsg(req.getEcode() + \" \" + req.getNewDur());\n\t\tmessageToServer.setOperation(\"updateExamDurationTime\");\n\t\tmessageToServer.setControllerName(\"ExamController\");\n\t\tres = (boolean) ClientUI.client.handleMessageFromClientUI(messageToServer);\n\t\tif (!res) {\n\t\t\tUsefulMethods.instance().display(\"error in approval duration!\");\n\t\t} else\n\t\t\tdeleteRequest();\n\t\tUsefulMethods.instance().close(event);\n\t}",
"public void timeLogic(int time){\n //Add logic to decide time increments at which tickets will be granted\n }",
"@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }",
"protected void onGetRatedPowerConsumptionOfHPUnitInWintertime(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"private void checkAnnoRateo() {\n\t\tif(req.getRateo().getAnno()>=primaNota.getBilancio().getAnno()){\n\t\t\tthrow new BusinessException(ErroreCore.OPERAZIONE_NON_CONSENTITA.getErrore(\"L'anno del Rateo deve essere minore dell'anno della prima nota di partenza.\"));\n\t\t}\n\t}",
"public void liquidarEmpleado(Fecha fechaLiquidacion) {\n //COMPLETE\n double prima=0; \n boolean antiguo=false;\n double aniosEnServicio=fechaLiquidacion.getAnio()-this.fechaIngreso.getAnio();\n if(aniosEnServicio>0&&\n fechaLiquidacion.getMes()>this.fechaIngreso.getMes())\n aniosEnServicio--; \n \n //System.out.println(\"A:\"+aniosEnServicio+\":\"+esEmpleadoLiquidable(fechaLiquidacion));\n if(esEmpleadoLiquidable(fechaLiquidacion)){\n this.descuentoSalud=salarioBase*0.04;\n this.descuentoPension=salarioBase*0.04;\n this.provisionCesantias=salarioBase/12;\n if(fechaLiquidacion.getMes()==12||fechaLiquidacion.getMes()==6)\n prima+=this.salarioBase*0.5; \n if(aniosEnServicio<6&&\n fechaLiquidacion.getMes()==this.fechaIngreso.getMes())prima+=((aniosEnServicio*5)/100)*this.salarioBase;\n if(aniosEnServicio>=6&&fechaLiquidacion.getMes()==this.fechaIngreso.getMes()) prima+=this.salarioBase*0.3;\n\n this.prima=prima;\n this.setIngresos(this.salarioBase+prima);\n \n this.setDescuentos(this.descuentoSalud+this.descuentoPension);\n this.setTotalAPagar(this.getIngresos()-this.getDescuentos());\n }\n\n }",
"@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource().equals(VEnt.getjButtonCancelar()))\n {\n Cancelar();\n VEnt.getjTextFieldBusq().setEnabled(false);\n return;\n }\n \n \n if(e.getSource().equals(VEnt.getjComboBoxBusqEnt()))\n {\n VEnt.getjTextFieldBusq().setEnabled(true);\n VEnt.getjButtonCancelar().setEnabled(true);\n \n }\n \n \n if(e.getSource().equals(VEnt.getjRadioButtonFecha()))\n {\n if(VEnt.getjRadioButtonFecha().isSelected())\n {\n VEnt.getjDateChooserFecFinal().setEnabled(true);\n VEnt.getjDateChooserFecInicial().setEnabled(true);\n VEnt.getjButtonBuscar().setEnabled(true);\n VEnt.getjButtonCancelar().setEnabled(true);\n \n }\n\n }\n if(e.getSource().equals(VEnt.getjButtonRegresar()))\n {\n VEnt.dispose();\n }\n \n if(e.getSource().equals(VEnt.getjButtonBuscar()))\n {\n \n if(VEnt.getjRadioButtonFecha().isSelected())\n {\n \n if(VEnt.getjDateChooserFecInicial().getDate()==null)\n {\n Rutinas.Aviso(\"Debe colocar una fecha de inicio para la búsqueda\", \"Advertencia\");\n return;\n }\n if(VEnt.getjDateChooserFecFinal().getDate()==null)\n {\n Rutinas.Aviso(\"Debe colocar una fecha final para la búsqueda\", \"Advertencia\");\n return;\n }\n \n if(VEnt.getjDateChooserFecFinal().getDate().before(VEnt.getjDateChooserFecInicial().getDate()))\n {\n Rutinas.Aviso(\"La fecha final no deber ser menor que la fecha inicial\", \"Advertencia\");\n return;\n }\n \n }\n else\n {\n if(VEnt.getjTextFieldBusq().getText().length()==0)\n {\n Rutinas.Aviso(\"Debe llenar el campo de búsqueda\", \"\");\n return;\n }\n }\n VEnt.getjTextFieldBusq().setEnabled(false);\n VEnt.getjComboBoxBusqEnt().setEnabled(false);\n VEnt.getjButtonBuscar().setEnabled(false);\n VEnt.getjRadioButtonFecha().setEnabled(false);\n VEnt.getjDateChooserFecFinal().setEnabled(false);\n VEnt.getjDateChooserFecInicial().setEnabled(false);\n \n if(VEnt.getjRadioButtonFecha().isSelected()&& (VEnt.getjComboBoxBusqEnt().getSelectedIndex()==0))\n {\n try {\n CargarGridFecha();\n } catch (SQLException ex) {\n Logger.getLogger(CConsultarEntrevista.class.getName()).log(Level.SEVERE, null, ex);\n }\n return;\n }\n \n if(VEnt.getjRadioButtonFecha().isSelected() && (VEnt.getjComboBoxBusqEnt().getSelectedIndex()==1))\n {\n try {\n CargarGridFecNom();\n } catch (SQLException ex) {\n Logger.getLogger(CConsultarEntrevista.class.getName()).log(Level.SEVERE, null, ex);\n }\n return;\n }\n else\n {\n if(VEnt.getjRadioButtonFecha().isSelected() && (VEnt.getjComboBoxBusqEnt().getSelectedIndex()==2))\n { \n try {\n cargarGridFecProy();\n } catch (SQLException ex) {\n Logger.getLogger(CConsultarEntrevista.class.getName()).log(Level.SEVERE, null, ex);\n }\n return;\n }\n }\n \n if(!VEnt.getjRadioButtonFecha().isSelected())\n { \n \n \n if(VEnt.getjComboBoxBusqEnt().getSelectedIndex()==2)\n {\n try {\n CargarGridProy();\n } catch (SQLException ex) {\n Logger.getLogger(CConsultarEntrevista.class.getName()).log(Level.SEVERE, null, ex);\n }\n return;\n }\n else\n {\n if(VEnt.getjComboBoxBusqEnt().getSelectedIndex()==1)\n {\n try {\n CargarGridCand();\n } catch (SQLException ex) {\n Logger.getLogger(CConsultarEntrevista.class.getName()).log(Level.SEVERE, null, ex);\n }\n return;\n }\n \n }\n \n }\n \n \n } \n \n }",
"private void exemTimeOver() {\n\t\tuploadBtn.setVisible(false);\n\t\tapproveImage.setVisible(false);\n\t\tuploadExamTxt.setText(\"Exam time is over, you can not upload files anymore\");\n\t\ttimer.cancel();\n\t\t// sign the student as someone who start the exam but did not submitted\n\t\tflag1 = false;\n\t\tsummbitBlank();\n\t}",
"static void sueldo7diasl(){\nSystem.out.println(\"Ejemplo estructura Condicional Multiple 1 \");\nString descuenta=\"\";\n//datos de entrada xd\nint ganancias= teclado.nextInt();\nif(ganancias<=150){\ndescuenta=\"0.5\";\n}else if (ganancias>150 && ganancias<300){\n descuenta=\"0.7\";}\n else if (ganancias>300 && ganancias<450){\n descuenta=\"0.9\";}\n //datos de salida:xd\n System.out.println(\"se le descuenta : \"+descuenta);\n}",
"public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }",
"private void savingAccountInterest(){\n if(this.watch.checkElapsedTime() >= 30){\n this.watch.stop(); // stopping stopwatch\n this.timeInterval = this.watch.elapsedTime(); // saving elapsed time in variable\n System.out.println(\"this.timeInterval == \"+this.timeInterval);\n this.bal += this.bal * 0.05 * Math.floor(this.timeInterval/30); // incrementing balance by 5% every 30 seconds\n this.watch.start();\n }\n }",
"@Override\r\n\tpublic void emettreOffre() {\n\t\t\r\n\t}",
"public void Cobrar() throws InterruptedException{\n System.out.println(\"Por favor indique la cantidad de litros que solicito\");\r\n int litros = sc.nextInt();\r\n String tipo = null;\r\n double costo;\r\n double costoTotal;\r\n do{\r\n System.out.println(\"¿Que tipo de gasolina?, indique magna o premium\");\r\n tipo = sc.nextLine();\r\n }while((!tipo.equalsIgnoreCase(\"magna\"))&&(!tipo.equalsIgnoreCase(\"premium\")));\r\n \r\n if (tipo.equalsIgnoreCase(\"magna\")) {\r\n costo = 19.42;\r\n }else costo = 20.71;\r\n System.out.println(\"Muy bien\");\r\n costoTotal = (litros*costo);\r\n Thread.sleep(2000);\r\n System.out.println(\"El total a pagar es de \"+costoTotal+\" pesos\");\r\n }",
"private void ruotaNuovoStatoPaziente() {\r\n\t\tif(nuovoStatoPaziente==StatoPaziente.WAITING_WHITE)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_YELLOW;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_YELLOW)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_RED;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_RED)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_WHITE;\r\n\t\t\r\n\t}",
"public void updateEnoughServantsProperty(Boolean moreThan1, Boolean moreThan3) {\n enghServantsPermit.set(moreThan1);\n enghServantsActionAgain.setValue(moreThan3);\n }",
"public void setVoltage(String vol, int upload_stat){//12.8V\n\t\tif(baseAct.serviceConn){\n//\t\t\tvolVal.setText(vol);\n\t\t\tString volDigit = \"\";\n\t\t\tfloat volF;\n\t\t\tlong volExp;\n\t\t\tif(vol.contains(\"v\") || vol.contains(\"V\"))\n\t\t\t\tvolDigit = vol.substring(0, vol.length()-1);\n\t\t\telse\n\t\t\t\tvolDigit = vol;\n\t\t\tvolF = Float.parseFloat(volDigit);\n\t\t\tif(volF < 13.01){\n\t\t\t\tvolExp = Preference.getInstance(baseAct.getApplicationContext()).getVolExp();\n\t\t\t\tif(volExp != 0){\n\t\t\t\t\tdouble volExpD = Double.longBitsToDouble(volExp);\t\t\n\t\t\t\t\tdouble expTime = (volExpD*(volF-10.5));\n\t\t\t\t\tlong expTimeL = (long) expTime;\n\t\t\t\t\tint day = 0, hr = 0;\n\t\t\t\t\tString notice = baseAct.getResources().getString(R.string.bat_expire_time);\n\t\t\t\t\tString expTimeStr = \"\";\n\t\t\t\t\t\n\t\t\t\t\tif((day = (int) (expTimeL/86400)) > 0){\n\t\t\t\t\t\texpTimeStr = expTimeStr + day + baseAct.getResources().getString(R.string.bat_day);\n\t\t\t\t\t\texpTimeL %= 86400;\n\t\t\t\t\t}\n\t\t\t\t\tif((hr = (int) (expTimeL/3600)) > 0){\n\t\t\t\t\t\texpTimeStr = expTimeStr + hr + baseAct.getResources().getString(R.string.bat_hour);\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(!expTimeStr.equals(\"\")){\n\t\t\t\t\t\tint rank = (int) ((volF-10.5)*6/(13-10.5));\n//\t\t\t\t\t\tif(day > 0)\n//\t\t\t\t\t\t\tbaseAct.tips_s.setBatteryInfo(Base.BAT_NORMAL, rank, notice+expTimeStr);\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t\tbaseAct.tips_s.setBatteryInfo(Base.BAT_LOW, rank, notice+expTimeStr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(upload_stat != 0)\n\t\t\t\t\tbaseAct.uploadVoltage(volDigit);\n\t\t\t}\n\t\t\t\n\t\t\tbaseAct.curVoltage = Float.parseFloat(volDigit);\n\t\t}\n\t\telse\n\t\t\tsaveBatteryVol(vol);\n\t}",
"public void setUlt_credito(java.util.Calendar ult_credito) {\n this.ult_credito = ult_credito;\n }",
"protected void setReserveBtnListener()\n {\n final FloatingActionButton reserveBtn = (FloatingActionButton) findViewById(R.id.reserveBtn);\n reserveBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if(reservationEndsOn==null)\n {\n showToastMessage(getResources().getString(R.string.reserveErrorMessage));\n return;\n }\n else\n {\n\n String username = getSharedPreferences(\"appUserPrefs\",MODE_PRIVATE).getString(\"username\",\"\");\n //The user is player\n if(!username.equals(\"\"))\n {\n promoCode=null;\n showPromoCodeDialog(username);\n\n }\n else {\n username = getSharedPreferences(\"venAdminPrefs\",MODE_PRIVATE).getString(\"username\",\"\");\n Reservation myReservation = new Reservation(username,reservationStartsOn,reservationEndsOn,pitch.getVenueID(),pitch.getPitchName());\n connectionManager.reserveByAdmin(myReservation, instance);\n\n }\n }\n }\n });\n\n\n }"
]
| [
"0.65590364",
"0.58372825",
"0.56983835",
"0.5672668",
"0.56203043",
"0.5593167",
"0.5583476",
"0.55735284",
"0.5570834",
"0.55631363",
"0.5550796",
"0.55351406",
"0.55317974",
"0.55244285",
"0.5510398",
"0.54695684",
"0.5450752",
"0.54434353",
"0.5442923",
"0.5437437",
"0.5434644",
"0.54338",
"0.54338",
"0.5430918",
"0.5418175",
"0.5391926",
"0.5371217",
"0.53692144",
"0.5358854",
"0.5340511",
"0.53361326",
"0.53329986",
"0.5331048",
"0.5325187",
"0.5312369",
"0.5291482",
"0.52840793",
"0.5265768",
"0.5265768",
"0.52422243",
"0.52386826",
"0.5230614",
"0.5229913",
"0.52292734",
"0.52268934",
"0.5201815",
"0.5197107",
"0.51960385",
"0.51952857",
"0.51822877",
"0.51711607",
"0.51702243",
"0.5164015",
"0.51627994",
"0.5141559",
"0.51312786",
"0.5118724",
"0.5113911",
"0.5104028",
"0.5102638",
"0.5092979",
"0.5090159",
"0.508878",
"0.5078854",
"0.50782824",
"0.506544",
"0.5061659",
"0.50520515",
"0.50509983",
"0.503508",
"0.5031144",
"0.50311387",
"0.50286406",
"0.50275666",
"0.50257534",
"0.5025457",
"0.50192815",
"0.5014798",
"0.50089353",
"0.50024873",
"0.4998542",
"0.49806693",
"0.49792075",
"0.49747953",
"0.49723756",
"0.4969945",
"0.49684682",
"0.49673304",
"0.4965688",
"0.49637234",
"0.49635923",
"0.49617156",
"0.49610764",
"0.49580413",
"0.49570212",
"0.49546525",
"0.49512064",
"0.49511486",
"0.4950981",
"0.49508584",
"0.49452773"
]
| 0.0 | -1 |
para mostrar que cobra voluntario, | public void cobrar() {
JOptionPane.showInternalMessageDialog(null,
this.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String toString(){\n return \" Vuelo \"+this.getTipo()+\" \" +this.getIdentificador() +\"\\t \"+ this.getDestino()+ \"\\t salida prevista en \" + timeToHour(this.getTiemposal())+\" y su combustible es de \"+this.getCombustible()+\" litros.( \"+ String.format(\"%.2f\", this.getCombustible()/this.getTankfuel()*100) + \"%).\"; \n }",
"public void volar() {\n }",
"public void vender() {\n\t\tSystem.out.println(\"Vender \"+cantidad+\" de \"+itemName);\n\t}",
"public void verComprobante() {\r\n if (tab_tabla1.getValorSeleccionado() != null) {\r\n if (!tab_tabla1.isFilaInsertada()) {\r\n Map parametros = new HashMap();\r\n parametros.put(\"ide_cnccc\", Long.parseLong(tab_tabla1.getValorSeleccionado()));\r\n parametros.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n parametros.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n vpdf_ver.setVisualizarPDF(\"rep_contabilidad/rep_comprobante_contabilidad.jasper\", parametros);\r\n vpdf_ver.dibujar();\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Debe guardar el comprobante\", \"\");\r\n }\r\n\r\n } else {\r\n utilitario.agregarMensajeInfo(\"No hay ningun comprobante seleccionado\", \"\");\r\n }\r\n }",
"public void mostraDados() {\n System.out.println(\"O canal atual é: \" + tv.getCanal());\n System.out.println(\"O volume atual é: \" + tv.getVolume());\n System.out.println(\"--------------------------------------\");\n }",
"void Planificar(Reserva unaReserva);",
"@Override\n\tpublic void voler() {\n\t\tSystem.out.println(\"JE SAIS PAS VOLER\");\n\t}",
"public static void visualizarVueltaCompletado(float a){\n JOptionPane.showMessageDialog(null,\"Aqui tiene su vuelta \"+a+\" €\");\n }",
"public ConversorVelocidad() {\n //setTemperaturaConvertida(0);\n }",
"public void mostrarCompra() {\n }",
"@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}",
"private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }",
"private void mostrarEmenta (){\n }",
"public void mostrarlistainicifin(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = inicio;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")<=>\";\n auxiliar = auxiliar.sig;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de inicio a fin\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }",
"public void prenderVehiculo();",
"public void MostrarValores() {\r\n Nodo recorrido = UltimoValorIngresado;\r\n\r\n while (recorrido != null) {\r\n Lista += recorrido.informacion + \"\\n\";\r\n recorrido = recorrido.siguiente;\r\n }\r\n\r\n JOptionPane.showMessageDialog(null, Lista);\r\n Lista = \"\";\r\n }",
"@Override\n\tpublic void verVehiculosDisponibles() {\n\t\tif(getCapacidad() > 0) {\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 1 \" + \" Carro disponible, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 0 \" + \" Carro disponibles, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}\n\t\t\n\t}",
"public void somaVezes(){\n qtVezes++;\n }",
"public void mostrarJet(){\r\n \r\n System.out.println(\"clase hija jet de vehiculo con motor \");\r\n System.out.println(\"LA CANTIDAD DE MOTORES ES : \" + this.cantidaddeMotores);\r\n\r\n\r\n System.out.println(\"***************************************************\");\r\n System.out.println(\"*************H**E**R**E**D**A**********************\");\r\n System.out.println(\"|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|\");\r\n }",
"private void iniciarVentana()\n {\n this.setVisible(true);\n //Centramos la ventana\n this.setLocationRelativeTo(null);\n //Colocamos icono a la ventana\n this.setIconImage(Principal.getLogo());\n //Agregamos Hint al campo de texto\n txt_Nombre.setUI(new Hint(\"Nombre del Archivo\"));\n //ocultamos los componentes de la barra de progreso general\n lblGeneral.setVisible(false);\n barraGeneral.setVisible(false);\n //ocultamos la barra de progreso de archivo\n barra.setVisible(false);\n //deshabiltamos el boton de ElimianrArchivo\n btnEliminarArchivo.setEnabled(false);\n //deshabilitamos el boton de enviar\n btnaceptar.setEnabled(false);\n //Creamos el modelo para la tabla\n modelo=new DefaultTableModel(new Object[][]{},new Object[]{\"nombre\",\"tipo\",\"peso\"})\n {\n //sobreescribimos metodo para prohibir la edicion de celdas\n @Override\n public boolean isCellEditable(int i, int i1) {\n return false;\n }\n \n };\n //Agregamos el modelo a la tabla\n tablaArchivos.setModel(modelo);\n //Quitamos el reordenamiento en la cabecera de la tabla\n tablaArchivos.getTableHeader().setReorderingAllowed(false);\n }",
"@Override\n\tpublic void mostrarDeposito() {\n\t\tSystem.out.println(\"Depósito: \"+depositoActual+\"litros\");\n\t}",
"private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }",
"@Override\n\tpublic String parler() {\n\t\treturn \"Je suis un Orc\";\n\t}",
"public String verDatos(){\n return \"Ataque: \"+ataque+\"\\nDefensa: \"+defensa+\"\\nPunteria: \"+punteria;\n }",
"public void view(){\r\n System.out.println(\"\tNombre: \"+name);\r\n\t\tSystem.out.println(\"\tTipo: \"+type.id);\r\n\t\tSystem.out.println(\"\tVal: \"+((Integer)val).intValue());\r\n\t\tif(block==true){\r\n\t\t\tSystem.out.println(\"\tBLOQUEADA\");\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"\tDESBLOQUEADO\");\r\n\t\t}\r\n //System.out.println(\"\tTipo2: \"+kind);\r\n //System.out.println(\"\tAnidamiento: \"+level);\r\n //System.out.println(\"\tSigDireccion: \"+nextAdr);\r\n System.out.println(\"\t*********************\");\r\n\t\tSystem.out.println();\r\n }",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Pasos dados por \" + a.nombre + \" \" + a.distancia + \" m = \" + pasosActividad + \" / Pasos en total = \" + pasosTotal);\n\t}",
"public void devolver() {\r\n \t\r\n \tif (raiz == null)\r\n \t\tSystem.out.println(\"No hay datos en la pila\");\r\n else\r\n \t System.out.println(\"Devolvemos el dato de la cima: \"+raiz.dato);\r\n }",
"private void esegui() {\n /* variabili e costanti locali di lavoro */\n OperazioneMonitorabile operazione;\n\n try { // prova ad eseguire il codice\n\n /**\n * Lancia l'operazione di analisi dei dati in un thread asincrono\n * al termine il thread aggiorna i dati del dialogo\n */\n operazione = new OpAnalisi(this.getProgressBar());\n operazione.avvia();\n\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n }",
"public IfrViagem() {\n initComponents();\n v = new Viagem();\n criarViagem();\n\n Formatacao.formatarData(ftfDataSaida);\n Formatacao.formatarHora(ftfHoraSaida);\n Formatacao.formatarData(ftfDataRetorno);\n Formatacao.formatarHora(ftfHoraRetorno);\n Formatacao.formatarReal(ftfValorViagem);\n\n }",
"public Voluntario() {\n super();\n this.livre = true;\n this.raio = 0;\n this.avaliacao = 0;\n this.numreviews = 0;\n\n //this.historico = new ArrayList<>() ;\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\t\tint hora = calendario.get(Calendar.HOUR_OF_DAY);\r\n\t\t\t\t\tint minutos = calendario.get(Calendar.MINUTE);\r\n\t\t\t\t\tint segundos = calendario.get(Calendar.SECOND);\r\n\t\t\t\t\tString horaDespegue = hora + \":\" + minutos + \":\" + segundos;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Asigna la hora de despegue a la variable del Avión\r\n\t\t\t\t\tcontrol.llegadaAviones.elementAt(0).setHoraDespegue(horaDespegue);\r\n\r\n\t\t\t\t\t//Asigna al avión que puede proceder a despegar\r\n\t\t\t\t\tcontrol.llegadaAviones.elementAt(0).setApagado(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Escribe en el texto del registro la información del avión\r\n\t\t\t\t\tescribeRegistro();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Elimina del vector el avión\r\n\t\t\t\t\tcontrol.llegadaAviones.remove(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Elimina de la tabla el avión\r\n\t\t\t\t\tlistaterminal.model.removeRow(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Actualiza los paneles\r\n\t\t\t\t\tactualiza();\r\n\r\n\t\t\t\t}",
"public void mostrarVagon() {\n\t\tSystem.out.println(\"Estado actual del vagon\");\n\t\tfor (int i = 0; i < getNumeroAsientosFila(); i++) {\n\t\t\tfor (int j = 0; j < getNumeroAsientosColumna(); j++) {\n\t\t\t\tSystem.out.print(vagonVacio[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"@Override\n public String toString()\n {\n String aDevolver= \"\";\n aDevolver += super.toString();\n aDevolver += \"potenciaCV: \" + potenciaCV + \"\\n\";\n return aDevolver;\n }",
"@Override\n\tpublic void concentrarse() {\n\t\tSystem.out.println(\"Se centra en sacar lo mejor del Equipo\");\n\t\t\n\t}",
"@Override // prekrytie danej metody predka\r\n public String toString() {\r\n return super.toString()\r\n + \" vaha: \" + String.format(\"%.1f kg,\", dajVahu())\r\n + \" farba: \" + dajFarbu() + \".\";\r\n }",
"public void venceuRodada () {\n this.pontuacaoPartida++;\n }",
"public void mostraDevolucao(List<Devolucao> lista) {\n System.out.println(\"--------------------------------------\\n\");\n System.out.println(String.format(\"%-10s\", \"ID\") + \"\\t\"\n + String.format(\"%-40s\", \"|LIVRO\") + \"\\t\"\n + String.format(\"%-20s\", \"|DISP\") + \"\\t\"\n + String.format(\"%-20s\", \"|CLIENTE\") + \"\\t\"\n + String.format(\"%-20s\", \"|RETIRADA\") + \"\\t\"\n + String.format(\"%-20s\", \"|ENTREGA\") + \"\\t\"\n + String.format(\"%-20s\", \"|DEVOLVIDO\")\n );\n for (Devolucao dev : lista) {\n String disponivel = dev.getRetirada().getLivroDevolvido() ? \"Sim\" : \"Não\";\n System.out.println(String.format(\"%-10s\", dev.getId()) + \"\\t\"\n + String.format(\"%-40s\", \"|\" + dev.getRetirada().getLivro().getNome()) + \"\\t\"\n + String.format(\"%-20s\", \"|\" + disponivel) + \"\\t\"\n + String.format(\"%-20s\", \"|\" + dev.getRetirada().getCliente().getNome()) + \"\\t\"\n + String.format(\"%-20s\", \"|\" + dev.getRetirada().getRetiradaFormatada()) + \"\\t\"\n + String.format(\"%-20s\", \"|\" + dev.getRetirada().getEntregaFormatada()) + \"\\t\"\n + String.format(\"%-20s\", \"|\" + dev.getRetirada().getDevolvidoFormatada())\n );\n }\n }",
"@Override\n\tpublic String getInformeVendedor() {\n\t\treturn \"Informe trimestre 3\";\n\t}",
"public jHistorialSeleccionarVoluntario() {\n initComponents();\n \n \n }",
"private void iniciarNovaVez() {\n this.terminouVez = false;\n }",
"public void verVerDescripcion()\r\n\t{\r\n\t\tverdescripcion = new VerDescripcion(this);\r\n\t\tverdescripcion.setVisible(true);\r\n\t}",
"@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }",
"@Override\r\n public void prenderVehiculo() {\r\n System.out.println(\"___________________________________________________\");\r\n System.out.println(\"prender Jet\");\r\n }",
"private void verLogroBotonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_verLogroBotonActionPerformed\n if(logrosTabla.getModel().getRowCount() > 0){\n String logroTitulo = logrosTabla.getModel().getValueAt(logrosTabla.getSelectedRow(), 1).toString();\n Logro logro = ninno.getLogro(logroTitulo);\n \n if(logro != null){\n JOptionPane.showMessageDialog(this, logro.getDescripcion(), logroTitulo, JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }",
"@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}",
"public void trenneVerbindung();",
"public void mostrarlistafininicio(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = fin;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")->\";\n auxiliar = auxiliar.ant;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de fin a inicio\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }",
"public static void status(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n System.out.printf(\"\\nNOMBRE:\\t\\t\\t\"+nombrePersonaje);\n\tSystem.out.printf(\"\\nPuntos De Vida (HP):\\t\"+puntosDeVida);\n\tSystem.out.printf(\"\\nPuntos De mana (MP):\\t\"+puntosDeMana);\n System.out.printf(\"\\nNivel: \\t\\t\\t\"+nivel);\n\tSystem.out.printf(\"\\nExperiencia:\\t\\t\"+experiencia);\n\tSystem.out.printf(\"\\nOro: \\t\\t\"+oro);\n System.out.printf(\"\\nPotion:\\t\\t\\t\"+articulo1);\n System.out.printf(\"\\nHi-Potion:\\t\\t\"+articulo2);\n System.out.printf(\"\\nM-Potion:\\t\\t\"+articulo3);\n System.out.printf(\"\\n\\tEnemigos Vencidos:\\t\");\n\tSystem.out.printf(\"\\nNombre:\\t\\t\\tNo.Derrotas\");\n System.out.printf(\"\\nDark Wolf:\\t\\t\"+enemigoVencido1);\n\tSystem.out.printf(\"\\nDragon:\\t\\t\\t\"+enemigoVencido2);\n System.out.printf(\"\\nMighty Golem:\\t\\t\"+enemigoVencido3);\t\n }",
"private void EstablecerVistas(TipoGestion tGestion){\n\t\tCantEjecutada=Utilitarios.round(activ.getCantidadEjecutada(),4);\n\t\n\t\tcantContratada=Utilitarios.round(activ.getCantidadContratada(),4);\n\t\t\n\t\t//CantPendienteDeEjecutar = Utilitarios.round((activ.getCantidadContratada()-activ.getCantidadEjecutada()),4);\n\n\n\t\tif ( activ.getCantidadEjecutada() > activ.getCantidadContratada()){\n\t\t\tCantPendienteDeEjecutar = 0;\n\t\t\tCantExcendete = Utilitarios.round((activ.getCantidadEjecutada()-activ.getCantidadContratada()),4);\n\t\t\tPorcExcedente = Utilitarios.round((CantExcendete / cantContratada * 100),2);\n\t\t\t((TextView) getActivity().findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadExcedente)).setTextColor(getResources().getColorStateList(R.color.graphRed));\n\t\t}\n\t\telse{\n\t\t\tCantPendienteDeEjecutar = Utilitarios.round((activ.getCantidadContratada()-activ.getCantidadEjecutada()),4);\n\t\t\t((TextView) getActivity().findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadExcedente)).setTextColor(getResources().getColorStateList(R.color.graphGreen));\n\t\t}\n\n\t\t\n\t\tif ( activ.getCantidadContratada() > 0){\n\t\t\t\tPorcEjecutado=Utilitarios.round((activ.getCantidadEjecutada()/cantContratada) * 100,2);\n\t\t\t\tPorcPendienteDeEjecutar = Utilitarios.round((CantPendienteDeEjecutar / cantContratada * 100),2);\n\t\t\t}\n\t\telse{\n\t\t\tPorcPendienteDeEjecutar\t= 0.00;\n\t\t\tPorcPendienteDeEjecutar = 0.00;\n\t\t}\n\n\t\t((TextView) getActivity()\n\t\t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_Actividad))\n\t\t\t\t.setText(String.valueOf(cantContratada));\n\n\t\t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadContratada))\n \t\t\t.setText(String.valueOf(cantContratada));\n\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadEjecutada))\n \t\t\t.setText(String.valueOf(CantEjecutada));\n\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadEjecutada))\n \t\t\t.setText( String.valueOf(PorcEjecutado) + \"%\");\n\n\n \ttvEtiquetaAgregarAvances.setText(getActivity().getString(R.string.fragment_agregar_avances_renglon_4));\n\n\t\tdesActividad.setText(\"[\" + activ.getCodigoInstitucional() + \"] - \" + activ.getDescripcion());\n \t\n\t\tif(tGestion == TipoGestion.Por_Cantidades){\n\t\t\t((TextView) getActivity()\n \t\t\t.findViewById(R.id.et_fragAgregarAvancesEtiquetaPorc))\n \t\t\t.setVisibility(0);\n \t}\n \telse{\n \t\t\n \t\t((TextView) getActivity()\n \t\t\t.findViewById(R.id.et_fragAgregarAvancesEtiquetaPorc))\n \t\t\t.setText(\"%\");\n\n \t}\n\n\t\t\n\t\t//Se deshabilitara el widget de ingreso del avance para cuando la cantidad\n\t\t//pendiente de ejecutar sea igual o menor a 0\n\t\t/*if (CantPendienteDeEjecutar>0){\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_FechaActualizo))\n \t\t\t.setText(getActivity().getResources().getString(R.string.fragment_agregar_avances_renglon_2)\n \t\t\t\t\t+ \" \" + String.valueOf(activ.getFechaActualizacion()));\n \t}\n \telse\n \t{\n \t\tToast.makeText(getActivity(), getActivity().getString(R.string.fragment_agregar_avances_renglon_5), Toast.LENGTH_LONG).show();\n \t\tetNuevoAvance.setText(\"0.00\");\n \t\tetNuevoAvance.setEnabled(false);\n \t}*/\n \t\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadPorEjecutar))\n \t\t\t.setText(String.valueOf(Utilitarios.round(CantPendienteDeEjecutar, 4)));\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadPorEjecutar))\n \t\t\t.setText(String.valueOf(Utilitarios.round(PorcPendienteDeEjecutar, 2)) + \"%\");\n\n\t\t((TextView) getActivity()\n\t\t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadExcedente))\n\t\t\t\t.setText(String.valueOf(Utilitarios.round(CantExcendete, 4)));\n\n\t\t((TextView) getActivity()\n\t\t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadExcedente))\n\t\t\t\t.setText(String.valueOf(Utilitarios.round(PorcExcedente, 2)) + \"%\");\n\n\t\tvalidarAvance(String.valueOf(etNuevoAvance.getText()));\n \t\n \tetNuevoAvance.addTextChangedListener(new TextWatcher() {\n \t\t\n\t\t\t@Override\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start,\n\t\t\t\t\tint count, int after) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start,\n\t\t\t\t\tint before, int count) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tvalidarAvance(s.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t}\n \t});\n\t\t\n\t}",
"public void visualizzaCampo(){\r\n\t\tInputOutput.stampaCampo(nome, descrizione, obbligatorio);\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\r\n\t\t\t\tDecimalFormat dec = new DecimalFormat(\"0.##\");\r\n\t\t\t\tVelocidadeMedia vm = new VelocidadeMedia();\r\n\t\t\t\t\r\n\t\t\t\tdouble espaco = Double.parseDouble(edespaco.getText().toString());\r\n\t\t\t\tdouble tempo = Double.parseDouble(edtempo.getText().toString());\r\n\t\t\t\t\r\n\t\t\t\t//t.calculavel(espaco, veloc);\r\n\t\t\t\t\r\n\t\t\t\tAlertDialog.Builder dialogo = new AlertDialog.Builder(MainVelocidadeMedia.this);\r\n\t\t\t\tdialogo.setTitle(\"Resultado\");//Defino o título\r\n\t\t\t\tdialogo.setMessage(\"Velocidade Média: \"+String.valueOf(dec.format(vm.calculavel(espaco, tempo)))+\" m/s\");//Colocando a mensagem que vai ter dentro do Dialog\r\n\t\t\t\tdialogo.setNeutralButton(\"OK\", null);//adicionando o botão de OK\r\n\t\t\t\tdialogo.show();//mostrando o Dialog\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}",
"@Override // Métodos que fazem a anulação\n\tpublic void vota() {\n\t\t\n\t}",
"public void mostrarlistainciofin(){\n if(!estavacia()){\n String datos=\"<=>\";\n nododoble auxiliar=inicio;\n while(auxiliar!=null){\n datos=datos+\"[\"+auxiliar.dato+\"]<=>\";\n auxiliar=auxiliar.siguiente;\n }\n JOptionPane.showMessageDialog(null,datos,\n \"Mostraando lista de incio a fin\",JOptionPane.INFORMATION_MESSAGE);\n } }",
"void displayCharge(Vehicle obj, long leaveTime);",
"private void vereenvoudigAction() {\n foutLabel.setText(\"\");\n int teller = Integer.parseInt(tellerVeld.getText());\n int noemer = Integer.parseInt(noemerVeld.getText());\n if (noemer <= 0) {\n foutLabel.setText(\"Noemer moet positief zijn\");\n }\n else if (teller < 0) {\n foutLabel.setText(\"Teller mag niet negatief zijn\");\n }\n else {\n Breuk breuk = new Breuk(teller, noemer); \n if (breuk != null) {\n breuk.vereenvoudig();\n tellerVeld.setText(breuk.getTeller() + \"\");\n noemerVeld.setText(breuk.getNoemer() + \"\");\n }\n }\n }",
"public static void pocetniMeni() {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"***********************************************\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 1 ako zelite vidjeti kalendar(za dati mjesec i godinu)\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 2 za pregled podsjetnika za dati mjesec i godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 3 da pregledate podsjetnik za datu godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 4 ako zelite da pogledate sve podsjetnike!\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 5 ako zelite da upisete neki podsjetnik!\\n\"\r\n\t\t\t\t\t\t+ \":::::::::::::::::::::::::::::::::::::::::::::::\");\r\n\t}",
"public String toString()\n {\n String textoADevolver = \"\";\n if (tareaCompletada)\n {\n textoADevolver += \"HECHA \";\n }\n textoADevolver += descripcion + \" (\" +prioridad+ \").\";\n return textoADevolver;\n }",
"void putdata()\n {\n System.out.printf(\"\\nCD Title \\\"%s\\\", is of %d minutes length and of %d rupees.\",title,length,price);\n }",
"@FXML\r\n private void mostrarSolicitudes() {\r\n try {\r\n //Carga la vista \r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/MostrarRma.fxml\"));\r\n VBox vistaMostrar = (VBox) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitudes enviadas\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaMostrar);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorMostrarRma controlador = loader.getController();\r\n controlador.setDialogs(primerStage, dialogo);\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"@Override\r\n\tpublic void mostrar() {\n\t\t\r\n\t}",
"private static void VeureVendes (BaseDades bd) {\n ArrayList <Venda> llista = new ArrayList <Venda>();\n llista = bd.consultaVen(\"SELECT * FROM VENDES\");\n if (llista != null)\n for (int i = 0; i<llista.size(); i++) {\n Venda p = (Venda) llista.get(i);\n Producte prod = bd.consultarUnProducte(p.getIdproducte());\n System.out.println(\"ID Venda =>\"+p.getNumvenda()+\"* Producte: \"\n +prod.getDescripcio()+\"* Quantitat: \"+p.getQuantitat()\n +\"* Data: \"+p.getDatavenda());\n }\n }",
"public void limpiarcarrito() {\r\n setTotal(0);//C.P.M limpiamos el total\r\n vista.jTtotal.setText(\"0.00\");//C.P.M limpiamos la caja de texto con el formato adecuado\r\n int x = vista.Tlista.getRowCount() - 1;//C.P.M inicializamos una variable con el numero de columnas\r\n {\r\n try {\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo actual de la tabla\r\n while (x >= 0) {//C.P.M la recorremos\r\n temp.removeRow(x);//C.P.M vamos removiendo las filas de la tabla\r\n x--;//C.P.M y segimos disminuyendo para eliminar la siguiente \r\n }\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al limpiar la venta\");\r\n }\r\n }\r\n }",
"public String mostrarVentas() {\n String ventas = \"\";\n for (int i = 0; i < posicionActual; i++) { //Recorre el vector hasra la poscion actual, y almacena toda la informacion de estos en una variable String la cual se retornara \n ventas += mostrarCliente(i);\n }\n return ventas;\n }",
"public void iniciarNovaPartida(Integer posicao);",
"public void PoblarINFO(String llamado) {//C.P.M Aqui llega como argumento llamado\r\n try {\r\n rs = modelo.Obteninfo();//C.P.M Mandamos a poblar la informacion de negocio\r\n if (llamado.equals(\"\")) {//C.P.M si el llamado llega vacio es que viene de la interface\r\n while (rs.next()) {//C.P.M recorremos el resultado para obtener los datos\r\n vista.jTNombreempresa.setText(rs.getString(1));//C.P.M los datos los enviamos a la vista de la interface\r\n vista.jTDireccion.setText(rs.getString(2));\r\n vista.jTTelefono.setText(rs.getString(3));\r\n vista.jTRFC.setText(rs.getString(4));\r\n }\r\n }\r\n if (llamado.equals(\"factura\")) {//C.P.M de lo contrario es llamado de factura y los valores se van a la vista de vactura \r\n while (rs.next()) {//C.P.M recorremos el resultado \r\n vistafactura.jTNombreempresa.setText(rs.getString(1));//C.P.M enviamos los datos a la vista de factura\r\n vistafactura.jTDireccion.setText(rs.getString(2));\r\n vistafactura.jTTelefono.setText(rs.getString(3));\r\n vistafactura.jTRFC.setText(rs.getString(4));\r\n }\r\n }\r\n } catch (SQLException ex) {//C.P.M Notificamos a el usuario si ocurre algun error\r\n JOptionPane.showMessageDialog(null,\"Ocurio un error al intentar consultar la informacion del negocio\");\r\n }\r\n }",
"private void gestionPriseEnCompte() {\r\n\t\tString raison = new String(\"\");\r\n\t\tDate now = new Date();\r\n\t\tString strSql = \"\";\r\n\t\r\n if (tbAlarme.getRowCount() > 0) {\r\n \tif (tbAlarme.getSelectedRowCount() > 0) {\r\n\t\t int[] selection = tbAlarme.getSelectedRows();\r\n\t\t int indexSelection = selection[0];\r\n\t\t int idCapteur = mdlTpsReelAlarme.getIdCapteur(indexSelection); \r\n\t\t String strTypeAlarme = \"\";\r\n\t\t \r\n\t\t\t\t// Motif Prise En Compte seulement si appel Alert\r\n\t\t strTypeAlarme = (String) mdlTpsReelAlarme.getValueAt(indexSelection, JTABLE_ALARME_TYPE_ALARME);\r\n\t\t if (strTypeAlarme.equals(\"Alarme\")) {\r\n\t\t\t\t\tint idPriseEnCompte = 0;\r\n\t\t \tdo {\r\n\t\t\t\t\t\tObject [] possibilites = new Object[tbPriseEnCompte.size()];\r\n\t\t\t\t\t\tfor(int i = 0; i < tbPriseEnCompte.size(); i++) {\r\n\t\t\t\t\t\t\tpossibilites[i] = tbPriseEnCompte.get(i).getNom();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString strReponse = (String)JOptionPane.showInputDialog(this, \"Choisir un motif de prise en compte : \", \"Prise en compte\", JOptionPane.QUESTION_MESSAGE, null, possibilites, null);\r\n\t\t\t\t\t\tidPriseEnCompte = 1;\r\n\t\t\t\t\t\tif (strReponse != null) {\r\n\t\t\t\t\t\t\tfor(int i = 0; i < tbPriseEnCompte.size(); i++) {\r\n\t\t\t\t\t\t\t\tif(strReponse.equals(tbPriseEnCompte.get(i).getNom())) {\r\n\t\t\t\t\t\t\t\t\tidPriseEnCompte = (int) tbPriseEnCompte.get(i).getId();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} // fin for\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\traison = \"En attente\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// idPriseEncompte == 1 (Autres)\r\n\t\t\t\t\t\tif(idPriseEnCompte == 1) {\r\n\t\t\t\t\t\t\t// Demande de commentaire\r\n\t\t\t\t\t\t\traison = AE_Fonctions.saisieTexte(\"Veuillez entrer une raison : \", \"Raison commentaire ...\");\r\n\t\t\t\t\t\t\tif (raison == null) raison = \"\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\traison = \"---\";\r\n\t\t\t\t\t\t}\r\n\t\t \t} while(raison == \"\");\r\n\t\t \t\r\n\t\t\t\t\tstrSql = \"UPDATE V2_AlarmeEnCours SET idPriseEnCompte = \" + idPriseEnCompte\r\n\t\t\t\t\t\t\t + \" , idUtilisateur = \" + EFS_Client_Variable.idUtilisateur\r\n\t\t\t\t\t\t\t + \" , CommentairePriseEnCompte = '\" + raison + \"'\"\r\n\t\t\t\t\t\t\t + \" WHERE idCapteur = \" + idCapteur;\r\n\t\t\t\t\tctn.fonctionSql(strSql);\r\n\t\t\t\t\tmdlTpsReelAlarme.setMotifIdPriseEncompte(indexSelection, idPriseEnCompte);\r\n\t\t } // fin if appelAlert\r\n\r\n\t\t if(mdlTpsReelAlarme.getValueAt(indexSelection, JTABLE_ALARME_PRISE_EN_COMPTE) == null) {\r\n\t\t\t\t\t// Date prise en compte\r\n\t\t\t\t\tstrSql = \"UPDATE V2_AlarmeEnCours SET DatePriseEnCompte = sysdate, blPriseEnCompte = 1 WHERE idCapteur = \" + idCapteur;\r\n\t\t\t\t\tctn.fonctionSql(strSql);\r\n\t\t\t\t\tmdlTpsReelAlarme.setValueAt(now, indexSelection, JTABLE_ALARME_PRISE_EN_COMPTE);\r\n\t\t } // fin if datePrsieEnCompte\r\n\t\r\n\t\t // Prevenir le programme maitre\r\n\t\t AE_Fonctions.modifierMaitreViaClient(idCapteur, VIA_API_PRISE_EN_COMPTE);\r\n\t\t \r\n\t\t\t\t// Arret klaxon et Alert\r\n//\t\t\t\tgestionKlaxon(false);\r\n//\t\t\t\tgestionAlert(false);\r\n\t\t\t\t\r\n \t} else {\r\n \t JOptionPane.showMessageDialog(this, \"Vous devez sélectionner une ligne pour prendre en compte ...\",\r\n \t \t\t \"GTC Visualize - Programme Maitre\", JOptionPane.WARNING_MESSAGE);\r\n \t}\r\n } else {\r\n//\t\t\tgestionKlaxon(false);\r\n//\t\t\tgestionAlert(false);\r\n }\r\n\t}",
"protected String getTitoloPaginaMadre() {\n return VUOTA;\n }",
"private void devolverLivro() throws Exception {\n try {\n long DAY_IN_MS = 1000 * 60 * 60 * 24; // formatar data entrega\n int codigo = Console.scanInt(\"Informe o código da retirada do livro: \");\n retiradaDao = new RetiradaDaoBd();\n Retirada retirada = retiradaDao.procurarPorId(codigo);\n try {\n devolucaoNegocio.salvar(retirada);\n System.out.println(\"Devolucao cadastrado com sucesso!\");\n } catch (Exception ex) {\n UIUtil.mostrarErro(ex.getMessage());\n }\n\n System.out.println(\"Livro \" + retirada.getLivro().getNome() + \" devolvido por \" + retirada.getCliente().getNome());\n } catch (InputMismatchException e) {\n System.err.println(\"ERRO! O ISBN deve ser numérico!\");\n }\n }",
"public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}",
"static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}",
"public void llenarVuelos()\n\t{\n\t\tResultSet resultado = null;\n\t\ttry\n\t\t{\n\t\t\tvuelos.removeAllItems();\n\t\t\tresultado = controladorBD.consultarVuelos();\n\n\t\t\twhile (resultado.next())\n\t\t\t{\n\t\t\t\tString id = resultado.getString(\"vuelo_id\");\n\t\t\t\tDate fecha = resultado.getDate(\"fecha\");\n\t\t\t\tint cupoMax = resultado.getInt(\"cupoMax\");\n\t\t\t\tString origen = resultado.getString(\"origen\");\n\t\t\t\tString destino = resultado.getString(\"destino\");\n\t\t\t\tint cupoActual = resultado.getInt(\"cupo_actual\");\n\t\t\t\tString hora = resultado.getString(\"hora\");\n\n\t\t\t\tVuelo v = new Vuelo(id, fecha, cupoMax, origen, destino, cupoActual, hora);\n\t\t\t\tvuelos.addItem(v);\n\t\t\t}\n\n\t\t} catch (ClassNotFoundException e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(PanelPasabordoVendedor.this, \"Error obteniendo vuelos\");\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(PanelPasabordoVendedor.this, \"Error obteniendo vuelos\");\n\t\t} finally\n\t\t{\n\t\t\tif (resultado != null)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tresultado.close();\n\t\t\t\t} catch (SQLException e)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(PanelPasabordoVendedor.this, \"Error cerrando la conexión\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void Operar(View vista)\n {\n String valor1 = et1.getText().toString();\n String valor2 = et2.getText().toString();\n int valor3=0;\n String texto=\"\";\n\n //Recolectamos el valor que el usuario ha marcado en el spinner\n String seleccionada = spinner.getSelectedItem().toString();\n\n //Si es sumar\n if(seleccionada.compareTo(\"Sumar\")==0)\n {\n valor3 = Integer.parseInt(valor1) + Integer.parseInt(valor2);\n texto = \"El valor de la Suma es: \"+valor3;\n }\n\n //Si es restar\n if(seleccionada.compareTo(\"Restar\")==0)\n {\n valor3 = Integer.parseInt(valor1) - Integer.parseInt(valor2);\n texto = \"El valor de la Resta es: \"+valor3;\n }\n\n //Si es multiplicar\n if(seleccionada.compareTo(\"Multiplicar\")==0)\n {\n valor3 = Integer.parseInt(valor1) * Integer.parseInt(valor2);\n texto = \"El valor de la Multiplicación es: \"+valor3;\n }\n\n //Si es dividir\n if(seleccionada.compareTo(\"Dividir\")==0)\n {\n valor3 = Integer.parseInt(valor1) / Integer.parseInt(valor2);\n texto = \"El valor de la Division es: \"+valor3;\n }\n\n //Si es mod\n if(seleccionada.compareTo(\"Modulo\")==0)\n {\n valor3 = Integer.parseInt(valor1) % Integer.parseInt(valor2);\n texto = \"El valor del Modulo es: \"+valor3;\n }\n\n tv3.setText(texto);\n }",
"public void visualizarMensaje(Object pila);",
"public void mainkan(){\n System.out.println();\n //System.out.printf(\"Waktu: %1.2f\\n\", this.oPlayer.getWaktu());\n System.out.println(\"Nama : \" + this.oPlayer.nama);\n System.out.println(\"Senjata : \" + this.oPlayer.getNamaSenjataDigunakan());\n System.out.println(\"Kesehatan : \" + this.oPlayer.getKesehatan());\n// System.out.println(\"Daftar Efek : \" + this.oPlayer.getDaftarEfekDiri());\n System.out.println(\"Nama Tempat : \" + this.namaTempat);\n System.out.println(\"Narasi : \" + this.narasi);\n }",
"public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }",
"private void xuLyLayMaDichVu() {\n int result = tbDichVu.getSelectedRow();\n String maDV = (String) tbDichVu.getValueAt(result, 0);\n hienThiDichVuTheoMa(maDV);\n }",
"private void inicializarVista() {\n this.vista.jtfNombreRol.setText(this.modelo.getRol().getDescripcion());\n this.vista.jbAgregar.setEnabled(false);\n this.vista.jbQuitar.setEnabled(false);\n this.vista.jtPermisosDisponibles.setModel(modelo.obtenerAccesosDispon());\n this.vista.jtPermisosSeleccionados.setModel(modelo.obtenerAccesoSelecc());\n Utilities.c_packColumn.packColumns(this.vista.jtPermisosDisponibles, 1);\n Utilities.c_packColumn.packColumns(this.vista.jtPermisosSeleccionados, 1);\n }",
"public void asignarVida();",
"public void presenta_Estudiante(){\r\n System.out.println(\"Universidad Técnica Particular de Loja\\nInforme Semestral\\nEstudiante: \"+nombre+\r\n \"\\nAsignatura: \"+nAsignatura+\"\\nNota 1 Bimestre: \"+nota1B+\"\\nNota 2 Bimestre: \"+nota2B+\r\n \"\\nPromedio: \"+promedio()+\"\\nEstado de la Materia: \"+estado());\r\n }",
"private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }",
"public void mostrarLectura(TomarLectura tomarLectura, Lectura lecturaActual);",
"public void recibirVolumen(int f){\n \tif (!Float.isNaN(f)){\n \t\tetVolumen.setText(Integer.toString(f));\n \t}else{\n \t\ttry {\n\t\t\t\tMessage msg = Message.obtain(null,CalcularServicio.MSG_NOTIFICAR_VOLUMEN_MAL);\n\t\t\t\tmsg.replyTo = mMessenger;\n\t\t\t\tmServicio.send(msg);\n\t\t\t} catch (RemoteException e) {\n\t\t\t\ttoastErrorConexion();\n\t\t\t}\n \t}\n }",
"public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }",
"public String getVigencia() { return this.vigencia; }",
"private void CargaInicial() {\r\n this.setTitle(\"\" + gui.getTitle().concat(\"\").concat(\" - [Modulo: Precio por Producto/Servicio]\"));\r\n }",
"public void mostrarMenuLectura(TomarLectura tomarLectura, Lectura lecturaActual);",
"public static void menuPrincicipal() {\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| Elige una opcion |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 1-Modificar Orden |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 2-Eliminar orden |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 3-Ver todas las ordenes |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 0-Salir |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t}",
"private void btnExecutarLabirinto(){\n log.setText(\"Log de erros\");\n botao[2].setEnabled(false);\n try{\n lab.encontrarAdj();\n lab.andadinha();\n info.setText(\" \");\n visor.setText(lab.toString());\n\n Pilha<Coordenada> caminho = lab.getCaminho();\n Pilha<Coordenada> inverso = new Pilha<Coordenada>();\n while(!caminho.isVazia())\n {\n inverso.guardeUmItem(caminho.recupereUmItem());\n caminho.removaUmItem();\n }\n\n log.setText(\"Caminho percorrido: \");\n while(!inverso.isVazia())\n {\n log.setText(log.getText() + inverso.recupereUmItem().toString() + \" \");\n inverso.removaUmItem();\n }\n }\n catch(Exception erro1){\n log.setText(erro1.getMessage());\n }\n\t\t}",
"public void mostrarReservas() {\n\t\tint numReserva=1;\r\n\t\tfor(Reserva reserva:reservas) {\r\n\t\t\tSystem.out.println(numReserva+\" \"+reserva.toString());\r\n\t\t\tnumReserva++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"public int vol() {\r\n\t\treturn 3;\r\n\t}",
"public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }",
"private void realizarVinculos() {\n btnVoltar = findViewById(R.id.btnVoltar);\n\n edtNome = findViewById(R.id.edtNome);\n edtCPF = findViewById(R.id.edtCpf);\n edtTelefone = findViewById(R.id.edtTelefone);\n edtIdade = findViewById(R.id.edtIdade);\n edtEmail = findViewById(R.id.edtEmail);\n }",
"public void mostrarTablero(){\n\t\tIterator<String> itr = getIteradorMinas();\n\t\tString mina = null;\n\t\tint col;\n\t\tint fila;\n\t\tint conta=1;\n\t\tCasilla casilla;\n\t\tif (lMinas.size()>0){\n\t\t\twhile(itr.hasNext()){\n\t\t\t\tconta++;\n\t\t\t\tmina=itr.next(); \n\t\t\t\tcol=this.separarCoordenadasCol(this.separarCoordenadasString(mina));\n\t\t\t\tfila=this.separarCoordenadasFil(this.separarCoordenadasString(mina));\n\t\t\t\tcasilla=buscarCasilla(fila, col);\n\t\t\t\tif(!casilla.estaDesvelada()&&!casilla.tieneBandera()){\n\t\t\t\t\tcasilla.descubrir();\n\t\t\t\t\tsetChanged();\n\t\t\t\t\tnotifyObservers(fila+\",\"+col+\",\"+10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcomprobarBanderas();\n\t\t\n\t}",
"public MovimentacaoCaixa(GeradorSQL.tipoOperacao operacao) {\n initComponents();\n URL url = this.getClass().getResource(\"/imagens/Icone.png\");\n Image imagemTitulo = Toolkit.getDefaultToolkit().getImage(url);\n this.setIconImage(imagemTitulo);\n String data = (new java.text.SimpleDateFormat(\"dd/MM/yyyy\").format(new java.util.Date(System.currentTimeMillis())));\n jFormattedTextFieldDataMovimentacao.setText(data);\n jFormattedTextFieldDataMovimentacao.setEnabled(false);\n try{\n GeradorSQL geradorSQL = new GeradorSQL();\n geradorSQL.consultaSaldoCaixa();\n if(geradorSQL.consultaSaldoCaixa() != null){\n jTextFieldSaldoCaixa.setText(geradorSQL.consultaSaldoCaixa());\n if(Float.parseFloat(jTextFieldSaldoCaixa.getText()) > 0){\n jTextFieldSaldoCaixa.setForeground(Color.BLUE);\n }else{\n jTextFieldSaldoCaixa.setForeground(Color.RED);\n } \n }else{\n jTextFieldSaldoCaixa.setText(\"0.00\");\n }\n \n jTextFieldSaldoCaixa.setEditable(false); \n } catch(SQLException ex){\n Logger.getLogger(MovimentacaoEstoque.class.getName()).log(Level.SEVERE, null, ex);\n }\n this.operacao = operacao;\n }",
"public void displayVragenlijst() {\n List<Vragenlijst> vragenlijst = winkel.getVragenlijst();\n\n System.out.println(\"Kies een vragenlijst: \");\n\n for (int i = 0; i < vragenlijst.size(); i++) {\n System.out.println((i + 1) + \". \" + vragenlijst.get(i));\n }\n }",
"public void agregarVolumenes(String[] volumenes) {\n for (String volumen : volumenes) {\n if(Double.parseDouble(volumen) < 1){\n desplegableVolumen.addItem(Double.toString(Double.parseDouble(volumen)*1000) + \"ml\");\n }else{\n desplegableVolumen.addItem(volumen + \"L\");\n }\n \n }\n }",
"private void mostrarReservas() {\n\t\tJFReservasAdmin jfres =new JFReservasAdmin();\n\t\tjfres.setVisible(true);\n\t\t\n\t\tMap<Integer,Reserva> reservas = modelo.obtenerReservasPeriodo(per.getIdPeriodo());\n\t\tDefaultTableModel dtm = new DefaultTableModel(new Object[][] {},\n\t\t\t\tnew String[] { \"Dia\", \"Hora\", \"Email\" });\n\n\t\tfor (Integer key : reservas.keySet()) {\n\n\t\t\tdtm.addRow(new Object[] { reservas.get(key).getReserva_dia(), reservas.get(key).getReserva_hora(),reservas.get(key).getEmail() });\n\t\t}\n\t\tjfres.tReservas.setModel(dtm);\n\t}",
"public void nom_ven(){\n \n String SQL_select = \"SELECT Nombres FROM `vendedor` WHERE User = '\"+login.a+\"'\";\n String lolo = \"\";\n try {\n ps = con.getConnection().prepareStatement(SQL_select);\n RS = ps.executeQuery();\n while (RS.next()) { \n lolo = RS.getString(1);\n }\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"no encontro el usuario\");\n }\n \n txtVendedor.setText(lolo);\n }",
"public void verPruevaCandidato(Candidato actualcandidato, Prueba pruebaselect, Convocatoria convoselect, ArrayList rolesselect)\r\n\t{\r\n\t\tList preguntas = null;\r\n\t try \r\n\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t preguntas= PreguntaBD.listar(conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t } catch (Exception e){\r\n\t\t JOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t }\r\n\t if(preguntas != null)\r\n\t {\r\n\t \tif(actualcandidato != null)\r\n\t \t{\r\n\t \t\tif(pruebaselect != null)\r\n\t\t \t{\r\n\t \t\t\tpruevacandidato = new PruebaCandidatoI(this, actualcandidato, pruebaselect, convoselect, rolesselect);\r\n\t \t\t\tpruevacandidato.setVisible(true);\r\n\t\t \t}\r\n\t \t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el tipo de prueba seleccionado.\",\"Presentar Prueba\", JOptionPane.WARNING_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/advertencia.PNG\"));\r\n\t\t\t\t}\r\n\t \t}\r\n\t \telse\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el candidato para preentar la prueba.\",\"Presentar Prueba\", JOptionPane.WARNING_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/advertencia.PNG\"));\r\n\t\t\t}\r\n\t }\r\n\t}",
"public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }"
]
| [
"0.6571364",
"0.6505852",
"0.61559427",
"0.6080081",
"0.6079541",
"0.60614383",
"0.60330194",
"0.6026302",
"0.6013155",
"0.60113186",
"0.6008039",
"0.5992625",
"0.5984357",
"0.59647125",
"0.5944138",
"0.5943195",
"0.59348637",
"0.5906201",
"0.58944076",
"0.58923435",
"0.5891153",
"0.58784235",
"0.5871652",
"0.5864291",
"0.5862847",
"0.5860468",
"0.5854397",
"0.5852648",
"0.5830694",
"0.5812269",
"0.58106905",
"0.58102673",
"0.5779067",
"0.5771071",
"0.57705593",
"0.5770063",
"0.5765021",
"0.57633764",
"0.5756245",
"0.575367",
"0.5752178",
"0.57511336",
"0.573645",
"0.57362044",
"0.5732394",
"0.57273984",
"0.57270944",
"0.57254755",
"0.57246083",
"0.57190424",
"0.57098466",
"0.5709309",
"0.570594",
"0.5705538",
"0.5699941",
"0.56978035",
"0.5697684",
"0.5694416",
"0.56919605",
"0.5691937",
"0.568865",
"0.568415",
"0.5680545",
"0.5675442",
"0.56736165",
"0.5670695",
"0.56689966",
"0.5668007",
"0.5667652",
"0.56622046",
"0.5655248",
"0.5647123",
"0.56462425",
"0.5646049",
"0.5643403",
"0.5642429",
"0.5641417",
"0.56350005",
"0.56324714",
"0.5631371",
"0.56310356",
"0.5619635",
"0.5616127",
"0.56148654",
"0.56102145",
"0.55989885",
"0.5593481",
"0.5590507",
"0.5585716",
"0.55836344",
"0.55828494",
"0.5578563",
"0.55777377",
"0.55759174",
"0.55750316",
"0.55698675",
"0.55682003",
"0.55658615",
"0.55647844",
"0.55589026",
"0.55583453"
]
| 0.0 | -1 |
Nothing to do ... | @Override
public long apply(ICreationCondition condition, ICreationData action, boolean optional, long apply) {
return apply;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void nadar() {\n\t\t\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}",
"public void smell() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"public void method_4270() {}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\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\tprotected void interr() {\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"void berechneFlaeche() {\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"public void baocun() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public void mo38117a() {\n }",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private final void i() {\n }",
"public final void mo91715d() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"public void mo21877s() {\n }",
"private void poetries() {\n\n\t}",
"protected void h() {}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"public void m23075a() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private void test() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"public void mo4359a() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"public void mo21825b() {\n }",
"public void doNothing(){\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public void mo115190b() {\n }",
"public void furyo ()\t{\n }",
"private Rekenhulp()\n\t{\n\t}",
"public void mo21878t() {\n }",
"public abstract void mo56925d();",
"public boolean method_218() {\r\n return false;\r\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"public void mo97908d() {\n }",
"@Override\r\n\tpublic void anularFact() {\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 }",
"public void mo21779D() {\n }",
"public void mo21785J() {\n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"public void mo21792Q() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void mo21795T() {\n }",
"@Override\n\tpublic void exucute() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void logic() {\n\n\t}",
"public static void doNothing(){\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void processing() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo12628c() {\n }",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"private void sub() {\n\n\t}",
"private void strin() {\n\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public void mo21793R() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo21791P() {\n }",
"public abstract void mo27386d();",
"public void swrap() throws NoUnusedObjectExeption;",
"public void mo21794S() {\n }"
]
| [
"0.6758159",
"0.66072506",
"0.6602716",
"0.6530756",
"0.6504949",
"0.64956236",
"0.64941657",
"0.6480964",
"0.6415343",
"0.64063305",
"0.6354142",
"0.6348092",
"0.6348092",
"0.6326873",
"0.6326754",
"0.6320198",
"0.62585723",
"0.62585723",
"0.6256142",
"0.62456465",
"0.62257147",
"0.6215014",
"0.6214908",
"0.6204647",
"0.6190733",
"0.6155353",
"0.61540234",
"0.6148795",
"0.61393905",
"0.6136076",
"0.6129538",
"0.6124435",
"0.6108872",
"0.6097282",
"0.6080986",
"0.6064499",
"0.6059861",
"0.6056432",
"0.60414135",
"0.60309017",
"0.60136276",
"0.6002805",
"0.59990776",
"0.5997603",
"0.59952056",
"0.5977749",
"0.5969951",
"0.5969705",
"0.59603155",
"0.5959583",
"0.59582293",
"0.59582293",
"0.59563464",
"0.59562784",
"0.5952382",
"0.59494054",
"0.59453803",
"0.5940614",
"0.593544",
"0.59294796",
"0.59268254",
"0.5924392",
"0.5912166",
"0.59075874",
"0.5899432",
"0.589773",
"0.5895846",
"0.5892156",
"0.5884061",
"0.5881437",
"0.5878685",
"0.5878685",
"0.5878685",
"0.5878685",
"0.5878685",
"0.5878685",
"0.5878685",
"0.58750576",
"0.58711755",
"0.58649623",
"0.58622223",
"0.5860342",
"0.5858481",
"0.585632",
"0.5856103",
"0.58513314",
"0.585034",
"0.58498216",
"0.5848775",
"0.5843557",
"0.5843111",
"0.58425856",
"0.5836945",
"0.58354753",
"0.5834791",
"0.58336246",
"0.5833386",
"0.5833025",
"0.58279574",
"0.5827943",
"0.5826572"
]
| 0.0 | -1 |
Nothing to do ... | @Override
public void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void nadar() {\n\t\t\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}",
"public void smell() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"public void method_4270() {}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\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\tprotected void interr() {\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"void berechneFlaeche() {\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"public void baocun() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public void mo38117a() {\n }",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private final void i() {\n }",
"public final void mo91715d() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"public void mo21877s() {\n }",
"private void poetries() {\n\n\t}",
"protected void h() {}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"public void m23075a() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private void test() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"public void mo4359a() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"public void mo21825b() {\n }",
"public void doNothing(){\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public void mo115190b() {\n }",
"public void furyo ()\t{\n }",
"private Rekenhulp()\n\t{\n\t}",
"public void mo21878t() {\n }",
"public abstract void mo56925d();",
"public boolean method_218() {\r\n return false;\r\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"public void mo97908d() {\n }",
"@Override\r\n\tpublic void anularFact() {\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 }",
"public void mo21779D() {\n }",
"public void mo21785J() {\n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"public void mo21792Q() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void mo21795T() {\n }",
"@Override\n\tpublic void exucute() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void logic() {\n\n\t}",
"public static void doNothing(){\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void processing() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo12628c() {\n }",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"private void sub() {\n\n\t}",
"private void strin() {\n\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public void mo21793R() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo21791P() {\n }",
"public abstract void mo27386d();",
"public void swrap() throws NoUnusedObjectExeption;",
"public void mo21794S() {\n }"
]
| [
"0.6758159",
"0.66072506",
"0.6602716",
"0.6530756",
"0.6504949",
"0.64956236",
"0.64941657",
"0.6480964",
"0.6415343",
"0.64063305",
"0.6354142",
"0.6348092",
"0.6348092",
"0.6326873",
"0.6326754",
"0.6320198",
"0.62585723",
"0.62585723",
"0.6256142",
"0.62456465",
"0.62257147",
"0.6215014",
"0.6214908",
"0.6204647",
"0.6190733",
"0.6155353",
"0.61540234",
"0.6148795",
"0.61393905",
"0.6136076",
"0.6129538",
"0.6124435",
"0.6108872",
"0.6097282",
"0.6080986",
"0.6064499",
"0.6059861",
"0.6056432",
"0.60414135",
"0.60309017",
"0.60136276",
"0.6002805",
"0.59990776",
"0.5997603",
"0.59952056",
"0.5977749",
"0.5969951",
"0.5969705",
"0.59603155",
"0.5959583",
"0.59582293",
"0.59582293",
"0.59563464",
"0.59562784",
"0.5952382",
"0.59494054",
"0.59453803",
"0.5940614",
"0.593544",
"0.59294796",
"0.59268254",
"0.5924392",
"0.5912166",
"0.59075874",
"0.5899432",
"0.589773",
"0.5895846",
"0.5892156",
"0.5884061",
"0.5881437",
"0.5878685",
"0.5878685",
"0.5878685",
"0.5878685",
"0.5878685",
"0.5878685",
"0.5878685",
"0.58750576",
"0.58711755",
"0.58649623",
"0.58622223",
"0.5860342",
"0.5858481",
"0.585632",
"0.5856103",
"0.58513314",
"0.585034",
"0.58498216",
"0.5848775",
"0.5843557",
"0.5843111",
"0.58425856",
"0.5836945",
"0.58354753",
"0.5834791",
"0.58336246",
"0.5833386",
"0.5833025",
"0.58279574",
"0.5827943",
"0.5826572"
]
| 0.0 | -1 |
A constructor for validating and loading data. Use this constructor when the data should be validated and loaded upon object creation. If validation fails, the data is not loaded. | public QuestionTF(String line, int lineNumber) {
if (this.validate(line, lineNumber)) {
this.loadData(line);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Data() {\n }",
"public Data() {\n }",
"public Data() {}",
"public Data() {\n \n }",
"public InitialData(){}",
"public Validation() {\n }",
"private Validate(){\n //private empty constructor to prevent object initiation\n }",
"public UserData() {\n }",
"public UserData() {\n\t\tvalid = false;\n\t\tcode = \"\";\n\t\t\n\t\tphone = \"\";\n\t\temail = \"\";\n\t\t\n\t\taccounts = new ArrayList<Account>();\n\t\tpayees = new ArrayList<Payee>();\n\t}",
"protected void validate()\r\n\t{\r\n\t\tif( this.mapper==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the Mapper of this dataset.\");\r\n\t\tif( this.input_format==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the InputFormat of this dataset.\");\r\n\t\tif( this.inputs==null || this.inputs.size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the input path(s) of this dataset\");\r\n\t\tif ( this.getSchema()==null || this.getSchema().size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the schema of this dataset first\");\r\n\t}",
"public CompanyData() {\r\n }",
"public ListingFormValidationObject() {\n this.titleValid = true;\n this.descriptionValid = true;\n this.initPriceValid = true;\n this.minBidValid = true;\n this.startDateAndTimeValid = true;\n this.categoryValid = true;\n this.endDateAndTimeValid = true;\n }",
"public UserDataLoadException() {\n }",
"public DataModel()\r\n {\r\n System.out.println(\"New DataModel created\");\r\n \r\n languageList = new LanguageList();\r\n }",
"private void validateData() {\n }",
"public DataRequest() {\n\t\tfilters = new ArrayList<FilteringRule>();\n\t\tsort_by = new ArrayList<SortingRule>();\n\t}",
"public Model(DataHandler data){\n //assign the data parameter to the instance\n //level variable data. The scope of the parameter\n //is within the method and that is where the JVM \n //looks first for a variable or parameter so we \n //need to specify that the instance level variable \n //is to be used by using the keyword 'this' followed \n //by the '.' operator.\n this.data = data;\n }",
"public DesastreData() { //\r\n\t}",
"public StudentXMLRepository(Validator<Student> studentValidator,String XMLfile){\n super(studentValidator);\n this.XMLfile=XMLfile;\n try {\n loadData();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private DatabaseValidationProperties() {}",
"@Test\n public void validate_Constructor() {\n try {\n Service testService = new Service(\"Camera Installation\", 250, \"category_test\");\n assertEquals(\"Service getter Failed - name\", \"Camera Installation\", testService.getName());\n assertEquals(\"Service getter Failed - rate\", 250, testService.getRate());\n assertEquals(\"Service getter Failed - categoryID\", \"category_test\", testService.getCategoryKey());\n } catch (InvalidDataException e) {\n fail(\"Availability construction failed. Error: \" + e.getMessage());\n }\n\n // Make sure InvalidDataException is thrown for invalid data\n try {\n new Service(\"Illegal-service+name\", 45, \"categoryKey\");\n fail(\"Service Constructor Failed - Illegal Name\");\n } catch (InvalidDataException ignore) {}\n try {\n new Service(\"service name\", -45, \"categoryKey\");\n fail(\"Service Constructor Failed - Illegal rate\");\n } catch (InvalidDataException ignore) {}\n try {\n new Service(\"service name\", 45, \"\");\n fail(\"Service Constructor Failed - Illegal category key\");\n } catch (InvalidDataException ignore) {}\n\n }",
"public Validate() {\n }",
"public StringData1() {\n }",
"public TriangleData()\r\n {\r\n knownCount = 0;\r\n /*--------------------------------------------------------------------*\r\n Input is validated by set. \r\n Must be >= 0.0\r\n Is there a practical maximum?\r\n \r\n Can you throw an exception in a constructor?\r\n *--------------------------------------------------------------------*/\r\n set( DataID.DATA_A, 0.0 );\r\n set( DataID.DATA_B, 0.0 );\r\n set( DataID.DATA_C, 0.0 );\r\n\r\n }",
"public FilterData() {\n }",
"private Validador() {\r\n }",
"public DataSourceValidationIncompleteException() {\n }",
"public CompositeData()\r\n {\r\n }",
"protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }",
"public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}",
"@Override\n public DataResource build() throws ConstraintViolationException {\n VocabUtil.getInstance().validate(dataResourceImpl);\n return dataResourceImpl;\n }",
"public DataBean() {\r\n \r\n }",
"public DataManage() {\r\n\t\tsuper();\r\n\t}",
"public InvalidUserDataException() {\n \n }",
"public Question(String data) {\n //Transforma a string recebida pelo pedido http para json\n JsonParser jsonParser = new JsonParser();\n JsonObject Question = (JsonObject) jsonParser.parse(data);\n //Exibe os dados, em formato json\n System.out.println(Question.entrySet());\n /**\n * Revalidar TUDO, formatos, campos vazios, TUDO!!\n */\n regist();\n validateData();\n //Associa os dados ao objecto Question\n this._id = getLastID() + 1; //ir buscar o max id da bd + 1 \n this.title = Question.get(\"title\").getAsString();\n this.category = Question.get(\"category\").getAsInt();\n this.description = Question.get(\"description\").getAsString();\n this.image = Question.get(\"image\").getAsString();\n this.algorithm = Question.get(\"algoritmo\").getAsString();\n }",
"public StringData() {\n\n }",
"public Datos(){\n }",
"public DataRecord() {\n super(DataTable.DATA);\n }",
"private Data initialise() {\n \r\n getRoomsData();\r\n getMeetingTimesData();\r\n setLabMeetingTimes();\r\n getInstructorsData();\r\n getCoursesData();\r\n getDepartmentsData();\r\n getInstructorFixData();\r\n \r\n for (int i=0;i<departments.size(); i++){\r\n numberOfClasses += departments.get(i).getCourses().size();\r\n }\r\n return this;\r\n }",
"public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<>();\n this.siteVisits = new HashMap<>();\n this.imageUploads = new HashMap<>();\n }",
"public DataAdapter() {\n }",
"public JsonDataset() {\r\n\t\tsuper();\r\n\t\tlogger.trace(\"JsonDataset() - start\");\r\n\t\tlogger.trace(\"JsonDataset() - end\");\r\n\t}",
"public DataSet() {\r\n \r\n }",
"public DatasetReader()\n\t{\n\t\treviews = new ArrayList<Review>();\n\t\tratings = new HashMap<Double,List<Double>>();\n\t\tproducts = new HashMap<String, Map<String,Double>>();\n\t\tproductRatings = new HashMap<String, List<Double>>();\n\t\treInstanceList = new ArrayList<ReviewInstance>();\n\t\treInstanceMap = new HashMap<String, ReviewInstance>();\n\t}",
"public LocationData()\n {\n }",
"public ValidationComponent ()\n\t\t{\n\t\t}",
"private ValidationError() {\n }",
"public Validation(model.User.StringData user) {\n // validationUtils method validates each user input (String even if destined for other type) from WebUser object\n // side effect of validationUtils method puts validated, converted typed value into TypedData object\n this.user = user;\n\n // this is not needed for insert, but will be needed for update.\n if (user.fantasyUserId != null && user.fantasyUserId.length() != 0) {\n this.fieldErrors.fantasyUserId = model.User.ValidationUtils.integerValidationMsg(user.fantasyUserId, true);\n }\n this.fieldErrors.fname = model.User.ValidationUtils.stringValidationMsg(user.fname, 45, true);\n this.fieldErrors.lname = model.User.ValidationUtils.stringValidationMsg(user.lname, 45, true);\n this.fieldErrors.email = model.User.ValidationUtils.stringValidationMsg(user.email, 45, true);\n this.fieldErrors.password = model.User.ValidationUtils.stringValidationMsg(user.password, 45, true);\n this.fieldErrors.passwordConf = model.User.ValidationUtils.stringValidationMsg(user.passwordConf, 45, true);\n \n if (user.password.compareTo(user.passwordConf) != 0) {\n this.fieldErrors.passwordConf = \"Both passwords must match.\";\n }\n \n \n String allMessages = this.fieldErrors.getAllStrings();\n //System.out.println(allMessages);\n this.valid = (allMessages.length() == 0);\n }",
"Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}",
"private TigerData() {\n initFields();\n }",
"private DataManager() {\n }",
"public ModelData(CallBackInterface _myContainer, String filename) {\n\t\tthis(_myContainer);\n\t\tload(filename);\n\t}",
"public User() throws InvalidUserDataException {\n this(DEFAULT_ID, DEFAULT_PASSWORD, DEFAULT_FIRST_NAME, \n DEFAULT_LAST_NAME, DEFAULT_EMAIL_ADDRESS, new Date(), \n new Date(), DEFAULT_TYPE, DEFAULT_ENABLED_STATUS);\n }",
"public DataModel(){\n this.listeners = new ArrayList<>();\n this.data = new ArrayList<>();\n }",
"public UsersDataSet() {}",
"protected VersionData() {}",
"public WERecordDataModel()\n\t{\n\t\tsuper();\n\t\tsetEqFileName(RECORD_NAME);\n\t\tinitMessages();\n\t}",
"private void constructObjectsExpectFailure(String missingData) throws Exception {\n\t\ttry {\n\t\t\tConfig.getConfig();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (CustomValidationException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\n\t\ttry {\n\t\t\tStudents.forceLoad();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (ConfigNotValidException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tnew Supervisors();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (ConfigNotValidException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\t}",
"@Test\n public void constructorTest(){\n String retrievedName = doggy.getName();\n Date retrievedBirthDate = doggy.getBirthDate();\n Integer retrievedId = doggy.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }",
"protected void loadData()\n {\n }",
"private RoleData() {\n initFields();\n }",
"public GenericSchemaValidator() {}",
"public ValidaCpf() {\n }",
"public LineData()\n\t{\n\t}",
"public TradeData() {\r\n\r\n\t}",
"public void validate () throws ModelValidationException\n\t\t\t{\n\t\t\t\tkeyClassName = validateKeyClassName(className);\n\t\t\t\t// initilialize keyClass field \n\t\t\t\tkeyClass = getModel().getClass(keyClassName, getClassLoader());\n\t\t\t\tvalidateClass();\n\t\t\t\tvalidateConstructor();\n\t\t\t\tvalidateFields();\n\t\t\t\tvalidateMethods();\n\t\t\t}",
"public PollData() {\n\n\n super(TYPE_NAME);\n }",
"public ArticleData() {\r\n\t\tid = Constants.EMPTY_STRING;\r\n\t\tname = Constants.EMPTY_STRING;\r\n\t\turl = Constants.EMPTY_STRING;\r\n\t\tdesc = Constants.EMPTY_STRING;\r\n\t\tlevels = Constants.EMPTY_STRING;\r\n\t\twebSiteId = Constants.EMPTY_STRING;\r\n\t\tmatched = Constants.EMPTY_STRING;\r\n\t\tcreateBy = Constants.EMPTY_STRING;\r\n\t\tcreateDate = Constants.EMPTY_STRING;\r\n\t\tlastUpdateBy = Constants.EMPTY_STRING;\r\n\t\tlastUpdateDate = Constants.EMPTY_STRING;\r\n\t\tenabled = Constants.EMPTY_STRING;\r\n\t\tpostTableName = Constants.EMPTY_STRING;\r\n\t\treturnPage = Constants.EMPTY_STRING;\r\n\t\twebSiteShowName = Constants.EMPTY_STRING;\r\n\t\treturnDirect = Constants.EMPTY_STRING;\r\n\t\tkeyWordTableName = Constants.EMPTY_STRING;\r\n\t\ttitle = Constants.EMPTY_STRING;\r\n\t\ttitleCounter = Constants.EMPTY_STRING;\r\n\t\tbufferStartCounter = Constants.EMPTY_STRING;\r\n\t\tbufferEndCounter = Constants.EMPTY_STRING;\r\n\t\tcatId = Constants.EMPTY_STRING;\r\n\t\tpostUrl = Constants.EMPTY_STRING;\r\n\t}",
"protected boolean isValidData() {\n return true;\n }",
"public ListingData() {\r\n\t\tsuper();\r\n\t}",
"public JSONLoader() {}",
"public StringDataList() {\n }",
"public Validacion(String descripcion) {\n super(descripcion);\n }",
"public mainData() {\n }",
"private User(Parcel in) {\n mData = in.readInt();\n }",
"protected User(Parcel in) {\n this.names = in.readString();\n this.lastnames = in.readString();\n this.age = in.readInt();\n }",
"private DataObject(Builder builder) {\n super(builder);\n }",
"public StudentInfo() {\n initComponents();\n\n loadData();\n loadComboBox();\n }",
"public BasicLoader() {\n }",
"public void validation() {\n ValidationData();\n if (Validation == null) {\n Toast.makeText(this, \"No Data Found\", Toast.LENGTH_SHORT).show();\n } else {\n getHistory();\n }\n }",
"private void initDataLoader() {\n\t}",
"public DataSet() {\n this.bars = new ArrayList<Bar>();\n this.reviews = new ArrayList<Review>();\n }",
"private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }",
"public NetworkData() {\n }",
"public Loader(){\n\t\tthis(PLANETS, NEIGHBOURS);\n\t}",
"public DataSet() {\n labels = new HashMap<>();\n locations = new HashMap<>();\n counter= new AtomicInteger(0);\n }",
"public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}",
"public AnalysisDatasets() {\n }",
"protected abstract void loadData();",
"protected UserWordData() {\n\n\t}",
"public WorkDataFile()\n\t{\n\t\tsuper();\n\t}",
"private void loadData() {\n\t\tOptional<ServerData> loaded_data = dataSaver.load();\n\t\tif (loaded_data.isPresent()) {\n\t\t\tdata = loaded_data.get();\n\t\t} else {\n\t\t\tdata = new ServerData();\n\t\t}\n\t}",
"public Customer() // default constructor to initialize data\r\n\t{\r\n\t\tthis.address = null;\r\n\t\tthis.name = null;\r\n\t\tthis.phoneNumber = null;\r\n\t\t// intializes the data\r\n\t}",
"public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }",
"public DataControl() throws DatabaseException{\r\n\t\tplayerDataService=new PlayerDataServiceImp();\r\n//\t\tteamDataService=new TeamDataServiceImp();\r\n//\t\tmatchDataService=new MatchDataServiceImp();\r\n\t}",
"public TestDataBean() {\n\t}",
"private ValidationUtils() {}",
"public DataManager() {\n\t\tthis(PUnit == null ? \"eElectionsDB\" : PUnit);\n\t}",
"public FlexData() {\n entryCollectionList = null;\n entryCollectionMap = null;\n type = Type.UNKNOWN;\n standardDateFormat = \"yyyy-MM-dd\"; // DB2-Datum\n\t}",
"private Domain(Parcel in){\n this.IdDomain = in.readLong();\n this.IdCategoryRoot = in.readLong();\n this.Name = in.readString();\n this.Description = in.readString();\n this.ImageURL = in.readString();\n }",
"private AuthenticationData() {\n\n }"
]
| [
"0.6633789",
"0.6633789",
"0.6630041",
"0.6621978",
"0.6350361",
"0.62528324",
"0.62210274",
"0.61945397",
"0.61474854",
"0.61457664",
"0.6136484",
"0.61186665",
"0.6089783",
"0.6061651",
"0.6031952",
"0.60319394",
"0.6025586",
"0.59590626",
"0.59297645",
"0.592001",
"0.59118533",
"0.589917",
"0.5893785",
"0.58611757",
"0.58382314",
"0.5816219",
"0.5800235",
"0.57989734",
"0.5796065",
"0.5780847",
"0.57674056",
"0.57638896",
"0.5741702",
"0.5737143",
"0.56931615",
"0.5690921",
"0.56846124",
"0.5678758",
"0.5674771",
"0.567402",
"0.56738985",
"0.56551343",
"0.5654635",
"0.5651689",
"0.5638787",
"0.5634296",
"0.56333035",
"0.56301796",
"0.5625346",
"0.5622302",
"0.56153154",
"0.5614711",
"0.5606574",
"0.5604665",
"0.5602144",
"0.55956787",
"0.55926126",
"0.55762315",
"0.5572011",
"0.55708283",
"0.5556629",
"0.5554614",
"0.5553339",
"0.55384946",
"0.5534317",
"0.5530091",
"0.552412",
"0.55070007",
"0.550514",
"0.55008096",
"0.549602",
"0.54950583",
"0.5484768",
"0.54826266",
"0.5481043",
"0.5474778",
"0.5474491",
"0.5473967",
"0.5472385",
"0.545193",
"0.5447459",
"0.54474044",
"0.54442036",
"0.5439512",
"0.542761",
"0.5423326",
"0.54143214",
"0.5413773",
"0.5411631",
"0.54099935",
"0.5400109",
"0.5383882",
"0.5382602",
"0.53821176",
"0.53793854",
"0.5374687",
"0.5374136",
"0.5354422",
"0.5353675",
"0.53514975",
"0.53496253"
]
| 0.0 | -1 |
Basic constructor Use this constructor when validation and data loading should be handled separately. | public QuestionTF() {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Data() {\n \n }",
"public Data() {\n }",
"public Data() {\n }",
"public InitialData(){}",
"public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}",
"public Constructor(){\n\t\t\n\t}",
"public Data() {}",
"public BasicLoader() {\n }",
"public DataManage() {\r\n\t\tsuper();\r\n\t}",
"public DataAdapter() {\n }",
"public CompanyData() {\r\n }",
"public DataModel()\r\n {\r\n System.out.println(\"New DataModel created\");\r\n \r\n languageList = new LanguageList();\r\n }",
"public Datos(){\n }",
"public Model() {\n\t}",
"public Model() {\n\t}",
"private Model(){}",
"public DesastreData() { //\r\n\t}",
"public JsonDataset() {\r\n\t\tsuper();\r\n\t\tlogger.trace(\"JsonDataset() - start\");\r\n\t\tlogger.trace(\"JsonDataset() - end\");\r\n\t}",
"public Model(DataHandler data){\n //assign the data parameter to the instance\n //level variable data. The scope of the parameter\n //is within the method and that is where the JVM \n //looks first for a variable or parameter so we \n //need to specify that the instance level variable \n //is to be used by using the keyword 'this' followed \n //by the '.' operator.\n this.data = data;\n }",
"public UserData() {\n }",
"protected Book() {\n this.title = \"Init\";\n this.author = \"Init\";\n this.bookCategories = new HashSet<>(10);\n }",
"public ListingData() {\r\n\t\tsuper();\r\n\t}",
"public DataRequest() {\n\t\tfilters = new ArrayList<FilteringRule>();\n\t\tsort_by = new ArrayList<SortingRule>();\n\t}",
"public Validation() {\n }",
"public DataBean() {\r\n \r\n }",
"public DB() {\r\n\t\r\n\t}",
"private TigerData() {\n initFields();\n }",
"public FilterData() {\n }",
"private Validate(){\n //private empty constructor to prevent object initiation\n }",
"public Lanceur() {\n\t}",
"public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}",
"public Pasien() {\r\n }",
"public SalesRecords() {\n super();\n }",
"private Instantiation(){}",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"public StudentInfo() {\n initComponents();\n\n loadData();\n loadComboBox();\n }",
"public Job() {\n\t\t\t\n\t\t}",
"public Tra() {\n super();\n initComponents();\n loadData();\n }",
"public mainData() {\n }",
"public CyanSus() {\n\n }",
"public WERecordDataModel()\n\t{\n\t\tsuper();\n\t\tsetEqFileName(RECORD_NAME);\n\t\tinitMessages();\n\t}",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"public Book() {\n\t\t// Default constructor\n\t}",
"public CSSTidier() {\n\t}",
"public TradeData() {\r\n\r\n\t}",
"public StudentRecord() {}",
"public DocumentUtil() {\n // Because this class can be instantiated by other classes many times, we only\n // want to call the initialize() function\n // if we will be using the getProblemType() function below.\n }",
"public DefaultObjectModel ()\n {\n this (new Schema ());\n }",
"public DataSet() {\r\n \r\n }",
"public Aanbieder() {\r\n\t\t}",
"Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}",
"public StringData1() {\n }",
"private CustomerReader()\r\n\t{\r\n\t}",
"public DABeneficios() {\n }",
"private DataManager() {\n }",
"public AllOne() {\n \n }",
"public ProcessDataMapper() {\t}",
"public DataCaseWorker() {\n super();\n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"public CompositeData()\r\n {\r\n }",
"public AnalysisDatasets() {\n }",
"public Job() {\r\n\t\tSystem.out.println(\"Constructor\");\r\n\t}",
"public PollData() {\n\n\n super(TYPE_NAME);\n }",
"public Model() {\n }",
"public Model() {\n }",
"public Model() {\n }",
"public PSRelation()\n {\n }",
"public WorkDataFile()\n\t{\n\t\tsuper();\n\t}",
"public Tbdtokhaihq3() {\n super();\n }",
"public DataFactoryImpl() {\n\t\tsuper();\n\t}",
"public Demo() {\n\t\t\n\t}",
"public Analysis() {\n this(\"analysis\", null);\n }",
"private Validador() {\r\n }",
"public DatasetReader()\n\t{\n\t\treviews = new ArrayList<Review>();\n\t\tratings = new HashMap<Double,List<Double>>();\n\t\tproducts = new HashMap<String, Map<String,Double>>();\n\t\tproductRatings = new HashMap<String, List<Double>>();\n\t\treInstanceList = new ArrayList<ReviewInstance>();\n\t\treInstanceMap = new HashMap<String, ReviewInstance>();\n\t}",
"public NetworkData() {\n }",
"public Loader(){\n\t\tthis(PLANETS, NEIGHBOURS);\n\t}",
"private BaseDatos() {\n }",
"public User() {\r\n\t\temployee=new HashMap<Integer, Employee>();\r\n\t\tperformance=new HashMap<Employee,String>();\r\n\t}",
"public Documento() {\n\n\t}",
"protected PricingModel() {\n }",
"public ArticleData() {\r\n\t\tid = Constants.EMPTY_STRING;\r\n\t\tname = Constants.EMPTY_STRING;\r\n\t\turl = Constants.EMPTY_STRING;\r\n\t\tdesc = Constants.EMPTY_STRING;\r\n\t\tlevels = Constants.EMPTY_STRING;\r\n\t\twebSiteId = Constants.EMPTY_STRING;\r\n\t\tmatched = Constants.EMPTY_STRING;\r\n\t\tcreateBy = Constants.EMPTY_STRING;\r\n\t\tcreateDate = Constants.EMPTY_STRING;\r\n\t\tlastUpdateBy = Constants.EMPTY_STRING;\r\n\t\tlastUpdateDate = Constants.EMPTY_STRING;\r\n\t\tenabled = Constants.EMPTY_STRING;\r\n\t\tpostTableName = Constants.EMPTY_STRING;\r\n\t\treturnPage = Constants.EMPTY_STRING;\r\n\t\twebSiteShowName = Constants.EMPTY_STRING;\r\n\t\treturnDirect = Constants.EMPTY_STRING;\r\n\t\tkeyWordTableName = Constants.EMPTY_STRING;\r\n\t\ttitle = Constants.EMPTY_STRING;\r\n\t\ttitleCounter = Constants.EMPTY_STRING;\r\n\t\tbufferStartCounter = Constants.EMPTY_STRING;\r\n\t\tbufferEndCounter = Constants.EMPTY_STRING;\r\n\t\tcatId = Constants.EMPTY_STRING;\r\n\t\tpostUrl = Constants.EMPTY_STRING;\r\n\t}",
"public mapper3c() { super(); }",
"public Livro() {\n\n\t}",
"public ValidationComponent ()\n\t\t{\n\t\t}",
"public Student() {\r\n\t\timePrezime = \"Petar Petrovic\";\r\n\t\tfakultet = \"Matematicki\";\r\n\t\tgodina = 1;\r\n\t}",
"public Course() {\n\n\t}",
"public SensorData() {\n\n\t}",
"private ClinicFileLoader() {\n\t}",
"public Parser()\n {\n //nothing to do\n }",
"public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY,\r\n Aspiration.EMPTY, 0.00, 0.00, 0.00, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n }",
"public TurbineRunDataService()\n {\n super();\n }",
"public ModelBolting(){}",
"public LoaderInfo( ) { \n\t\tsuper( null );\n\t}",
"private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}",
"public TestDataBean() {\n\t}",
"public JSONLoader() {}",
"public StringDataList() {\n }",
"public DataSet() {\n labels = new HashMap<>();\n locations = new HashMap<>();\n counter= new AtomicInteger(0);\n }",
"public Chauffeur() {\r\n\t}",
"protected VersionData() {}"
]
| [
"0.70472926",
"0.70373166",
"0.6967455",
"0.6967455",
"0.689495",
"0.687403",
"0.68195873",
"0.68056536",
"0.6782513",
"0.67414844",
"0.67114234",
"0.6709819",
"0.66960067",
"0.66370845",
"0.66221035",
"0.66221035",
"0.6576438",
"0.65701693",
"0.65436083",
"0.65366995",
"0.6502448",
"0.6500121",
"0.64894116",
"0.6480223",
"0.6466701",
"0.64635193",
"0.6454689",
"0.64388925",
"0.643256",
"0.6411762",
"0.6405245",
"0.63935685",
"0.6391904",
"0.6391134",
"0.6380926",
"0.63717705",
"0.6365717",
"0.6363625",
"0.6362336",
"0.63613534",
"0.63538",
"0.6344708",
"0.63445044",
"0.6343795",
"0.6339431",
"0.6337839",
"0.63336784",
"0.6327285",
"0.6320303",
"0.63024783",
"0.6301211",
"0.63001215",
"0.6292745",
"0.6292084",
"0.6290653",
"0.62872905",
"0.62829053",
"0.6272221",
"0.6267191",
"0.6265892",
"0.62539196",
"0.62407255",
"0.6230406",
"0.6222529",
"0.6221965",
"0.6221965",
"0.6221965",
"0.6220822",
"0.6213043",
"0.6209472",
"0.61974585",
"0.61959076",
"0.61938477",
"0.6193689",
"0.619234",
"0.6191351",
"0.61911476",
"0.61904156",
"0.61895126",
"0.6185678",
"0.6185452",
"0.61835384",
"0.6180655",
"0.617152",
"0.61712873",
"0.61653656",
"0.61639774",
"0.61624265",
"0.61616313",
"0.6161045",
"0.615975",
"0.61578715",
"0.61573917",
"0.615603",
"0.6155778",
"0.61541945",
"0.61535627",
"0.6148658",
"0.6144848",
"0.6144213",
"0.6142384"
]
| 0.0 | -1 |
delete items when swiping from the main list | @Override
public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {
viewModel.delete(adapter.getNoteAtPosition(viewHolder.getAdapterPosition()));
Toast.makeText(MainActivity.this, "Drink deleted!", Toast.LENGTH_SHORT).show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n int position = viewHolder.getAdapterPosition();\n adapter.arrayList.remove(position);\n adapter.notifyDataSetChanged();\n\n }",
"@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n int position = (viewHolder.getAdapterPosition());\n mMainViewModel.delete(mShoppingListItems.get(position));\n }",
"@Override\n public void onClick(View v) {\n listItems.remove(position);\n //close the swipe layout\n holder.swipeLayout.close();\n //update adapter\n activity.updateAdapter();\n }",
"@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n int position = viewHolder.getAdapterPosition();\n PinItem item = pinItems.remove(position);\n // delete the item from the DB\n dbHelper.deleteItem(item);\n mRecyclerView.getAdapter().notifyItemRemoved(position);\n\n }",
"public void deleteItem(ActionEvent actionEvent) {\n // find the list that the item belongs in\n // removeItem() from its parenting list\n }",
"private void removeList()\r\n {\n if (tableCheckBinding != null)\r\n {\r\n tableCheckBinding.dispose();\r\n tableCheckBinding = null;\r\n }\r\n\r\n // m_TableViewer.setInput(null);\r\n WritableList newList = new WritableList(SWTObservables.getRealm(Display.getDefault()));\r\n for (int i = 0; i < 10; ++i)\r\n {\r\n newList.add(this.generateNewDataModelItem());\r\n }\r\n m_TableViewer.setInput(newList);\r\n }",
"@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}",
"@FXML\n public void removeListItem(ActionEvent event) throws IOException {\n int removeItemIndex = unseenPacketList.getSelectionModel().getSelectedIndex();\n if (removeItemIndex < 0) {\n \tJOptionPane.showMessageDialog(null, \"Cannot remove from already empty list.\");\n } else {\n \tUpdateHandler.getAllPacketsList().remove(removeItemIndex);\n unseenPacketList.getItems().remove(removeItemIndex);\n UpdateHandler.getUnseenPacketListIndex().remove(removeItemIndex);\n }\n \n }",
"public void setCurrentListToBeUndoneList();",
"private void undoDelete() {\n if (!mReversDeleteItemPositionsList.isEmpty()) {\n\n mAllItems.add(mReversDeleteItemPositionsList.get(mReversDeleteItemPositionsList.size() - 1),\n mReverseDeleteItemsList.get(mReverseDeleteItemsList.size() - 1));\n //subtract from pallet total\n mPickHandlerInterface.subtractFromTOtal(Integer.parseInt(mReverseDeleteItemsList.get(mReversDeleteItemPositionsList.size() - 1).getCaseQuantity()));\n notifyItemInserted(mReversDeleteItemPositionsList.get(mReversDeleteItemPositionsList.size() - 1));\n mReverseDeleteItemsList.remove(mReverseDeleteItemsList.size() - 1);\n mReversDeleteItemPositionsList.remove(mReversDeleteItemPositionsList.size() - 1);\n showUndoSnackbar();\n SendInformationToActivity();\n\n }\n\n }",
"public void removeAllItems ();",
"@Override\n\t\t\tpublic boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\t\t\n\t\t\t\t \n\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\tcase R.id.delete:\n\t\t\t\t\t\n\t\t\t\t\tfor(messagewrapper obje:dummyList){\n\t\t\t\t\t\t\n\t\t\t\t\t\tmAdapter.remove(obje);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcheckedCount=0;\n\t\t\t\t\t\n\t\t\t\t\tmode.finish();\n\t\t\t\t\treturn true;\n\t\t\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public void removeSelectedAction() {\n\t\tvar selectedItems = pairsListView.getSelectionModel().getSelectedItems();\n\t\tpairsListView.getItems().removeAll(selectedItems);\n\t}",
"void notifyListItemRemoved(int position);",
"void onSwipedClear();",
"boolean removAble(InputItem item);",
"void onItemDeleted();",
"@Override\n\t\t\t\t\tpublic void OnSelectItem(Item item) {\n\n\t\t\t\t\t\tif(!toDelete.contains(item))\n\t\t\t\t\t\t\ttoDelete.add(item);\n\t\t\t\t\t}",
"@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder,\n int direction) {\n int position = viewHolder.getAdapterPosition();\n Anime myAnime = mAdapter.getAnimeAtPosition(position);\n Toast.makeText(MainActivity.this, \"Deleting \" +\n myAnime.getTitle(), Toast.LENGTH_LONG).show();\n\n // Delete the word\n mAnimeViewModel.deleteAnime(myAnime);\n }",
"public void deleteTDList(ActionEvent actionEvent) {\n // find the tdlist being referenced by the button,\n // removeList() from it's parenting group\n }",
"private void bindSwipeToDelete() {\n ItemTouchHelper itemTouchHelper = new\n ItemTouchHelper(new SwipeToDeleteCallback(getContext(),basketListAdapter));\n itemTouchHelper.attachToRecyclerView(binding.recyclerViewVirtualBasket);\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tItemType i = getSelectedItem();\n\t\t\t\tif(i != null)\n\t\t\t\t{\t\n\n\t\t\t\t\tfinal String msg = \"Delete \"+i.getName() + \"?\";\n\t\t\t\t\tif(!confirmDelete(msg))\n\t\t\t\t\t\treturn;\n\t\t\t\t\ti.removeContainer(GeneralItemList.this);\n\t\t\t\t\ti.destroy();\n\t\t\t\t}\n\t\t\t\titems.remove(i);\n\t\t\t\tlist.clearSelection();\n\t\t\t\tlist.repaint(100);\t\t\t\t\n\t\t\t}",
"void onItemClear();",
"void onItemClear();",
"protected abstract void removeItem();",
"@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n\n id = (int) viewHolder.itemView.getTag();\n\n\n final CustomCursorAdapter adapter = (CustomCursorAdapter) mRecyclerView.getAdapter();\n // int position = viewHolder.getAdapterPosition();\n\n if (!pending.contains(id)) {\n pending.add(id);\n adapter.pendingRemoval(id);\n // findViewById(R.id.include_regular).setVisibility(View.GONE);\n\n } else {\n // pending.remove(id);\n\n }\n\n getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, MainActivity.this);\n\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tUser zws = alllist.getSelectedValue();\r\n\t\t\t\tam.removeElement(zws);\r\n\t\t\t\tall.remove(zws);\r\n\t\t\t\tvm.addElement(zws);\r\n\t\t\t\tverwalter.remove(zws);\r\n\t\t\t}",
"@FXML\r\n\tpublic void deleteItem() {\r\n\t\tcontroller.deleteWishlistItem(listView.getSelectionModel().getSelectedItem().getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t}",
"@FXML\n public void handleDeleteButton(ActionEvent event) {\n if (cList.getItems().size() == 0) {\n alert(\"Error\", \"Invalid selection.\", \"The list is already empty.\");\n return;\n }\n\n String s = (String) cList.getSelectionModel().getSelectedItem();\n\n if (cList.getSelectionModel().getSelectedIndex() == -1) {\n alert(\"Error\", \"Invalid selection.\", \"Please select an item to delete.\");\n return;\n }\n\n String parts[] = s.split(\"=\");\n Tag delete = null;\n for (Tag t : tags) {\n if (t.getType().equals(parts[0]) && t.getValue().equals(parts[1])) {\n obsList.remove(s);\n }\n }\n tags.remove(delete);\n cList.setItems(obsList);\n\n\n }",
"@Override\n public void onRowMoved(int fromPosition, int toPosition) {\n if (fromPosition < toPosition) {\n for (int i = fromPosition; i < toPosition; i++) {\n Collections.swap( listManageHome, i, i + 1);\n }\n } else {\n for (int i = fromPosition; i > toPosition; i--) {\n Collections.swap( listManageHome, i, i - 1);\n }\n }\n notifyItemMoved(fromPosition, toPosition);\n notifyItemChanged(fromPosition);\n notifyItemChanged(toPosition);\n }",
"public void doRemoveItem() {\n doRemoveItem(this.mSrcPos - getHeaderViewsCount());\n }",
"private void deleteList(){\n new Thread(() -> agenda.getConnector().deleteItem(currentList)).start();\n numberOfLists--;\n for(Component c:window.getComponents()){\n if (c.getName().equals(comboBox.getSelectedItem().toString())){\n window.remove(c);\n }\n }\n if(comboBox.getItemCount() == 1){\n comboBox = new JComboBox();\n }else {\n comboBox.removeItemAt(comboBox.getSelectedIndex());\n }\n setUpHeader();\n this.updateComponent(header);\n }",
"@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n Company toBeRestoredCompany = comparisonCompaniesAdapter\n .getItem(viewHolder.getAdapterPosition());\n Company a = null;\n for (Company c : selectedCompanies) {\n if (toBeRestoredCompany.getIdentifiers().getTicker().equalsIgnoreCase(c.getIdentifiers().getTicker())) {\n horizontalCompanyListAdapter.addItem(toBeRestoredCompany);\n a = c;\n }\n }\n if (a != null) {\n selectedCompanies.remove(a);\n }\n comparisonCompaniesAdapter.removeItem(viewHolder.getAdapterPosition());\n }",
"public void itemRemoved(boolean wasSelected);",
"public void supprimerLivres(View view) {\n /* recuperer les ids des livres selectionnes dans\n * la liste de livres\n */\n long[] ids = list.getCheckedItemIds();\n if (ids.length == 0)\n return;\n\n for (long id : ids) {\n Log.d(\"supprimer id =\", id + \"\");\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"content\")\n .authority(authority)\n .appendPath(\"book_table\");\n /* id du livre a supprimer a la fin de uri */\n ContentUris.appendId(builder, id);\n Uri uri = builder.build();\n\n int res = getContentResolver().delete(uri, null, null);\n Log.d(\"result of delete=\", res + \"\");\n }\n /* apres la suppression de titres mettre a jour la liste\n de titres, id_author ne change pas */\n getLoaderManager().restartLoader(1, null, callbackTitres);\n }",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tfor(int i = 0; i <deleteButtons.size(); i++) {\n\t\t\t\t\t\tif(e.getSource() == deleteButtons.get(i)) {\n\t\t\t\t\t\t\tdutchList.remove(i + 1);\n\t\t\t\t\t\t\tdutchList.revalidate();\n\t\t\t\t\t\t\tsetSize(getSize().width, getSize().height - 40);\n\t\t\t\t\t\t\tdeleteButtons.remove(i);\n\t\t\t\t\t\t\tlist.remove(i + 1);\n\t\t\t\t\t\t\tSystem.out.println(deleteButtons.size());\n\t\t\t\t\t\t\tSystem.out.println(list.size());\n\t\t\t\t\t\t\tcalculateDutch();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"public void deleteSelection() {\n deleteFurniture(Home.getFurnitureSubList(this.home.getSelectedItems())); \n }",
"public void removePrevCardList(){\n for (int i = 0; i < playerCardList.getPlayerCardListSize(); i++){\n playerCardPuzzle.getChildren().remove(playerCardList.getPlayerCardByNo(i));\n }\n }",
"@Override\n public void onItemLongClicked(int position) {\n items.remove(position);\n // Notify the adapter\n itemsAdapter.notifyItemRemoved(position);\n Toast.makeText(getContext(), \"Item was removed\", Toast.LENGTH_SHORT).show();\n saveItems();\n }",
"void actuallyRemove() {\n /*\n * // Set the TextViews View v = mListView.getChildAt(mRemovePosition -\n * mListView.getFirstVisiblePosition()); TextView nameView =\n * (TextView)(v.findViewById(R.id.sd_name));\n * nameView.setText(R.string.add_speed_dial);\n * nameView.setEnabled(false); TextView labelView =\n * (TextView)(v.findViewById(R.id.sd_label)); labelView.setText(\"\");\n * labelView.setVisibility(View.GONE); TextView numberView =\n * (TextView)(v.findViewById(R.id.sd_number)); numberView.setText(\"\");\n * numberView.setVisibility(View.GONE); ImageView removeView =\n * (ImageView)(v.findViewById(R.id.sd_remove));\n * removeView.setVisibility(View.GONE); ImageView photoView =\n * (ImageView)(v.findViewById(R.id.sd_photo));\n * photoView.setVisibility(View.GONE); // Pref\n */\n mPrefNumState[mRemovePosition + 1] = \"\";\n mPrefMarkState[mRemovePosition + 1] = -1;\n SharedPreferences.Editor editor = mPref.edit();\n editor.putString(String.valueOf(mRemovePosition + 1), mPrefNumState[mRemovePosition + 1]);\n editor.putInt(String.valueOf(offset(mRemovePosition + 1)),\n mPrefMarkState[mRemovePosition + 1]);\n editor.apply();\n startQuery();\n }",
"public void remove()\n {\n list.remove(cursor);\n cursor--;\n }",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n inMealRecipes.remove(i);\n adapterM.notifyDataSetChanged();\n }",
"private void initListItems() {\n RecyclerView recyclerView = findViewById(R.id.recyclerView);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n recyclerView.setHasFixedSize(true);\n\n List<Food> foods = database.getAll();\n\n List<ListItem> items = new ArrayList<>();\n foods.sort(Comparator.comparing(Food::getExpiration));\n\n for(int i = 0; i < foods.size(); i++) {\n items.add(i, new ListItem(foods.get(i)));\n //items.add(idx, new ListItem(\"Section 1\", true));\n }\n\n ListAdapter adapter = new ListAdapter(this, items);\n recyclerView.setAdapter(adapter);\n\n adapter.setOnItemClickListener(new ListAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(View view, ListItem obj, int position) {\n// database.removeFood(items.get(position).getFood());\n// items.remove(position);\n// adapter.notifyDataSetChanged();\n// Toast.makeText(getApplicationContext(),\"Item Removed!\", Toast.LENGTH_SHORT).show();\n }\n });\n\n // Swipe handler for the rows in the listview\n ItemTouchHelper touchHelper = new ItemTouchHelper(new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {\n @Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n int position = viewHolder.getAdapterPosition();\n\n if (swipeDir == ItemTouchHelper.LEFT) {\n Toast.makeText(getApplicationContext(),\"Item Removed!\", Toast.LENGTH_SHORT).show();\n database.removeFood(items.get(position).getFood());\n adapter.notifyDataSetChanged();\n items.remove(position);\n recreate();\n\n }\n else if (swipeDir == ItemTouchHelper.RIGHT) {\n Toast.makeText(getApplicationContext(),\"Frozen toggled!\", Toast.LENGTH_SHORT).show();\n database.freezeFood(items.get(position).getFood());\n adapter.notifyDataSetChanged();\n recreate();\n }\n }\n\n @Override\n public void onChildDraw (Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {\n new RecyclerViewSwipeDecorator.Builder(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)\n .addSwipeRightActionIcon(R.drawable.snowflake)\n .addSwipeRightBackgroundColor(ContextCompat.getColor(MainActivity.this, R.color.freeze_blue))\n .addSwipeLeftActionIcon(R.drawable.ic_baseline_delete_24)\n .addSwipeLeftBackgroundColor(ContextCompat.getColor(MainActivity.this, R.color.design_default_color_error))\n .setActionIconTint(ContextCompat.getColor(MainActivity.this, R.color.white))\n .create()\n .decorate();\n\n super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);\n }\n\n @Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) { return false; }\n });\n touchHelper.attachToRecyclerView(recyclerView);\n\n // Check item list size to display empty view\n if (items.isEmpty()) {\n emptyList.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.GONE);\n }\n else {\n recyclerView.setVisibility(View.VISIBLE);\n emptyList.setVisibility(View.GONE);\n }\n }",
"void onItemDelete(int position);",
"void delete()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call delete() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call delete() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tdeleteFront(); //deletes the front if the cursor is at the front\n\n\t\t}\n\t\telse if(cursor == back)\n\t\t{\n\t\t\tdeleteBack(); //deletes the back if the cursor is at the back\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcursor.prev.next=cursor.next; \n\t\t\tcursor.next.prev=cursor.prev;\n\t\t\tcursor = null; \n\t\t\tindex = -1;\n\t\t\tlength--;\n\t\t}\n\t\t\n\t}",
"public void remove()\r\n { Exceptions.unmodifiable(\"list\"); }",
"@Override\n public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {\n switch (menuItem.getItemId()) {\n case R.id.delete:\n mArchivedFruits.clear();\n mArchivedListAdapter.notifyDataSetChanged();\n actionMode.finish();\n return true;\n default:\n return false;\n }\n }",
"private void removePressed() {\n\t\ts = allMedia.getSelectedValuesList();\n\t\t// now remove all the value that are in the list from the default list model\n\t\tfor(Object o : s){\n\t\t\tif(l.contains(o)){\n\t\t\t\tl.removeElement(o);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onDestroyActionMode(ActionMode mode) {\n for (int i = 0; i < mListView.getCount(); i++) {\n mListView.setItemChecked(i, false);\n }\n }",
"@Override\n public void onDestroyActionMode(ActionMode mode) {\n for (int i = 0; i < mListView.getCount(); i++) {\n mListView.setItemChecked(i, false);\n }\n }",
"public void onItemUnsetSelection(AdapterView<?> parent, View view, int position);",
"@Override\r\n\tpublic void onSongListDeleteClick(View v) {\n\t\tint position = (Integer) ((ImageView)v).getTag();\r\n\t\tMPService.SongList.remove(position);\r\n\t\tadapter.notifyDataSetChanged();\r\n\t\ttv_songlist.setText(\"播放列表(\" + MPService.SongList.size() + \")\" );\r\n\t}",
"@Override\n\tpublic void undo() {\n\t\tthis.list.delete(shape);\n\n\t}",
"public void evt_DeleteCurrentObject()\r\n {\r\n rh2EventPos.hoOiList.oilNumOfSelected -= 1;\t\t\t\t\t// Un de moins dans l'OiList\r\n if (rh2EventPrev != null)\r\n {\r\n rh2EventPrev.hoNextSelected = rh2EventPos.hoNextSelected;\r\n rh2EventPos = rh2EventPrev; // Car le courant est vire!\r\n }\r\n else\r\n {\r\n// rhPtr.rhOiList[rh2EventPosOiList].oilListSelected=rh2EventPos.hoNextSelected;\r\n rh2EventPrevOiList.oilListSelected = rh2EventPos.hoNextSelected;\r\n rh2EventPos = null;\r\n }\r\n }",
"private void delete() {\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tif (list.get(i).toString().equals(lu.toString())) {\r\n\t\t\t\tlist.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.makeXml(list);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tinitTableView();\r\n\t}",
"private void clearTasks(){\n ArrayList<Item> iteratorList = new ArrayList<Item>(items);\n Iterator<Item> it = iteratorList.iterator();\n while(it.hasNext()){\n Item i = it.next();\n if (!i.isCategory()){\n Task t = (Task) i;\n if(t.finished){\n \tDirectIO.RemoveItem(t);\n adapter.remove(i);\n }\n }\n }\n }",
"public void onDeleteList() {\n ListsManager listManager = ListsManager.getInstance(context);\n listManager.deleteTable(deletePosition,context);\n Toast.makeText(context, \"deleted TodoList\", Toast.LENGTH_SHORT).show();\n data.remove(deletePosition);\n notifyItemRemoved(deletePosition);\n }",
"@Override\r\n public void onClick(View view) {\n entries.remove(position);\r\n notifyItemRemoved(position);\r\n notifyItemRangeChanged(position, entries.size());\r\n Toast.makeText(mContext, \"Rejected : \" + u, Toast.LENGTH_SHORT).show();\r\n }",
"@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n int position = viewHolder.getAdapterPosition();\n userList.remove(position);\n if (userList!=null && userList.size()>0)\n {\n userBinding.tvNoDataFound.setVisibility(View.GONE);\n userListAdapter = new UserListAdapter(userList,UserActivity.this);\n userBinding.recyclerList.setAdapter(userListAdapter);\n }\n else\n {\n userBinding.tvNoDataFound.setVisibility(View.VISIBLE);\n }\n userListAdapter.notifyDataSetChanged();\n\n }",
"public List onStartUp() {\n\t\t// TODO - implement ItemManager.onStartUp\n\n\t\tItemDAO itemDAO = new ItemDAO();\n\n\t\tList listOfItems = itemDAO.retrieveAll();\n\n\t\tfor (int i = 0; i < listOfItems.size(); i++) {\n\t\t\tItem tempItem = (Item) listOfItems.get(i);\n\n\t\t\tif (tempItem.getRemoved() == true) {\n\t\t\t\tlistOfItems.remove(i);\n\t\t\t\ti = i - 1;\n\t\t\t}\n\t\t}\n\n\t\treturn listOfItems;\n\n\t}",
"public void removeAllItems() {\n mPapers.clear();\n notifyDataSetChanged();\n }",
"public void deleteSongFromList(boolean a, Song song) {\n\t\t// iterate through the list from songIndex, move all songs forward 1 index\n\t\tfor (int i = song.getIndex(a)-1; i < this.getCurrentList(a).getHeapSize()-1; i++)\n\t\t\tthis.getCurrentList(a).getInternalArray()[i] = this.getCurrentList(a).getInternalArray()[i+1];\n\t\t// decrease heapsize\n\t\tthis.getCurrentList(a).setHeapSize(this.getCurrentList(a).getHeapSize() - 1);\n\t\tsong.setIndex(a, -1);\n\t}",
"@Override\n\tpublic void deleteItem(Object toDelete) {}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n mAdapter.notifyItemRemoved(position); //item removed from recylcerview\n mAdapter.removeItem(position);\n dataList.remove(position); //then remove item\n mAdapter.notifyDataSetChanged();\n deleteEntry(dataList.get(position).getDocId());\n }",
"@FXML\n void clearEntireListClicked(ActionEvent event)\n {\n Item.getToDoList().clear();\n\n // Clear the table view\n listView.getItems().clear();\n\n // Reset the index to 0 and clear\n index = 0;\n clear();\n\n }",
"@Override\r\n\t\tpublic boolean deleteItem() {\n\t\t\treturn false;\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.del_bkmarks) {\n\n final Button bkdeletebtn=(Button)findViewById(R.id.bkmrk_delete_btn);\n final Button bkcancelbtn=(Button)findViewById(R.id.bkmrk_cancel_btn);\n\n bkcancelbtn.setVisibility(View.VISIBLE);\n bkdeletebtn.setVisibility(View.VISIBLE);\n\n\n Myapp2.setCheckboxShown(true);\n //bkMarkList.deferNotifyDataSetChanged();\n bkMarkList.setAdapter(adapter);\n\n\n bkcancelbtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Myapp2.setCheckboxShown(false);\n //checkboxShown=false;\n bkcancelbtn.setVisibility(View.GONE);\n bkdeletebtn.setVisibility(View.GONE);\n\n bkMarkList.setAdapter(adapter);\n }\n });\n\n\n\n bkdeletebtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n for(int i=0;i<Myapp2.getChecks().size();i++){\n\n if(Myapp2.getChecks().get(i)==1){\n\n int index=i+1;\n\n //remove items from the list here for example from ArryList\n Myapp2.getChecks().remove(i);\n PgNoOfBkMarks.remove(i);\n paraName.remove(i);\n SuraName.remove(i);\n //similarly remove other items from the list from that particular postion\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor =settings.edit();\n\n editor.remove(\"bookmark_\"+index);\n editor.putInt(\"bookmark_no\",settings.getInt(\"bookmark_no\",0)-1);\n editor.apply();\n\n\n\n i--;\n }\n }\n Myapp2.setCheckboxShown(false);\n bkcancelbtn.setVisibility(View.GONE);\n bkdeletebtn.setVisibility(View.GONE);\n bkMarkList.setAdapter(adapter);\n }\n });\n\n\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"public void deleteSelectedPosition() {\n if (selectedPosition != -1) {\n list.remove(selectedPosition);\n selectedPosition = -1;//after removing selectedPosition set it back to -1\n notifyDataSetChanged();\n }\n }",
"@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n //Get the index corresponding to the selected position\n int position = (viewHolder.getAdapterPosition());\n if (swipeDir == ItemTouchHelper.LEFT) {\n getAnswer(true, position);\n removeItem(position);\n } else if (swipeDir == ItemTouchHelper.RIGHT) {//swipe right\n getAnswer(false, position);\n removeItem(position);\n }\n }",
"public void removeItem() {\n tvItem.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n // Notify the listener which position was long pressed.\n longClickListener.onItemLongClicked(getBindingAdapterPosition());\n return true;\n }\n });\n }",
"@Override\r\n\tpublic void undo() {\n\t\tfor(IShape shape : tempList)\r\n\t\t\tshapeList.remove(shape);\r\n\t}",
"@Override\r\n public void removeFirstObjectInAdapter() {\n Log.d(\"LIST\", \"removed object!\");\r\n al.remove(0);\r\n arrayAdapter.notifyDataSetChanged();\r\n }",
"private DefaultListModel<String> removeItem(JList<String> list, DefaultListModel<String> listModel) {\r\n\t\tint[] selectedItems = list.getSelectedIndices();\r\n\t\tfor(int i=selectedItems.length; i>0; i--)\r\n\t\t\tlistModel.removeElementAt(selectedItems[i-1]);\r\n\t\treturn listModel;\r\n\t}",
"public void deleteWholeList()\n {\n head = null;\n }",
"private void deleteSelectedWaypoints() {\r\n\t ArrayList<String> waypointsToRemove = new ArrayList<String>();\r\n\t int size = _selectedList.size();\r\n\t for (int i = _selectedList.size() - 1; i >= 0; --i) {\r\n boolean selected = _selectedList.get(i);\r\n if (selected) {\r\n waypointsToRemove.add(UltraTeleportWaypoint.getWaypoints().get(i).getWaypointName());\r\n }\r\n }\r\n\t UltraTeleportWaypoint.removeWaypoints(waypointsToRemove);\r\n\t UltraTeleportWaypoint.notufyHasChanges();\r\n\t}",
"@Override\n public boolean onItemLongClick(AdapterView<?> arg0,\n View arg1,\n int position,\n long arg3){\n arrayTasks.remove(position);\n //apply changes on the adapter\n adapter.notifyDataSetChanged();\n return true;\n }",
"@Override\n\t\tpublic void deleteItem(int index) {\n\t\t\tmGuanzhuList.remove(index);\n\t\t}",
"public void onClick(DialogInterface dialog,int id) {\n todoList.remove(pos);\n listAdapter.notifyDataSetChanged();\n }",
"public void deletePhotoForMovePhoto(ActionEvent event) {\n\t\tObservableList<ImageView> pho;\n\t\tpho = PhotoListDisplay.getSelectionModel().getSelectedItems();\n\t\t\n\t\t//System.out.println(\"before deletion: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\n\t\tif(pho.isEmpty() == true) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.setTitle(\"Error!\");\n\t\t\talert.setHeaderText(\"No Photo Selected\");\n\t\t\talert.setContentText(\"No photo selected. Delete Failed!\");\n\t\t\talert.showAndWait();\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(ImageView p: pho) {\n\t\t\t//delUsername.setText(name.getUsername());\n\t\t\t//this is a confirmation\n\t\t\t\n\t\t\t//removed it from observable list\n\t\t\tlistOfPhotos.remove(p);\n\t\t\tdisplayedPhoto.remove(0);\n\t\t\t\n\t\t\t//removing photo from the master list\n\t\t\tPhoto getPhoto = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getPhotoFromImage(p);\n\t\t\t//System.out.println(\"Path to this image is: \" + getPhoto.getPathToPhoto());\n\t\t\tAccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum().remove(getPhoto);\n\t\t\t\n\t\t\t//System.out.println(\"removing album\");\n\t\t\tdisplayedPhoto.clear();\n\t\t\tdisplayedPhoto = FXCollections.observableArrayList();\n\t\t\tDisplayedImage.setItems(displayedPhoto);\n\t\t\t\n\t\t\tPhotoCaptionDisplay.setText(\"\");\n\t\t\tOldCaptionText.setText(\"\");\n\t\t\t\n\t\t\tArrayList<Tag> list = new ArrayList<Tag>();\n\t\t\ttagObsList = FXCollections.observableList(list);\n\t\t\tTagListDisplay.setItems(tagObsList);\n\t\t\t\n\t\t\t//System.out.println(\"after: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\t\n\t\t\t\n\t\t\t//*******************CHECK FOR BUG HERE, (deleting newly added user creates zombie photos\n\t\t\t//System.out.println(\"1: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\t//System.out.println(\"2: \" + listOfPhotos);\n\t\t\t//System.out.println(\"3: \" + displayedPhoto);\n\t\t\t\n\t\t}\n\t\t\n\t\trefreshPhotos();\n\t\t\n\t\t//Note: MUST SERIALIZE AFTER DELETING (also after adding)\n\t\t\n\t\t//updates permanent list(Serialized List) of users\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public void removeAllItem() {\n orderList.clear();\n }",
"public void evt_DeleteCurrent()\r\n {\r\n rh4PickFlags[0] = -1;\r\n rh4PickFlags[1] = -1;\r\n rh4PickFlags[2] = -1;\r\n rh4PickFlags[3] = -1;\r\n\r\n int oil;\r\n CObjInfo oilPtr;\r\n for (oil = 0; oil < rhPtr.rhMaxOI; oil++)\r\n {\r\n oilPtr = rhPtr.rhOiList[oil];\r\n oilPtr.oilEventCount = rh2EventCount;\r\n oilPtr.oilListSelected = -1;\r\n oilPtr.oilNumOfSelected = 0;\r\n }\r\n }",
"@Override\r\n public void onDestroyActionMode(ActionMode mode) {\n adapter.removeSelection();\r\n }",
"@Override\n public void removeFirstObjectInAdapter() {\n Log.d(\"LIST\", \"removed object!\");\n rowItem.remove(0);\n arrayAdapter.notifyDataSetChanged();\n }",
"@Override\r\n\tpublic void onClick(View v) {\n\t\tlist.remove(index);\r\n\t\tact.showOrderList(toView, list, act);\r\n\t}",
"public void removeItemListerners() {\r\n\t\titemListeners.clear();\r\n\t}",
"public abstract void onRemoveAction();",
"void deleteFront()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call deleteFront() on empty List\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tcursor = null;\n\t\t\tindex = -1; //added because i was failing the test scripts because i wasn't managing the indicies\n\t\t}\n \n\t\tfront = front.next; //front element becomes the next element in the list\n\t\tlength--;\n index --; //added because i was failing the test scripts because i wasn't managing the indicies\n\t\t\n\t}",
"public void removeItem(){\n\t\tthis.item = null;\n\t}",
"public abstract boolean depleteItem();",
"@Override\n\tpublic void deleteSelected() {\n\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tUser zws = alllist.getSelectedValue();\r\n\t\t\t\tvm.removeElement(zws);\r\n\t\t\t\tverwalter.remove(zws);\r\n\t\t\t\tam.addElement(zws);\r\n\t\t\t\tall.add(zws);\r\n\t\t\t}",
"@Override\n public void onItemDismiss(int position) {\n dummyDataList.remove(position);\n notifyItemRemoved(position);\n\n }",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n myIngredients.remove(i);\n updateIngredientListView();\n }",
"public void clearItems(){\n items.clear();\n }",
"@Override\n public void onClick(View view) {\n adapter.restoreItem(deletedModel, deletedPosition);\n }",
"public void eliminarTodosLosElementos(){\n\t\tlistModel.removeAllElements();\n\t}",
"@Override\n public boolean onItemMove(int fromPosition, int toPosition) {\n if (fromPosition < toPosition) {\n for (int i = fromPosition; i < fromPosition; i++) {\n Collections.swap(dummyDataList, i, i + 1);\n }\n } else {\n for (int i = fromPosition; i > toPosition; i--) {\n Collections.swap(dummyDataList, i, i - 1);\n }\n }\n notifyItemMoved(fromPosition, toPosition);\n\n return true;\n }",
"@FXML\n\tprivate void deleteSelected(ActionEvent event) {\n\t\tint selectedIndex = taskList.getSelectionModel().getSelectedIndex();\n\t\tString task = taskList.getItems().get(selectedIndex);\n\t\ttaskList.getSelectionModel().clearSelection();\n\t\ttaskList.getItems().remove(task);\n\t\tchatView.setText(\"\");\n\t\ttaskList.getItems().removeAll();\n\t\tString task_split[] = task.split(\" \", 2);\n\t\tString removeTask = task_split[1];\n\t\tif (task.contains(\"due by\")) {\n\t\t\tString[] taskDate = task_split[1].split(\"\\\\s+\");\n\t\t\tSystem.out.println(taskDate);\n\t\t\tString end = taskDate[taskDate.length - 3];\n\t\t\tSystem.out.println(end);\n\t\t\tremoveTask = task_split[1].substring(0, task_split[1].indexOf(end)).trim();\n\t\t\tSystem.out.println(removeTask);\n\n\t\t}\n\t\tclient.removeTask(removeTask.replace(\"\\n\", \"\"));\n\t}",
"void onDeleteItem(E itemElementView);",
"@Override\n public String executeGui(TaskList items, Ui ui) {\n String deletedStr = \" \" + items.get(index).toString();\n items.remove(index);\n String str = Ui.showDeleteGui(items, deletedStr);\n return str;\n }"
]
| [
"0.69264114",
"0.68892694",
"0.67482567",
"0.66996366",
"0.66926295",
"0.6650354",
"0.66313875",
"0.6515011",
"0.6474448",
"0.64459527",
"0.64275676",
"0.6413702",
"0.62907165",
"0.6280273",
"0.6261275",
"0.623539",
"0.62254256",
"0.62201816",
"0.6205735",
"0.6200665",
"0.6177262",
"0.61653763",
"0.61518383",
"0.61518383",
"0.61398596",
"0.6107911",
"0.61021185",
"0.6098063",
"0.6083321",
"0.607339",
"0.60548556",
"0.605435",
"0.60526085",
"0.6041497",
"0.60327",
"0.60318106",
"0.60315067",
"0.6030617",
"0.6020578",
"0.6005593",
"0.6004671",
"0.60003644",
"0.5996531",
"0.599591",
"0.5971657",
"0.59636414",
"0.59625113",
"0.59585273",
"0.595453",
"0.595453",
"0.59517354",
"0.59457326",
"0.59204787",
"0.59201235",
"0.5916257",
"0.5910929",
"0.5902316",
"0.58959204",
"0.5883281",
"0.5879549",
"0.5878193",
"0.587123",
"0.586845",
"0.5843052",
"0.5835781",
"0.5825529",
"0.5818609",
"0.58178174",
"0.5814469",
"0.58114576",
"0.58075196",
"0.5797783",
"0.5787913",
"0.57802844",
"0.5779028",
"0.5778556",
"0.57634306",
"0.57629496",
"0.57614875",
"0.57600933",
"0.5752833",
"0.5744634",
"0.5741328",
"0.5739206",
"0.57378036",
"0.5735932",
"0.5735648",
"0.573304",
"0.5732452",
"0.5725995",
"0.5725981",
"0.5723345",
"0.5721677",
"0.57202667",
"0.5712189",
"0.5706865",
"0.5704274",
"0.57041",
"0.56965846",
"0.56946766"
]
| 0.60649216 | 30 |
Using BinaryOperator Functional Interface to return an Integer Lambda expression finds the average between two numbers: a and b | @Override
public void run() {
BinaryOperator<Integer> avg = (Integer a, Integer b) -> (a + b) / 2;
int replacement;
System.out.println("++" + Thread.currentThread().getName() + " has arrived.");
replacement = avg.apply(oldArray[index - 1], oldArray[index + 1]);
// All threads must wait for all numThreads threads to catch up
// Phaser acting like a barrier
ph.arriveAndAwaitAdvance();
System.out.println("--" + Thread.currentThread().getName() + " has left.");
oldArray[index] = replacement;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double average();",
"@Override\n\tpublic int calculation(int a, int b) {\n\t\treturn b/a;\n\t}",
"public abstract int apply(int lhs, int rhs);",
"@Override\n public BinaryOperator<List<Integer>> combiner() {\n return (resultList1, resultList2) -> {\n Integer currentTotal1 = resultList1.get(0);\n Integer currentTotal2 = resultList2.get(0);\n currentTotal1 += currentTotal2;\n resultList1.set(0, currentTotal1);\n return resultList1;\n };\n }",
"static int calculate(int a, int b, String op) {\n switch (op) {\n case \"+\":\n return a + b;\n case \"-\":\n return a - b;\n case \"*\":\n return a * b;\n case \"/\":\n return a / b;\n default:\n break;\n }\n return 0;\n }",
"private static int getAverageOfPerson(final Collection<Person> persons, Function<Person, Integer> func) {\n BigDecimal sum = BigDecimal.ZERO;\n for (Person p: persons) {\n sum = sum.add(new BigDecimal(func.apply(p)));\n }\n return sum.divide(new BigDecimal(persons.size()), RoundingMode.DOWN).intValue();\n }",
"@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}",
"private int calcula(int op,int a, int b){\n \n switch (op) {\n case 0: \n return a+b;\n case 1: \n return a-b;\n case 2: \n return a*b;\n case 3: \n return a/b;\n default: \n return 0;\n }\n \n }",
"@Override\r\n\tpublic int call(int a, int b) {\n\t\treturn a/b;\r\n\t}",
"private static <T> int getAverageOf(final Collection<T> collection, Function<T, Integer> func) {\n BigDecimal sum = BigDecimal.ZERO;\n for (T t: collection) {\n sum = sum.add(new BigDecimal(func.apply(t)));\n }\n return sum.divide(new BigDecimal(collection.size()), RoundingMode.DOWN).intValue();\n }",
"@Nonnull\r\n\tpublic static Observable<Double> averageInt(\r\n\t\t\t@Nonnull final Observable<Integer> source) {\r\n\t\treturn aggregate(source,\r\n\t\t\tnew Func2<Double, Integer, Double>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic Double invoke(Double param1, Integer param2) {\r\n\t\t\t\t\tif (param1 != null) {\r\n\t\t\t\t\t\treturn param1 + param2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn param2.doubleValue();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tnew Func2<Double, Integer, Double>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic Double invoke(Double param1, Integer param2) {\r\n\t\t\t\t\treturn param1 / param2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t}",
"public static int\n /**\n * \n * @param left\n * an integer\n * @param right\n * an integer\n * @return the average of left and right. The number will round towards zero\n * if the average is not a whole number\n * @pre both left and right numbers should not be greater than\n * Integer.Max_Value or smaller than Integer.Min_Value\n */\n average (int left, int right)\n {\n /**\n * In the original program, it was possible that the sum of left and right\n * exceeds Integer.Max_Value or Integer.Min_Value even when either left or\n * right is within the boundaries. Therefore, we solve this problem by\n * dividing the left and right numbers first, and then sum them up.\n */\n double avg = left / 2.0 + right / 2.0;\n return (int) avg;\n }",
"@Override\r\n\tpublic int calculate(int a, int b) {\n\t\treturn (a + b) * 2;\r\n\t}",
"static <T> Function<T,SibillaValue> apply(BinaryOperator<SibillaValue> op, Function<T,SibillaValue> f1, Function<T, SibillaValue> f2) {\n return arg -> op.apply(f1.apply(arg), f2.apply(arg));\n }",
"double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}",
"private static double operate(Double a, Double b, String op){\n\t switch (op){\r\n\t case \"+\": return Double.valueOf(a) + Double.valueOf(b);\r\n\t case \"-\": return Double.valueOf(a) - Double.valueOf(b);\r\n\t case \"*\": return Double.valueOf(a) * Double.valueOf(b);\r\n\t case \"/\": try{\r\n\t return Double.valueOf(a) / Double.valueOf(b);\r\n\t }catch (Exception e){\r\n\t e.getMessage();\r\n\t }\r\n\t default: return -1;\r\n\t }\r\n\t }",
"public static void main( String[] args )\n {\n \tScanner sc=new Scanner(System.in);\n\t\taverage a=()->{\n\t\t\tSystem.out.println(\"Enter no of elements\");\n\t\t\tint n=sc.nextInt();\n\t\t\tArrayList<Integer> a1=new ArrayList<Integer>();\n\t\t\tSystem.out.println(\"Enter\"+n+\" elements\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tint z=sc.nextInt();\n\t\t\t\ta1.add(z);\n\t\t\t}\n\t\t\tint s=0;\n\t\t\tfor(Integer i:a1)\n\t\t\t{\n\t\t\t\ts=s+i;\n\t\t\t}\n\t\t\tfloat AvgOfList=(float)(s)/a1.size();\n\t\t\treturn AvgOfList;\n\t\t};\n\t\tSystem.out.println(\"Average of the list of given integers are:\"+a.avg());\n\t\tsc.close();\n }",
"public static BinaryExpression divideAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }",
"public static int applyOp(char op, int b, int a)\n {\n switch (op)\n {\n case '+':\n return a + b;\n case '-':\n return a - b;\n case '*':\n return a * b;\n case '/':\n if (b == 0)\n throw new\n UnsupportedOperationException(\"Cannot divide by zero\");\n return a / b;\n }\n return 0;\n }",
"static <T> Function<T, SibillaValue> apply(DoubleBinaryOperator op, Function<T,SibillaValue> f1, Function<T,SibillaValue> f2) {\n return arg -> SibillaValue.of(op.applyAsDouble(f1.apply(arg).doubleOf(), f2.apply(arg).doubleOf()));\n }",
"public static void main(String[] args) {\n System.out.println(getInt());\n// Function<Integer, Integer> increment = num -> ++num;\n// System.out.println(increment.apply(2));\n// Function<Integer, Integer> incrementTwoTimes = increment.andThen(increment);\n// System.out.println(incrementTwoTimes.apply(2));\n//\n// BiFunction <Integer, Integer, Integer> biIncrement = (number1, number) -> number1 + number ;\n// System.out.println(biIncrement.apply(increment.apply(2), increment.apply(2)));\n }",
"static DoubleUnaryOperator convert(double f, double b) {\n\t\treturn (double x) -> f * x + b;\n\t}",
"private static Vector3f average(Vector3f a, Vector3f b) {\r\n\t\treturn new Vector3f(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2, a.z + (b.z - a.z) / 2);\r\n\t}",
"double apply(final double a);",
"public static void main(String[] args) {\n\t\t List<Product> list = new ArrayList<>();\r\n\t list.add(new Product(1, 1.58));\r\n\t list.add(new Product(2, 1.45));\r\n\t list.add(new Product(3, 2.25));\r\n\t list.add(new Product(4, 2.58));\r\n\r\n\t Double ans = list.stream().filter(p -> p.price < 2.5).mapToDouble\r\n\t (p -> p.price).average().orElse(0);\r\n\r\n\t System.out.println(ans);\r\n\t}",
"Double reduce(Double identity, Function accumulator);",
"public double getAverage()\n {\n return getSum() / 2.0;\n }",
"public int average(int num1, int num2) {\n return (num1 + num2) / 2;\n }",
"public abstract double divideForAvg(S o, Long l);",
"double getAvgControl();",
"public static double average(double number1, double number2) {\n\t\treturn (number1 + number2) / 2;\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\n float d = (float)sum(3.0f, (float)2.0);\n System.out.println(d);\n\n double d2=avg(3.0,2.0);\n System.out.println(d2);\n//\n// int[] list={1,2};\n// list={2,3};\n\n\n\n }",
"static <T> Function<T,SibillaValue> apply(UnaryOperator<SibillaValue> op, Function<T,SibillaValue> f1) {\n return arg -> op.apply(f1.apply(arg));\n }",
"@Override\n public Double average() {\n return (sum() / (double) count());\n }",
"@Override\n public BiConsumer<List<Integer>, Employee> accumulator() {\n return (resultList, employee) -> {\n if (resultList.isEmpty()) resultList.add(employee.getSalary());\n else {\n Integer currentTotal = resultList.get(0);\n currentTotal += employee.getSalary();\n resultList.set(0, currentTotal);\n }\n };\n }",
"public static BinaryExpression divide(Expression expression0, Expression expression1) { throw Extensions.todo(); }",
"Execution getAverageExecutions();",
"public Double computeAverage(){\n\t\tdouble total = 0; //double used to keep total value of elements in arr to determine average\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++)//loop through array and add the total\n\t\t{\n\t\t\ttotal += arr[i].doubleValue(); //add current value of element in arr to total's value\n\t\t}\n\t\t\n\t\tDouble result = total/arr.length; //returns the average as a Double\n\t\t\n\t\treturn result;\n\t}",
"@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}",
"protected static void performReduceWithABinaryOperator() {\n Integer sum = Stream.of(1, 2, 3, 4, 5).reduce(0, Integer::sum);\n\n Integer minValue = Stream.of(5, 4, 9, 2, 1).reduce(Integer.MIN_VALUE, Integer::max);\n\n String concatenation = Stream.of(\"str \", \"= \", \"alt \", \"string\")\n // the first parameter becomes the target of the concat method and the second one is the argument to concat\n // the target, the parameter and the result are of the same type and this can be considered a binary\n // operator for the reduce method\n .reduce(\"\", String::concat);\n System.out.println(concatenation);\n }",
"public void getAvg()\n {\n this.avg = sum/intData.length;\n }",
"@Test\n\tpublic void testSumOverFunctionV2() {\n\t\trunTest(2, true, \"sum({{(on f in Boolean -> 0..3) f(true) : true }})\", \"24\");\n\t}",
"public static void main(String[] args) {\n\t\tint a[]= {2,3,4,5,6,7,8};\n\t\tdouble b[]= {2.0,3.0,4.5,8.9};\n\t\tSystem.out.println(Average1(a));\n\t\tSystem.out.println(Average(b));\n\n\t}",
"public final EObject ruleAverageOperator() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n EObject lv_parameter_2_0 = null;\n\n EObject lv_stream_4_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:2983:28: ( (otherlv_0= 'avg' otherlv_1= '(' ( (lv_parameter_2_0= ruleStreamAccess ) ) otherlv_3= ',' ( (lv_stream_4_0= ruleStreamOperatorParameter ) ) otherlv_5= ')' ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:2984:1: (otherlv_0= 'avg' otherlv_1= '(' ( (lv_parameter_2_0= ruleStreamAccess ) ) otherlv_3= ',' ( (lv_stream_4_0= ruleStreamOperatorParameter ) ) otherlv_5= ')' )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:2984:1: (otherlv_0= 'avg' otherlv_1= '(' ( (lv_parameter_2_0= ruleStreamAccess ) ) otherlv_3= ',' ( (lv_stream_4_0= ruleStreamOperatorParameter ) ) otherlv_5= ')' )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:2984:3: otherlv_0= 'avg' otherlv_1= '(' ( (lv_parameter_2_0= ruleStreamAccess ) ) otherlv_3= ',' ( (lv_stream_4_0= ruleStreamOperatorParameter ) ) otherlv_5= ')'\n {\n otherlv_0=(Token)match(input,53,FOLLOW_53_in_ruleAverageOperator6701); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getAverageOperatorAccess().getAvgKeyword_0());\n \n otherlv_1=(Token)match(input,21,FOLLOW_21_in_ruleAverageOperator6713); \n\n \tnewLeafNode(otherlv_1, grammarAccess.getAverageOperatorAccess().getLeftParenthesisKeyword_1());\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:2992:1: ( (lv_parameter_2_0= ruleStreamAccess ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:2993:1: (lv_parameter_2_0= ruleStreamAccess )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:2993:1: (lv_parameter_2_0= ruleStreamAccess )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:2994:3: lv_parameter_2_0= ruleStreamAccess\n {\n \n \t newCompositeNode(grammarAccess.getAverageOperatorAccess().getParameterStreamAccessParserRuleCall_2_0()); \n \t \n pushFollow(FOLLOW_ruleStreamAccess_in_ruleAverageOperator6734);\n lv_parameter_2_0=ruleStreamAccess();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getAverageOperatorRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"parameter\",\n \t\tlv_parameter_2_0, \n \t\t\"StreamAccess\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n otherlv_3=(Token)match(input,16,FOLLOW_16_in_ruleAverageOperator6746); \n\n \tnewLeafNode(otherlv_3, grammarAccess.getAverageOperatorAccess().getCommaKeyword_3());\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3014:1: ( (lv_stream_4_0= ruleStreamOperatorParameter ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3015:1: (lv_stream_4_0= ruleStreamOperatorParameter )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3015:1: (lv_stream_4_0= ruleStreamOperatorParameter )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3016:3: lv_stream_4_0= ruleStreamOperatorParameter\n {\n \n \t newCompositeNode(grammarAccess.getAverageOperatorAccess().getStreamStreamOperatorParameterParserRuleCall_4_0()); \n \t \n pushFollow(FOLLOW_ruleStreamOperatorParameter_in_ruleAverageOperator6767);\n lv_stream_4_0=ruleStreamOperatorParameter();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getAverageOperatorRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"stream\",\n \t\tlv_stream_4_0, \n \t\t\"StreamOperatorParameter\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n otherlv_5=(Token)match(input,22,FOLLOW_22_in_ruleAverageOperator6779); \n\n \tnewLeafNode(otherlv_5, grammarAccess.getAverageOperatorAccess().getRightParenthesisKeyword_5());\n \n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }",
"public static int eval(NslInt0 a, int b) {\n return a.getint()*b;\n }",
"private static int getAverage(ArrayList<Integer> inList) \n\t{\n\t\tint add = 0; \n\t\tint mean = 0; \n\t\tfor(int pos = 0; pos < inList.size(); ++pos)\n\t\t{\n\t\t\tadd = add + inList.get(pos);\n\t\t\t\n\t\t}\n\t\t\n\t\tmean = add/inList.size(); \n\t\t\n\t\treturn mean; \n\t\t\n\t}",
"@Override\npublic double executar(double a, double b) {\n\treturn a + b;\n}",
"@Override\n public int fun(int a, int b) {\n return a + b + 1;\n }",
"private double average(LinkedList<Double> lastSums2) {\n\t\tOptionalDouble average = lastSums2.stream().mapToDouble(a -> a).average();\n\t\treturn average.getAsDouble();\n\t}",
"public double getAverage(User user) throws Exception;",
"@Override\n\t\t\tpublic Integer apply(Integer num1, Integer num2) {\n\t\t\t\treturn num1+num2;\n\t\t\t}",
"private double computeMean(List<Integer> intList) {\n double count = 0;\n for (Integer i : intList) {\n count += i;\n }\n return count / intList.size();\n }",
"public final EObject ruleAverageFunction() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_3=null;\r\n Token otherlv_5=null;\r\n EObject lv_operator_0_0 = null;\r\n\r\n EObject lv_values_2_0 = null;\r\n\r\n EObject lv_values_4_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3268:28: ( ( ( (lv_operator_0_0= ruleAvgOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3269:1: ( ( (lv_operator_0_0= ruleAvgOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3269:1: ( ( (lv_operator_0_0= ruleAvgOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3269:2: ( (lv_operator_0_0= ruleAvgOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')'\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3269:2: ( (lv_operator_0_0= ruleAvgOperator ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3270:1: (lv_operator_0_0= ruleAvgOperator )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3270:1: (lv_operator_0_0= ruleAvgOperator )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3271:3: lv_operator_0_0= ruleAvgOperator\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getAverageFunctionAccess().getOperatorAvgOperatorParserRuleCall_0_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleAvgOperator_in_ruleAverageFunction7000);\r\n lv_operator_0_0=ruleAvgOperator();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getAverageFunctionRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"operator\",\r\n \t\tlv_operator_0_0, \r\n \t\t\"AvgOperator\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,43,FOLLOW_43_in_ruleAverageFunction7012); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getAverageFunctionAccess().getLeftParenthesisKeyword_1());\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3291:1: ( (lv_values_2_0= ruleNumberExpression ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3292:1: (lv_values_2_0= ruleNumberExpression )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3292:1: (lv_values_2_0= ruleNumberExpression )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3293:3: lv_values_2_0= ruleNumberExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getAverageFunctionAccess().getValuesNumberExpressionParserRuleCall_2_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleNumberExpression_in_ruleAverageFunction7033);\r\n lv_values_2_0=ruleNumberExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getAverageFunctionRule());\r\n \t }\r\n \t\tadd(\r\n \t\t\tcurrent, \r\n \t\t\t\"values\",\r\n \t\tlv_values_2_0, \r\n \t\t\"NumberExpression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3309:2: (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )*\r\n loop44:\r\n do {\r\n int alt44=2;\r\n int LA44_0 = input.LA(1);\r\n\r\n if ( (LA44_0==20) ) {\r\n alt44=1;\r\n }\r\n\r\n\r\n switch (alt44) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3309:4: otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) )\r\n \t {\r\n \t otherlv_3=(Token)match(input,20,FOLLOW_20_in_ruleAverageFunction7046); if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \tnewLeafNode(otherlv_3, grammarAccess.getAverageFunctionAccess().getCommaKeyword_3_0());\r\n \t \r\n \t }\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3313:1: ( (lv_values_4_0= ruleNumberExpression ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3314:1: (lv_values_4_0= ruleNumberExpression )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3314:1: (lv_values_4_0= ruleNumberExpression )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3315:3: lv_values_4_0= ruleNumberExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAverageFunctionAccess().getValuesNumberExpressionParserRuleCall_3_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumberExpression_in_ruleAverageFunction7067);\r\n \t lv_values_4_0=ruleNumberExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAverageFunctionRule());\r\n \t \t }\r\n \t \t\tadd(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"values\",\r\n \t \t\tlv_values_4_0, \r\n \t \t\t\"NumberExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop44;\r\n }\r\n } while (true);\r\n\r\n otherlv_5=(Token)match(input,44,FOLLOW_44_in_ruleAverageFunction7081); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_5, grammarAccess.getAverageFunctionAccess().getRightParenthesisKeyword_4());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"public void calculate() //default method\n {\n int average;\n average= (a+b+c)/3;\n System.out.println(\"the average of 3 numbers is :\"+average); // printing average\n }",
"public double average(int first, int last){\n double final = 0;\n for(int i = first; i < last; i++){\n final += scores[i];\n }\n return final/(last-first+1);\n}",
"private double calcG(int a, int b) {\n return a % 2 == 0 && b % 2 == 0 ? 20 : a % 2 == 1 && b % 2 == 1 ? 1 : 5;\n }",
"public float getAverageBetweenPoint(){\n return getMetric()/list.size();\n }",
"public T mean();",
"static <T, U> BiFunction<T,U,SibillaValue> apply(BinaryOperator<SibillaValue> op, BiFunction<T, U, SibillaValue> f1, BiFunction<T, U, SibillaValue> f2) {\n return (t,u) -> op.apply(f1.apply(t, u), f2.apply(t, u));\n }",
"public static WritableImage getAverage(WritableImage a, WritableImage b) {\n\t\tWritableImage result = new WritableImage((int)a.getWidth(), \n\t\t\t\t(int)a.getHeight());\n\t\tPixelWriter writer = result.getPixelWriter();\n\t\tPixelReader aPixels = a.getPixelReader();\n\t\tPixelReader bPixels = b.getPixelReader();\n\t\t\n\t\tfor (int y = 0; y < a.getHeight(); y ++) {\n\t\t\tfor (int x = 0; x < a.getWidth(); x ++) {\n\t\t\t\tColor color = getAverageColor(\n\t\t\t\t\t\taPixels.getColor(x, y), \n\t\t\t\t\t\tbPixels.getColor(x, y));\n\t\t\t\twriter.setColor(x, y, color);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public static double meanOf(Iterable<? extends Number> values) {\n/* 393 */ return meanOf(values.iterator());\n/* */ }",
"static <T, U> BiFunction<T, U, SibillaValue> apply(DoubleBinaryOperator op, BiFunction<T, U, SibillaValue> f1, BiFunction<T, U, SibillaValue> f2) {\n return (t, u) -> SibillaValue.of(op.applyAsDouble(f1.apply(t, u).doubleOf(), f2.apply(t, u).doubleOf()));\n }",
"public static void runExercise4() {\n students.stream().mapToInt(student -> student.getAge()).average().ifPresent(System.out::println);\n }",
"public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }",
"static <T> Function<T, SibillaValue> apply(DoubleUnaryOperator op, Function<T,SibillaValue> f) {\n return arg -> SibillaValue.of(op.applyAsDouble(f.apply(arg).doubleOf()));\n }",
"private double calcAverage(int startIndex, int endIndex) {\n\t\t\n\t\t// total for the scores\n\t\tdouble total = 0;\n\t\t\n\t\t// loop between indexes and add the scores\n\t\tfor (int i = startIndex; i < endIndex; i++) \n\t\t\ttotal += scores.get(i);\n\t\t\n\t\t// return the average\n\t\treturn total / (endIndex - startIndex);\n\t}",
"abstract double apply(double x, double y);",
"public int calculateUsingFactory(int a ,int b ,String operator) {\n\t\tOperation targetOperation = OperatorFactory.getOperationNull(operator);\n\t\tif(targetOperation instanceof Addition) {\n\t\t\tSystem.out.println(\"Addiction Object\");\n\t\t}else if(targetOperation instanceof Subtraction) {\n\t\t\tSystem.out.println(\"Subtraction Object\");\n\t\t}\n\t\treturn targetOperation.apply(a, b);\n\t}",
"public double average(){\n double avg = 0;\n double sum = 0;\n for (T t : arr) {\n // sum += t.doubleValue();\n }\n\n return sum / arr.length;\n }",
"public double mean (List<? extends Number> a){\n\t\tint sum = sum(a);\n\t\tdouble mean = 0;\n\t\tmean = sum / (a.size() * 1.0);\n\t\treturn mean;\n\t}",
"@Nonnull\r\n\tpublic static Observable<Float> averageFloat(\r\n\t\t\t@Nonnull final Observable<Float> source) {\r\n\t\treturn aggregate(source,\r\n\t\t\tFunctions.sumFloat(),\r\n\t\t\tnew Func2<Float, Integer, Float>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic Float invoke(Float param1, Integer param2) {\r\n\t\t\t\t\treturn param1 / param2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t}",
"public double getAverage()\n {\n if (test1 < 0 || test2 < 0)\n {\n System.out.println(\"Warning: one or more grades have not been entered.\");\n return -1;\n }\n return (test1 + test2) / 2;\n }",
"private double calcAvgX(List<Business> business) {\n\t\tdouble avg = 0.0;\n\t\tint count = 0;\n\t\tfor (int i = 0; i < business.size(); i++) {\n\t\t\tavg += business.get(i).getPrice();\n\t\t\tcount++;\n\t\t}\n\n\t\treturn avg / count;\n\t}",
"public abstract int compute(int i1, int i2);",
"public double getSuma(double a, double b) {\n return a * b;\r\n }",
"@Override\n\tpublic double getMean() {\n\t\treturn 1/this.lambda;\n\t}",
"void apply(FnIntFloatToFloat lambda);",
"public static double calculateAverage (Scanner read){\n int sum = 0;\n int num;\n while(read.hasNextInt()){\n num = read.nextInt();\n sum += num;\n }\n \n return sum/5.0;\n }",
"public double average(){\r\n\t\t//create variable to hold the values\r\n\t\tdouble average = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\t//add current index\r\n\t\t\taverage += this.data[i];\r\n\t\t\t}\r\n\t\treturn (average/this.data.length);\r\n\t}",
"@Override\r\n\tpublic double calculate() {\n\t\treturn n1 / n2;\r\n\t}",
"public double sum() {\n/* 196 */ return this.mean * this.count;\n/* */ }",
"public abstract int calculate(int a, int b);",
"public double getAverage(){\n int total = 0; //inicializa o total\n \n //soma notas de um aluno\n for(int grade: grades){\n total += grade;\n }\n \n return (double) total/grades.length;\n }",
"public static BinaryExpression divide(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }",
"public int division(int a, int b) {\n return a / b;\n }",
"public Integer perform (IExpression left, IExpression right);",
"public static double avg(ExpressionContext context, List nodeset) {\n if ((nodeset == null) || (nodeset.size() == 0)) {\n return Double.NaN;\n }\n\n JXPathContext rootContext = context.getJXPathContext();\n rootContext.getVariables().declareVariable(\"nodeset\", nodeset);\n\n Double value = (Double) rootContext.getValue(\"sum($nodeset) div count($nodeset)\", Double.class);\n\n return value.doubleValue();\n }",
"private int cal(int num1, int op, int num2){\n\n int ans=0;\n if(op<2){\n ans=num1+op*num2;\n }else if(op==2){\n ans=num1*num2;\n }else{\n ans=num1/num2;\n }\n return ans;\n }",
"public static double average(double number1, double number2, double number3) {\n\t\treturn (number1 + number2 + number3) / 2;\r\n\t\t\r\n\t}",
"private static Number operate(Number value1, Number value2, DoubleBinaryOperator operatorDouble,\n\t\t\tIntBinaryOperator operatorInteger) {\n\t\tif (value1 instanceof Double || value2 instanceof Double) {\n\t\t\treturn Double.valueOf(operatorDouble.applyAsDouble(\n\t\t\t\t\t(value1).doubleValue(),\n\t\t\t\t\t(value2).doubleValue()\n\t\t\t));\n\t\t}\n\n\t\tif (!(value1 instanceof Integer && value2 instanceof Integer)) {\n\t\t\tthrow new IllegalArgumentException(\"values must be Integer or Double\");\n\t\t}\n\t\treturn Integer.valueOf(operatorInteger.applyAsInt(\n\t\t\t\t((Integer)value1).intValue(),\n\t\t\t\t((Integer)value2).intValue()\n\t\t));\n\t}",
"private long function(long a, long b) {\n if (a == UNIQUE) return b;\n else if (b == UNIQUE) return a;\n\n // return a + b; // sum over a range\n // return (a > b) ? a : b; // maximum value over a range\n return (a < b) ? a : b; // minimum value over a range\n // return a * b; // product over a range (watch out for overflow!)\n }",
"private float calculateAverage(List<Float> tempVoltages) {\r\n\t\t\r\n\t\tfloat runningTotal = 0;\r\n\t\tfor(float i : tempVoltages){\r\n\t\t\trunningTotal += i;\r\n\t\t}\r\n\t\trunningTotal /= tempVoltages.size();\r\n\t\treturn runningTotal;\r\n\t}",
"public static BinaryExpression divideAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }",
"static Integer foo(final List<Integer> list,\n final Integer initial,\n final Function2<Integer, Integer, Integer> operator) {\n Integer accumulator = initial;\n for (final Integer element : list) {\n accumulator = operator.apply(accumulator, element);\n }\n\n return accumulator;\n }",
"public static double average (double ... numbers)\r\n\t{",
"public default IntStreamPlus mapTwoToInt(DoubleDoubleToIntFunctionPrimitive combinator) {\n return DoubleStreamPlusWithMapGroupHelper.mapGroupToInt(doubleStreamPlus(), 2, (array, start, end, consumer) -> {\n val prev = array[start];\n val curr = array[start + 1];\n val value = combinator.applyAsDoubleAndDouble(prev, curr);\n consumer.accept(value);\n return (Void) null;\n }, null);\n }",
"public double getAverage(){\n return getTotal()/array.length;\n }",
"public double average() {\n double average = 0;\n for (int i = 0; i < studentList.size(); i++) {\n Student student = studentList.get(i);\n average += student.average();\n }\n average /= studentList.size();\n return average;\n }",
"void visit(ArithmeticValue value);",
"public static int getRgbAvg(int argb0, int argb1){\n\n\t\tint red0 = argb0 & 0xff;\n\t\tint green0 = (argb0 >> 8) & 0xff;\n\t\tint blue0 = (argb0 >> 16) & 0xff;\n\n\t\tint red1 = argb1 & 0xff;\n\t\tint green1 = (argb1 >> 8) & 0xff;\n\t\tint blue1 = (argb1 >> 16) & 0xff;\n\n\t\tint red = (red0 + red1) /2;\n\t\tint green = (green0 + green1) /2;\n\t\tint blue = (blue0 + blue1) /2;\n\n\n\t\tint avg = (0xff << 24) + (red << 16) + (green << 8) + blue;\n\n\t\treturn avg;\n\t}"
]
| [
"0.6473387",
"0.6159004",
"0.5973428",
"0.5959663",
"0.5945764",
"0.5926129",
"0.59213704",
"0.59190285",
"0.58519536",
"0.58199006",
"0.58164287",
"0.57998735",
"0.57988507",
"0.5774684",
"0.5762139",
"0.5761724",
"0.5744435",
"0.57269394",
"0.57166547",
"0.5710729",
"0.57076246",
"0.569757",
"0.5690471",
"0.569011",
"0.56831753",
"0.5670626",
"0.56672245",
"0.566223",
"0.5654856",
"0.56523204",
"0.5648278",
"0.5615966",
"0.561174",
"0.5573871",
"0.5528878",
"0.552666",
"0.55211943",
"0.5509058",
"0.5503361",
"0.5487767",
"0.5458387",
"0.5453589",
"0.54472375",
"0.5444433",
"0.54393834",
"0.5425315",
"0.5414718",
"0.5409496",
"0.5382771",
"0.5382181",
"0.5373373",
"0.53701264",
"0.53649896",
"0.5363849",
"0.53554726",
"0.53547806",
"0.5348199",
"0.53480935",
"0.53458273",
"0.53360236",
"0.5324304",
"0.53202754",
"0.53036076",
"0.5300542",
"0.53004944",
"0.5282496",
"0.52737105",
"0.5268287",
"0.52581203",
"0.52449757",
"0.52421963",
"0.5229499",
"0.5228163",
"0.52273464",
"0.5226868",
"0.52192366",
"0.52129674",
"0.52127963",
"0.52102494",
"0.5210003",
"0.519992",
"0.51944286",
"0.51940435",
"0.51926327",
"0.51867",
"0.5184809",
"0.5178618",
"0.5168617",
"0.5165798",
"0.51563305",
"0.5156153",
"0.51511604",
"0.51501644",
"0.5144117",
"0.51421493",
"0.5140714",
"0.5133032",
"0.51254725",
"0.5122522",
"0.51177895",
"0.5111811"
]
| 0.0 | -1 |
interfazFuncional(); expresionesLambda(); ejemplosStream(); ejerciciosStream(); | public static void main(String[] args) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void functionStream() {\n\t\tStream.iterate(0, n -> n + 2).limit(10).forEach(System.out::println);\n\t\tStream.generate(Math::random).limit(4).forEach(System.out::println);\n\n\t}",
"public static void main(String[] args) {\n\t\tStream st = new Stream();\r\n\t\tSystem.out.println(\">>> Filtrar <<<\");\r\n\t\tst.filtrar();\r\n\t\tSystem.out.println(\">>> Transformar <<<\");\r\n\t\tst.transformar();\r\n\t\tSystem.out.println(\">>> Ordenar <<<\");\r\n\t\tst.ordenar();\r\n\t\tSystem.out.println(\">>> Limitar <<<\");\r\n\t\tst.limitar();\r\n\t\tSystem.out.println(\">>> Contar <<<\");\r\n\t\tst.contar();\r\n\t\t\r\n\t}",
"private static void ejercicio1() {\n List<Integer> numeros = Arrays.asList(1, 2, 3, 4, 5);\n numeros.stream().map(numero -> Main.calculaCubo(numero)).forEach(numero -> System.out.print(numero + \" \"));\n System.out.println();\n numeros.stream().map(Main::calculaCubo).forEach(numero -> System.out.print(numero + \" \"));\n }",
"public static void main(String[] args) {\n\n Function<Integer, String> parOuImpar = n -> n % 2 == 0 ? \"Par\" : \"Ímpar\";\n\n System.out.println(parOuImpar.apply(27));\n\n Function<String, String> oResutladoE = v -> \"O resultado é: \" + v;\n\n Function<String, String> empolgado = x -> x + \"!!\";\n\n Function<String, String> duvida = v -> v + \"??\";\n\n String resultadoFinal = parOuImpar\n .andThen(oResutladoE) //Função encadeada\n .andThen(empolgado) //Função encadeada\n .apply(27);\n System.out.println(resultadoFinal);\n\n String resutladoFinal2 = parOuImpar\n .andThen(duvida)\n .apply(33);\n System.out.println(resutladoFinal2);\n\n }",
"public static void main(String[] args) {\n Consumer<Integer> consumer = x ->{\n System.out.println(\"Number is :\"+x);\n };\n consumer.accept(55);\n //Supplier\n Supplier<String> str = () -> \"Implementation of Supplier \";\n System.out.println(str.get());\n //Predicate\n int a=37;\n Predicate<Integer> isOddPredicate = x -> x%2 != 0;\n System.out.println(\"Is \"+a+\" Odd Number :\"+isOddPredicate.test(a));\n //Function\n int b=7;\n Function<Integer,Integer> squareFunction = x -> x*x;\n System.out.println(\"Square of \"+b+\" is \"+squareFunction.apply(b));\n\n //Example\n List<Integer> list = List.of(12,9,13,4,6,2,4);\n Consumer<Integer> con = System.out::println;\n System.out.println(\"Example(Square of odd no.) : \");\n list.stream()\n .filter(isOddPredicate)\n .map(squareFunction)\n .forEach(con);\n\n\n\n }",
"@CompileStatic\npublic interface Stream<T> {\n\n /**\n * Remap the stream.\n *\n * @param <X> type parameter\n * @param mapper mapper returning iterable of values to be flattened into output\n * @return the remapped stream\n */\n default <X> Stream<X> flatMap(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Iterable<X>> mapper) {\n\n return flatMap(null, mapper);\n }\n\n /**\n * Remap the stream.\n *\n * @param <X> type parameter\n * @param name name of the operation\n * @param mapper mapper returning iterable of values to be flattened into output\n * @return the remapped stream\n */\n <X> Stream<X> flatMap(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Iterable<X>> mapper);\n\n /**\n * Remap the stream.\n *\n * @param <X> type parameter\n * @param mapper the mapping closure\n * @return remapped stream\n */\n default <X> Stream<X> map(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<X> mapper) {\n\n return map(null, mapper);\n }\n\n /**\n * Remap the stream.\n *\n * @param <X> type parameter\n * @param name stable name of the mapping operator\n * @param mapper the mapping closure\n * @return remapped stream\n */\n <X> Stream<X> map(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<X> mapper);\n\n /**\n * Filter stream based on predicate\n *\n * @param predicate the predicate to filter on\n * @return filtered stream\n */\n default Stream<T> filter(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate) {\n\n return filter(null, predicate);\n }\n\n /**\n * Filter stream based on predicate\n *\n * @param name name of the filter operator\n * @param predicate the predicate to filter on\n * @return filtered stream\n */\n Stream<T> filter(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate);\n\n /**\n * Assign event time to elements.\n *\n * @param assigner assigner of event time\n * @return stream with elements assigned event time\n */\n default Stream<T> assignEventTime(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Long> assigner) {\n\n return assignEventTime(null, assigner);\n }\n\n /**\n * Assign event time to elements.\n *\n * @param name name of the assign event time operator\n * @param assigner assigner of event time\n * @return stream with elements assigned event time\n */\n Stream<T> assignEventTime(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Long> assigner);\n\n /**\n * Add window to each element in the stream.\n *\n * @return stream of pairs with window\n */\n default Stream<Pair<Object, T>> withWindow() {\n return withWindow(null);\n }\n\n /**\n * Add window to each element in the stream.\n *\n * @param name stable name of the mapping operator\n * @return stream of pairs with window\n */\n Stream<Pair<Object, T>> withWindow(@Nullable String name);\n\n /**\n * Add timestamp to each element in the stream.\n *\n * @return stream of pairs with timestamp\n */\n default Stream<Pair<T, Long>> withTimestamp() {\n return withTimestamp(null);\n }\n\n /**\n * Add timestamp to each element in the stream.\n *\n * @param name stable name of mapping operator\n * @return stream of pairs with timestamp\n */\n Stream<Pair<T, Long>> withTimestamp(@Nullable String name);\n\n /** Print all elements to console. */\n void print();\n\n /**\n * Collect stream as list. Note that this will result on OOME if this is unbounded stream.\n *\n * @return the stream collected as list.\n */\n List<T> collect();\n\n /**\n * Test if this is bounded stream.\n *\n * @return {@code true} if this is bounded stream, {@code false} otherwise\n */\n boolean isBounded();\n\n /**\n * Process this stream as it was unbounded stream.\n *\n * <p>This is a no-op if {@link #isBounded} returns {@code false}, otherwise it turns the stream\n * into being processed as unbounded, although being bounded.\n *\n * <p>This is an optional operation and might be ignored if not supported by underlying\n * implementation.\n *\n * @return Stream viewed as unbounded stream, if supported\n */\n default Stream<T> asUnbounded() {\n return this;\n }\n\n /**\n * Convert elements to {@link StreamElement}s.\n *\n * @param <V> type of value\n * @param repoProvider provider of {@link Repository}\n * @param entity the entity of elements\n * @param keyExtractor extractor of keys\n * @param attributeExtractor extractor of attributes\n * @param valueExtractor extractor of values\n * @param timeExtractor extractor of time\n * @return stream with {@link StreamElement}s inside\n */\n <V> Stream<StreamElement> asStreamElements(\n RepositoryProvider repoProvider,\n EntityDescriptor entity,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<CharSequence> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\")\n Closure<CharSequence> attributeExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Long> timeExtractor);\n\n /**\n * Persist this stream to replication.\n *\n * @param repoProvider provider of {@link Repository}.\n * @param replicationName name of replication to persist stream to\n * @param target target of the replication\n */\n void persistIntoTargetReplica(\n RepositoryProvider repoProvider, String replicationName, String target);\n\n /**\n * Persist this stream to specific family.\n *\n * <p>Note that the type of the stream has to be already {@link StreamElement StreamElements} to\n * be persisted to the specified family. The family has to accept given {@link\n * AttributeDescriptor} of the {@link StreamElement}.\n *\n * @param repoProvider provider of {@link Repository}.\n * @param targetFamilyname name of target family to persist the stream into\n */\n default void persistIntoTargetFamily(RepositoryProvider repoProvider, String targetFamilyname) {\n persistIntoTargetFamily(repoProvider, targetFamilyname, 10);\n }\n\n /**\n * Persist this stream to specific family.\n *\n * <p>Note that the type of the stream has to be already {@link StreamElement StreamElements} to\n * be persisted to the specified family. The family has to accept given {@link\n * AttributeDescriptor} of the {@link StreamElement}.\n *\n * @param repoProvider provider of {@link Repository}.\n * @param targetFamilyname name of target family to persist the stream into\n * @param parallelism parallelism to use when target family is bulk attribute family\n */\n void persistIntoTargetFamily(\n RepositoryProvider repoProvider, String targetFamilyname, int parallelism);\n\n /**\n * Persist this stream as attribute of entity\n *\n * @param <V> type of value extracted\n * @param repoProvider provider of repository\n * @param entity the entity to store the stream to\n * @param keyExtractor extractor of key for elements\n * @param attributeExtractor extractor for attribute for elements\n * @param valueExtractor extractor of values for elements\n * @param timeExtractor extractor of event time\n */\n <V> void persist(\n RepositoryProvider repoProvider,\n EntityDescriptor entity,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<CharSequence> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\")\n Closure<CharSequence> attributeExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Long> timeExtractor);\n\n /**\n * Directly write this stream to repository. Note that the stream has to contain {@link\n * StreamElement}s (e.g. created by {@link #asStreamElements}.\n *\n * @param repoProvider provider of repository\n */\n void write(RepositoryProvider repoProvider);\n\n /**\n * Create time windowed stream.\n *\n * @param millis duration of tumbling window\n * @return time windowed stream\n */\n WindowedStream<T> timeWindow(long millis);\n\n /**\n * Create sliding time windowed stream.\n *\n * @param millis duration of the window\n * @param slide duration of the slide\n * @return sliding time windowed stream\n */\n WindowedStream<T> timeSlidingWindow(long millis, long slide);\n\n /**\n * Create session windowed stream.\n *\n * @param <K> type of key\n * @param keyExtractor extractor of key\n * @param gapDuration duration of the gap between elements per key\n * @return session windowed stream\n */\n <K> WindowedStream<Pair<K, T>> sessionWindow(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n long gapDuration);\n\n /**\n * Create calendar-based windowed stream.\n *\n * @param window the resolution of the calendar window (\"days\", \"weeks\", \"months\", \"years\")\n * @param count number of days, weeks, months, years\n * @param timeZone time zone of the calculation\n * @return calendar windowed stream\n */\n WindowedStream<T> calendarWindow(String window, int count, TimeZone timeZone);\n\n /**\n * Group all elements into single window.\n *\n * @return globally windowed stream.\n */\n WindowedStream<T> windowAll();\n\n /**\n * Merge two streams together.\n *\n * @param other the other stream(s)\n * @return merged stream\n */\n default Stream<T> union(Stream<T> other) {\n return union(Arrays.asList(other));\n }\n\n /**\n * Merge two streams together.\n *\n * @param name name of the union operator\n * @param other the other stream(s)\n * @return merged stream\n */\n default Stream<T> union(@Nullable String name, Stream<T> other) {\n return union(name, Arrays.asList(other));\n }\n\n /**\n * Merge multiple streams together.\n *\n * @param streams other streams\n * @return merged stream\n */\n default Stream<T> union(List<Stream<T>> streams) {\n return union(null, streams);\n }\n\n /**\n * Merge multiple streams together.\n *\n * @param name name of the union operator\n * @param streams other streams\n * @return merged stream\n */\n Stream<T> union(@Nullable String name, List<Stream<T>> streams);\n\n /**\n * Transform this stream using stateful processing.\n *\n * @param <K> type of key\n * @param <S> type of value state\n * @param <V> type of intermediate value\n * @param <O> type of output value\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialState closure providing initial state value for key\n * @param outputFn function for outputting values (when function returns {@code null} the output\n * is discarded\n * @param stateUpdate update (accumulation) function for the state the output is discarded\n * @return the statefully reduced stream\n */\n default <K, S, V, O> Stream<Pair<K, O>> reduceValueStateByKey(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<S> initialState,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<O> outputFn,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<S> stateUpdate) {\n\n return reduceValueStateByKey(\n null, keyExtractor, valueExtractor, initialState, outputFn, stateUpdate);\n }\n\n /**\n * Transform this stream using stateful processing without time-sorting.\n *\n * @param <K> type of key\n * @param <S> type of value state\n * @param <V> type of intermediate value\n * @param <O> type of output value\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialState closure providing initial state value for key\n * @param outputFn function for outputting values (when function returns {@code null} the output\n * is discarded\n * @param stateUpdate update (accumulation) function for the state the output is discarded\n * @return the statefully reduced stream\n */\n default <K, S, V, O> Stream<Pair<K, O>> reduceValueStateByKeyUnsorted(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<S> initialState,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<O> outputFn,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<S> stateUpdate) {\n\n return reduceValueStateByKeyUnsorted(\n null, keyExtractor, valueExtractor, initialState, outputFn, stateUpdate);\n }\n\n /**\n * Transform this stream using stateful processing.\n *\n * @param <K> type of key\n * @param <S> type of value state\n * @param <V> type of intermediate value\n * @param <O> type of output value\n * @param name optional name of the stateful operation\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialState closure providing initial state value for key\n * @param stateUpdate update (accumulation) function for the state\n * @param outputFn function for outputting values (when function returns {@code null} the output\n * is discarded\n * @return the statefully reduced stream\n */\n default <K, S, V, O> Stream<Pair<K, O>> reduceValueStateByKey(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<S> initialState,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<O> outputFn,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<S> stateUpdate) {\n\n return reduceValueStateByKey(\n name, keyExtractor, valueExtractor, initialState, outputFn, stateUpdate, true);\n }\n\n /**\n * Transform this stream using stateful processing without time-sorting.\n *\n * @param <K> type of key\n * @param <S> type of value state\n * @param <V> type of intermediate value\n * @param <O> type of output value\n * @param name optional name of the stateful operation\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialState closure providing initial state value for key\n * @param stateUpdate update (accumulation) function for the state\n * @param outputFn function for outputting values (when function returns {@code null} the output\n * is discarded\n * @return the statefully reduced stream\n */\n default <K, S, V, O> Stream<Pair<K, O>> reduceValueStateByKeyUnsorted(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<S> initialState,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<O> outputFn,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<S> stateUpdate) {\n\n return reduceValueStateByKey(\n name, keyExtractor, valueExtractor, initialState, outputFn, stateUpdate, false);\n }\n\n /**\n * Transform this stream using stateful processing.\n *\n * @param <K> type of key\n * @param <S> type of value state\n * @param <V> type of intermediate value\n * @param <O> type of output value\n * @param name optional name of the stateful operation\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialState closure providing initial state value for key\n * @param stateUpdate update (accumulation) function for the state\n * @param outputFn function for outputting values (when function returns {@code null} the output\n * is discarded\n * @param sorted {@code true} if the input to the state update function should be time-sorted\n * @return the statefully reduced stream\n */\n <K, S, V, O> Stream<Pair<K, O>> reduceValueStateByKey(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<S> initialState,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<O> outputFn,\n @ClosureParams(value = FromString.class, options = \"S, V\") Closure<S> stateUpdate,\n boolean sorted);\n\n /**\n * Transform this stream to another stream by applying combining transform in global window\n * emitting results after each element added. That means that the following holds: * the new\n * stream will have exactly the same number of elements as the original stream minus late elements\n * dropped * streaming semantics need to define allowed lateness, which will incur real time\n * processing delay * batch semantics use sort per key\n *\n * @param <K> key type\n * @param <V> value type\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialValue closure providing initial value of state for key\n * @param combiner combiner of values to final value\n * @return the integrated stream\n */\n default <K, V> Stream<Pair<K, V>> integratePerKey(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<V> initialValue,\n @ClosureParams(value = FromString.class, options = \"V,V\") Closure<V> combiner) {\n\n return integratePerKey(null, keyExtractor, valueExtractor, initialValue, combiner);\n }\n\n /**\n * Transform this stream to another stream by applying combining transform in global window\n * emitting results after each element added. That means that the following holds: * the new\n * stream will have exactly the same number of elements as the original stream minus late elements\n * dropped * streaming semantics need to define allowed lateness, which will incur real time\n * processing delay * batch semantics use sort per key\n *\n * @param <K> key type\n * @param <V> value type\n * @param name optional name of the transform\n * @param keyExtractor extractor of key\n * @param valueExtractor extractor of value\n * @param initialValue closure providing initial value of state for key\n * @param combiner combiner of values to final value\n * @return the integrated stream\n */\n <K, V> Stream<Pair<K, V>> integratePerKey(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<K> keyExtractor,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<V> valueExtractor,\n @ClosureParams(value = FromString.class, options = \"K\") Closure<V> initialValue,\n @ClosureParams(value = FromString.class, options = \"V,V\") Closure<V> combiner);\n\n /** Reshuffle the stream via random key. */\n default Stream<T> reshuffle() {\n return reshuffle(null);\n }\n\n /**\n * Reshuffle the stream via random key.\n *\n * @param name name of the transform\n */\n @SuppressWarnings(\"unchecked\")\n Stream<T> reshuffle(@Nullable String name);\n}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Create Stream of Object\\n\");\n\t\tStream<String> stream= Stream.of(\"Saliou\",\"Fatimatou\",\"Mahdiyou\",\"Kolon\");\n\t stream.forEach(System.out::println);\n\t \n // Create Stream from Objects from Collection\n\t\tSystem.out.println(\" \\n\\nCreate Stream Object from collection\\n\");\n\t Collection<String> collection=Arrays.asList(\"Saliou\",\"Fatimatou\",\"Mahdiyou\",\"Kolon\");\n\t Stream<String> stream2=collection.stream();\n\t stream2.forEach(System.out::println);\n\t \n\t //Create Stream Object from Collection\n\t System.out.println(\"\\n\\nCreate Stream Object from List\");\n\t List<String> list= Arrays.asList(\"Modou\",\"Fatou\",\"Saliou\",\"Samba\");\n\t Stream<String> stream3=list.stream();\n\t stream3.forEach(System.out::println);\n\t \n\t //Create Stream Object from Set\n\t System.out.println(\"\\n Create Stream from Set\");\n\t Set<String> set= new HashSet<>(list);\n\t Stream<String> stream4= set.stream();\n\t stream4.forEach(System.out::println);\n\t \n\t //Create Stream Object from Arrays\n\t System.out.println(\"\\nCreate Stream Object from Arrays\");\n\t ArrayList<String> array= new ArrayList<>(list);\n\t Stream<String> stream5= array.stream();\n\t stream5.forEach(System.out::println);\n\t \n\t //Create Stream from Array of String\n\t System.out.println(\"\\n Create Stream from Array of String\");\n\t String[] strArray= {\"Saliou\",\"Fatimatou\",\"Mahdiyou\",\"Kolon\"};\n\t Stream<String> stream6=Arrays.stream(strArray);\n\t stream6.forEach(System.out::println);\n\t \n\t \n\t}",
"IEmpleado next();",
"public static void main(String[] args) {\n\n Expositores_Interface expositoresInterface = DaoFactory.construirInstanciaExpositor();\n List<Expositores> listaExpositores = expositoresInterface.listar();\n\n\n listaExpositores.stream().filter(a -> a.getEvento() == 3).forEach(a -> a.imprimirSueldo());\n\n\n\n\n }",
"public static void main(String[] args) {\n\t\t//Até o java 7\n\t\tnew Thread(new Runnable() {\n\n\t\t @Override\n\t\t public void run() {\n\t\t System.out.println(\"Executando um Runnable\");\n\t\t }\n\n\t\t}).start();\n\t\t//A partir do java 8\n\t\tnew Thread(() -> System.out.println(\"Executando um Runnable\")).start();\n\t\t\n\t\t//iterando com java 8: classe anonima\n\t\ttexto.forEach(new Consumer<String>() {\n\t\t public void accept(String s) {\n\t\t System.out.println(s);\n\t\t }\n\t\t});\n\t\t//iterando com java 8: lambda\n\t\t//Essa sintaxe funciona para qualquer interface \n\t\t//que tenha apenas um método abstrato\n\t\ttexto.forEach((String s) -> {\n\t\t System.out.println(s);\n\t\t});\n\t\t//ou\n\t\ttexto.forEach((s) -> {\n\t\t System.out.println(s);\n\t\t});\n\t\t//ou\n\t\ttexto.forEach(s -> {\n\t\t System.out.println(s);\n\t\t});\n\t\t//ou\n\t\ttexto.forEach(s -> System.out.println(s));\n\t\t// Uma interface que possui apenas um método abstrato \n\t\t//é agora conhecida como interface funcional e pode ser utilizada dessa forma\n\t\t\n\t\t//Outro exemplo é o próprio Comparator. Se utilizarmos a forma \n\t\t//de classe anônima, teremos essa situação: \n\t\ttexto.sort(new Comparator<String>() {\n\t\t public int compare(String s1, String s2) {\n\t\t if (s1.length() < s2.length())\n\t\t return -1;\n\t\t if (s1.length() > s2.length())\n\t\t return 1;\n\t\t return 0;\n\t\t }\n\t\t});\n\t\t//ou com lambda\n\t\ttexto.sort((s1, s2) -> {\n\t\t if (s1.length() < s2.length())\n\t\t return -1;\n\t\t if (s1.length() > s2.length())\n\t\t return 1;\n\t\t return 0;\n\t\t});\n\t\t//ou\n\t\ttexto.sort((s1, s2) -> {\n\t\t return Integer.compare(s1.length(), s2.length());\n\t\t});\n\t\t//ou como há apenas um único statement, podemos remover as chaves\n\t\ttexto.sort((s1, s2) -> Integer.compare(s1.length(), s2.length()));\n\t}",
"@Test\n public void intermediateAndTerminalOperations() throws Exception {\n System.out.println(\n MockData.getCars()\n // Here we go to \"abstraction\" of strams\n .stream()\n // This is an intermediate op because we stay in the abstraction\n .filter(car -> {\n System.out.println(\"filter car \" + car);\n return car.getPrice() < 10000;\n })\n // This is intermediate too, we still working with streams \"abstraction\"\n .map(car -> {\n System.out.println(\"mapping car \" + car);\n return car.getPrice();\n })\n // same as before, still intermediate, still in streams abstraction\n .map(price -> {\n System.out.println(\"mapping price \" + price);\n return price + (price * .14);\n })\n // ok, this is a terminal operation and give you back the \"concrete type\" result of the operations\n .collect(Collectors.toList())\n );\n\n // Q: If you comment this line, no result is printed, you got only stram reference, why?\n // A: STREAMS are LAZY initialized\n\n // Q: What's the order of execution in the above code?\n // A: See the console print to understand order of execution:\n // The mappings are executed as soon as the first car passes the filter\n // so to get some results, stream don't need to filter ALL the list before\n\n }",
"public static void main(String[] args){\n int result = Stream.of(1,2,3,4,5,6,7,8,9,10)\n .reduce(0,Integer::sum);//metodo referenciado\n// .reduce(0, (acumulador, elemento) -> acumulador+elemento);\n System.out.println(result);\n\n // Obtener lenguajes separados por pipeline entre ellos y sin espacios\n // opcion 1(mejor) con operador ternario\n String cadena = Stream.of(\"Java\",\"C\",\"Python\",\"Ruby\")\n .reduce(\"\", (acumulador, lenguaje) -> acumulador.equals(\"\")?lenguaje:acumulador + \"|\" + lenguaje);\n\n System.out.println(cadena);\n\n //Opcion 2 Con regex\n String cadenaRegex = Stream.of(\"Java\",\"C\",\"Python\",\"Ruby\")\n .reduce(\"\", (acumulador, lenguaje) -> acumulador + \"|\" + lenguaje)\n .replaceFirst(\"\\\\|\",\"\") // Quitamos la primera pipeline\n .replaceAll(\"\\\\s\",\"\"); // Quitamos todos los espacios\n\n System.out.println(cadenaRegex);\n }",
"public static void main(String[] args) {\n BiFunction<String, Integer, Usuario> factory = Usuario::new;\n Usuario user1 = factory.apply(\"Henrique Schumaker\", 50);\n Usuario user2 = factory.apply(\"Humberto Schumaker\", 120);\n Usuario user3 = factory.apply(\"Hugo Schumaker\", 190);\n Usuario user4 = factory.apply(\"Hudson Schumaker\", 10);\n Usuario user5 = factory.apply(\"Gabriel Schumaker\", 90);\n Usuario user6 = factory.apply(\"Nikolas Schumaker\", 290);\n Usuario user7 = factory.apply(\"Elisabeth Schumaker\", 195);\n Usuario user8 = factory.apply(\"Eliza Schumaker\", 1000);\n Usuario user9 = factory.apply(\"Marcos Schumaker\", 100);\n Usuario user10 = factory.apply(\"Wilson Schumaker\", 1300);\n \n List<Usuario> usuarios = Arrays.asList(user1, user2, user3, user4, user5,\n user6, user7, user8, user9, user10);\n \n //filtra usuarios com + de 100 pontos\n usuarios.stream().filter(u -> u.getPontos() >100);\n \n //imprime todos\n usuarios.forEach(System.out::println);\n \n /*\n Por que na saída apareceu todos, sendo que eles não tem mais de 100 pontos? \n Ele não aplicou o ltro na lista de usuários! Isso porque o método filter, assim como os \n demais métodos da interface Stream, não alteram os elementos do stream original! É muito \n importante saber que o Stream não tem efeito colateral sobre a coleção que o originou.\n */\n }",
"public void runExercises() throws IOException {\n System.out.println(\"JDK 8 Lambdas and Streams MOOC Lesson 2\");\n System.out.println(\"Running exercise 1 solution...\");\n exercise1();\n System.out.println(\"Running exercise 2 solution...\");\n exercise2();\n System.out.println(\"Running exercise 3 solution...\");\n exercise3();\n System.out.println(\"Running exercise 4 solution...\");\n exercise4();\n System.out.println(\"Running exercise 5 solution...\");\n exercise5();\n System.out.println(\"Running exercise 6 solution...\");\n exercise6();\n System.out.println(\"Running exercise 7 solution...\");\n exercise7();\n }",
"public static void main(final String[] args)\n {\n final Supplier<ArrayList<String>> proveedor = ArrayList::new;\n\n // Aqui tenemos el acumulador, el que añadira cada elemento del stream al proveedor definido\n // arriba\n // BiConsumer<ArrayList<String>, String> acumulador = (list, str) -> list.add(str);\n final BiConsumer<ArrayList<String>, String> acumulador = ArrayList::add;\n\n // Aquí tenemos el combinador, ya que por ejemplo al usar parallelStream, cada hijo generara\n // su propio proveedor, y al final deberan combinarse\n final BiConsumer<ArrayList<String>, ArrayList<String>> combinador = ArrayList::addAll;\n\n final List<Empleado> empleados = Empleado.empleados();\n final List<String> listNom = empleados.stream()\n .map(Empleado::getNombre)\n .collect(ArrayList::new, ArrayList::add, ArrayList::addAll);\n System.out.println(listNom);\n\n // Usando Collectors\n final List<String> listNom2 = empleados.stream()\n .map(Empleado::getNombre)\n .collect(Collectors.toList());\n System.out.println(listNom2);\n\n final Set<String> listNom3 = empleados.stream()\n .map(Empleado::getNombre)\n .collect(Collectors.toSet());\n System.out.println(listNom3);\n\n final Collection<String> listNom4 = empleados.stream()\n .map(Empleado::getNombre)\n .collect(Collectors.toCollection(TreeSet::new));\n System.out.println(listNom4);\n\n // Ahora con mapas\n final Map<Long, String> map = empleados.stream()\n .collect(Collectors.toMap(Empleado::getId, Empleado::getNombre));\n System.out.println(map);\n\n final Map<Genero, String> map2 = empleados.stream()\n .collect(Collectors.toMap(Empleado::getGenero, Empleado::getNombre,\n (nom1,\n nom2) -> String.join(\", \", nom1, nom2)));\n System.out.println(map2);\n }",
"public static void main(String[] args) {\n\t\tStream<Integer> intStream = Stream.of(1, 2, 3, 4);\n\t\t// intStream.forEach(System.out::println);\n\n\t\t/*\n\t\t * Approach 2 of declaring a stream objects with range of elements from 1-10\n\t\t * where last range element is not considered while printing or for any //\n\t\t * operation like sum, average, etc.\n\t\t * \n\t\t * We have IntStream, DoubleStream, etc to handle primitive values inside\n\t\t * streams...\n\t\t */\n\n\t\tIntStream.range(1, 10).forEach(e -> System.out.println(\"IntStream values from 1-10 range: \" + e)); // This will\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// print\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// numbers\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// from 1-9\n\n\t\t// Sometimes,we really want to create Streams dynamically instead of sequential\n\t\t// int values as above. We can use iterate method to to that.\n\t\tIntStream.iterate(1, e -> e * 2).limit(10).forEach(System.out::println);// Priting square numbers\n\n\t\tIntStream.iterate(2, e -> e + 2).limit(10).peek(System.out::println);// Printing even numbers\n\n\t\t/*\n\t\t * Convert these primitive streams to List For that we need to do a boxing\n\t\t * operation on top of stream\n\t\t */\n\n\t\tSystem.out.println(\"Converting IntStream to List...\");\n\t\tIntStream.range(1, 10).limit(5).boxed().collect(Collectors.toList()).forEach(System.out::println);\n\n\t\t/*\n\t\t * Lets explore some concepts on Strings...How stream works on strings and its\n\t\t * related operations\n\t\t */\n\n\t\t// Stream courseStream = Stream.of(\"Spring\", \"API\", \"AWS\", \"Java\", \"JavaFP\");\n\t\tList<String> courses = List.of(\"Spring\", \"API\", \"AWS\", \"Java\", \"JavaFP\");\n\t\tList<String> courses2 = List.of(\"Spring\", \"API\", \"AWS\", \"Java\", \"JavaFP\");\n\t\t// If we want to join these values\n\n\t\tSystem.out.println(courses.stream().collect(Collectors.joining()));\n\n\t\t/*\n\t\t * Lets say, if i want tp split each string in stream seprated by comma..\n\t\t */\n\t\tSystem.out.println(\"String opeartaion within Streams....\");\n\t\t// The below one prints all stream Objects that executed on top of split\n\t\t// function. So, we need to flatMap it to extract the actual result\n\t\tSystem.out.println(courses.stream().map(course -> course.toString().split(\",\")).collect(Collectors.toList()));\n\t\tSystem.out.println(\n\t\t\t\tcourses.stream().map(course -> course.split(\"\")).flatMap(Arrays::stream).collect(Collectors.toList()));\n\n\t\tSystem.out.println(\"Tuples strings : \"\n\t\t\t\t+ courses.stream().flatMap(course -> courses2.stream().map(course2 -> List.of(course, course2)))\n\t\t\t\t\t\t.collect(Collectors.toList()));\n\n\t\t/**\n\t\t * Higher Order Functions... Higher Order function is a function that returns a\n\t\t * function... In simpler terms, a method that returns a Predicate which\n\t\t * contains logic. So, here we are using method logic as a normal data and\n\t\t * returning it from an another method..\n\t\t */\n\n\t\tList<Courses> courseList = List.of(new Courses(1, \"Java\", 5000, 5), new Courses(2, \"AWS\", 4000, 4));\n\t\t// If we want to get courses whcih has number of students greater than 4000,\n\t\t// then we need to write a predicate for that first\n\t\tint numberOfStudentsThreshhold = 4000;\n\t\tPredicate<Courses> numberOfStudentsPredicate = numberOfStudentsPredecateMethod(numberOfStudentsThreshhold);\n\n\t\tSystem.out.println(\"Courses that has score>4000 : \"\n\t\t\t\t+ courseList.stream().filter(numberOfStudentsPredicate).collect(Collectors.toList()));\n\n\t}",
"public static void main(String[] args) {\n Calculo soma = ( a, b ) -> a + b;\n\n // Chama para ser executado -> paradigma funcional\n System.out.println(executarOperacao(soma,1,3));\n System.out.println(executarOperacao( ( a, b ) -> a + b,1,3));\n\n // paradigma imperativo\n System.out.println(somar(1, 3));\n // 4\n\n System.out.println(\"Demais operações matemáticas...\");\n Calculo subtracao = ( a, b ) -> a - b;\n Calculo multiplicacao = ( a, b ) -> a * b;\n Calculo divisao = ( a, b ) -> a / b;\n System.out.println(executarOperacao(subtracao,10,3));\n System.out.println(executarOperacao(multiplicacao,10,3));\n System.out.println(executarOperacao(divisao,12,3));\n\n System.out.println(\"Demais operações matemáticas chamando direto...\");\n System.out.println(executarOperacao( ( a, b ) -> a - b,10,3));\n System.out.println(executarOperacao( ( a, b ) -> a * b,10,3));\n System.out.println(executarOperacao( ( a, b ) -> a / b,12,3));\n\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tFunInterf fi=()->System.out.println(\"Functional Interface\");\r\n\t\tfi.print();\r\n\t\t\r\n\t\tISquare is=i->i*i;\r\n\t\tSystem.out.println(is.square(10));\r\n\t\t\r\n\t\tIMultiply im=(a,b)->a*b;\r\n\t\tSystem.out.println(im.multiply(10,20));\r\n\t\t\r\n\t\t/*** Create Thread using Lamda expression****/\r\n\t\t\r\n\t\tRunnable r=()->{\r\n\t\t\tfor(int i=0;i<10;i++)\r\n\t\t\t\tSystem.out.println(\"Child Thread\");\r\n\t\t};\r\n\t\tnew Thread(r).start();\r\n\t\t\r\n\t\t/*** Sort using Lamda expression****/\r\n\t\t\r\n\t\tList<Integer> lst = new ArrayList<Integer> ();\r\n\t\tlst.add(10);\r\n\t\tlst.add(50);\r\n\t\tlst.add(3);\r\n\t\tComparator <Integer> c=(a,b)->(a<b)?-1:(a>b)?1:0;\r\n\t\tCollections.sort(lst,c);\r\n\t\tSystem.out.println(lst);\r\n\t\t\r\n\t\t/*** Filter even number using Lamda expression****/\r\n\t\tList l2=lst.stream().filter(i->i%2==0).collect(Collectors.toList());\r\n\t\tSystem.out.println(l2);\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t/***Function Interface ****/\r\n\t\t\r\n\t\tFunction<Integer,Integer> f=i->i*i;\r\n\t\tSystem.out.println(\"Using Funtion Interface \"+f.apply(2));\r\n\t\t\r\n\t\t\t\t\r\n\t\t/****Predicate Interface ****/\r\n\t\t\r\n\t\tPredicate<Integer> p=i->i%2==0;\r\n\t\tSystem.out.println(\"Using Perdicate Interface \"+p.test(100));\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t/**** Using Filter method ***/\r\n\t\tList<String> names = Arrays.asList(\"Melisandre\", \"Sansa\", \"Jon\", \"Daenerys\", \"Joffery\");\r\n\r\n\t\tList<String> longnames = names.stream() // converting the list to stream\r\n\t\t\t\t.filter(str -> str.length() > 6) // filter the stream to create\r\n\t\t\t\t.collect(Collectors.toList()); // collect the final stream and convert it to a List\r\n\r\n\t\tSystem.out.println(longnames);\r\n\t\t\r\n\t\t/**** Using Map method ***/\r\n\r\n\t\tList<Integer> num = Arrays.asList(1, 2, 3, 4, 5, 6);\r\n\t\tList<Integer> sqrList = num.stream().map(n -> n * n).collect(Collectors.toList());\r\n\t\tSystem.out.println(sqrList);\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tSystem.out.println(\"-------1. Stream filter() example---------\");\r\n\t\t//We can use filter() method to test stream elements for a condition and generate filtered list.\r\n\t\t\r\n\t\tList<Integer> myList = new ArrayList<>();\r\n\t\tfor(int i=0; i<100; i++) myList.add(i);\r\n\t\tStream<Integer> sequentialStream = myList.stream();\r\n\r\n\t\tStream<Integer> highNums = sequentialStream.filter(p -> p > 90); //filter numbers greater than 90\r\n\t\tSystem.out.print(\"High Nums greater than 90=\");\r\n\t\thighNums.forEach(p -> System.out.print(p+\" \"));\r\n\t\t//prints \"High Nums greater than 90=91 92 93 94 95 96 97 98 99 \"\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"-------2. Stream map() example---------\");\r\n\t\t//We can use map() to apply functions to an stream\r\n\t\tStream<String> names = Stream.of(\"aBc\", \"d\", \"ef\");\r\n\t\tSystem.out.println(names.map(s -> {\r\n\t\t\t\treturn s.toUpperCase();\r\n\t\t\t}).collect(Collectors.toList()));\r\n\t\t//prints [ABC, D, EF]\r\n\t\t\r\n\t\tSystem.out.println(\"-------3. Stream sorted() example---------\");\r\n\t\t//We can use sorted() to sort the stream elements by passing Comparator argument.\r\n\t\tStream<String> names2 = Stream.of(\"aBc\", \"d\", \"ef\", \"123456\");\r\n\t\tList<String> reverseSorted = names2.sorted(Comparator.reverseOrder()).collect(Collectors.toList());\r\n\t\tSystem.out.println(reverseSorted); // [ef, d, aBc, 123456]\r\n\r\n\t\tStream<String> names3 = Stream.of(\"aBc\", \"d\", \"ef\", \"123456\");\r\n\t\tList<String> naturalSorted = names3.sorted().collect(Collectors.toList());\r\n\t\tSystem.out.println(naturalSorted); //[123456, aBc, d, ef]\r\n\t\t\r\n\t\tSystem.out.println(\"-------4. Stream flatMap() example---------\");\r\n\t\t//We can use flatMap() to create a stream from the stream of list.\r\n\t\tStream<List<String>> namesOriginalList = Stream.of(\r\n\t\t\t\tArrays.asList(\"Pankaj\"), \r\n\t\t\t\tArrays.asList(\"David\", \"Lisa\"),\r\n\t\t\t\tArrays.asList(\"Amit\"));\r\n\t\t\t//flat the stream from List<String> to String stream\r\n\t\t\tStream<String> flatStream = namesOriginalList\r\n\t\t\t\t.flatMap(strList -> strList.stream());\r\n\r\n\t\t\tflatStream.forEach(System.out::println);\r\n\r\n\t}",
"public Iterator<IPessoa> getAtores();",
"public static void main(String[] args){\n SomeFunc<String> reverse = (str) -> new StringBuilder(str).reverse().toString();\n// System.out.println(reverse.func(\"Hello World\"));\n\n // passing lambda expressions as arguments\n// System.out.println(makeHappy((s -> s + \" :)\"), \"Hello Jeff\"));\n\n MyNumberType doubleNum = (nt) -> nt * 2;\n MyNumberType addOneToNum = (nt)-> nt + 1;\n System.out.printf(\"2 doubled is %d, 2 + 1 is %d\", doubleNum.transform(2), addOneToNum.transform(2));\n System.out.printf(\"\\n2 doubled + 1 is %d\", doubleNum.andThen(addOneToNum).transform(2));\n\n// consumerDemo();\n// predicateDemo();\n functionDemo();\n// supplierDemo();\n\n }",
"@Test\n public void streamsExample() {\n List<Integer> list = asList(1, 2, 3, 4, 5);\n \n list.stream().forEach(out::println);\n \n out.println();\n \n list.stream().parallel().forEachOrdered(out::println);\n \n \n }",
"public void testConsumer ()\n {\n\n List<String> list = new ArrayList<>();\n list.add(\"ccc\");\n list.add(\"bbb\");\n list.add(\"ddd\");\n list.add(\"DDDD\");\n list.add(\"ccc\");\n list.add(\"aaa\");\n list.add(\"eee\");\n\n// Collections.sort(list);\n// Collections.sort(list, (s, s2) -> s.toLowerCase().compareTo(s2.toLowerCase()));\n\n// list.sort((s, s2) -> s.compareTo(s2));\n// list.sort((s, s2) -> s.toLowerCase().compareTo(s2.toLowerCase()));\n\n// list.forEach(s -> System.out.println(s));\n// list.forEach(s -> System.out.println(s));\n\n\n// Predicate<String> predicate2 = s -> s.length()>3;\n// System.out.println(\"predicate2.test(\\\"DDDD\\\") = \" + predicate2.test(\"DDDD\"));\n\n// Stream<String> stringStream = list.stream();\n// stringStream.forEach(s -> System.out.println(s));\n// stringStream.forEach(s -> System.out.println(s));//会报错\n\n// list.stream().forEach(s -> System.out.println(s));\n// list.stream().forEach(s -> System.out.println(s));\n\n //并行流是无序的\n// list.parallelStream().forEach(s -> System.out.println(s));\n// list.parallelStream().forEach(s -> System.out.println(s));\n\n// list.stream().skip(3).forEach(s -> System.out.println(s));\n// list.stream().distinct().forEach(s -> System.out.println(s));\n// System.out.println(\"list.stream().count() = \" + list.stream().count());\n// list.stream().limit(2).forEach(s -> System.out.println(s));\n\n// list.stream().filter(s -> s.length()<4).forEach(s -> System.out.println(s));\n\n// BiFunction<Integer, String, Person> bf = Person::new;\n// BiFunction<Integer, String, Person> bf = (n, s) -> new Person(s);\n\n// Person aaa = bf.apply();\n\n// System.out.println(\"aaa = \" + bf.apply(0, \"aaa\"));\n \n }",
"public static void main(String[] args) {\n Foo fooByIC= new Foo() {\n @Override\n public void method(String string) {\n System.out.println(string);\n }\n };\n Foo fooByIc2=new Foo() {\n @Override\n public void method(String string) {\n System.out.println(string+\" \"+string);\n }\n };\n fooByIC.method(\"test\");\n fooByIc2.method(\"test\");\n\n //TODO call testFunctional with fooByIC\n testFunctional(\"test2\",fooByIc2);\n //TODO call testFunctional with a lambda\n testFunctional(\"test3\",s-> System.out.println(s.toUpperCase()+\"lambda\"));\n //TODO call testFunctional with a different lambda\n testFunctional(\"4\",s-> {\n try {\n\n\n Integer number = Integer.parseInt(s);\n System.out.println(number*number);\n }\n catch (NumberFormatException ex)\n {\n System.out.println(\"Not a number\");\n }\n\n });\n testFunctional(2,3,(a,b)->a+b);\n\n\n }",
"@FunctionalInterface // or we can call it SAM\r\n interface ShowMe{\r\n\t\r\n\t void showOk();\r\n\t \r\n\tpublic default void one()\r\n\t {\r\n\t System.out.println(\"method one \");\r\n };\r\n \r\n public static void one1()\r\n {\r\n System.out.println(\"method one 1 \");\r\n };\r\n \r\n public default void one2()\r\n \t {\r\n \t System.out.println(\"method one2 \");\r\n };\r\n \r\n }",
"public void performLambdaOperations(){\n functionalInterfaceLambdaService.printFunctionalInterfaceWithAndWithoutLambda();\n runnableLambdaService.printRunnableInterfaceWithAndWithoutLambda();\n comparatorLambdaService.printComparatorInterfaceWithAndWithoutLambda();\n }",
"public static void main(String[] args) {\n assert(sum((a -> a + 4), 5) == 9); // a is inferred to be an int\n assert(sum((int a) -> a + 5, 9) == 14); //a is explicit\n\n //Some other lambdas with one method interfaces\n Runnable r = () -> System.out.println(\"Run in a separate thread\");\n ActionListener al = (evt) -> evt.getActionCommand();\n\n //Multistatement lambda\n SampleInterface si2 = a -> {\n int total = 3 + 4;\n return total + 19;\n };\n }",
"void pasarALista();",
"public static void main(String[] args) {\n\t\tStream<Integer> stream = Stream.of(1, 2, 3, 4, 5, 6);\n\t\tstream.forEach(System.out::print);\n\t\t//:: is called method refrence \n\t\tStream<Integer> stream1 = Stream.of(new Integer[]{1,2,3,4});\n\t\tstream1.forEach(System.out::println);\n\t\t\n\t\tStream<String> names2 = Stream.of(\"D\", \"A\", \"Z\", \"R\");\n names2.sorted(Comparator.naturalOrder()).forEach(System.out::println);\n\t\t \n \n\t}",
"public static void main(String[] args) {\n\t\t\tEmp e1=new Emp(101,\"Sree\",0);\n\t\tEmp e2=new Emp(201,\"krishna\",2300);\n\t\tEmp e3=new Emp(301,\"Aravind\",4300);\n\t\tEmp e4=new Emp(401,\"Aravind\",5400);\n\t\tEmp e5=new Emp(501,\"Aravind\",6400);\n\t\t\n\t\tList<Emp> al=new ArrayList();\n\t\tal.add(e1);al.add(e2);al.add(e3);al.add(e4);al.add(e5);\n\t\t\n\t\t//Exception handling in streams\n\t\tal.stream().map(x->except(x)).forEach(x->{\n\t\t\tSystem.out.println(x.getName()+\"---\"+x.getSal());\n\t\t});\n\t\t\n\t\t//Increase Salary with the external method in streams.\n\t\tal.stream().map(x->increaseSal(x)).forEach(x->{\n\t\t\tSystem.out.println(x.getName()+\"---\"+x.getSal());\n\t\t});\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"@Test()\n public void findPessoaStream() {\n try (Session session = factoryJpa.openSession()) {\n Stream<Perfil> perfilUsandoNameQueryComStream = findPerfilUsandoNameQueryComStream(session, nome);\n perfilUsandoNameQueryComStream.forEach(System.out::println);\n }\n }",
"public static void main(String[] args){\t \n\t FunctionTest ft = ()-> System.out.println(\"Hola Mundo\");\n ft.saludar();\n\t}",
"public static void main(String[] args) {\n\t\t Supplier<Personne> supplier = Personne::new;\n\t\t System.out.println(supplier.get());\n\t\t \n\t\t //constructeur avec plusieur parametre \n\t\t PersonneSupplier supplierP = Personne::new;\n\t\t Personne personne = supplierP.creerInstance(\"nom1\", \"prenom1\");\n\t\t System.out.println(personne);\n\t\t \n\t\t PersonneSupplier supplierP1 = (nom, prenom) -> new Personne(nom, prenom);\n\t\t Personne personneP1 = supplierP1.creerInstance(\"nom1\", \"prenom1\");\n\t\t System.out.println(personneP1);\n\t\t \n\t\t \n\t\t Supplier<Personne> supplier0 = () -> new Personne();\n\t\t Supplier<Personne> supplier1 = () -> new Personne(\"\",\"\");\n\t\t \n\t\t //Supplier<Integer> I0 = Integer::new;\n\t\t Supplier<Integer> I1 = () -> new Integer(0);\n\t\t //Supplier<String> I2 =(String s) -> new Integer(s);\n\t\t \n\t\t Supplier<ArrayList<Personne>> supplier5 = ArrayList<Personne>::new;\n\t\t Supplier<ArrayList<Personne>> supplier6 = () -> new ArrayList<Personne>(); \n\t\t \n\t\t //Supplier<String[]> supplier7 = String[]::new;\n\t\t //Supplier<> supplier8 = (int size) -> new String[size];\n\t\t \n\t\t \n\t\t //generic\n\t\t //MaFabrique<Integer[]> fabrique = Integer[]::new; \n\t\t //Integer[] entiers = fabrique.creerInstance(10);\n\t\t //System.out.println(\"taille = \"+entiers.length);\n\t\t \n\t\t \n\t\t \n\t\t }",
"public static void main(String[] args) {\n\t\tStream<Integer> numStream = numbers.stream();\n\t\t\n\t\t// numStream.forEach(System.out::println); // here stream is closed\n\t\t// numStream.forEach(System.out::println); // this line with throw java.lang.IllegalStateException: stream has already been operated upon or closed\n\t\t\n\t\t// Flux has the similary concepts cannot use the same flux steam multiple times.\n\t\t// Flux<Integer> fluxStream = Flux.fromStream(numStream);\n\t\t\n//\t\tfluxStream.subscribe(\n//\t\t\t\tLamdaUtil.onNext(),\n//\t\t\t\tLamdaUtil.onError(),\n//\t\t\t\tLamdaUtil.onComplete()\n//\t\t\t\t);\n\t\t\n//\t\tfluxStream.subscribe(\n//\t\t\t\tLamdaUtil.onNext(),\n//\t\t\t\tLamdaUtil.onError(),\n//\t\t\t\tLamdaUtil.onComplete()\n//\t\t\t\t);// this line with throw ERROR :stream has already been operated upon or closed\n\t\t\n\t\t// to reuse the same data several times we need to use supplier with every time new stream\n\t\t\n\t\tFlux<Integer> numSupplierStream = Flux.fromStream(() -> numbers.stream());\n\t\tnumSupplierStream.subscribe(\n\t\t\t\tLamdaUtil.onNext(),\n\t\t\t\tLamdaUtil.onError(),\n\t\t\t\tLamdaUtil.onComplete()\n\t\t\t\t);\n\t\tnumSupplierStream.subscribe(\n\t\t\t\tLamdaUtil.onNext(),\n\t\t\t\tLamdaUtil.onError(),\n\t\t\t\tLamdaUtil.onComplete()\n\t\t\t\t);\n\t\t\n\t}",
"Stream<CallableOliveDefinition> oliveDefinitions();",
"@Test\n public void streamApiTest(){\n Collection<Integer> myCollection=initializeIntCollection(3,5);\n\n long sumOfOddValues3times=myCollection.stream().\n filter(o -> o % 2 ==1). // for all odd numbers\n mapToInt(o -> o*3). // multiply their value on 3\n sum(); // and return their sum (reduce operation)\n Assert.assertEquals((3+5+7)*3, sumOfOddValues3times);\n\n Optional<Integer> sumOfModulesOn3= myCollection.stream().\n filter( o -> o % 3 ==0).\n reduce((sum, o) -> sum = sum + o);\n Assert.assertEquals(new Integer(3+6), sumOfModulesOn3.get());\n\n\n\n Collection<Integer> evenCollection=new ArrayList<>();\n myCollection.\n stream().\n filter(o -> o % 2 == 0).\n forEach((i) -> evenCollection.add(i));\n }",
"static <T> Function<T, T> compose(Stream<Function<T, T>> functions) {\n return functions.reduce(identity(), Function::andThen);\n }",
"@Test\n public void test1() {\n final Car car = Car.create(Car::new);\n final List<Car> cars = Collections.singletonList(car);\n final Car police = Car.create(Car::new);\n cars.forEach(police::follow);\n cars.forEach(c -> police.follow(c)); // 等价于写成lambda表达式的形式\n }",
"public static void main(String[] args) {\n\t\n\t\tm(\"Iterate\", () -> {\t\t\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tSupplier<IntStream>[] sArr = (Supplier<IntStream>[])new Supplier[] {\n\t\t\t\t() -> IntStream.iterate(2, i -> 2 * i),\n\t\t\t\t() -> IntStream.iterate(10, i -> i - 1),\n\t\t\t\t() -> IntStream.iterate(10, i -> i),\n\t\t\t\t() -> IntStream.iterate(10, i -> 2),\n\t\t\t\t() -> IntStream.iterate(42, IntUnaryOperator.identity()),\n\t\t\t\t() -> IntStream.iterate(42, IntUnaryOperator.identity().andThen(IntUnaryOperator.identity())),\n\t\t\t};\n\t\t\tStream.of(sArr).forEach(supplier -> supplier.get().limit(10).forEach(System.out::println));\n\t\t});\n\t\t\n\t\t\n\t\t//Various IntStream generations. generate produces elements without input => it uses an IntSupplier.\n\t\t\n\t\tSystem.out.println(\"---------------------------------------------\");\n\t\t\n\t\tm(\"Generate\", () -> {\t\t\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tSupplier<IntStream>[] sArr = (Supplier<IntStream>[])new Supplier[] {\n\t\t\t\t() -> IntStream.generate(() -> new Random().nextInt()),\n\t\t\t\t() -> IntStream.generate(() -> new Random().nextInt()).filter(n -> n >= 0),\n\t\t\t\t() -> IntStream.generate(() -> 10),\n\t\t\t\t() -> IntStream.generate(() -> new Random().nextInt() % 20).filter(n -> n >= 0)\n\t\t\t};\n\t\t\tStream.of(sArr).forEach(supplier -> {supplier.get().limit(10).forEach(System.out::println); System.out.println(\"--------------------------------\");});\n\t\t});\n\t\t\n\t\t\n\t\t//Iterate and generate for DoubleStream, LongStream and Stream<T>\n\t\t\n\t\t\n\t\tm(\"DoubleStream iterate and generate\", () -> {\t\t\n\t\t\tDoubleStream.iterate(1, d -> d + d / 2).limit(20).forEach(System.out::println); //Uses DoubleUnaryOperator\n\t\t\tSystem.out.println(\"-------------------------\");\n\t\t\tDoubleStream.generate(() -> new Random().nextDouble()).limit(5).forEach(System.out::println); //Uses DoubleSupplier\n\t\t});\n\t\t\n\t\tm(\"LongStream iterate and generate\", () -> {\t\t\n\t\t\tLongStream.iterate(2, n -> n * n).limit(4).forEach(System.out::println); //Uses LongUnaryOperator\n\t\t\tSystem.out.println(\"-------------------------\");\n\t\t\tDoubleStream.generate(() -> new Random().nextLong()).limit(5).forEach(System.out::println); //Uses LongSupplier\n\t\t});\n\t\t\n\t\tm(\"Stream iterate and generate\", () -> {\t\t\n\t\t\tStream.<List<Object>>iterate(new ArrayList<Object>(), l -> {l.add(1); return l;}).limit(4).forEach(System.out::println); //Uses UnaryOperator\n\t\t\tSystem.out.println(\"-------------------------\");\n\t\t\tStream.<List<Object>>generate(() -> new ArrayList<Object>()).limit(4).forEach(System.out::println); //Uses Supplier\n\t\t});\n\t\t\n\t\tm(\"noneMatch\", () -> {\t\t\n\t\t\tStream<String> stream = Stream.<String>iterate(\"-\", s -> s + s);\n\t\t\tPredicate<String> predicate = s -> s.length() > 3;\n\t\t\tSystem.out.println(stream.noneMatch(predicate)); //Note: this is not infinite. None match will fail as soon as one element is found\n\t\t});\n\t\t\n\t\tm(\"allMatch\", () -> {\t\t\n\t\t\tStream<String> stream = Stream.<String>iterate(\"-\", s -> s + s);\n\t\t\tPredicate<String> predicate = s -> s.length() > 0;\n\t\t\tPredicate<String> predicate2 = s -> s.length() > 3;\n\t\t\t//System.out.println(stream.allMatch(predicate)); //Note: This is infinite and will fail with OOM error\n\t\t\tSystem.out.println(stream.allMatch(predicate2)); //Note how this will return as the first element does not match so false can be returned\n\t\t});\n\t\t\n\t}",
"Funcionario(){\n }",
"public void implementFunctionalInterface2() {\n\t\tSystem.out.println(\"\\n\\n************Implement Functional Interfaces - 2**********\");\n\t\t// Functional Interface Implementations:\n\t\tMathOperation addition = (int a, int b) -> a + b;\n\t\t// without type declaration - Type is optional in lambda expression\n\t\tMathOperation subtraction = (a, b) -> a - b;\n\t\t// Curly braces are mandatory when you use the return statement\n\t\tMathOperation multiplication = (int a, int b) -> {\n\t\t\treturn a * b;\n\t\t};\n\t\tMathOperation division = (a, b) -> a / b;\n\n\t\t// Method Calls:\n\t\tSystem.out.println(\"10 + 5 = \" + addition.operation(10, 5));\n\t\tSystem.out.println(\"10 - 5 = \" + subtraction.operation(10, 5));\n\t\tSystem.out.println(\"10 x 5 = \" + multiplication.operation(10, 5));\n\t\tSystem.out.println(\"10 / 5 = \" + division.operation(10, 5));\n\t}",
"public static void main(String[] args) {\n\t\tList<Integer> numberList = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);\r\n\t\t\t\t\r\n\t\t//Stampa il doppio di ogni numero\r\n\t\tSystem.out.println(\"Stampa il doppio di ogni numero\");\r\n\t\tnumberList.forEach((i)-> System.out.print(numberList.get(i-1)*2+ \" \"));\r\n\t\t\r\n\t\t//Recupera lo stream a partire dalla lista\r\n\t\tStream<Integer> streamInt = numberList.stream();\r\n\t\tSystem.out.println(\"\");\r\n\t\t//Stampa il quadrato di ogni numero\r\n\t\tSystem.out.println(\"Stampa il quadrato di ogni numero\");\r\n\t\tstreamInt.forEach((p)->System.out.print(p*p +\" \"));\r\n\t\t\r\n\t\t//Stampa i numeri Dispari\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Stampa i numeri Dispari\");\t\t\r\n\t\tnumberList.stream().filter(n -> n % 2 != 0).forEach(System.out::print); \t\t\r\n\t\tSystem.out.println(\"\");\r\n\t\tnumberList.stream().filter(n -> n % 2 != 0).forEach((n)->System.out.print(n));\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tList<String> stringList = Arrays.asList(\"a1\", \"c6\", \"a2\", \"b1\", \"c2\", \"c1\", \"c5\", \"c3\");\r\n\t\tstringList.stream().filter(s -> s.startsWith(\"c\")).map(String::toUpperCase).sorted().forEach(System.out::println);\r\n\t\t\t\t\r\n\t\t//Stampa le donne della mia famiglia\r\n\t\tMyFamily myFamily = new MyFamily();\r\n\t\tSystem.out.println(\"Stampa le donne della mia famiglia\");\r\n\t\tmyFamily.getMyFamily().stream().filter((p)->p.isFemale()).forEach((p)->System.out.println(p));\r\n\t\t\r\n\t\t//Stampa gli uomini della mia famiglia\r\n\t\tSystem.out.println(\"Stampa gli uomini della mia famiglia\");\r\n\t\tmyFamily.getMyFamily().stream().filter((p)->!p.isFemale()).forEach((p)->System.out.println(p));\r\n\t\t\r\n\t\t//Calcola la somma dell'eta dei maschi della mia famiglia\r\n\t\tInteger anniMaschi = myFamily.getMyFamily().stream().filter((p)->!p.isFemale()).map((p)->p.getEta()).reduce(0, Integer::sum);\r\n\t\t\r\n\t\t//These reduction operations can run safely in parallel with almost no modification:\r\n\t\tInteger anniMaschi2 = myFamily.getMyFamily().stream().parallel().filter((p)->!p.isFemale()).map((p)->p.getEta()).reduce(0, Integer::sum);\t\t\r\n\t\tSystem.out.println(\"Anni Totali dei maschi...\" + anniMaschi);\r\n\t\tSystem.out.println(\"Anni Totali dei maschi...\" + anniMaschi2);\r\n\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tConsumer<String> imprimirUmaFrase = System.out::println;\n\t\tConsumer<String> imprimirOutraFrase = frase -> System.out.println(frase);\n\t\t\n\t\timprimirUmaFrase.accept(\"Hello World\");\n\t\timprimirOutraFrase.accept(\"Ola Mundo\");\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tClick click = (String element) -> { System.out.println(\"Clickeaste \"+element);};\n\t\tclick.click(\"Image\");\n\t\t\n\t\tOnOneListener oneListener = new OnOneListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onOne(String message) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"One: \"+message);\n\t\t\t}\n\t\t};\n\t\t\n\t\tOnOneListener oneListener2 = (String message) -> {\n\t\t\tSystem.out.println(\"One: \"+message);\n\t\t};\n\t\t\n\t\toneListener.onOne(\"Sin lambda :(\");\n\t\toneListener2.onOne(\"Con lamda :)\");\n\t\t\n\t\tOnOneListener oneListener3 = message -> System.out.println(\"Tu mensaje \" + message);\n\t\toneListener3.onOne(\"mas ccorta\");\n\t\t\n\t\t//Operador ::\n\t\tList<String> lista = new ArrayList<>();\n\t\tlista.add(\"uno\");\n\t\tlista.add(\"dos\");\n\t\tlista.forEach(System.out::println);\n\t\t\n\t\tList<String> words = Arrays.asList(\"hello\",null,\"\");\n\t\twords.stream().filter(t -> t != null).filter(t -> !t.isEmpty()).forEach(System.out::println);\n\n\t}",
"public static void main(String[] args) {\r\n ArrayList<String> canciones = new ArrayList<>();\r\n\r\n// Le agregamos datos\r\n canciones.add(\"Canciones 1\");\r\n canciones.add(\"Canciones 2\");\r\n canciones.add(\"Canciones 3\");\r\n\r\n// Método 1\r\n System.out.println(\"Recorriendo con método 1\");\r\n for (String cancion : canciones) {\r\n System.out.println(cancion);\r\n }\r\n\r\n// Método 2\r\n System.out.println(\"Recorriendo con método 2\");\r\n for (int x = 0; x < canciones.size(); x++) {\r\n String cancion = canciones.get(x);\r\n System.out.println(cancion);\r\n }\r\n// Método 3\r\n System.out.println(\"Recorriendo con método 3\");\r\n canciones.forEach((cancion) -> {\r\n System.out.println(cancion); });\r\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tnew Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tSystem.out.println(\"Before JAVA 8, too much code for too little to do\");\r\n\t\t\t}\r\n\t\t}).start();\r\n\t\t\r\n\t\t// Java 8 way:\r\n\t\t\r\n\t\tnew Thread( () -> System.out.println(\"In Java 8, Lambda Expression rocks !!\") ).start();\r\n\t\t\r\n\t\tSystem.out.println(\"-----------*************************-------------\");\r\n\t\t\r\n\t\t// Iterating Over List Using Lambda Expressions\r\n\t\t\r\n\t\tList features = Arrays.asList(\"Lambdas\",\"Default Method\",\"Stream API\",\"DAte and Time API\");\r\n\t\t\r\n\t\tfeatures.forEach(n -> System.out.println(n));\r\n\r\n\t\tSystem.out.println(\"-----------*************************-------------\");\r\n\t\t\t\t\r\n\t\t// Even better use method reference feature of Java 8\r\n\t\t// method reference is denoted by :: ****double colon***** operator\r\n\t\t// looks similar to scope resolution operator of C++\r\n\t\t\r\n\t\tfeatures.forEach(System.out::println);\r\n\r\n\t}",
"public static void calculateSumViaStreams(List<Integer> numbers){\n int sum = numbers.stream()\n .filter(x -> x % 2 == 0)\n .map(y -> y * y)\n .reduce(0, (x, y) -> x + y);\n\n System.out.println(sum);\n }",
"private void mapToObjUsingStream() {\n IntStream.range(1, 4)\n .mapToObj(i -> \"a\" + i)\n .forEach(System.out::println);\n }",
"@Test\r\n\tvoid mapMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream();\r\n\t\tStream<Integer> streamInteger = transactionBeanStream.peek(System.out::println).map(TransactionBean::getId);\r\n\t\tList<Integer> afterStreamList = streamInteger.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong value\", 1, afterStreamList.get(0).intValue());\r\n\t\tassertSame(\"wrong value\", 2, afterStreamList.get(1).intValue());\r\n\t\tassertSame(\"wrong value\", 3, afterStreamList.get(2).intValue());\r\n\t}",
"@Test\n public void lecturaYEscrituraCallAndReturn() {\n c0 = unArchivo.lecturaSincronica(0, 4);\n c1 = unArchivo.lecturaSincronica(0, 1);\n c2 = unArchivo.lecturaSincronica(0, 5);\n otroArchivo.escrituraSincronica(c0, 0, 4)\n .escrituraSincronica(new byte[] { 0x0, 0x10, 0x0 }, 0, 3)\n .escrituraSincronica(c1, 0, 1)\n .escrituraSincronica(c2, 0, 5);\n }",
"public static Stream<StreamAnimal> generateStreamOfAnimals_lambda() {\n\n Stream<StreamAnimal> resultStream = Stream.generate(\n () -> getNewAnimal()\n );\n\n return resultStream;\n }",
"Stream<Line> stream(Consumer<JSaParException> errorConsumer) throws IOException;",
"private void openStreams() {\n\t\ttry {\n\t\t\t// mostramos un log\n\t\t\tthis.getLogger().debug(\"Opening streams..\");\n\t\t\t// abrimos el stream de salida\n\t\t\tthis.setOutputStream(new ObjectOutputStream(this.getConnection().getOutputStream()));\n\t\t\t// abrimos el stream de entrada\n\t\t\tthis.setInputStream(new ObjectInputStream(this.getConnection().getInputStream()));\n\t\t} catch (final IOException e) {}\n\t}",
"public static final void main(String... strings) {\n\t\tMathematics sum = (x, y) -> x + y;\n\t\t// Uso de interface funcional para resta\n\t\tMathematics subtraction = (x, y) -> x - y;\n\t\t// Uso de interface funcional para multiplicacion\n\t\tMathematics mult = (x, y) -> x * y;\n\t\t// Uso de interface funcional para division\n\t\tMathematics div = (x, y) -> x / y;\n\n\t\tSystem.out.println(\"El resultado de la suma es: \" + sum.operation(15, 10));\n\t\tSystem.out.println(\"El resultado de la suma es: \" + subtraction.operation(15, 10));\n\t\tSystem.out.println(\"El resultado de la suma es: \" + mult.operation(15, 10));\n\t\tSystem.out.println(\"El resultado de la suma es: \" + div.operation(15, 10));\n\n\t}",
"public LambdaMART() {}",
"static void consumerDemo() {\n Consumer<Integer> printAgeConsumer = new Consumer<Integer>() {\n @Override\n public void accept(Integer integer) {\n System.out.println(\"Age is \" + integer);\n }\n };\n // call the method\n printAgeConsumer.andThen(age -> System.out.println(\"Again age is \" + age)).accept(25);\n\n // using lambda\n Consumer<Integer> printAgeWithLambda = (age) -> System.out.println(\"Age with lambda is \" + age);\n printAgeWithLambda.andThen(age -> System.out.println(\"Again age with lambda us \" + age))\n .accept(23); // this value will be given to each consumer\n }",
"public static void main(String[] args) throws IOException {\n\tSample Lambda = String -> System.out.println(String);\n\t// Invocation\n\tLambda.method(\"Hello, World!\"); // Output: Hello, World!\n\n\t// Or, using new Generic Functional Interfaces provided in the new package `java.util.function' bundled with Java 1.8\n\t// (NO custom interface declaration required!):\n\t// More Information: http://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html\n\tConsumer<String> Lambda_2 = String -> System.out.println(String);\n\t// Invocation\n\tLambda_2.accept(\"Hello, World 2!\"); // Output: Hello, World 2!\n\t// A recursive lambda function!\n\t// Relevant: https://pysaumont.github.io/2014/09/01/Recursive-lambdas-in-Java-8.html\n\tfactorial = a -> a > 1 ? a * factorial.apply(a - 1) : a;\n\tSystem.out.println(factorial.apply(10)); // Output: 3628800\n\n\tSystem.out.println(E); // Output: 5\n\t // `E' is a static variable! It can be accessed even when the class has not been instantiated yet!\n\tJava_Experiment_File One = new Java_Experiment_File(3); // Output: Instance variable `F' is set to 3!\n\tSystem.out.println(One); // Output: Package.MyPack.Java_Experiment_File@...\n\t // ... represents the hexadecimal memory address where object is stored\n\tJava_Experiment_File Two = new Java_Experiment_File(4, \"Hi\"); // Output: Instance variable `F' set to 4 and `Q' set to 'Hi'!\n\tTwo.E = 9;\n\tSystem.out.println(One.E + \" \" + Two.E + \" \" + E); // Output: 9 9 9\n\t // Since variable `E' is static, if value associated with one object instance changes, value associated with *all* object instances changes!\n\t\n\t// Two ways to call static generic method `Method'\n\tJava_Experiment_File.<Integer>Method(3); // Output: 3\n Method(\"Hello\"); // This way the method can take an argument of *any* type (e.g. Method(3) also works) unlike previous way\n\t // This is known as `Type Inference' : http://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html\n\t // Output: Hello\n\n\tJava_Experiment_File[] Array = new Java_Experiment_File[3]; // Initializes `Array' as an array of objects of type `Java_Experiment_File'\n\t // Any type referring to a class and declaring an object is called a `reference type'; otherwise a `primitive type'\n\t // Also, any variable which holds an object is known as a `reference'\n // Is the constructor still called? No! Nothing is output! Creates array with 3 uninstantiated references to `Java_Experiment_File'!\n\t // Relevant: http://stackoverflow.com/questions/3426843/what-is-the-default-initialization-of-an-array-in-java\n\t// Java enhanced (`for-each') loops\n\t// Iterates through array `Array' initialized above\n\tfor (Java_Experiment_File U : Array) {\n\t System.out.println(U); // Output: null\n\t // Calling `U(4)' or `new U(4)' or anything along lines causes compile-time error!\n\t}\n\t\n\t// To create object instances in array `Array' do following\n\tfor (int index = 0;index < 3;index++) {\n\t Array[index] = new Java_Experiment_File(5); // Output: Instance variable `F' is set to 5!\n\t System.out.println(Array[index]); // Output: Package.MyPack.Java_Experiment_File@...\n\t}\n\tSystem.out.println(Array[0]); // Output: Package.MyPack.Java_Experiment_File@...\n\n\tScanner in_2 = new Scanner(System.in).useDelimiter(\"\\\\n\"); // Very versatile input reading object; best way to read from STDIN\n System.out.println(in_2.next()); // Read next token of input up to the delimiter provided as argument to `Scanner' method `useDelimiter(...)'; In this case, it reads the first line of the input\n in_2.close(); // Always remember to close streams to avoid memory leaks!\n\n\t// try-catch-[finally] block; Used to handle exceptions; the `finally' block is optional and *always* invoked if present\n\t// Since the `InputStreamReader' class *can* throw an `IOException', it must either be handled in a `try-catch-[finally]' block *or* be declared using the `throws' keyword in the method declaration\n\t// This is true for *all* exceptions!\n\t// More information: http://stackoverflow.com/questions/1989077/the-throws-keyword-for-exceptions-in-java\n\t// More information: http://stackoverflow.com/questions/3794910/difference-between-try-catch-and-throw-in-java\n\ttry {\n\t InputStreamReader in = new InputStreamReader(System.in); // Instantiate object with methods capable of reading from STDIN in reference `in'\n\t // `System.in' is a static field which allows access to STDIN. It is statically defined in the class `java.lang.System'.\n\t\n\t System.out.println((char)in.read()); // Reads single character from STDIN and outputs it. As `in.read()' returns codepoint representing character, return value must be casted to `char'.\n\t // Output: {The first character of input}\n\n\t in.close(); // ALWAYS remember to close streams to free allocated memory! Otherwise, a memory leak could occur (https://en.wikipedia.org/wiki/Memory_leak)!\n\t throw new Exception(); // Manually throw an exception\n\t}\n\tcatch (Exception e) {\n\t // Do something if exception thrown.\n\t}\n\tfinally {\n\t // Do something regardless of whether exception thrown or not.\n\t}\n\n\t// ArrayList: An extensible, dynamic array; Much more versatile than the built-in arrays\n\t// Now, before we move on, notice that `List<E>' is an interface in the `java.util' package. In that case, how can it be a type?\n\t// Well, whenever an interface is used as a type for a reference variable, the variable may only be assigned an object which is an instance of a class which implements that interface!\n\t// For example, the `ArrayList<E>' class implements the `List<E>' interface. Therefore, I can assign a `ArrayList<E>' object to a reference varaible of type `List<E>'.\n\t// However, if I were to assign an instance of the `Java_Experiment_File' class to a reference variable of type `List<E>', since `Java_Experiment_File' does *not* implement `List<E>', a compile-time exception would occur.\n\tList<Integer> arrayList = new ArrayList<Integer>(Arrays.asList(123, 56, 365, 34, -1, -456, 4563));\n\n\t// Lambda expression as an argument to a method which sorts the `ArrayList<E>'\n\t// The lambda experession is outmatically being casted to `Comparator<E>' where type inference based on `ArrayList' type is used to figure out `E'\n\t// The `Comparator<E>' functional interface is apart of the `java.utils' package\n\t// The following utilizes merge sort for sorting purposes\n\tarrayList.sort((a,b) -> a.compareTo(b));\n\n\tSystem.out.println(arrayList); // Output: [-456, -1, 34, 56, 123, 365, 4563]\n\n\tList<Integer> arrayList2 = new ArrayList<Integer>(Arrays.asList(25, 46, 89, 53, 1265, 43, 8234509, -45234895, -322345532));\n\n\t// The following also works and the argument is known as a `method reference'\n\t// The part before the colons is the class containing the method and the part after is the mthod to be referenced\n\t// If the method to be referenced is `new' then the constructor is referenced\n\tarrayList2.sort(Integer::compareTo);\n\n\tSystem.out.println(arrayList2); // Output: [-322345532, -45234895, 25, 43, 46, 53, 89, 1265, 8234509]\n\n\tList<?> array = new ArrayList<Integer>(Arrays.asList(1,2,3,4));\n\n // Anonymous inner classes! The following compiles and works!\n\t// NOTE: Constructors *not* allowed in anonymous inner classes!\n\t// Also, class name must first be declared somewhere else as either interface or class!\n\t// If the predefined class name is an interface, the anonymous inner class is a new class instantiated with the name of the interface which `implements' the interface's abstract methods!\n\t// Therefore, the following `AnonymousClass' must implemement the abstract methods `greet' and `okay' defined in the interface `AnonymousClass'.\n\t// Also, the following creates another class file named `Java_Experiment_File$1.class'\n\tAnonymousClass D = new AnonymousClass() {\n\t\t\n\t\tpublic String greet(String name) {\n\t\t return \"Hi \" + name + \"!\";\n\t\t}\n\n\t\tpublic int okay(int input) {\n\t\t return input * 4;\n\t\t}\n\n\t }; // One way to instantiate an anonymous inner class\n\tSystem.out.println(new AnonymousClass() {\n\n\t\tint i = 4;\n\t\t\n\t\tpublic String greet(String name) {\n\t\t return \"Hello \" + name + \"!\";\n\t\t}\n\n\t\tpublic int okay(int input) {\n\t\t return input + 3;\n\t\t}\n\t\t\n\t }); // Anonymous class as an argument to a method\n\t // Output: Package.MyPack.Java_Experiment_File$1@...\n }",
"public static void main(String args[]) \n {\n Consumer<List<Integer> > modify = list -> \n { \n for (int i = 0; i < list.size(); i++) \n list.set(i, 5 * list.get(i));\n };\n \n Consumer<List<Integer> > square = list ->\n { \n for (int i = 0; i < list.size(); i++)\n \tlist\n .set(i,(int) Math.pow(list.get(i), 2));\n };\n \n // Consumer to display a list of integers \n Consumer<List<Integer> > \n dispList = list ->\n list.stream().\n forEach(a -> System.out.print(a + \" \"));\n \n List<Integer> list = new ArrayList<Integer>(); \n list.add(2); \n list.add(1); \n list.add(3); \n \n // using addThen() \n modify\n .andThen(square)\n .andThen(dispList)\n .accept(list);\n }",
"public FunctionIterator getExternalFunctions();",
"public void builtInFunctionalInterfaces() {\n\t\tSystem.out.println(\"\\n\\n************Built In Functional Interfaces**********\");\n\t\tList<String> names = Arrays.asList(\"bob\", \"josh\", \"megan\");\n\n\t\tPredicate<String> predicate = s -> s.length() < 5;\n\t\tSystem.out.println(predicate.test(\"Predicate Test\"));\n\t\t// filter uses predicate functional interface\n\t\tList<String> namesWithM = names.stream().filter(name -> name.startsWith(\"m\")).collect(Collectors.toList());\n\n\t\tConsumer<Integer> consumer = a -> System.out.println(\"Print: \" + (a + 10));\n\t\tconsumer.accept(15);\n\t\t// ForEach uses consumer functional interface\n\t\tnames.forEach(name -> System.out.println(\"Hello, \" + name));\n\n\t\tSupplier<String> supplier = () -> \"Print Supplier\";\n\t\tSystem.out.println(supplier.get());\n\n\t\tFunction<String, Integer> function = (s) -> s.length();\n\t\tSystem.out.println(\"String Length: \" + function.apply(\"Function Test\"));\n\n\t\tBinaryOperator<Integer> binaryOperator = (a, b) -> a + b;\n\t\tSystem.out.println(\"Addition: \" + binaryOperator.apply(8, 9));\n\n\t\tUnaryOperator<String> unaryOperator = s -> s.toUpperCase();\n\t\t// ReplaceAll uses unary operator functional interface\n\t\tnames.replaceAll(unaryOperator); // or names.replaceAll(name -> name.toUpperCase());\n\t\tnames.forEach(i -> System.out.print(i + \" \"));\n\n\t\tRunnable runnable = () -> System.out.println(\"Execute Run Method\");\n\t\trunnable.run();\n\n\t\tComparator<Integer> comparator = (a, b) -> b - a;\n\t\tList<Integer> list = Arrays.asList(5, 3, 7, 2, 4);\n\t\tCollections.sort(list, comparator);\n\t\tlist.forEach(i -> System.out.print(i + \" \"));\n\t}",
"public static void main(String[] args) {\n System.out.println(IntStream.rangeClosed(1, 70).filter(t->t%7==0).sum());\n\n\t\t\n\t\t//2.yol\n\t\tSystem.out.println(IntStream.iterate(7, t->t+7).limit(10).sum());\n\t\t\n\t}",
"public void alquilarMultimediaAlSocio(){\n lector = new Scanner(System.in);\n int opcion = -1;\n int NIF = 0;\n int pedirElemento;\n String titulo;\n Socio socio;\n\n\n\n NIF = pedirNIF(); // pido el NIF por teclado\n\n if(tienda.exiteSocio(NIF)){ // Si exite, continuo\n socio = tienda.getSocioWithNIF(NIF); // Si exite el socio, busco en la tienda y lo asigno.\n if(!socio.isAlquilando()) { // si el socio no está actualmente alquilando, no continuo\n opcion = pedirElemento(); // Pido el elemento\n\n switch (opcion) {\n case 1:\n tienda.imprimirDatos(tienda.getPeliculas());\n System.out.println(\"Introduce el titulo de la pelicula que quieres: \");\n titulo = lector.nextLine();\n if (tienda.exitePelicula(titulo)) {\n\n tienda.alquilarPeliculaSocio(NIF, titulo);\n System.out.println(\"PELICULA ANYADIDO EN EL MAIN\");\n\n\n } else {\n System.out.println(\"No exite la pelicula \" + titulo + \".\");\n }\n\n\n break;\n case 2:\n tienda.imprimirDatos(tienda.getVideojuegos());\n System.out.println(\"Introduce el titulo del videojuego que quieres: \");\n titulo = lector.nextLine();\n if (tienda.existeVideojuego(titulo)) {\n\n tienda.alquilarVideojuegoSocio(NIF, titulo);\n System.out.println(\"VIDEOJUEGO ANYADIDO EN EL MAIN\");\n\n\n } else {\n System.out.println(\"No exite el videojuego \" + titulo + \".\");\n }\n break;\n default:\n break;\n }\n }else{\n System.out.println(\"El socio \" + socio.getNombre() + \" tiene recargos pendientes.\");\n }\n\n }else{\n System.out.println(\"El socio con NIF \" + NIF + \" no exite.\");\n }\n\n\n\n\n\n\n }",
"public static void runExercise7() {\n students.stream().filter(student -> student.getAge()>20).map(student -> student.getLastName() + \" \" + student.getFirstName()).sorted().forEach(System.out::println);\n }",
"public void implementFunctionalInterface1() {\n\t\tSystem.out.println(\"\\n\\n************Implement Functional Interfaces - 1**********\");\n\t\tMyFunctionalInterface lambda = () -> System.out.println(\"Executing...\");\n\t\tlambda.execute();\n\t}",
"public static void main(String... args) {\n\n\t\tObservable<String[]> testObs = Observable.create(new Observable.OnSubscribe<String[]>() {\n\t\t\tpublic void call(Subscriber<? super String[]> sub) {\n\t\t\t\tString[] aString = new String[] { \"aaa\", \"bbb\", \"ccc\" };\n\t\t\t\tsub.onNext(aString);\n\t\t\t\tsub.onCompleted();\n\t\t\t}\n\t\t});\n\t\tObservable<String> testOb = Observable.just(\"abc just\");\n\t\t Subscriber<String> mySub = new Subscriber<String>(){\n\t\t public void onNext(String s){\n\t\t System.out.println(\"Test finish : \" + s);\n\t\t }\n\t\t\n\t\t public void onCompleted() {\n\t\t // TODO Auto-generated method stub\n\t\t\n\t\t }\n\t\t\n\t\t public void onError(Throwable arg0) {\n\t\t // TODO Auto-generated method stub\n\t\t\n\t\t }\n\t\t };\n\n\t\ttestObs.subscribe(s -> System.out.println(\"lambda : \" + s[0]));\n\t\tString[] bString = new String[] { \"aa\", \"bb\", \"cc\" };\n\t\tint i = 0;\n\t\tfor (String s : bString) {\n\t\t\ti++;\n\t\t\tSystem.out.println(\"Loop \" + Integer.toString(i) + \" \" + s);\n\t\t}\n\n\t\toperaterTest();\n\t\toperaterTestStringToHash();\n\n\t\tRunnable r = () -> System.out.println(\"test runnable lambda\");\n\t\tr.run();\n\n\t\tComparator<String> c = (a, b) -> a.compareTo(b);\n\t\tSystem.out.println(Integer.toString(c.compare(\"AAA\", \"AAA\")));\n\n\t\tHello h = new Hello();\n\t\th.r.run();\n\t\th.r2.run();\n\n\t\tString message = \"Test effective final\";\n\n\t\tRunnable r3 = () -> System.out.println(message);\n\n\t\tr3.run();\n\n\t\tStringBuilder messageB = new StringBuilder(\"aa\");\n\t\tmessageB.append(\"aa\");\n\t\tRunnable r4 = () -> System.out.println(messageB);\n\t\tr4.run();\n\t\tmessageB.append(\"AA\");\n\n\t\tPerson[] people = new Person[] { new Person(\"ted\", \"new\", 41), new Person(\"wayne\", \"wang\", 18),\n\t\t\t\tnew Person(\"adm\", \"zcho\", 22) };\n\t\tArrays.sort(people, Person.compareFirstName);\n\t\tArrays.sort(people, Person::compareLastName);\n\t\tfor( Person p : people)\n\t\t\tSystem.out.println(p);\n\t\t\n\t\tNamedCache<Long,String> cache = CacheFactory.getCache(\"st\");\n\t\tcache.put(3L, \"3\");\n\t\tcache.put(2L, \"2\");\n\t\tcache.put(1L, \"1\");\n\t\tcache.put(4L, \"4\");\n\t\tcache.put(5L, \"5\");\n\t\tRxNamedCache<Long,String> rxcache = RxNamedCache.rx(cache);\n//\t\trxcache.values().buffer(2).subscribe(productList -> System.out.println(\"List :\" + productList));\n\t\trxcache.values().subscribe(product -> System.out.println(\"rxCache : \" + product));\n\t\t\n\t\tObservableMapListener<Long,String> listener = ObservableMapListener.create();\n\t\tlistener.filter(evt -> evt.getId() == MapEvent.ENTRY_INSERTED).map(MapEvent::getNewValue)\n\t\t.subscribe(new Subscriber<String>(){\n\t\t\tpublic void onNext(String s){\n\t\t\t\tSystem.out.println(\"xxx\" + s);\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onCompleted() {\n\t\t\t\tSystem.out.println(\"completed\");\n\t\t\t\t\n\t\t\t}\n\t\t\tpublic void onError(Throwable e){\n\t\t\t\tSystem.out.println(\"aaaaahhhh\");\n\t\t\t}\n\t\t\t\n\t\t});\n//\t\tlistener.filter(evt -> evt.getId() == MapEvent.ENTRY_INSERTED).map(MapEvent::getNewValue).buffer(2,TimeUnit.SECONDS)\n//\t\t.subscribe(ppp -> System.out.println(\"Trades placed in the last 10 seconds: \" + ppp));\n\t\tcache.addMapListener(listener);\n\t\tcache.remove(3L);\n\t\t\n\t\tcache.put(6L, \"test6\");\n\t\tcache.put(7L, \"test7\");\n\t\ttry {\n\t\t\tThread.sleep(200);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void geneticoPSO(){ \n //leer archivos de texto\n nombreArchivos.stream().map((nombreArchivo) -> lam.leerArchivo(nombreArchivo)).forEach((Mochila moc) -> {\n mochilas.add(moc);\n }); \n \n int o = 0;\n for (Mochila mochila : mochilas) { \n \n Algorithm_PSO alg_pso = new Algorithm_PSO(0.1, 0.8, 0.7, 0.6, 1, tamanioPob, EFOs, mochila.getSolucion().length, mochila); \n Individuo_mochilaPSO res = (Individuo_mochilaPSO)alg_pso.correr();\n System.out.println(\"fitnes: \" + res.getFitness() + \". Solucion\" + Arrays.toString(res.getCromosoma()));\n if (o == 9){\n System.out.println(\"\");\n }\n o++;\n }\n \n }",
"private List<RhFuncionario> getFuncionarios()\n {\n System.out.println(\"supiEscalaFacade.findEnfermeiros():\"+supiEscalaFacade.findEnfermeiros());\n return supiEscalaFacade.findEnfermeiros();\n }",
"@Test(groups= {\"Regression\"})\n\tpublic static void javaStream() throws IOException {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Program Files\\\\Selenium\\\\Drivers\\\\chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\tProperties prop = new Properties();\n\t\tFileInputStream fis = new FileInputStream(\"C:\\\\Users\\\\Somas\\\\My WorkSpace\\\\Recap\\\\src\\\\data.properties\");\n\t\tprop.load(fis);\n\t\t\n\t\tdriver.get(prop.getProperty(\"url\"));\n\t\tString[] required = {\"Cheese\", \"Rice\", \"Wheat\"};\n\t\tString filter = \"Rice\";\n\t\tList<String> reqList = Arrays.asList(required);\n\t\treqList = reqList.stream().sorted().collect(Collectors.toList());\n\t\t\n\t\tdriver.findElement(By.xpath(\"//tr/th[1]\")).click();\n\t\t\n\t\treqList.forEach(item-> {\n\t\t\t\n\t\t\tList<WebElement> reqVeg = new ArrayList<WebElement>();\n\t\t\tdo {\n\t\t\t\tList<WebElement> vege = driver.findElements(By.xpath(\"//tr/td[1]\"));\n\t\t\t\treqVeg = vege.stream().filter(s -> s.getText().equalsIgnoreCase(item)).collect(Collectors.toList());\n\t\t\t\tif (reqVeg.size() < 1) {\t\t\t\n\t\t\t\t\tdriver.findElement(By.xpath(\"//a[@aria-label='Next']\")).click();\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t} while (reqVeg.size() < 1);\n\t\t\treqVeg.stream().map(s -> getPrice(s)).forEach(s -> System.out.println(\"The Price of \" + item + \" is \" + s));\n\t\t\tdriver.findElement(By.xpath(\"//a[@aria-label='First']\")).click();\n\t\t\ttry {\n\t\t\t\tThread.sleep(2000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\t\t\t\n\t\t});\n\t\t\n\t\t\n\t\tdriver.findElement(By.id(\"search-field\")).sendKeys(filter);\n\t\tList<WebElement> vege = driver.findElements(By.xpath(\"//tr/td[1]\"));\n\t\tList<WebElement> filterList = vege.stream().filter(s-> s.getText().contains(filter)).collect(Collectors.toList());\n\n\t\tif (vege.size()==filterList.size())\n\t\t{\n\t\t\tSystem.out.println(\"Filter is working Fine\");\n\t\t}else\n\t\t\tSystem.out.println(\"Filter is NOT working\");\n\t\t\n\t\tFileOutputStream fos = new FileOutputStream(\"C:\\\\Users\\\\Somas\\\\My WorkSpace\\\\Recap\\\\src\\\\data.properties\");\n\t\tprop.store(fos, null);\n\t\tprop.setProperty(\"browser\", \"Chrome\");\n\t\t\n\t\tdriver.quit();\n\t}",
"public void ejemploIterable(String... args) throws Exception {\n\n\t\tList<String> usuariosList = new ArrayList<>();\n\t\tusuariosList.add(\"Bernardo Guzman\");\n\t\tusuariosList.add(\"Pepe Flores\");\n\t\tusuariosList.add(\"Eder Flores\");\n\t\tusuariosList.add(\"Julia Guzman\");\n\t\tusuariosList.add(\"Maria Cabrera\");\n\t\tusuariosList.add(\"Bruce Lee\");\n\t\tusuariosList.add(\"Bruce Williams\");\n\n\t\tFlux<String> nombres = Flux.fromIterable(usuariosList);\n\n\t\tFlux<Usuario> usuarios = nombres\n\t\t\t\t.map(elemento -> new Usuario(elemento.split(\" \")[0].toUpperCase(),\n\t\t\t\t\t\telemento.split(\" \")[1].toUpperCase()))\n\t\t\t\t.filter(f -> f.getNombre().contains(\"B\")).doOnNext(usuario -> {\n\t\t\t\t\tif (usuario == null) {\n\t\t\t\t\t\tthrow new RuntimeException(\"El nombre no puede estár vacio\");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(usuario.toString());\n\t\t\t\t}).map(usuario -> {\n\t\t\t\t\tString nombre = usuario.getNombre().toLowerCase();\n\t\t\t\t\tusuario.setNombre(nombre);\n\t\t\t\t\treturn usuario;\n\t\t\t\t})\n\n\t\t;\n\n\t\tusuarios.subscribe(e -> log.info(e.toString()), err -> log.error(err.getMessage()),\n\n\t\t\t\tnew Runnable() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tlog.info(\"Se completa con éxito el observable\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"private void limpiarDatos() {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tObservable<String> mObservable = Observable.create(new Observable.OnSubscribe<String>() {\n\t\t\t@Override\n\t\t\tpublic void call(Subscriber<? super String> subscriber) {\n\t\t\t\tsubscriber.onNext(\"hello world\");\n\t\t\t\tsubscriber.onCompleted();\n\t\t\t}\n\t\t}) ;\n\n\t\tSubscriber<String> mSubscriber = new Subscriber<String>() {\n\t\t\t@Override\n\t\t\tpublic void onCompleted() {}\n\n\t\t\t@Override\n\t\t\tpublic void onError(Throwable e) {}\n\n\t\t\t@Override\n\t\t\tpublic void onNext(String s) {System.out.println(s);}\n\t\t} ;\n\n\t\tmObservable.subscribe(mSubscriber);\n\t\t//1.2 abbreviate\n\t\t// TODO: 7/2/15 myObservable.subscribe(onNextAction, onErrorAction, onCompleteAction);\n\t\tObservable<String> mObservable2 = Observable.just(\"Hello RxJava\") ;\n\t\tAction1<String> onNextAction = new Action1<String>() {\n\t\t\t@Override\n\t\t\tpublic void call(String s) {\n\t\t\t\tSystem.out.println(s) ;\n\t\t\t}\n\t\t} ;\n\t\tmObservable2.subscribe(onNextAction);\n\t\t//1.3 simpler code\n\t\tObservable.just(\"simpler code\").subscribe(new Action1<String>() {\n\t\t\t@Override\n\t\t\tpublic void call(String s) {\n\t\t\t\tSystem.out.println(s) ;\n\t\t\t}\n\t\t});\n\t\t//1.4. Java8 lambda\n\t\tObservable.just(\"Hello Rx and lambda\").subscribe(s -> System.out.println(s)) ;\n\t\t//2. transformation\n\t\tObservable.just(\"Hello trans\").subscribe(s -> System.out.println(s+\"formation\")) ;\n\t\t//2.1 map()\n\t\tObservable.just(\"Hello trans\").map(new Func1<String, String>() {\n\t\t\t@Override\n\t\t\tpublic String call(String s) {\n\t\t\t\treturn s+\"formation\";\n\t\t\t}\n\t\t}).subscribe(s -> System.out.println(s));\n//\t\t}).subscribe(System.out::println);\n\t\t//2.2 trans + lambda\n\t\tObservable.just(\"Hello trans\").map(s -> s+\"fromation\").subscribe(s -> System.out.println(s));\n\t\t//or\n\t\tObservable.just(\"Hello trans\").map(s -> s+\"fromation\").subscribe(System.out::println);\n\t\t//2.3 trans String to Integer\n\t\tObservable.just(\"Hello trans!\").map(new Func1<String, Integer>() {\n\t\t\t@Override\n\t\t\tpublic Integer call(String s) {\n\t\t\t\treturn s.hashCode();\n\t\t\t}\n\t\t}).subscribe(i-> System.out.println(Integer.toString(i)));\n\t\tObservable.just(\"Hello trans!\").map(s -> s.hashCode())\n\t\t\t\t.subscribe(i -> System.out.println(Integer.toString(i)));\n\t\tObservable.just(\"Hello trans!\").map(String::hashCode)\n\t\t\t\t.subscribe(i->System.out.println(Integer.toString(i)));\n\t\tObservable.just(\"Hello trans!\").map(String::hashCode).map(i->Integer.toString(i))\n\t\t\t\t.subscribe(System.out::println);\n\t}",
"List<Oficios> buscarActivas();",
"public void printItemsUsingLambdaCollectorsJDK8(List<Item> items){\n\t\tIO.print(\"\\nPrint average of all items price using JDK8 stream, method reference, collector!\");\r\n\t\t// average requires total sum and no of items as well.\r\n\t\t// collect returns ONLY one value throughout the stream. So we need some kind of placer where we will keep storing sum, count during stream.\r\n\t\tAverager avg = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice) \r\n\t\t\t// alternate of item -> item.getPrice()\r\n\t\t\t.collect(Averager::new, Averager::accept, Averager::mergeIntermediateAverage); \r\n\t\t\t//accept takes one double value from stream and call merge.. method, which combines previous averger`s sum, count.\r\n\t\t\t// All Averager`s methods have no return type except for average which is not used in stream processing.\r\n\t\tIO.print(\"Average of price: \" + String.format(\"%.4f\", avg.average()));\r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of items price using JDK8 stream, collector, suming!\");\r\n\t\tdouble total = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.summingDouble(Item::getPrice)); // no need for map as well.\r\n\t\tIO.print(\"Total price: \" + String.format(\"%.4f\", total)); // same result\r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of all items price using JDK8 stream, collector toList!\");\r\n\t\tList<Double> prices = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice) \r\n\t\t\t// alternate of item -> item.getPrice()\r\n\t\t\t.collect(Collectors.toList()); \r\n\t\t\t// collects stream of elements i.e. price, and creates a List of price.\r\n\t\tIO.print(\"List of prices: \" + prices); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of all items price using JDK8 stream, collector toCollection!\");\r\n\t\tprices = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice) \r\n\t\t\t.collect(Collectors.toCollection(ArrayList::new)); // same as toList: Here, we can get prices in any list form; TreeSet, HashSet, ArrayList.\r\n\t\tIO.print(\"List of prices: \" + prices);\r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of all items price using JDK8 stream, collector joining!\");\r\n\t\tString priceString = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice)\r\n\t\t\t.map(Object::toString) //basically, double.toString() as upper map converts stream of Item into stream of Double\r\n\t\t\t.collect(Collectors.joining(\", \")); // same as toList.\r\n\t\tIO.print(\"List of prices: [\" + priceString + \"]\"); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint items based on type using JDK8 stream, collector grouping!\");\r\n\t\tMap<ITEM_TYPE, List<Item>> byType = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.groupingBy(Item::getType));\r\n\t\tIO.print(\"Items by Type: \" + byType ); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint items based on type using JDK8 stream, collector grouping!\");\r\n\t\tMap<ITEM_TYPE, Double> sumByType = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.groupingBy(Item::getType, Collectors.summingDouble(Item::getPrice)));\r\n\t\tIO.print(\"Total prices by Type: \" + sumByType); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint items based on type using JDK8 stream, collector grouping!\");\r\n\t\tMap<ITEM_TYPE, Optional<Item>> largetstByType = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.groupingBy(Item::getType, Collectors.maxBy(Comparator.comparing(Item::getPrice) )));\r\n\t\tIO.print(\"Total prices by Type: \" + largetstByType); \r\n\t}",
"@Override\n protected void adicionar(Funcionario funcionario) {\n\n }",
"public static void main(String[] args) {\n \n Ejemplo1 func=new Ejemplo1();\n Scanner sc=new Scanner(System.in);\n System.out.println(\"Primer Numero\");\n int n1=sc.nextInt();\n System.out.println(\"Segundo Numero\");\n int n2=sc.nextInt();\n \n func.sumaP(n1, n2);\n \n // Funciones Metodos e instancias Estudair concepto en java \n \n \n /*func.suma();\n func.resta();\n func.multiplicacion();\n func.sumaP(7, 10); */\n }",
"default Stream<Token<?>> stream() {\n return stream(true);\n }",
"public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }",
"public static void main(String[] args) throws Exception {\n StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // use event time for the application\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n // configure watermark interval\n env.getConfig().setAutoWatermarkInterval(1000L);\n\n // ingest sensor stream\n DataStream<SensorReading> readings = env\n // SensorSource generates random temperature readings\n .addSource(new SensorSource())\n // assign timestamps and watermarks which are required for event time\n .assignTimestampsAndWatermarks(new SensorTimeAssigner());\n\n // filter out sensor measurements with temperature below 25 degrees\n DataStream<SensorReading> filteredReadings = readings\n .filter(r -> r.temperature >= 25);\n\n // the above filter transformation using a FilterFunction instead of a lambda function\n // DataStream<SensorReading> filteredReadings = readings\n // .filter(new TemperatureFilter(25));\n\n // project the reading to the id of the sensor\n DataStream<String> sensorIds = filteredReadings\n .map(r -> r.id);\n\n // the above map transformation using a MapFunction instead of a lambda function\n // DataStream<String> sensorIds = filteredReadings\n // .map(new IdExtractor());\n\n // split the String id of each sensor to the prefix \"sensor\" and sensor number\n DataStream<String> splitIds = sensorIds\n .flatMap((FlatMapFunction<String, String>)\n (id, out) -> { for (String s: id.split(\"_\")) { out.collect(s);}})\n // provide result type because Java cannot infer return type of lambda function\n .returns(Types.STRING);\n\n // the above flatMap transformation using a FlatMapFunction instead of a lambda function\n // DataStream<String> splitIds = sensorIds\n // .flatMap(new IdSplitter());\n\n // print result stream to standard out\n splitIds.print();\n\n // execute application\n env.execute(\"Basic Transformations Example\");\n }",
"public static void main(String []args) {\n\t\tList<String> numbers = Arrays.asList(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\",\"7\",\"8\",\"9\");\r\n\t\t//Generate numbers from 1 to 9\r\n\t\tSystem.out.println(IntStream.range(1,10).mapToObj(String::valueOf).collect(Collectors.toList()));\r\n//\t\tSystem.out.println(\"Original list \" + numbers);\r\n\t\t\r\n\t\tList<Integer> even = numbers.stream()\r\n\t\t\t\t//gets the integer value from the string\r\n//\t\t\t\t.map(s ->Integer.valueOf(s))\r\n\t\t\t\t.map(Integer::valueOf) // Another way to do the top line(line 18)\r\n\t\t\t\t//checking if it is even\r\n\t\t\t\t.filter(number -> number % 2 ==1)// Odd numbers\r\n//\t\t\t\t.filter(number -> number % 2 ==0)// Even numbers\r\n\t\t\t\t//Collects results in to list call even.\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\t\r\n\t\tSystem.out.println(even);\r\n\r\n\t\tList<String> strings = Arrays.asList(\"abc\", \"\", \"bc\", \"efg\", \"abcd\", \"\", \"jkl\", \"\", \"\");\r\n\t\tSystem.out.println(strings);\r\n\t\t\r\n\t\tList<String> filtered = strings.stream()\r\n\t\t\t\t// checking each item and we check it is empty\r\n\t\t\t\t.filter(s-> !s.isEmpty())\r\n//\t\t\t\t.filter(s-> s.isEmpty())\r\n\t\t\t\t// add the remaining element to the list\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\tSystem.out.println(filtered);\r\n\t\t\r\n\t\t// Known as a method reference \r\n//\t\tforEach(System.out::println)\r\n\t\t \r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tList<Evento> arrayList = new ArrayList<Evento>();\r\n\r\n\t\tarrayList.add(new Evento(1, \"Event 1\", \"Musical\", 3));\r\n\t\tarrayList.add(new Evento(2, \"Event 2\", \"Sport\", 5));\r\n\t\tarrayList.add(new Evento(3, \"Event 3\", \"Sport\", 10));\r\n\t\tarrayList.add(new Evento(4, \"Event 4\", \"Cultutal\", 34));\r\n\t\tarrayList.add(new Evento(5, \"Event 5\", \"Sport\", 56));\r\n\r\n\t\t// Ejercicio 1\r\n\t\tSystem.out.println(\"Listado de todos los miembros: \");\r\n\t\tarrayList.stream().forEach(e -> System.out.println(e.getNombre()));\r\n\t\tSystem.out.println();\r\n\r\n\t\t// Ejercicio 2\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"Listado de todos los miembros que son de tipo \\\"sport\\\": \");\r\n\t\tarrayList.stream().filter(list -> list.getType().equals(\"Sport\"))\r\n\t\t\t\t.forEach(e -> System.out.println(e.getNombre()));\r\n\t\tSystem.out.println();\r\n\r\n\t\t// Ejercicio 3\r\n\t\tSystem.out.println(\"Suma de los asientos libres de \\\"sport\\\": \");\r\n\t\tSystem.out.println(arrayList.stream()\r\n\t\t\t\t.filter(list -> list.getType().equals(\"Sport\"))\r\n\t\t\t\t.mapToInt(e -> e.getSeatsAvailable()).sum());\r\n\t\tSystem.out.println();\r\n\r\n\t\t// Ejercicio 4\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"Listado de todos los IDs que son de tipo \\\"sport\\\": \");\r\n\t\tarrayList.stream().filter(list -> list.getType().equals(\"Sport\"))\r\n\t\t\t\t.map(e -> e.getId()).forEach(System.out::println);\r\n\t\tSystem.out.println();\r\n\r\n\t\t// Ejercicio 5\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"Listado de todos los IDs que son de tipo \\\"sport\\\" invertidos: \");\r\n\t\tarrayList.stream().filter(list -> list.getType().equals(\"Sport\"))\r\n\t\t\t\t.sorted(new ComparatorEventoNombreDecreciente())\r\n\t\t\t\t.map(e -> e.getId()).forEach(System.out::println);\r\n\r\n\t}",
"private static void testStreamFormList() {\n\n Integer[] ids = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};\n\n/*\n Stream.of(ids)\n .map(StreamsOverviewMain::findById)\n .filter(Objects::nonNull)\n .collect(Collectors.toList())\n .forEach(System.out::println);\n*/\n/*\n Random r = new Random();\n Integer integer = Stream.of(ids)\n .filter(i -> i % 2 == 0)\n .filter(i -> i % 3 == 0)\n .filter(i -> i % 5 == 0)\n .findFirst()\n// .orElse(0);\n .orElseGet(()->r.nextInt());\n System.out.println(integer);\n*/\n Stream.of(ids)\n .filter(i -> i % 2 == 0)\n .filter(i -> i % 3 == 0)\n .skip(2)\n .limit(1)\n .forEach(System.out::println);\n\n/*\n Optional<Employee2> first = Stream.of(ids)\n .map(StreamsOverviewMain::findById)\n .filter(Objects::nonNull)\n .findFirst();\n System.out.println(first);\n*/\n/*\n OptionalDouble average = Stream.of(ids)\n .map(StreamsOverviewMain::findById)\n .filter(Objects::nonNull)\n .mapToInt(Employee2::getSalary)\n .average();\n System.out.println(average);\n*/\n\n List<List<Employee2>> departments = new ArrayList<>();\n departments.add(employeeList);\n departments.add(secondList);\n\n/*\n departments.stream().flatMap(l -> l.stream()\n .map(e -> e.getFirstName())).forEach(System.out::println);\n*/\n\n/*\n Stream.of(ids).map(e -> String.format(\"%,3d\", e)).forEach(System.out::print);\n System.out.println();\n Stream.of(ids)\n// .peek(e -> e = e * 2)\n .map(e -> String.format(\"%,3d\", e * 2))\n .forEach(System.out::print);\n System.out.println();\n*/\n/*\n Consumer<Integer> c = e -> e = e * 2;\n Stream.of(ids).forEach(c);\n System.out.println(c);\n*/\n }",
"public static void main(String[] args) {\n\t\tnew Action() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void execute(String content) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(content);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}.execute(\"jdk1.8之前匿名内部类实现方式\");\r\n\t\t\r\n\t\t\r\n\t\t//lambda\r\n\t\tAction login=(String content)->{\r\n\t\t\tSystem.out.println(\"jdk1.8的lambda语法实现\");\r\n\t\t};\r\n\t\tlogin.execute(\"jdk1.8的lambda语法实现\");\r\n\t\t\r\n\t}",
"@Test\n public void test1(){\n\n// List<String> list= new ArrayList<String>();\n// list.add(\"张三\");\n// list.add(\"李四\");\n// list.add(\"王五\");\n// list.add(\"马六\");\n// System.out.println(list.get(0));\n//\n// list.forEach(li-> System.out.println(li+\"干什么\"));\n//// Runnable no=() -> System.out.println(\"hello\");\n//\n// Complex complex=new Complex(2,3);\n//\n// Complex c=new Complex(5,3);\n// Complex cc=c.plus(complex);\n// System.out.println(cc.toString()+\"11111111111111111111\");\n List<String> data = new ArrayList<>();\n data.add(\"张三\");\n data.add(\"李四\");\n data.add(\"王三\");\n data.add(\"马六\");\n data.parallelStream().forEach(x-> System.out.println(x));\n System.out.println(\"--------------------\");\n data.stream().forEach(System.out::println);\n System.out.println(\"+++++++++++++++++\");\n List<String> kk=data.stream().sorted().limit(2).collect(Collectors.toList());\n kk.forEach(System.out::println);\n List<String> ll=data.stream()\n .filter(x -> x.length() == 2)\n .map(x -> x.replace(\"三\",\"五\"))\n .sorted()\n .filter(x -> x.contains(\"五\")).collect(Collectors.toList());\n ll.forEach(string-> System.out.println(string));\n for (String string:ll) {\n System.out.println(string);\n }\n ll.stream().sorted().forEach(s -> System.out.println(s));\n// .forEach(System.out::println);\n Thread thread=new Thread(()->{ System.out.println(1); });\n thread.start();\n\n LocalDateTime currentTime=LocalDateTime.now();\n\n System.out.println(\"当前时间\"+currentTime);\n LocalDate localDate=currentTime.toLocalDate();\n System.out.println(\"当前日期\"+localDate);\n\n Thread tt=new Thread(()-> System.out.println(\"111\"));\n }",
"private void usingPrimitiveStream() {\n IntStream.range(1, 4).forEach(System.out::println);\n DoubleStream.of(2.3, 4.3).forEach(System.out::println);\n LongStream.range(1, 4).forEach(System.out::println);\n }",
"public void create() {\n // 1\n Stream.of(unitOfWorks);\n // 2\n Arrays.stream(unitOfWorks);\n // 3\n Stream.of(unitOfWorks[0], unitOfWorks[1], unitOfWorks[2]);\n //4\n Stream.Builder<UnitOfWork> unitOfWorkBuilder = Stream.builder();\n unitOfWorkBuilder.accept(unitOfWorks[0]);\n unitOfWorkBuilder.accept(unitOfWorks[1]);\n unitOfWorkBuilder.accept(unitOfWorks[2]);\n Stream<UnitOfWork> unitOfWorkStream = unitOfWorkBuilder.build();\n\n }",
"@Test\n public void example() {\n Func1<Integer, Observable<Integer>> db1 = param -> Observable.range(1, param);\n\n // ws-kald som funktion der returner en Observable\n Func1<Integer, Observable<Integer>> ws1 = param -> Observable.just(param);\n\n // ws-kald som funktion der returner en Observable\n Func1<Integer, Observable<Integer>> ws2 = param -> Observable.just(param);\n\n // ws-kald som funktion der returner en Observable\n Func1<List<Integer>, Observable<Object>> ws3 = param -> Observable.empty();\n\n db1.call(5)\n .flatMap(row -> {\n if (row % 2 == 0) {\n // ws2 kaldes kun, hvis ws1 ikke var tom\n return Observable.concat(ws1.call(row), ws2.call(row)).first();\n } else {\n // ws1 og ws2 udføres parallelt\n return Observable.zip(ws1.call(10), ws2.call(20), (e1, e2) -> e1 + e2);\n }\n })\n .onErrorResumeNext(err -> {\n log.error(\"error - resume next \", err);\n return Observable.empty();\n })\n .doOnNext(n -> log.info(\"element {}\", n))\n // samle/batche 2 elementer i en liste (men højst vente 1 sekund)\n .buffer(2, 1, TimeUnit.SECONDS)\n // output sendes til en ws3\n .flatMap(ws3)\n // subscribe starter kæden\n .subscribe();\n }",
"public static void findFirstMultipleOfSixViaStreams(List<Integer> numbers){\n\n int abc = 9;\n numbers.stream().filter(x -> {\n System.out.println(\"x = \" + x);\n return x % 6 == 0;\n }).map(x -> x + abc).findFirst();\n// Optional<Integer> firstSixMultiple = numbers.stream()\n// .filter(x -> {\n// System.out.println(\"x = \" + x);\n// return x % 6 == 0;\n// })\n// .findFirst();\n\n// int ans = firstSixMultiple.orElse(-1);\n\n// System.out.println(ans);\n }",
"@Test\n public void testStreamingFunction() throws Exception {\n setFunctionLocation(\"encode-1.0.0-boot\");\n setFunctionBean(\"com.acme.Encode\");\n process = processBuilder.start();\n\n Function<Flux<Integer>, Flux<?>[]> fn = FunctionProxy.create(Function.class, connect(), Integer.class);\n\n Flux<?>[] result = fn.apply(Flux.just(1, 1, 1, 0, 0, 0, 0, 1, 1));\n\n assertThat(result.length, CoreMatchers.equalTo(1));\n StepVerifier.create((Flux<Integer>) result[0])\n .expectNext(3, 1)\n .expectNext(4, 0)\n .expectNext(2, 1)\n .verifyComplete();\n }",
"default <T> EagerFutureStream<T> switchToIO(EagerFutureStream<T> stream){\n\t\tEagerReact react = EagerReactors.ioReact;\n\t\treturn stream.withTaskExecutor(react.getExecutor()).withRetrier(react.getRetrier());\n\t}",
"public interface LambdaInterface {\n\n @LambdaFunction\n byte[] HelloFunction(LambdaRequest request);\n\n @LambdaFunction\n LambdaRespMenues GetFullAndFilteredMenuForRestaurant(LambdaRequest2 input);\n}",
"public Object lambda23() {\n return this.staticLink.lambda7loupOr(lists.cdr.apply1(this.res));\n }",
"void testeAcessos() {\n System.out.println(formaDeFalar);// acessa por herança\n System.out.println(todosSabem);\n }",
"public static void main(String[] args) throws Exception {\n\t\tFlowable<String> obs4 = Flowable.just(\"un\", \"deux\", \"trois\", \"quatre\", \"sank\", \"six\", \"sept\", \"huit\", \"neuf\", \"deese\");\n//\t\tobs4.map(mapper -> {\n//\t\t\tif (\"deux\".equals(mapper))\n//\t\t\t\tThread.sleep(2000);\n//\t\t\treturn mapper+\" -- \"+Thread.currentThread().getName();\n//\t\t})\t\n//\t\t.subscribe(System.out::println);\n\t\t\n\t\tObserver<String> observer1 = new Observer<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onComplete() {\n\t\t\t\tSystem.out.println(\"Completed...\");\n\t\t\t\t\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(Throwable arg0) {\n\t\t\t\targ0.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onSubscribe(Disposable arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onNext(String arg0) {\n\t\t\t\tSystem.out.println(\"on next -- \"+arg0);\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t\tList<String> list1 = Arrays.asList(\"un\",\"deux\",\"trois\",\"quatre\",\"sank\");\n\t\t\n\t\tObservable obs5 = Observable.fromIterable(list1);\n\t\t\n\t\t//obs5.subscribe(observer1);\n\t\t\n\t\t//Flowable.range(3, 10).subscribe(System.out::println);\n\t\t\n\t\tnew Thread(\n\t\t()->{\n\t\t\tobs4\n\t\t\t.map(mapper ->{\n\t\t\t\tif (\"deux\".equals(mapper) || \"quatre\".equals(mapper))\n\t\t\t\t\tThread.sleep(2000);\n\t\t\t\treturn mapper+\" -- \"+Thread.currentThread().getName();\n\t\t\t})\n\t\t\t.subscribe(System.out::println);\n\t\t\t\n\t\t}).start();\n\t\t\n//\t\tnew Thread() {\n//\t\t\tpublic void run() {\n//\t\t\t\tobs4\n//\t\t\t\t\t.map(mapper ->{\n//\t\t\t\t\t\tif (\"deux\".equals(mapper) || \"quatre\".equals(mapper))\n//\t\t\t\t\t\t\tThread.sleep(2000);\n//\t\t\t\t\t\treturn mapper+\" -- \"+Thread.currentThread().getName();\n//\t\t\t\t\t})\n//\t\t\t\t\t.subscribe(System.out::println);\n//\t\t\t}\n//\t\t}.start();\n\t\t\n//\t\tExecutor exe = Executors.newCachedThreadPool();\n//\t\t\n//\t\texe.execute(()->{\n//\t\t\t\n//\t\t\tobs4\n//\t\t\t.map(mapper ->{\n//\t\t\t\tif (\"deux\".equals(mapper) || \"quatre\".equals(mapper))\n//\t\t\t\t\tThread.sleep(2000);\n//\t\t\t\treturn mapper+\" -- \"+Thread.currentThread().getName();\n//\t\t\t})\n//\t\t\t.subscribe(System.out::println);\n\t\t\t\n//\t\t\tobs4.subscribe();\n//\t\t\tFlowable.zip(obs4, Flowable.interval(2, TimeUnit.SECONDS),(k,v)->k)\n//\t\t\t.subscribe((data)->{\n//\t\t\t\tSystem.out.println(\" \"+data+\" -- \"+Thread.currentThread().getName());\n//\t\t\t});\n//\t\t\tFlowable.interval(1, TimeUnit.SECONDS)\n//\t\t\t.map(mapper -> {\n//\t\t\t\tif (mapper == 3)\n//\t\t\t\t\tthrow new Exception(\" Time is Over !!! \");\n//\t\t\t\treturn mapper;\n//\t\t\t})\n//\t\t\t.subscribe((data)->{\n//\t\t\t\tSystem.out.println(data +\" -- \"+Thread.currentThread().getName());\n//\t\t\t},(e)->{\n//\t\t\t\te.printStackTrace();\n//\t\t\t});\n\t\t\t\n\t\t//});\n\t\t\n//\t\t//Thread.sleep(5000);\t\n//\t\tFlowable<String> flw1 = Flowable.just(\"un\",\"deux\",\"trois\",\"quatre\",\"sank\",\"six\",\"sept\");\n//\t\tflw1\n//\t\t//.subscribeOn(Schedulers.from(Executors.newFixedThreadPool(4)))\n//\t\t.map(mapper ->{\n//\t\t\tif (\"deux\".equals(mapper))\n//\t\t\t\tThread.sleep(1000);\n//\t\t\tif (\"quatre\".equals(mapper))\n//\t\t\t\tThread.sleep(500);\n//\t\t\treturn mapper +\" -- \"+Thread.currentThread().getName();\n//\t\t})\n//\t\t.subscribe(System.out::println);\n//\t\t\n//\t\tThread.sleep(2000);\n\t}",
"public void callLazystream()\n {\n\n Stream<String> stream = list.stream().filter(element -> {\n wasCalled();\n System.out.println(\"counter in intermediate operations:\" + counter);\n return element.contains(\"2\");\n });\n\n System.out.println(\"counter in intermediate operations:\" + counter);\n }",
"default EagerFutureStream<U> control(Function<Supplier<U>, Supplier<U>> fn) {\n\t\treturn (EagerFutureStream<U>) FutureStream.super.control(fn);\n\t}",
"public static void main(String args[]) \r\n {\n List<Integer> number = Arrays.asList(2,3,4,5); \r\n \r\n // demonstration of map method \r\n List<Integer> square = number.stream().map(x -> x*x). \r\n collect(Collectors.toList()); \r\n System.out.println(\"Square od number using map()\"+square); \r\n \r\n // create a list of String \r\n List<String> names = \r\n Arrays.asList(\"Reflection\",\"Collection\",\"Stream\"); \r\n \r\n // demonstration of filter method \r\n List<String> result = names.stream().filter(s->s.startsWith(\"S\")). \r\n collect(Collectors.toList()); \r\n System.out.println(result); \r\n \r\n // demonstration of sorted method \r\n List<String> show = \r\n names.stream().sorted().collect(Collectors.toList()); \r\n System.out.println(show); \r\n \r\n // create a list of integers \r\n List<Integer> numbers = Arrays.asList(2,3,4,5,2); \r\n \r\n // collect method returns a set \r\n Set<Integer> squareSet = \r\n numbers.stream().map(x->x*x).collect(Collectors.toSet()); \r\n System.out.println(squareSet); \r\n \r\n // demonstration of forEach method \r\n number.stream().map(x->x*x).forEach(y->System.out.println(y)); \r\n \r\n // demonstration of reduce method \r\n int even = \r\n number.stream().filter(x->x%2==0).reduce(0,(ans,i)-> ans+i); \r\n \r\n System.out.println(even); \r\n \r\n // Create a String with no repeated keys \r\n Stream<String[]> \r\n str = Stream \r\n .of(new String[][] { { \"GFG\", \"GeeksForGeeks\" }, \r\n { \"g\", \"geeks\" }, \r\n { \"G\", \"Geeks\" } }); \r\n\r\n // Convert the String to Map \r\n // using toMap() method \r\n Map<String, String> \r\n map = str.collect( \r\n Collectors.toMap(p -> p[0], p -> p[1])); \r\n\r\n // Print the returned Map \r\n System.out.println(\"Map:\" + map); \r\n }",
"public static void main(String[] args) {\n\t\tFunction<Integer, Integer> f = (x) -> x+20;\r\n\t\tSystem.out.println(f.apply(20));\r\n\t\tFunction<Integer, Double> f1 = (x) -> x+20.0;\r\n\t\tSystem.out.println(f1.apply(20));\r\n\t\tFunction<String, Integer> f2 = (str) -> str.length();\r\n\t\tSystem.out.println(f2.apply(\"Aditya Mukherjee\"));\r\n\t\r\n\t\r\n//\t Function Chaining\r\n\t\tFunction<Integer, Integer> f3 = (x) -> 2*x;\r\n\t\tFunction<Integer, Integer> f4 = (x) -> x*x*x;\r\n//\t\tAND THEN FUNCTION\r\n\t\tSystem.out.println(\"And Then Output \"+f3.andThen(f4).apply(2));\r\n//\t\tCOMPOSE FUNCTION\r\n\t\tSystem.out.println(\"Compose Output \"+f3.compose(f4).apply(2));\r\n//\tBIFUNCTION\r\n\t\tBiFunction<Integer, Integer, Integer> bf = (x,y) -> x+y;\r\n\t\tSystem.out.println(bf.apply(20, 30));\r\n\t\r\n\t}",
"static public void callForeachRDD (org.apache.spark.streaming.api.java.JavaDStream<byte[]> jdstream, org.apache.spark.streaming.api.python.PythonTransformFunction pfunc) { throw new RuntimeException(); }",
"public static void main(String[] args) {\n Consumer<String> c1 = System.out::println;\n Consumer<String> c2 = x -> System.out.println(x);\n\n c1.accept(\"Annie\");\n c2.accept(\"Annie\");\n }",
"@Test\n public void intermediateOperations() {\n Stream<Book> books = TestData.getBooks().stream();\n // filter\n Stream<Book> booksWithMultipleAuthors = books.filter(book -> book.hasMultipleAuthors());\n // map\n Stream<String> namesStream = booksWithMultipleAuthors.map(book -> book.getName());\n \n Set<String> expected = \n Sets.newHashSet(\"Design Patterns: Elements of Reusable Object-Oriented Software\",\n \"Structure and Interpretation of Computer Programs\");\n assertEquals(expected, namesStream.collect(Collectors.toSet()));\n }",
"protected void sequence_StreamFunction(ISerializationContext context, StreamFunction semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getStreamFunction_Fo()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getStreamFunction_Fo()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getStreamFunctionAccess().getFoFunctionOperationParserRuleCall_1_0(), semanticObject.getFo());\n\t\tfeeder.finish();\n\t}"
]
| [
"0.63541067",
"0.6110818",
"0.5926567",
"0.58950317",
"0.5893261",
"0.5839013",
"0.57584864",
"0.56987715",
"0.56911135",
"0.5690787",
"0.5688644",
"0.5680207",
"0.567251",
"0.56293654",
"0.5614573",
"0.56034803",
"0.5566403",
"0.5545029",
"0.5523863",
"0.54594433",
"0.54541826",
"0.5451053",
"0.54489714",
"0.5389158",
"0.538096",
"0.5342066",
"0.533583",
"0.53232324",
"0.5311673",
"0.53100795",
"0.530695",
"0.5304263",
"0.53026",
"0.52808535",
"0.5272822",
"0.5266655",
"0.5265271",
"0.5259942",
"0.5246741",
"0.5242786",
"0.52409995",
"0.52225924",
"0.5216899",
"0.52153116",
"0.5215278",
"0.5191543",
"0.518786",
"0.5159348",
"0.51373994",
"0.51132834",
"0.5100981",
"0.50982326",
"0.5092114",
"0.5090756",
"0.50843763",
"0.5076524",
"0.5068424",
"0.505398",
"0.5033932",
"0.5013892",
"0.50136834",
"0.50129724",
"0.5007477",
"0.5005191",
"0.5003184",
"0.4991724",
"0.49885127",
"0.4985217",
"0.49848545",
"0.49778813",
"0.49778515",
"0.4966225",
"0.49536118",
"0.49523506",
"0.49407157",
"0.49388433",
"0.49345455",
"0.49290064",
"0.49219656",
"0.49217638",
"0.4918011",
"0.4917678",
"0.4916489",
"0.4911066",
"0.4907408",
"0.48878396",
"0.48779485",
"0.48713437",
"0.48691243",
"0.48688745",
"0.486742",
"0.48669267",
"0.4866475",
"0.48647743",
"0.48560584",
"0.48511523",
"0.4849904",
"0.4847241",
"0.48346686",
"0.4830604",
"0.4827152"
]
| 0.0 | -1 |
/ Help functions for logging | private String getGeofenceTransitionDetails(
int geofenceTransition,
List<Geofence> triggeringGeofences) {
String geofenceTransitionString = getTransitionString(geofenceTransition);
// Get the Ids of each geofence that was triggered.
ArrayList<String> triggeringGeofencesIdsList = new ArrayList<>();
for (Geofence geofence : triggeringGeofences) {
triggeringGeofencesIdsList.add(geofence.getRequestId());
}
String triggeringGeofencesIdsString = TextUtils.join(", ", triggeringGeofencesIdsList);
Log.i("logos","jnj");
return geofenceTransitionString + ": " + triggeringGeofencesIdsString;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void log();",
"public String getLog();",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }",
"void initializeLogging();",
"public void log(String txt);",
"String getLogHandled();",
"void log(String string);",
"private void logToFile() {\n }",
"public static void main(String []args) {\n\t\tlog.trace(\"111---\");\n\t\tlog.debug(\"2222\");\n\t\tlog.info(\"333\");\n\t\tlog.warn(\"444\");\n\t\tlog.error(\"555\");\n\t}",
"@Override\n public void logs() {\n \n }",
"private static void log(String aMsg){\n\t System.out.println(aMsg);\n\t }",
"public abstract void logd(String str);",
"void log(Log log);",
"private void Log(String action) {\r\n\t}",
"protected void log(Object msg) {\n\t\n\t\tSystem.out.println(\"MusicDataAccessor: \" + msg);\n\t}",
"Appendable getLog();",
"void setupFileLogging();",
"@Override\n public void log()\n {\n }",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"public void log(String msg) {\n\n\t}",
"public void log(String text) {\n }",
"abstract protected void _log(Source src, OpLevel sev, String msg, Object... args) throws Exception;",
"public static void log(String str)\r\n\t{\n\t}",
"@Override\n\tpublic void log(String msg) throws IOException {\n\t\t\n\t}",
"private static final void log(String msg) {\n\t\tlog.println(msg);\n\t}",
"public void logData(){\n }",
"void log(String line);",
"@Override\n protected void log(String tag, String msg) {\n Log.i(tag, \"[you can use your custom logger here \\\"]\" + msg);\n }",
"public interface Log {\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param handler 添加handler.\n * @author admin\n */\n default void addHandler(Handler handler) {\n //\n }\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param newLevel 设置日志级别.\n * @throws SecurityException 抛出安全异常.\n * @author admin\n */\n default void setLevel(final Level newLevel) throws SecurityException {\n //\n }\n\n /**\n * 信息日志.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @param args 日志消息格式化填充对象.\n * @author admin\n */\n void info(final String message, final Object... args);\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @author admin\n */\n void info(final String message);\n\n /**\n * 详细日志.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @param args 日志消息格式化填充对象.\n * @author admin\n */\n void debug(final String message, final Object... args);\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @author admin\n */\n void debug(final String message);\n\n /**\n * 较详细日志.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @param args 日志消息格式化填充对象.\n * @author admin\n */\n void trace(final String message, final Object... args);\n\n /**\n * 较详细日志.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @author admin\n */\n void trace(final String message);\n\n /**\n * 警告日志.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @param args 日志消息格式化填充对象.\n * @author admin\n */\n void warn(final String message, final Object... args);\n\n /**\n * 较详细日志.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @author admin\n */\n void warn(final String message);\n\n /**\n * 严重日志.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @param args 日志消息格式化填充对象.\n * @author admin\n */\n void error(final String message, final Object... args);\n\n /**\n * 较详细日志.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @author admin\n */\n void error(final String message);\n\n /**\n * 致命错误日志.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @param args 日志消息格式化填充对象.\n * @author admin\n */\n void fatal(final String message, final Object... args);\n\n /**\n * 致命错误日志.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @author admin\n */\n void fatal(final String message);\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param args 日志传递进来的参数.\n * @param message 日志消息.\n * @author admin\n */\n default void off(final String message, final Object... args) {\n //\n }\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @author admin\n */\n default void off(final String message) {\n //\n }\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param args 日志传递进来的参数.\n * @param message 日志消息.\n * @author admin\n */\n default void all(final String message, final Object... args) {\n //\n }\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @author admin\n */\n default void all(final String message) {\n //\n }\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param args 日志传递进来的参数.\n * @param message 日志消息.\n * @author admin\n */\n default void config(final String message, final Object... args) {\n //\n }\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param message 日志消息.\n * @author admin\n */\n default void config(final String message) {\n //\n }\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @return 是否开启调试.\n * @author admin\n */\n default boolean isDebugEnabled() {\n return false;\n }\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @return 是否开启Info.\n * @author admin\n */\n default boolean isInfoEnabled() {\n return false;\n }\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @return 是否开启Warn.\n * @author admin\n */\n default boolean isWarnEnabled() {\n return false;\n }\n}",
"private static void log(String msg) {\n System.out.println(msg);\n }",
"public static void loggingExample() {\n\t\tSystem.out.println(\"This is running with the default logger!\");\n\t\tnewLogger.fatal(\"This is fatal\");\n\t\tnewLogger.warn(\"This is the warn level\");\n\t\tnewLogger.info(\"This is the info level\");\n\t\t\n\t}",
"public void viewLogs() {\n\t}",
"@Override\n public void log(String message) {\n }",
"IFileLogger log();",
"abstract protected void logInternal(int level, String message);",
"void log(Message message);",
"public static void main(String[] args)throws IOException ,SQLException {\nlog.debug(\"Hello this is a debug message\");\r\nlog.info(\"Hello this is a info message\");\r\nlog.warn(\"Sample warn message \");\r\nlog.error(\"Sample error message \");\r\nlog.fatal(\"Sample fatal message \");\r\n\r\n}",
"public interface ILog {\n /**\n * 打印日志\n * @param L 虚拟机地址,可通过 {@link org.luaj.vm2.Globals#getGlobalsByLState(long)}获取\n */\n void l(long L, String tag, String log);\n\n /**\n * 打印错误日志\n * @param L 虚拟机地址,可通过 {@link org.luaj.vm2.Globals#getGlobalsByLState(long)}获取\n */\n void e(long L, String tag, String log);\n}",
"public interface ILog {\n\n /**\n * Send an information level log message, used by time-related log.\n *\n * @param tag Used to identify the source of a log message. It usually identifies\n * the class or activity where the log call occurs.\n * @param msg The message you would like logged.\n */\n void info(String tag, String msg);\n\n\n /**\n * Send an warning level log message, used by exception-related log.\n *\n * @param tag Used to identify the source of a log message. It usually identifies\n * the class or activity where the log call occurs.\n * @param msg The message you would like logged.\n */\n void warn(String tag, String msg);\n}",
"public String get_log(){\n }",
"public interface Log {\n\n void sql(Object o);\n\n void log(Object o);\n\n void warn(Object o);\n\n void error(Exception e);\n\n Log print(String... string);\n\n Log println(String... string);\n\n void println(Object... objects);\n\n void print(Object... objects);\n\n void front(String front);\n\n void behind(String behind);\n}",
"private Log() {\r\n\t}",
"void printLog(String str, int level)\n { if (log!=null) log.println(\"CommandLineUA: \"+str, UserAgent.LOG_OFFSET+level);\n }",
"public interface LogViewer {\n\n\t/**\n\t * General application info.\n\t * @param text\n\t */\n\tvoid info(String text);\n\t\n\t/**\n\t * General error info.\n\t * @param text\n\t */\n\tvoid err(String text);\n\t\n\t/**\n\t * Info related to GA.\n\t * @param text\n\t */\n\tvoid gaInfo(String text);\n\t\n\t/**\n\t * Info related to ANTS.\n\t * @param text\n\t */\n\tvoid antsInfo(String text);\n\t\n\t/**\n\t * Info related to BA.\n\t * @param text\n\t */\n\tvoid baInfo(String text);\n}",
"void log(String source, String line);",
"private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}",
"private void logUser() {\n }",
"abstract void initiateLog();",
"public interface Log {\n void debug(String msg, Object... args);\n\n void info(String msg, Object... args);\n\n void warn(String msg, Object... args);\n}",
"abstract protected String getLogFileName();",
"public static void main(String[] args)\n\t{\n\t\tSystem.out.println(logger.getName());\n\t\tlogger.log(Level.INFO,\"come from logFunction\");\n\t\tlogger.debug(\"debug message\");\n\t\tlogger.info(\"info message\");\n\t\tlogger.warn(\"warn message\");\n\t\tlogger.error(\"error message\");\n\t\tlogger.fatal(\"fatal message\");\n\t}",
"private void logika_rozpocznij(){\n\t}",
"private static final void log(org.jetbrains.anko.AnkoLogger r2, java.lang.Object r3, java.lang.Throwable r4, int r5, kotlin.jvm.functions.Function2<? super java.lang.String, ? super java.lang.String, kotlin.Unit> r6, kotlin.jvm.functions.Function3<? super java.lang.String, ? super java.lang.String, ? super java.lang.Throwable, kotlin.Unit> r7) {\n /*\n r0 = r2.getLoggerTag();\n r1 = android.util.Log.isLoggable(r0, r5);\n if (r1 == 0) goto L_0x0017;\n L_0x000a:\n if (r4 == 0) goto L_0x001c;\n L_0x000c:\n if (r3 == 0) goto L_0x0018;\n L_0x000e:\n r1 = r3.toString();\n if (r1 == 0) goto L_0x0018;\n L_0x0014:\n r7.invoke(r0, r1, r4);\n L_0x0017:\n return;\n L_0x0018:\n r1 = \"null\";\n goto L_0x0014;\n L_0x001c:\n if (r3 == 0) goto L_0x0028;\n L_0x001e:\n r1 = r3.toString();\n if (r1 == 0) goto L_0x0028;\n L_0x0024:\n r6.invoke(r0, r1);\n goto L_0x0017;\n L_0x0028:\n r1 = \"null\";\n goto L_0x0024;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.jetbrains.anko.Logging.log(org.jetbrains.anko.AnkoLogger, java.lang.Object, java.lang.Throwable, int, kotlin.jvm.functions.Function2, kotlin.jvm.functions.Function3):void\");\n }",
"void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }",
"private void log(String msg) {\n\t\tSystem.out.println(new Date() + \": \" + msg);\n\t}",
"public void enableLogging();",
"private void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }",
"void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }",
"void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}",
"public static void main(String[] args) {\n\t\tLogger spacedLogger = new SpacedLogger();\n\t\tLogger asteriskLogger = new AsteriskLogger();\n\t\t\n// Part 11 this will Test both methods on both instances, passing in Strings \n\t\tasteriskLogger.Error(\"This is a Fatal Error you Must look at everything Again!!! \");\n\t\tasteriskLogger.Log(\"There is an Error!! You must fix this!!!\");\n\t\t\t\t\n\t\t\n\t\tSystem.out.println();\n\t\tspacedLogger.Error(\"This is a Huge ERROR!!! Must fix it ASAP!!!!\");\n\t\tspacedLogger.Log(\"This is more readable!! With More Spaces!!!\");\n\t\t\n\t}",
"@Override\n\tpublic void log(Level level, String message, Object... params) {\n\n\t}",
"public void log(String message) {\n\t}",
"private void log(String l) {\n if (LOG) {\n System.out.println(\"RotationMatrixTest.\" + l);\n }\n }",
"public abstract void logKenaiUsage(Object... parameters);",
"private void log(String s) {\n RlogEx.i(TAG, s);\n }",
"public void info(Object message)\n/* */ {\n/* 145 */ if (message != null) {\n/* 146 */ getLogger().info(String.valueOf(message));\n/* */ }\n/* */ }",
"private void log(String msg) {\r\n\t\tif (logger != null) {\r\n\t\t\tlogger.append(msg);\r\n\t\t\tlogger.println();\r\n\t\t}\r\n\t}",
"private void divertLog() {\n wr = new StringWriter(1000);\n LogTarget[] lt = { new WriterTarget(wr, fmt) };\n SampleResult.log.setLogTargets(lt);\n }",
"final void out (String msg) { if (m_debugMode) { Logger.println (msg); } }",
"abstract protected void _log(Snapshot snapshot) throws Exception;",
"public void logDebug(String str) {\n }",
"private void log(String message) {\n System.out.println(message);\n }",
"@Test\r\n\tpublic void logTest() {\r\n\t\tlogger.info(\"Testando info\");\r\n\t\tlogger.debug(\"nao sera logado\" + \"Nice\");\r\n\t\tlogger.error(\"This is Error message\", new Exception(\"Testing\"));\r\n\t}",
"private TypicalLogEntries() {}",
"public void logThis(String log, Theory theory)\n {\n }",
"protected Log getLog()\n/* */ {\n/* 59 */ return log;\n/* */ }",
"abstract protected void _log(TrackingActivity activity) throws Exception;",
"void log(HandlerInput input, String message) {\n System.out.printf(\"[%s] [%s] : %s]\\n\",\n input.getRequestEnvelope().getRequest().getRequestId().toString(),\n new Date(),\n message);\n }",
"private static void log(String message) {\n System.out.println(message);\n }",
"private static void log( java.io.PrintStream out, String message )\r\n { // Log message if requested\r\n if (out != null)\r\n {\r\n out.println(message);\r\n }\r\n }",
"abstract protected void _log(TrackingEvent event) throws Exception;",
"public final void Log2(String s) {\n //System.err.println(s);\n //if (win != null)\n // win.Log(s); // For detailed debug purposes\n }",
"private void log(String s) {\n Rlog.i(TAG, s);\n }",
"private void writeLog(){\n\t\tStringBuilder str = new StringBuilder();\r\n\t\tstr.append(System.currentTimeMillis() + \", \");\r\n\t\tstr.append(fileInfo.getCreator() + \", \");\r\n\t\tstr.append(fileInfo.getFileName() + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(networkSize + \", \");\r\n\t\tstr.append(fileInfo.getN1() + \", \");\r\n\t\tstr.append(fileInfo.getK1() + \", \");\r\n\t\tstr.append(fileInfo.getN2() + \", \");\r\n\t\tstr.append(fileInfo.getK2() + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT)+ \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.encryStart, logger.encryStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \"\\n\");\r\n\t\t\r\n\t\tString tmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getKeyStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\r\n\t\t\r\n\t\ttmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getFileStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.FILE_CREATION, str.toString());\t\t\r\n\t\t\r\n\t\t// Topology Discovery\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"TopologyDisc, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.topStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT ) + \", \");\r\n\t\tstr.append(\"\\n\");\t\t\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\r\n\t\t\r\n\t\t// Optimization\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"Optimization, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.optStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(\"\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t\t\r\n\t\t\r\n\t\t// File Distribution\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"FileDistribution, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(logger.distStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \", \");\r\n\t\tstr.append(\"\\n\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t}",
"final void out (String msg1, String msg2) { if (m_debugMode) { Logger.print (msg1); Logger.println (msg2); } }",
"@Override\n\t\t\t\t\t\t\tpublic void log(String msg, int level, Date date, StackTraceElement trace) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"public void add_to_log(String s){\n }",
"private void logMessage(String msg) {\n\n\t\tlog.logMsg(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg + \"\\n\");\n\n\t\t// System.out.println(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg);\n\n\t}",
"@Override\n\tpublic void log(Level level, Marker marker, String message, Object... params) {\n\n\t}",
"private void log(String message) {\n System.out.println(message);\n }",
"private static void log(IStatus status) {\n\t getDefault().getLog().log(status);\n\t}",
"protected void log(String s ) {\r\n\tmessageSB.append( s ).append(\"\\r\\n\");\r\n }",
"private void logInfo(String msgText) {\n System.out.println (\"[INFO] \" + msgText);\n \n }",
"void logHTTPRequest(HttpServletRequest request, Logger logger);",
"public static void main(String[] args) {\n // logger.info(\"Message\");\n // System.out.println(\"cdkdk\");\n\n }",
"static void log(int priority, String tag, String message) {\n }",
"public void customLogger() {\n KOOM.getInstance().setLogger(new KLog.KLogger() {\n @Override\n public void i(String TAG, String msg) {\n //get the log of info level\n }\n\n @Override\n public void d(String TAG, String msg) {\n //get the log of debug level\n }\n\n @Override\n public void e(String TAG, String msg) {\n //get the log of error level\n }\n });\n }",
"private static void writeLog(String log) {\n\t\twriteLog(log, true);\n\t}",
"public static final void info(@org.jetbrains.annotations.NotNull org.jetbrains.anko.AnkoLogger r4, @org.jetbrains.annotations.Nullable java.lang.Object r5, @org.jetbrains.annotations.Nullable java.lang.Throwable r6) {\n /*\n r3 = \"$receiver\";\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r4, r3);\n r0 = 4;\n r2 = r4.getLoggerTag();\n r3 = android.util.Log.isLoggable(r2, r0);\n if (r3 == 0) goto L_0x0025;\n L_0x0011:\n if (r6 == 0) goto L_0x002a;\n L_0x0013:\n if (r5 == 0) goto L_0x0026;\n L_0x0015:\n r3 = r5.toString();\n if (r3 == 0) goto L_0x0026;\n L_0x001b:\n r6 = (java.lang.Throwable) r6;\n r3 = (java.lang.String) r3;\n r1 = r2;\n r1 = (java.lang.String) r1;\n android.util.Log.i(r1, r3, r6);\n L_0x0025:\n return;\n L_0x0026:\n r3 = \"null\";\n goto L_0x001b;\n L_0x002a:\n if (r5 == 0) goto L_0x003b;\n L_0x002c:\n r3 = r5.toString();\n if (r3 == 0) goto L_0x003b;\n L_0x0032:\n r3 = (java.lang.String) r3;\n r1 = r2;\n r1 = (java.lang.String) r1;\n android.util.Log.i(r1, r3);\n goto L_0x0025;\n L_0x003b:\n r3 = \"null\";\n goto L_0x0032;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.jetbrains.anko.Logging.info(org.jetbrains.anko.AnkoLogger, java.lang.Object, java.lang.Throwable):void\");\n }"
]
| [
"0.7888856",
"0.7193236",
"0.7172839",
"0.7171774",
"0.71637344",
"0.708232",
"0.70711815",
"0.7064105",
"0.7013679",
"0.69961286",
"0.6979487",
"0.69687283",
"0.6923361",
"0.6893133",
"0.6881956",
"0.6877396",
"0.6875372",
"0.6869662",
"0.68579376",
"0.68579376",
"0.68579376",
"0.68379295",
"0.6821019",
"0.68184066",
"0.6752797",
"0.67516565",
"0.67387253",
"0.6713566",
"0.6708565",
"0.6692724",
"0.6690492",
"0.6668497",
"0.6667396",
"0.66584045",
"0.6654403",
"0.66535103",
"0.6650723",
"0.6641807",
"0.66374695",
"0.6635531",
"0.6624251",
"0.6623873",
"0.6621836",
"0.660104",
"0.66000795",
"0.65832067",
"0.65688443",
"0.65481013",
"0.6544731",
"0.65427065",
"0.6536539",
"0.65275186",
"0.6526217",
"0.6524242",
"0.65011114",
"0.64939815",
"0.64839447",
"0.6474372",
"0.646849",
"0.64563316",
"0.6445346",
"0.6442299",
"0.6439725",
"0.6432655",
"0.6431094",
"0.6424825",
"0.64210063",
"0.64041597",
"0.63929343",
"0.637529",
"0.6369659",
"0.6368754",
"0.6364659",
"0.63622725",
"0.63484216",
"0.63414633",
"0.63408554",
"0.633626",
"0.6334592",
"0.6333311",
"0.63103163",
"0.6308605",
"0.63079655",
"0.63053393",
"0.6302638",
"0.6302553",
"0.6295136",
"0.62841785",
"0.6279527",
"0.6266997",
"0.6265594",
"0.6263405",
"0.6247653",
"0.62452924",
"0.62386316",
"0.6238095",
"0.6236918",
"0.6235597",
"0.62242943",
"0.6222597",
"0.62148774"
]
| 0.0 | -1 |
Use PingMessage.newBuilder() to construct. | private PingMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private PingResult(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public void sendPing(PingMessage ping)\n {\n InetAddress host = ping.getIP();\n int port = ping.getPort();\n String msg = ping.getPayload();\n try\n {\n DatagramPacket packet = \n new DatagramPacket(msg.getBytes(), msg.length(), host, port);\n socket.send(packet);\n } \n catch (Exception ex)\n {\n System.out.println(\"UDPPinger Exception: \" + ex);\n }\n }",
"private void constructHeartbeatMessage() {\n // build head\n MessageProtobuf.Head.Builder headBuilder = MessageProtobuf.Head.newBuilder();\n headBuilder.setMsgId(UUID.randomUUID().toString());\n headBuilder.setMsgType(MsgConstant.MsgType.HEARTBEAT_MESSAGE);\n headBuilder.setTimeStamp(System.currentTimeMillis());\n\n // build message\n MessageProtobuf.Msg.Builder builder = MessageProtobuf.Msg.newBuilder();\n builder.setHead(headBuilder.build());\n\n defaultHeartbeatMessage = builder.build();\n }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) {\n/* 136 */ return new SimpleMessage(message);\n/* */ }",
"public TestPing(boolean request) {\n\t\tthis.request = request;\n\t\tp = new Ping(request);\n\t}",
"public Ping_args(Ping_args other) {\r\n }",
"public PingMessage receivePing()\n {\n Date date = new Date();\n String dateString = String.format(\"%tc\", date);\n byte recvBuf[] = new byte[PACKET_SIZE];\n DatagramPacket recvPacket = \n\t new DatagramPacket(recvBuf, PACKET_SIZE);\n PingMessage reply = null;\n try\n {\n socket.receive(recvPacket);\n System.out.println(\"Received packet from \" + recvPacket.getAddress()\n + \" \" + recvPacket.getPort() + \" \" + dateString);\n String recvMsg = new String(recvPacket.getData());\n\t reply = new PingMessage(recvPacket.getAddress(),\n recvPacket.getPort(), recvMsg);\n }\n catch (Exception ex)\n {\n System.out.println(\"receivePing...java.net.SocketTimeoutException: \" +\n \"Receive timed out\");\n }\n return reply;\n }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) {\n/* 127 */ return new SimpleMessage(message);\n/* */ }",
"public void ping() {\n JsonNode rootNode = get(\"ping\");\n\n // TODO verify that the response was \"Pong!\"\n JsonNode dataNode = rootNode.get(\"data\");\n String pong = dataNode.asText();\n }",
"private Pinger(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public TestResponse ping() {\n TestResponse responseBody = new TestResponse();\n responseBody.setMessage(TEST_MESSAGE);\n responseBody.setDateTimeMessage(LocalDateTime.now());\n return responseBody;\n }",
"public Message newMessage(String message, Object p0, Object p1) {\n/* 77 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) {\n/* 109 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) {\n/* 118 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object... params) {\n/* 61 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n/* 145 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0, Object p1, Object p2) {\n/* 85 */ return new SimpleMessage(message);\n/* */ }",
"public Attributes getPingBytes() { return this.pingBytes; }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3) {\n/* 93 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n/* 101 */ return new SimpleMessage(message);\n/* */ }",
"public static ServerStatus ping(String address) {\n MCPingOptions options = getPingOptions(address);\n Instant timestamp = Instant.now();\n MCPingResponse ping = null;\n\n try {\n ping = MCPing.getPing(options);\n } catch (IOException e) {\n //TODO differentiate between different types of exceptions, i.e. UnknownHostException,\n log.error(\"Error while pinging Minecraft server\", e);\n }\n\n return new ServerStatus(address, ping, ping != null, timestamp);\n }",
"public PingImpl() throws RemoteException {\n super(); //cria no rmi\n }",
"public Message() {}",
"public Message() {}",
"public Ping_result(Ping_result other) {\r\n }",
"public Message newMessage(String message, Object p0) {\n/* 69 */ return new SimpleMessage(message);\n/* */ }",
"public String getPing() {\r\n return ping;\r\n }",
"public Message(){\n super();\n this.status = RETURN_OK;\n put(\"status\",this.status.getCode());\n put(\"message\", this.status.getMessage());\n }",
"private MsgNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public HazelcastMQMessage() {\n this(new DefaultHeaders(), null);\n }",
"public Message() {\n }",
"private Message onPingMessageReceived(PingMessage m, DecentSocket origin) {\n\t\treturn null;\n\t}",
"public HealthUpdateMessage(byte[] message, InetSocketAddress source) throws Exception\n\t{\n\t\tsuper(message, source);\n\t\t\n if (message[1] != TYPE_PLAYER_DEATH)\n throw new InvalidParameterException(String.format(\"The byte array passed to the HealthUpdateMessage class is NOT a health update message. Message code is 0x%02x.\", message[1]));\n \n // Skip the header\n ByteArrayInputStream in = new ByteArrayInputStream(message, MESSAGE_HEADER_SIZE, message.length-MESSAGE_HEADER_SIZE);\n // Player id\n playerId = ByteStreamUtils.readChar(in);\n // Health\n health = ByteStreamUtils.readChar(in);\n\t}",
"private Message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"public Message(String message){\n\t\tthis(message, 5000);\n\t}",
"public interface PingProto$ConversationUpdateOrBuilder extends MessageLiteOrBuilder {\n int getBolt();\n\n String getConversationUuid();\n\n ByteString getConversationUuidBytes();\n\n String getGroupName();\n\n ByteString getGroupNameBytes();\n\n C6818b getMembers(int i);\n\n int getMembersCount();\n\n List<C6818b> getMembersList();\n\n Timestamp getUntil();\n\n C7466b getWhat();\n\n int getWhatValue();\n\n boolean hasUntil();\n}",
"public Thread asyncPing() {\n Gson gson = new Gson();\n PingMessage pingMessage = new PingMessage(\"ping\");\n return new Thread(() -> {\n try {\n while (!socket.isClosed() && !Command.checkError()) {\n Command.sendMessage(gson.toJson(new MessageEnvelope(MessageType.PING, gson.toJson(pingMessage, PingMessage.class)), MessageEnvelope.class));\n Thread.sleep(500);\n }\n } catch (InterruptedException e) {\n view.showError(\"Error ping thread interrupted\");\n }\n });\n }",
"private MockarooPingHelper(){}",
"protected IcmpMessageWithDatagram(IcmpMessage msg) {\n\t\tsuper(msg);\n\t}",
"public ServerMessage(String message, String status) {\n this.message = message;\n this.status = status;\n }",
"public MessageInfo() { }",
"public Message() {\n }",
"public Message() {\n }",
"public void ping() {\n\t\tHeader.Builder hb = Header.newBuilder();\n\t\thb.setNodeId(999);\n\t\thb.setTime(System.currentTimeMillis());\n\t\thb.setDestination(-1);\n\n\t\tCommandMessage.Builder rb = CommandMessage.newBuilder();\n\t\trb.setHeader(hb);\n\t\trb.setPing(true);\n\n\t\ttry {\n\t\t\t// direct no queue\n\t\t\t// CommConnection.getInstance().write(rb.build());\n\n\t\t\t// using queue\n\t\t\tCommConnection.getInstance().enqueue(rb.build());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public Packet(PacketId packetId, String message)\n {\n this.packetId = packetId;\n this.message = message;\n\n }",
"private ParkingAddress(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public Message(){}",
"public String toString() {\n return \"(PingContent: \" + pingReqUID + \", \" + timeout + \")\";\n }",
"public static void ping() {}",
"public static void ping() {}",
"public static String createAliveMessage(){\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(\"NOTIFY * HTTP/1.1\").append(\"\\n\");\n\t\tsb.append(\"HOST: 239.255.255.250:1900\").append(\"\\n\");\n\t\tsb.append(\"NT: urn:schemas-upnp-org:service:ContentDirectory:1\").append(\"\\n\");\n\t\tsb.append(\"NTS: ssdp:alive\").append(\"\\n\");\n\t\tsb.append(\"LOCATION: http://142.225.35.55:5001/description/fetch\").append(\"\\n\");\n\t\tsb.append(\"USN: uuid:9dcf6222-fc4b-33eb-bf49-e54643b4f416::urn:schemas-upnp-org:service:ContentDirectory:1\").append(\"\\n\");\n\t\tsb.append(\"CACHE-CONTROL: max-age=1800\").append(\"\\n\");\n\t\tsb.append(\"SERVER: Windows_XP-x86-5.1, UPnP/1.0, PMS/1.11\").append(\"\\n\");\n\t\t\n\t\t\n\t\treturn sb.toString();\n\t}",
"public ServiceMessage() {\r\n\t}",
"private PushParkingRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private MsgInstantiateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public void createPingOptions(PingOptions options) {\n\t}",
"private ProtocolMessage(Builder builder) {\n super(builder);\n }",
"public Message() {\n\t\tsuper();\n\t}",
"public Message(long msg) {\n m_msg = msg;\n m_type = getType(msg);\n parseMessage();\n }",
"private Message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public interface PingProto$GroupMemberMetadataOrBuilder extends MessageLiteOrBuilder {\n long getBolt();\n\n Timestamp getLastBoltAt();\n\n Timestamp getMuteUntil();\n\n boolean getMuteUntilComeBack();\n\n String getNickname();\n\n ByteString getNicknameBytes();\n\n boolean hasLastBoltAt();\n\n boolean hasMuteUntil();\n}",
"messages.Statusmessage.StatusMessageOrBuilder getStatusOrBuilder();",
"public String getPingQuery()\n {\n return _pingQuery;\n }",
"private StatusMessage() {\n\n\t}",
"private StatusMessage() {\n\n\t}",
"public void\n ping() {\n }",
"private Message(Builder builder) {\n super(builder);\n }",
"private CircleLikeMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public PingWebSocketFrame(ByteBuf binaryData) {\n/* 40 */ super(binaryData);\n/* */ }",
"public ServerMessage(String message) {\n this.message = message;\n }",
"private CircleNewPublishNoticeMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public CallMessage() {\n\t}",
"private Request(com.google.protobuf.GeneratedMessage.ExtendableBuilder<Pokemon.Request, ?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"private void replyToPeerPing(final ByteString payload) {\n Runnable replierPong = new NamedRunnable(\"OkHttp %s WebSocket Pong Reply\", name) {\n @Override protected void execute() {\n try {\n writer.writePong(payload);\n } catch (IOException t) {\n Platform.get().log(Platform.INFO, \"Unable to send pong reply in response to peer ping.\", t);\n }\n }\n };\n synchronized (replier) {\n if (!isShutdown) {\n replier.execute(replierPong);\n }\n }\n }",
"public DemoMessage(String message) {\n\t\tthis.message = message;\n\t}",
"public ProtocolWorker(String message){\n this.message = message;\n }",
"org.graylog.plugins.dnstap.protos.DnstapOuterClass.MessageOrBuilder getMessageOrBuilder();",
"public abstract void ping(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done);",
"private PBHeuristicRequestMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public Message(){\n\t\ttimeStamp = System.currentTimeMillis();\n\t}",
"public ModelApiResponse ping() throws AuthenticationApiException {\n try {\n return authenticationApi.ping();\n } catch (ApiException e) {\n throw new AuthenticationApiException(\"Error during keep alive ping\", e);\n }\n }",
"private RpcMessage(Builder builder) {\n super(builder);\n }",
"public LBCUtils(BTCMessage btcMessage){\n this.ACCESS_KEY = btcMessage.getACCESS_KEY();\n this.SECRET_KEY = btcMessage.getSECRET_KEY();\n this.IP = btcMessage.getIP();\n this.PORT = btcMessage.getPORT();\n this.PASSWORD = btcMessage.getPASSWORD();\n }",
"public Builder setMessage(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setPingerLoc(org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Pinger value) {\n if (pingerLocBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n pingerLoc_ = value;\n onChanged();\n } else {\n pingerLocBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000200;\n return this;\n }",
"private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Payload(com.google.protobuf.GeneratedMessage.ExtendableBuilder<Pokemon.Payload, ?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public ByteBuffer Pack(Message message) {\n ByteBuffer byteBuffer = ByteBuffer.allocate(message.GetMessageLen()+1);\n byteBuffer.put((byte) message.GetMessageLen());\n byteBuffer.put((byte) (message.getDataLen()>>8));\n byteBuffer.put((byte) message.getDataLen());\n byteBuffer.put((byte) message.getFromId());\n byteBuffer.put((byte) message.getToId());\n byteBuffer.put((byte) message.getMsgType().ordinal());\n byteBuffer.put(message.getData());\n return byteBuffer;\n }",
"private native String simplePing(int sessionId, String name, String pingStr);"
]
| [
"0.6270375",
"0.5899079",
"0.5412903",
"0.5341719",
"0.53363615",
"0.53316694",
"0.53250223",
"0.5285512",
"0.52688766",
"0.5265946",
"0.52636087",
"0.5255573",
"0.5249606",
"0.5216293",
"0.5210007",
"0.5207296",
"0.51875275",
"0.5175081",
"0.5166196",
"0.5143696",
"0.51362634",
"0.5077714",
"0.5070135",
"0.5070135",
"0.5067314",
"0.5045722",
"0.50448066",
"0.49930125",
"0.49759883",
"0.49703968",
"0.4957797",
"0.49301678",
"0.49291527",
"0.49233836",
"0.49183765",
"0.49028134",
"0.4900832",
"0.48922604",
"0.48919684",
"0.487915",
"0.48751828",
"0.4873068",
"0.4873068",
"0.48622373",
"0.48538032",
"0.48377264",
"0.4808908",
"0.47909412",
"0.47878727",
"0.47878727",
"0.47755075",
"0.4761458",
"0.4743743",
"0.47414738",
"0.473585",
"0.47318238",
"0.4728852",
"0.47286925",
"0.4723479",
"0.47217637",
"0.47181627",
"0.47162074",
"0.4708577",
"0.4708577",
"0.4696103",
"0.46731836",
"0.46447048",
"0.46387947",
"0.4637454",
"0.4636554",
"0.46277055",
"0.46193895",
"0.4607409",
"0.4607409",
"0.4607409",
"0.4607409",
"0.4607409",
"0.4607409",
"0.4607409",
"0.4607409",
"0.4607409",
"0.46051076",
"0.46036753",
"0.45983613",
"0.45878494",
"0.45677203",
"0.45652378",
"0.45649052",
"0.4557733",
"0.45519283",
"0.4547647",
"0.45407546",
"0.45311603",
"0.4522093",
"0.4522093",
"0.4522093",
"0.4522093",
"0.45151493",
"0.4512567",
"0.45123082"
]
| 0.7858533 | 0 |
Use CommonMsgPB.newBuilder() to construct. | private CommonMsgPB(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Builder setMsgBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000020;\n msg_ = value;\n onChanged();\n return this;\n }",
"public Builder setMsg(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n msg_ = value;\n onChanged();\n return this;\n }",
"private SendMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private MsgInstantiateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"public Builder setInitMsg(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n initMsg_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n message_ = value;\n onChanged();\n return this;\n }",
"private RpcMessage(Builder builder) {\n super(builder);\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n message_ = value;\n onChanged();\n return this;\n }",
"public Builder setMessageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n message_ = value;\n onChanged();\n return this;\n }",
"private MsgNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private KafkaMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private Messages(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private ReceiveMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private BaseMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public Builder setMessage(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n message_ = value;\n onChanged();\n return this;\n }",
"private TransmissionMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private MsgFields(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\r\n super(builder);\r\n this.unknownFields = builder.getUnknownFields();\r\n }",
"private KafkaLoggingMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private void constructHeartbeatMessage() {\n // build head\n MessageProtobuf.Head.Builder headBuilder = MessageProtobuf.Head.newBuilder();\n headBuilder.setMsgId(UUID.randomUUID().toString());\n headBuilder.setMsgType(MsgConstant.MsgType.HEARTBEAT_MESSAGE);\n headBuilder.setTimeStamp(System.currentTimeMillis());\n\n // build message\n MessageProtobuf.Msg.Builder builder = MessageProtobuf.Msg.newBuilder();\n builder.setHead(headBuilder.build());\n\n defaultHeartbeatMessage = builder.build();\n }",
"private DAPMessage constructFrom(DatabaseTableRecord record) {\n return DAPMessage.fromXML(record.getStringValue(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_DATA_COLUMN_NAME));\n }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n/* 145 */ return new SimpleMessage(message);\n/* */ }",
"private Message(Builder builder) {\n super(builder);\n }",
"private ProtocolMessage(Builder builder) {\n super(builder);\n }",
"private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private MessageNotification(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Message newMessage(String message, Object... params) {\n/* 61 */ return new SimpleMessage(message);\n/* */ }",
"com.google.protobuf.ByteString getInitMsg();",
"private ProcessMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private MsgMigrateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private chat_message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"com.google.protobuf.ByteString getMsg();",
"private MessageRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) {\n/* 136 */ return new SimpleMessage(message);\n/* */ }",
"private BeeMessage(Builder builder) {\n super(builder);\n }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) {\n/* 127 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3) {\n/* 93 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n/* 101 */ return new SimpleMessage(message);\n/* */ }",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"private QueQiaoInviteMsg(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private MessageSendMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private CommonAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder setMsgData(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n msgData_ = value;\n onChanged();\n return this;\n }",
"public Message newMessage(String message, Object p0, Object p1, Object p2) {\n/* 85 */ return new SimpleMessage(message);\n/* */ }",
"private MsgSummon(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private PassageRecord(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private VerifyNotifyC(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder setMsgTextBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n msgText_ = value;\n onChanged();\n return this;\n }",
"public Message newMessage(String message, Object p0, Object p1) {\n/* 77 */ return new SimpleMessage(message);\n/* */ }",
"private PBHeuristicRequestMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private MessagesResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"private CSTeamCreate(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) {\n/* 109 */ return new SimpleMessage(message);\n/* */ }",
"private MessageResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private ChatProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"messages.Clienthello.ClientHelloOrBuilder getClientHelloOrBuilder();",
"private PingMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private MessageWithLotsOfFields(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private HeartBeatProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"com.google.protobuf.ByteString\n getMsgBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"com.google.protobuf.ByteString\n getMessageBytes();",
"private PlayerBagMsg(Builder builder) {\n super(builder);\n }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) {\n/* 118 */ return new SimpleMessage(message);\n/* */ }",
"private CombatProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private MsgInstantiateContractResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private OneMessage(Builder builder) {\n super(builder);\n }",
"private QueQiaoInviteBoardMsg(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private MessageText(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }"
]
| [
"0.6558248",
"0.6547967",
"0.63615745",
"0.63019764",
"0.62816995",
"0.6273351",
"0.6227149",
"0.6227149",
"0.6224937",
"0.6224937",
"0.6224937",
"0.6224937",
"0.62119246",
"0.620833",
"0.620833",
"0.620833",
"0.620833",
"0.6199329",
"0.6199329",
"0.6199329",
"0.6198215",
"0.6189916",
"0.61633736",
"0.61267763",
"0.6078133",
"0.6074087",
"0.6074087",
"0.6074087",
"0.6074087",
"0.60331774",
"0.6024535",
"0.6013783",
"0.6002137",
"0.59911555",
"0.5988723",
"0.5977603",
"0.59555566",
"0.59498966",
"0.5944305",
"0.5920756",
"0.5908041",
"0.59068346",
"0.5897028",
"0.5895845",
"0.58798295",
"0.58582044",
"0.58512026",
"0.58498996",
"0.5842194",
"0.5822391",
"0.5810723",
"0.5798426",
"0.5793872",
"0.57704514",
"0.57704514",
"0.57704514",
"0.57704514",
"0.57704514",
"0.57704514",
"0.57704514",
"0.57704514",
"0.57704514",
"0.57639706",
"0.57632095",
"0.575219",
"0.5737788",
"0.5732752",
"0.57294476",
"0.57186013",
"0.57162905",
"0.57135624",
"0.5712933",
"0.5711984",
"0.5709814",
"0.57011944",
"0.56746036",
"0.5670063",
"0.5668983",
"0.5660897",
"0.56594527",
"0.5657847",
"0.5654943",
"0.5642825",
"0.5624892",
"0.5624892",
"0.5624892",
"0.5624892",
"0.5624892",
"0.5624892",
"0.5624892",
"0.5624892",
"0.5624892",
"0.5624892",
"0.5612182",
"0.5608313",
"0.5603467",
"0.5593455",
"0.5589876",
"0.55798703",
"0.557161"
]
| 0.7907181 | 0 |
Affiche une boite dialogue pour confirmer l'appel au serveur | public void callWaiter(View v){
new AlertDialog.Builder(this).setMessage("Appeler un serveur ?").setPositiveButton("Oui", null).setNegativeButton("Non",null).show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void msgNoServidorConfigurado() {\r\n\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\tbuilder.setMessage(R.string.txtSinServidor).setCancelable(false)\r\n\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\r\n\t\t public void onClick(DialogInterface dialog, int id) {\r\n\t\t\tListaRutasActivity.this.finish();\r\n\t\t }\r\n\t\t});\r\n\tAlertDialog alert = builder.create();\r\n\talert.show();\r\n }",
"@Override\n\tpublic void dialogar() {\n\t\tSystem.out.println(\"Ofrece un Discurso \");\n\t\t\n\t}",
"private void gaVerder()\n {\n /**\n * Dialog tonen waarbij de gebruiker de keuze krijgt om al dan niet nog een spelbord te maken.\n */\n Alert keuze = new Alert(Alert.AlertType.CONFIRMATION);\n keuze.setTitle(ResourceHandling.getInstance().getString(\"Configureer.gaverder\"));\n keuze.setHeaderText(ResourceHandling.getInstance().getString(\"Knop.verder\"));\n\n ButtonType btnNieuw = new ButtonType(ResourceHandling.getInstance().getString(\"Spelbord.nieuw\"));\n ButtonType btnCancel = new ButtonType(ResourceHandling.getInstance().getString(\"Annuleer.knop\"));\n\n keuze.getButtonTypes().setAll(btnCancel, btnNieuw);\n Optional<ButtonType> result = keuze.showAndWait();\n\n if (result.get() == btnNieuw)\n {\n LoaderSchermen.getInstance().load(\"Sokoban\", new GaVerderSchermController(dc), 488, 213, this);\n } else\n {\n LoaderSchermen.getInstance().load(\"Sokoban\", new KiesConfigureerSchermController(dc), 300, 300, this);\n }\n }",
"public void verifierSaisie(){\n boolean ok = true;\n\n // On regarde si le client a ecrit quelque chose\n if(saisieMessage.getText().trim().equals(\"\"))\n ok = false;\n\n if(ok)\n btn.setEnabled(true); //activer le bouton\n else\n btn.setEnabled(false); //griser le bouton\n }",
"public void showUnsolvableMessage() {\n\t\tJOptionPane.showMessageDialog(frame, \"Det angivna sudokut är olösbart\");\n\t}",
"private void mIesireActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mIesireActionPerformed\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa parasiti aplicatia?\", \"Confirmare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }",
"private void confirmarGuardarEmpleado() {\n String pregunta = \"Esto seguro de realizar guardar la categoria?\";\n new AlertDialog.Builder(this)\n .setTitle(getResources().getString(R.string.msj_confirmacion))\n .setMessage(pregunta)\n .setNegativeButton(android.R.string.cancel, null)//sin listener\n .setPositiveButton(getResources().getString(R.string.lbl_aceptar),\n new DialogInterface.OnClickListener() {//un listener que al pulsar, solicite el WS de Transsaccion\n @Override\n public void onClick(DialogInterface dialog, int which){\n guardarEmpleado();\n }\n })\n .show();\n }",
"@Override\r\n\tpublic void showErrReq() {\n\t\tdialog.cancel();\r\n\t\tshowNetView(true);\r\n\t}",
"private void showLoserDialog() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"You Have Been Defeated \" + player1.getName() + \",Computer Wins!!\", new ButtonType(\"Close\", ButtonBar.ButtonData.NO), new ButtonType(\"Try Again?\", ButtonBar.ButtonData.YES));\n alert.setGraphic(new ImageView(new Image(this.getClass().getResourceAsStream(\"/Images/bronze.png\"))));\n alert.setHeaderText(null);\n alert.setTitle(\"Computer Wins\");\n alert.showAndWait();\n if (alert.getResult().getButtonData() == ButtonBar.ButtonData.YES) {\n onReset();\n }\n }",
"private void alertDialoge() {\n builder.setMessage(R.string.dialoge_desc).setTitle(R.string.we_request_again);\n\n builder.setCancelable(false)\n .setPositiveButton(R.string.give_permissions, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n requestPermission();\n }\n })\n .setNegativeButton(R.string.dont_ask_again, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'Don't Ask Again' Button\n // the sharedpreferences value is true\n editor.putBoolean(getResources().getString(R.string.dont_ask_again), true);\n editor.commit();\n dialog.cancel();\n }\n });\n //Creating dialog box\n AlertDialog alert = builder.create();\n alert.show();\n }",
"public void confirmacionVolverMenu(){\n AlertDialog.Builder builder = new AlertDialog.Builder(Postre.this);\n builder.setCancelable(false);\n builder.setMessage(\"¿Desea salir?\")\n .setPositiveButton(\"Aceptar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\tIntent intent = new Intent(Postre.this, HomeAdmin.class);\n\t\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_FORWARD_RESULT);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\toverridePendingTransition(R.anim.left_in, R.anim.left_out);\t\n }\n })\n .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n \n builder.show();\n }",
"public void msgErreur(){\n \n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Entrée invalide\");\n alert.setHeaderText(\"Corriger les entrées invalides.\");\n alert.setContentText(\"Les informations entrées sont erronnées\");\n\n alert.showAndWait();\n \n\n}",
"private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}",
"public void ClickCerrarSesion() {\n // Se redirige a la actividad de Editat Perfil\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Cerrar Sesion\");\n builder.setMessage(\"¿Estas seguro que quieres cerrar sesión?, Esto te devolvera a la pantalla de inicio\");\n // Boton para cerrar sesion\n builder.setPositiveButton(\"Cerrar Sesión\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n builder.setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n builder.show();\n }",
"public void emitirSaludoConGui()\n {\n JOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"<html><p style ='color: red'>Saludo en modo gráfico </p></html>\" + \n\t\t\t\t\t\"\\n\\nBienvenido/a al curso de programación orientada a objetos\\n en Java utilizando BlueJ\",\n\t\t\t\t\t\"Ejemplo de prueba\", JOptionPane.INFORMATION_MESSAGE);\n }",
"DialogResult show();",
"public static void mensagemRealizarCadastro() {\n\t\tJOptionPane.showMessageDialog(null, \"Favor clique em atualizar para re-listar e selecionar o novo item recem cadastrado.\", \"Informação\", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(Toolkit.getDefaultToolkit().getImage(CadastroQuartos.class.getResource(\"/Imagens/Informacao32.png\"))));\n\t}",
"private void confirmarGuardarUsr() {\n String pregunta = \"Esto seguro de realizar el registro?\";\n new AlertDialog.Builder(this)\n .setTitle(getResources().getString(R.string.msj_confirmacion))\n .setMessage(pregunta)\n .setNegativeButton(android.R.string.cancel, null)//sin listener\n .setPositiveButton(getResources().getString(R.string.lbl_aceptar),\n new DialogInterface.OnClickListener() {//un listener que al pulsar, solicite el WS de Transsaccion\n @Override\n public void onClick(DialogInterface dialog, int which){\n guardarUsr();\n }\n })\n .show();\n }",
"public void bienvenida(){\n System.out.println(\"Bienvenid@ a nuestro programa de administracion de parqueos\");\n }",
"private void showDetectedPresence(){\n AlertDialog.Builder box = new AlertDialog.Builder(SecurityActivity.this);\n box.setTitle(\"Attention!\")\n .setMessage(\"Le robot a détecté une présence\");\n\n box.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n presenceDetectee.setValue(false);\n Intent intent = new Intent(SecurityActivity.this, JeuActivity.class);\n intent.putExtra(\"ROBOT\", robotControle);\n startActivity(intent);\n }\n }\n );\n box.show();\n //J'ai un problème de permissions, je la demande mais Android ne la demande pas...\n //Vibrator vib=(Vibrator)getSystemService(Context.VIBRATOR_SERVICE);\n //vib.vibrate(10000);\n }",
"private void showAlertDialog() {\n new AlertDialog.Builder(getActivity())\n .setMessage(R.string.feedback_sharing_data_alert)\n .setCancelable(false)\n .setPositiveButton(R.string.ok, (dialog, which) -> {\n sendFeedback();\n })\n .show();\n }",
"public static void mostrarAdvertencia(JDialog dialogo, String mensaje) {\n JOptionPane.showMessageDialog(dialogo, mensaje, \"BancoSoft: Advertencia\", JOptionPane.WARNING_MESSAGE);\n }",
"public void showLooseMessage() {\n\t\tAlertDialog alert = new AlertDialog.Builder(getContext()).create();\n\t\talert.setCancelable(false);\n\n\t\talert.setMessage(\"You Loose!\");\n\t\talert.setButton(AlertDialog.BUTTON_POSITIVE, \"Replay\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\talert.setButton(AlertDialog.BUTTON_NEGATIVE, \"Exit\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tactivity.finish();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\talert.show();\n\n\t}",
"public void sucessoCadastro(){\n JOptionPane.showMessageDialog(null, \"Cadastro realizado com sucesso!\", null, \n\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\tjanela.dispose();\n }",
"private void confirmacion(String P, String T) {\n int n = JOptionPane.showConfirmDialog(\n null,\n P,\n T,\n JOptionPane.YES_NO_OPTION);\n if (n == JOptionPane.YES_OPTION) {\n N_Cupon ventana = new N_Cupon(conexion);\n ventana.setVisible(true);\n this.setVisible(false);\n //Abrir nueva ventana para insertar Ticket en cupon\n } else {\n this.setVisible(false);\n }\n }",
"private void GeefFoutboodschap(String s) {\n new AlertDialog.Builder(this)\n .setTitle(\"Onbekende kode\")\n .setMessage(\n \"Arduino heeft een onbekende kode \" + s\n + \" opgestuurd. Het programma wordt gestopt \")\n .setPositiveButton(android.R.string.yes,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int which) {\n finish();\n }\n }).show();\n }",
"public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }",
"void confirm();",
"private void showSuccess() {\n if (binder.isValid()){\n Notification notification = Notification.show(\"Your Advert Has Been Updated \");\n notification.addThemeVariants(NotificationVariant.LUMO_SUCCESS);\n UI.getCurrent().getPage().reload();\n }\n }",
"private void errorPopUp() {\n new AlertDialog.Builder(mActivity)\n .setTitle(\"Oops\")\n .setMessage(\"Please choose an emotional state or enter a date and time\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Go back without changing anything\n dialogInterface.dismiss();\n }\n })\n .create()\n .show();\n }",
"private void confirmar(){\n\n cliente = new Cliente();\n\n if (validaCampos() == false){\n\n cliente.idade = Integer.parseInt(edtIdade.getText().toString());\n try {\n\n clienteRepositorio.inserir(cliente);\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n finish();\n dlg.setTitle(\"Sucess\");\n dlg.setMessage(\"Cadastro realizado com sucesso\");\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n\n }catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Error\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }\n }",
"private void showGameOverDialog() {\n this.computerPaquetView.showOnceHiddenCards();\n int dialogResult = JOptionPane.showConfirmDialog (null, String.format(\"%s, you have lost!\\nPlay again?\", this.blackjackController.getHumanPlayer().getName()),\"\", JOptionPane.YES_NO_OPTION);\n if(dialogResult == JOptionPane.YES_OPTION){\n this.blackjackController.getHumanPlayer().resetBudget();\n this.startGame();\n } else {\n this.dispose();\n }\n }",
"public static void zatvoriAplikaciju() {\r\n\t\tint zatvori = JOptionPane.showConfirmDialog(teretanaGui.getContentPane(),\r\n\t\t\t\t\"Da li ste sigurni da zelite da izadjete iz programa?\", \"Izlazak iz programa\",\r\n\t\t\t\tJOptionPane.YES_NO_OPTION);\r\n\t\tif (zatvori == JOptionPane.YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}",
"private void showErrorDialogue() {\n\t\ttry {\n\t\t\tnew AlertDialog.Builder(mContext)\n\t\t\t\t\t.setTitle(\"Something unfortunate happened...\")\n\t\t\t\t\t.setMessage(\"Your device was not able to verify activation. Please check your internet connection and ensure you are using the latest version of the application.\")\n\t\t\t\t\t.setNeutralButton(\"Close\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.show();\n\t\t} catch (Exception e) {\n\t\t\t//not in main activity, not a problem\n\t\t\tLog.w(TAG, e.getMessage());\n\t\t}\n\t}",
"public static void mensegemSucessoCadastro() {\n\t\tJOptionPane.showMessageDialog(null, \"Sucesso ao cadastrar.\", \"Sucesso\", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(Toolkit.getDefaultToolkit().getImage(CadastroQuartos.class.getResource(\"/Imagens/Sucesso32.png\"))));\n\t}",
"private void okEvent() {\n\t\tYAETMMainView.PRIVILEGE = (String)loginBox.getSelectedItem();\n\t\tshowMain();\n\t\tcloseDialog();\n\t}",
"public void alertAlreadySolved() {\n\t\tthis.alert(\"ERROR\",\"Game already solved\",AlertType.WARNING);\n\t}",
"public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }",
"public void alertInvalid(){\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.setTitle(\"Herencia invalida\");\n alert.setHeaderText(\"Un hijo no puede ser hijo de su padre o un padre no puede ser padre de su padre,\"\n + \"No puede crear herencia con entidades debiles.\");\n alert.showAndWait();\n }",
"private void showAlert() {\n AlertDialog.Builder alert = new AlertDialog.Builder(this);\n alert.setMessage(\"Error al autenticar usuario\");\n alert.setPositiveButton(\"Aceptar\", null);\n AlertDialog pop = alert.create();\n alert.show();\n }",
"private void success() {\n showMessage(\"Congratulations!\", \"success\");\n }",
"private void notConnectedDialog() {\n final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(mContext);\n alertDialogBuilder.setTitle(mContext.getResources().getString(R.string.not_connected_title));\n alertDialogBuilder.setCancelable(false);\n alertDialogBuilder.setMessage(mContext.getResources().getString(R.string.not_connected_message));\n\n alertDialogBuilder.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface arg0, int arg1) {\n alertDialog.dismiss();\n finish();\n }\n });\n\n alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n\n }",
"public void onClick(DialogInterface arg0, int arg1) {\n\t \t //Declare Object From Get Internet Connection Status For Check Internet Status\n\t \t System.exit(0);\n\t \t\t\t arg0.dismiss();\n\t \t\t\t \n\t }",
"private void dialogshow(String title, String msg) {\n\n AlertDialog.Builder builder =\n new AlertDialog.Builder(this, R.style.AppCompatAlertDialogStyle);\n builder.setTitle(title);\n builder.setMessage(msg);\n builder.setCancelable(false);\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (acc1.equals(\"no\")) {\n// sendacktorider();\n Intent fare = new Intent(SlideMainActivity.this, SlideMainActivity.class);\n fare.putExtra(\"userid\", User_id);\n fare.putExtra(\"fbuserproimg\", fbuserproimg);\n fare.putExtra(\"whologin\", WhoLogin);\n fare.putExtra(\"password\", checkpassword);\n startActivity(fare);\n finish();\n }\n dialog.cancel();\n }\n });\n\n builder.show();\n\n }",
"public void quitter() throws HeadlessException {\n //Permet l'arret du programme\n int reponse = JOptionPane.showConfirmDialog(null, \"Voulez-vous vraiment quitter?\",\n \"Quitter\", JOptionPane.YES_NO_OPTION);\n if (reponse == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }",
"public void exibeMensagem(String mensagem) {\n JOptionPane.showMessageDialog(null, mensagem);\n }",
"private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}",
"public void handleForgotPassword() {\n\t\tAlert alert = new Alert(AlertType.WARNING);\n\t\talert.initOwner(mainApp.getPrimaryStage());\n\t\talert.setTitle(\"Under building\");\n\t\talert.setHeaderText(\"Under construction.\");\n\t\talert.setContentText(\"At the moment you can not get your password. Thanks for being patient.\");\n\t\talert.showAndWait();\n\t}",
"private void submitForm() {\n final Dialog dialog = new Dialog(context);\n\t\t dialog.setContentView(R.layout.dialogbox);\n\t\t dialog.setTitle(\"Sucess!\");\n\t\t dialog.setCancelable(false);\n\t dialog.setCanceledOnTouchOutside(false);\n\t\t TextView txt = (TextView) dialog.findViewById(R.id.errorlog);\n\t\t txt.setText(\"Registration Successfull.\");\n\t\t Button dialogButton = (Button) dialog.findViewById(R.id.release);\n\t\t dialogButton.setOnClickListener(new OnClickListener() {\n\t\t\t public void onClick(View vd) {\n\t\t\t\t change.setEnabled(true);\n\t\t\t\t dialog.dismiss();\n\t\t\n\t\t}\n\t\t});\n\t\t dialog.show();\n}",
"@Override\n\tpublic boolean performOk() {\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\t// Set the values from the fields\n\t\tpreferenceStore.setValue(DEFAULT_PASSWORD_LENGTH, spiLength.getSelection());\n\t\tpreferenceStore.setValue(USE_LOWERCASE_LETTERS, btnUseLowercase.getSelection());\n\t\tpreferenceStore.setValue(USE_UPPERCASE_LETTERS, btnUserUppercase.getSelection());\n\t\tpreferenceStore.setValue(USE_DIGITS, btnUseDigits.getSelection());\n\t\tpreferenceStore.setValue(USE_SYMBOLS, btnUseSymbols.getSelection());\n\t\tpreferenceStore.setValue(USE_EASY_TO_READ, btnUseEaseToRead.getSelection());\n\t\tpreferenceStore.setValue(USE_HEX_ONLY, btnUseHexOnly.getSelection());\n\n\t\t// Return true to allow dialog to close\n\t\treturn true;\n\t}",
"private void Ignorado() {\n Dialogo(R.string.ignorada);\n }",
"private void showDialog() {\n try {\n pDialog.setMessage(getString(R.string.please_wait));\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.setCanceledOnTouchOutside(false);\n pDialog.show();\n } catch (Exception e) {\n // TODO: handle exception\n }\n\n }",
"private void tampilPesan(String message) {\n JOptionPane.showMessageDialog(this, message);\n }",
"@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message!\", Toast.LENGTH_SHORT).show();\n\n }",
"public boolean pregunta(){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea escribir otra palabra?\", \"¿Escribir?\", JOptionPane.YES_NO_OPTION);\n if (d == 0) {\n return true;\n }else if (d == 1) {\n return false;\n }\n return false;\n }",
"private void showDialog(String broad_message) {\n\t\tif (!ThermActivity.this.isFinishing()) {\n\t\t\tAlertDialog.Builder builder = new Builder(ThermActivity.this);\n\t\t\tbuilder.setTitle(getResources().getString(R.string.offline_notification)).setMessage(broad_message);\n\t\t\tbuilder.setPositiveButton(getResources().getString(R.string.confirm),\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tsendDataBle.sendData(\"0045\", macAddress);// 断开特定设备连接\n\t\t\t\t\t\t\tEMClient.getInstance().logout(true);\n\t\t\t\t\t\t\tAC.accountMgr().logout();\n\t\t\t\t\t\t\tLog.e(TAG, \"退出登录\");\n\t\t\t\t\t\t\tLong userid = PreferencesUtils.getLong(ThermActivity.this, \"userId\");\n\t\t\t\t\t\t\tPushAgent mPushAgent = MainApplication.push();\n\t\t\t\t\t\t\t//userId为用户ID,通过AbleCloud登录接口返回的ACUserInfo可以获取到userId;第二个参数写死ablecloud即可。\n\t\t\t\t\t\t\tmPushAgent.removeAlias(String.valueOf(userid), \"ablecloud\", new UTrack.ICallBack(){\n\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t public void onMessage(boolean isSuccess, String message) {\n\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\tdialog.dismiss();\n\t\t\t\t\t\t\tThermActivity.this.finish();\n\t\t\t\t\t\t\tIntent intent = new Intent(ThermActivity.this,\n\t\t\t\t\t\t\t\t\tLoginActivity.class);\n\t\t\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK\n\t\t\t\t\t\t\t\t\t| Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\tAlertDialog alert = builder.create();\n\t\t\talert.setCanceledOnTouchOutside(false);//dialog点击空白不消失\n\t\t\talert.setCancelable(false);//dialog点击返回键不消失\n\t\t\talert.show();\n\t\t}\n\t}",
"private void openExitWindowConfirmation() {\n\t\t// int opcion = JOptionPane.showConfirmDialog(this, \"Desea salir del\n\t\t// Chat\", \"Confirmación\",\n\t\t// JOptionPane.YES_NO_OPTION);\n\t\t// if (opcion == JOptionPane.YES_OPTION) {\n\t\tthis.setVisible(false);\n\t\t// }\n\t}",
"public static void mostrarAdvertenciaDeActualizacion(JDialog dialogo) {\n JOptionPane.showMessageDialog(dialogo, advertenciaDeActualizacion, \"BancoSoft: Advertencia\", JOptionPane.WARNING_MESSAGE);\n }",
"@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}",
"@Override\n public void displayMessage(int status, String msg) {\n if (status == Constants.STATUS_OK) {\n dispose();\n } else {\n JOptionPane.showMessageDialog(null, msg, \"Lỗi\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"@Override\n public void displayMessage(int status, String msg) {\n if (status == Constants.STATUS_OK) {\n dispose();\n } else {\n JOptionPane.showMessageDialog(null, msg, \"Lỗi\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"protected void showAlertbox() {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"위치서비스 비활성화\");\n builder.setMessage(\"현위치를 탐색하기 위해서 위치서비스가 필요합니다. 위치 설정을 켜시고 다시 현위치를 탐색해주세요.\");\n builder.setCancelable(true);\n builder.setPositiveButton(\"설정\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));\n }\n });\n builder.setNegativeButton(\"취소\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n builder.create().show();\n }",
"@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tConfirmDialog.show(UI.getCurrent(), MESSAGE_1,\"\",\"Aceptar\",\"Crear mas Usuarios\",\n\t\t\t\t new ConfirmDialog.Listener() {\n\n\t\t\t\t public void onClose(ConfirmDialog dialog) {\t\n\t\t\t\t \tent= false;\n\t\t\t\t if (dialog.isConfirmed()) {\n\t\t\t\t // Confirmed to continue\t\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t } else {\n\t\t\t\t // User did not confirm\t\t\t \n\t\t\t\t \t//c.crearWindow(RegistrarUser.VIEW_NAME);\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t//Notification nota= new Notification(\"Registro Exitoso!\",Notification.Type.HUMANIZED_MESSAGE);\n\t\t\t\t//nota.setDelayMsec(-1);\n\t\t\t\t//nota.show(Page.getCurrent());\t\n\t\t\t\t\n\t\t\t\tclose();\t\t\t\n\t\t\t}",
"public void showWinMessage(String info) {\n\t\tAlert al = new Alert(AlertType.WARNING);\n\t\tal.setTitle(\"Se termino el juego\");\n\t\tal.setHeaderText(\"Ganaste\");\n\t\tal.setContentText(info);\n\t\tal.showAndWait();\n\t}",
"protected void validateAction() {\r\n\t\tthis.lblLoading.setVisible(true);\r\n\t\tThread longThread = new Thread(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tMajFicheClientCarteFidelite.this.newsletter = MajFicheClientCarteFidelite.this.valeurCaseNewsletter;\r\n\t\t\t\tif (checkfields()) {\r\n\t\t\t\t\tconfirmation();\r\n\t\t\t\t} else {\r\n\t\t\t\t\talerte();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tlongThread.start();\r\n\t}",
"private void mostrarMensagemDeErro(String informacao) {\n\t\tJOptionPane.showMessageDialog(null, informacao, \"Aten��o\",\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t}",
"private void showAlert(String message) {\n\n if (message.equals(\"Uploaded Successfully...\")) {\n // this.dismiss();\n commmunicator.onDialogMessage(new MessageDetails());\n this.dismiss();\n\n } else {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(form.getContext());\n builder.setMessage(message).setTitle(\"Response from Servers\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // do nothing\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n }",
"public void enviarAlertaDeQueEstaOnline(){\n //mandaria un mail a los usuarios avisando que ya esta disponible para ver.\n System.out.println(\"Enviando mail con url \" + this.url);\n }",
"public void actionPerformed(ActionEvent e) {\n int reply = JOptionPane.showConfirmDialog(null, \"Esta operación cerrará todos los procesos del sistema de mensajería\\n\"\n + \" ¿Está seguro que desea salir?\\n\", \"Salir\", JOptionPane.YES_NO_OPTION);\n if (reply == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n\n }",
"public String confirm()\n\t{\n\t\tconfirm = true;\n\t\treturn su();\n\t}",
"private void enviarRequisicaoPalpite() {\n if (servidor.verificarPalpitar(nomeJogador)) {\n String palpite = NomeDialogo.nomeDialogo(null, \"Informe o seu palpite\", \"Digite o seu palpite:\", false);\n if (palpite != null && !servidor.palpitar(nomeJogador, Integer.parseInt(palpite))) {\n JanelaAlerta.janelaAlerta(null, \"Este palpite já foi dado!\", null);\n }\n }\n }",
"private void showUnsavedChangesDialog() {\n // Create an AlertDialog.Builder and set the message and click listeners for the positive\n // and negative buttons.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.you_have_unsaved_messages_dialog);\n\n // Leave the page if user clicks \"Leave\"\n builder.setPositiveButton(R.string.leave, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n\n // Stay on the page if user clicks \"Stay\"\n builder.setNegativeButton(R.string.stay, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"public void showLoseMessage(String info) {\n\t\tAlert al = new Alert(AlertType.WARNING);\n\t\tal.setTitle(\"Se termino el juego\");\n\t\tal.setHeaderText(\"Perdiste\");\n\t\tal.setContentText(info);\n\t\tal.showAndWait();\n\t}",
"public static void mostrarAdvertenciaDeCreacion(JDialog dialogo) {\n JOptionPane.showMessageDialog(dialogo, advertenciaDeCreacion, \"BancoSoft: Advertencia\", JOptionPane.WARNING_MESSAGE);\n }",
"public void verValidarCandidato()\r\n\t{\r\n\t\tcandidato = new ValidarCandidato(this);\r\n\t\tcandidato.setVisible(true);\r\n\t}",
"@Override\n public void messagePrompt(String message) {\n JOptionPane.showMessageDialog(lobbyWindowFrame,message+\" is choosing the gods\");\n }",
"public void serverSideOk();",
"public void showAlert(String cadena, Context ctx){\n AlertDialog.Builder alertbox = new AlertDialog.Builder(ctx);\n //seleccionamos la cadena a mostrar\n alertbox.setMessage(cadena);\n alertbox.show();\n\n }",
"protected void aboutUs(ActionEvent ae) {\n\t\tString info =\"欢迎您使用该系统!!!\\n\";\n\t\tinfo +=\"愿为您提供最好的服务!\\n\";\n\t\tinfo +=\"最好的防脱发洗发水!!!\";\n\t\t//JOptionPane.showMessageDialog(this,info);\n\t\tString[] buttons = {\"迫不及待去看看!\",\"心情不好以后再说!\"};\n\t\tint ret=JOptionPane.showOptionDialog(this, info,\"关于我们\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.DEFAULT_OPTION, new ImageIcon(LoginFrm.class.getResource(\"/images/logo.png\")), buttons, null);\n\t\tif(ret==0) \n\t\t{\n\t\t\ttry {\n\t\t\t\tURI uri = new URI(\"https://s.taobao.com/search?q=%E9%98%B2%E8%84%B1%E5%8F%91%E6%B4%97%E5%8F%91%E6%B0%B4&imgfile=&commend=all&ssid=s5-e&search_type=item&sourceId=tb.index&spm=a21bo.2017.201856-taobao-item.1&ie=utf8&initiative_id=tbindexz_20170306\");\n\t\t\t\tDesktop.getDesktop().browse(uri);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(this, \"你真是狠心,坏淫!\");\n\t\t}\n\t}",
"private void showInputDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"App info\");\n builder.setMessage(message);\n builder.setPositiveButton(\" Done \", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n builder.show();\n }",
"private void successDialog() {\n AlertDialog dialog = _dialogFactory.createDialog(this, R.string.completed, R.string.success);\n\n dialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.ok), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n gotoGameEnd(IGameConstants.GAME_SUCCESS);\n }\n });\n\n dialog.setCancelable(false);\n _dialogActive = true;\n dialog.show();\n }",
"private void showAlert(String status, String msg){\n android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(HostelRequestActivity.this)\n .setTitle(status)\n .setMessage(msg);\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n onBackPressed();\n }\n\n });\n //call api for insertion\n builder.setCancelable(false);\n android.app.AlertDialog alert = builder.create();\n alert.show();\n }",
"@Override\r\n public void windowClosing(WindowEvent e) {\n if (isSendFile || isReceiveFile) {\r\n JOptionPane.showMessageDialog(contentPane,\r\n \"���ڴ����ļ��У��������뿪...\",\r\n \"Error Message\", JOptionPane.ERROR_MESSAGE);\r\n } else {\r\n int result = JOptionPane.showConfirmDialog(getContentPane(),\r\n \"��ȷ��Ҫ�뿪������\");\r\n if (result == 0) {\r\n CatBean clientBean = new CatBean();\r\n clientBean.setType(-1);\r\n clientBean.setName(name);\r\n clientBean.setTimer(CatUtil.getTimer());\r\n sendMessage(clientBean);\r\n }\r\n }\r\n }",
"private void promptInternetConnect() {\n android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(AdminHomePage.this);\n builder.setTitle(R.string.title_alert_no_intenet);\n builder.setMessage(R.string.msg_alert_no_internet);\n String positiveText = getString(R.string.btn_label_refresh);\n builder.setPositiveButton(positiveText,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n //Block the Application Execution until user grants the permissions\n if (startStep2(dialog)) {\n //Now make sure about location permission.\n if (checkPermissions()) {\n //Step 2: Start the Location Monitor Service\n //Everything is there to start the service.\n startStep3();\n } else if (!checkPermissions()) {\n requestPermissions();\n }\n }\n }\n });\n android.support.v7.app.AlertDialog dialog = builder.create();\n dialog.show();\n }",
"private void validarResp(){\n String respIngresada = txtRespuesta.getText().toString();\n\n if(respIngresada.equals(respuesta)){\n //Habilita el prox paso\n viewFlipper.showNext();\n pasoFlipper = 1;\n } else {\n txtRespuesta.setError(getString(R.string.error_resp_incorrecta));\n txtRespuesta.requestFocus();\n }\n }",
"private boolean showConfirmationMessage(String title, String body)\r\n {\r\n MyLogger.log(Level.INFO, \"Info message initiated. Info Title: {0}\", title);\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n alert.initOwner(currentStage);\r\n alert.setTitle(title);\r\n alert.setHeaderText(null);\r\n alert.setContentText(body);\r\n ButtonType buttonTypeCancel = new ButtonType(\"Cancel\", ButtonData.CANCEL_CLOSE);\r\n ButtonType buttonTypeOK = new ButtonType(\"OK\", ButtonData.OK_DONE);\r\n alert.getButtonTypes().setAll(buttonTypeCancel, buttonTypeOK);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == buttonTypeOK)\r\n {\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"User confirmed coin action\");\r\n return true;\r\n } else if (result.isPresent() && result.get() == buttonTypeCancel)\r\n {\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"User canceled coin Action\");\r\n return false;\r\n }\r\n return false;\r\n\r\n }",
"public void showWarningMessage(View view){\n\n //Show popup to warn user about the entered start and destiantion Addresses\n builder = new AlertDialog.Builder(this);\n //Setting message manually and performing action on button click\n builder.setMessage(\"Please insert a start and a destination address!\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // finish();\n Toast.makeText(getApplicationContext(),\"you choose yes action for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n });\n /* .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"you choose no action for for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n } );*/\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(\"WARNING!\");\n alert.show();\n }",
"private void displayDuplicateInputError(){\n\t\tAlert alert = new Alert(Alert.AlertType.INFORMATION);\n\t\talert.setTitle(\"Duplicate Letter Dialog\");\n\t\talert.setHeaderText(\"Pay Attention!\");\n\t\talert.setContentText(\"You have already tried that letter, please try again\");\n\t\talert.showAndWait();\n\t}",
"public static void message() {\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, \"Thanks for your participation\" + \"\\nHave a great day!\");\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected String showConfirmation() {\n\t\treturn \"Payment is successful. Check your credit card statement for PetSitters, Inc.\";\n\t}",
"public void sol_nuevasolicitud(){\n try{\n FacesContext context = FacesContext.getCurrentInstance();\n context.getExternalContext().redirect(\"sol_nuevasolicitud.xhtml\");\n }\n catch(Exception e){\n System.out.println(\"Error: \"+e);\n }\n }",
"private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a new one.\");\n dialog.button(\"OK\", true);\n dialog.show(stage);\n }",
"public void messageErreur(Exception ex) throws HeadlessException {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }",
"public void dialogoAgregarUsuario() {\n vAgregarUsuario = new V_AgregarUsuario(new JFrame(), true);\n vAgregarUsuario.setVisible(true);\n }",
"public void verificaJogo(){\n\t\t\t\tif(jogo.verificaPerdeu()) {\n\t \t\tJOptionPane dialogo = new JOptionPane();\n\t \t\t\n\t \t\tint opcao = dialogo.showConfirmDialog(this, \"Voce Perdeu!!\\nDeseja jogar novamente?\", \"mensagem\", JOptionPane.YES_NO_OPTION);\n\t \t\t\n\t \t\tif(opcao == JOptionPane.YES_OPTION) {\n\t \t\t\tMatriz novamente = new Matriz();\n\t \t\t}\n\t \t\tsetVisible(false);\n\t \t\tdispose();\n\t \t}\n\t\t\t\t\n\t\t\t\tif(jogo.verificaGanhou()) {\n\t\t\t\t\tJOptionPane dialogo = new JOptionPane();\n\t \t\t\n\t \t\tint opcao = dialogo.showConfirmDialog(this, \"Voce GANHOOOOO!!\\nDeseja jogar novamente?\", \"mensagem\", JOptionPane.YES_NO_OPTION);\n\t \t\t\n\t \t\tif(opcao == JOptionPane.YES_OPTION) {\n\t \t\t\tMatriz novamente = new Matriz();\n\t \t\t}\n\t \t\tsetVisible(false);\n\t \t\tdispose();\n\t \t}\n\t\t\t\t\n\t\t\t}",
"private void showAlert(String message) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(message).setTitle(\"Response from Yourcare\")\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tIntent intent = new Intent(getApplicationContext(),CapturePrescriptionActivity.class);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\tfinish();\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tAlertDialog alert = builder.create();\n\t\talert.show();\n\t}",
"private void handleOptionOne() {\n\n ClientData clientData = view.askForClientPersonalDataAndCreateClientData(); // zwracamy stworzonego w widoku clienta z wrpowadoznych scanerem danych\n clientModel.save(clientData); // zapisujemy clienta do bazy danych\n view.showClientInformation(clientData); // wyswietlamy info o jego pinie itp.\n\n }",
"public void checkAlert() {\n try {\n wait(1000);\n driver.switchTo().alert();\n driver.findElement(By.xpath(\"//*[@title='No, thanks']\")).click();\n } catch (Exception e) {\n // Do nothing\n }\n }",
"private static void imprimirMensajeEnPantalla() {\n\tSystem.out.println(\"########### JUEGO EL AHORCADO ###########\");\n\timprimirAhorcado(intentosRestantes);\n\tSystem.out.println(\"\\nPALABRA ACTUAL: \" + getPalabraActualGuionBajo());\n\tSystem.out.println(\"INTENTOS RESTANTES: \" + intentosRestantes);\n\t}",
"public void game_over() {\n JOptionPane.showMessageDialog(null,\"GAME OVER\",\"Titolo finestra mettici quello che vuoi\",1);\n\n System.exit(0);\n}"
]
| [
"0.70182157",
"0.6745019",
"0.66550267",
"0.6609184",
"0.6599067",
"0.6586523",
"0.6574598",
"0.65558",
"0.6546854",
"0.6423708",
"0.6423282",
"0.6421664",
"0.6419506",
"0.6391872",
"0.6358915",
"0.6324072",
"0.63209087",
"0.63127124",
"0.62956977",
"0.6276093",
"0.6273532",
"0.6264927",
"0.625785",
"0.6256533",
"0.6243186",
"0.62326217",
"0.62257725",
"0.6223834",
"0.6218763",
"0.6195507",
"0.6193713",
"0.6186543",
"0.6180813",
"0.61806774",
"0.61650085",
"0.6164491",
"0.6154565",
"0.61516243",
"0.61438066",
"0.6127396",
"0.6118554",
"0.61059785",
"0.6091394",
"0.6084352",
"0.60811955",
"0.60795486",
"0.6077605",
"0.607292",
"0.6065447",
"0.6055093",
"0.6041981",
"0.6040532",
"0.6033253",
"0.60250103",
"0.60237414",
"0.60126424",
"0.6009866",
"0.60064816",
"0.60063875",
"0.6005668",
"0.6005668",
"0.5996745",
"0.5995607",
"0.5983169",
"0.598249",
"0.5982222",
"0.59685624",
"0.5968158",
"0.59631085",
"0.5941315",
"0.5936437",
"0.5936322",
"0.5933772",
"0.5927097",
"0.5925305",
"0.59228253",
"0.5920135",
"0.59194887",
"0.5918879",
"0.59188676",
"0.5916669",
"0.5906146",
"0.5904395",
"0.5901927",
"0.5897598",
"0.58945054",
"0.58940053",
"0.58936834",
"0.58932716",
"0.5891218",
"0.5891153",
"0.58900696",
"0.5882894",
"0.58786845",
"0.58769387",
"0.58736587",
"0.58733493",
"0.5872638",
"0.5872625",
"0.5871553"
]
| 0.6084207 | 44 |
afficher info d'un produit | public void afficherInfo(View v){
Intent intent=new Intent(CarteActivity.this,InfoActivity.class);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void afficherProduit() {\r\n Scanner myObj = new Scanner(System.in);\r\n System.out.print(\"Entrez le nom du produit ............................. \");\r\n String input = myObj.nextLine();\r\n int indice = Catalogue.chercher(input);\r\n if(indice == -1) {\r\n System.out.println(\"Le produit demandé n'est pas dans le catalogue\");\r\n } else {\r\n System.out.println(\"Le produit demandé : \" + Catalogue.getNom(indice) + \" est bien dans le catalogue\");\r\n }\r\n System.out.println();\r\n }",
"public void realiserAcahatProduit() {\n\t\t\n\t}",
"@Override\n\tpublic String info() {\n\t\treturn String.valueOf(super.getDonnee());\n\t}",
"@Override\n public void afficher() {\n super.afficher();\n System.out.println(\"Sexe : \" + getSexe());\n System.out.println(\"Numéro de sécurité sociale : \" + getNumeroSecuriteSociale());\n System.out.println(\"Date de naissance : \" + getDateDeNaissance().format(DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG)));\n System.out.println(\"Commentaires : \" + getCommentaires());\n this.adresse.afficher();\n }",
"private void carregaInformacoes() {\n Pessoa pessoa = (Pessoa) getIntent().getExtras().getSerializable(\"pessoa\");\n edtNome.setText(pessoa.getNome());\n edtEmail.setText(pessoa.getEmail());\n edtTelefone.setText(pessoa.getTelefone());\n edtIdade.setText(pessoa.getIdade());\n edtCPF.setText(pessoa.getCpf());\n }",
"public Produit getProduit(int theId);",
"public void saveProduit(Produit theProduit);",
"public String infosPourList(){\n return nom+ \" , \" +promo.getNom();\n }",
"@Override\n\tpublic void mostrarinfo(String nombreclase) {\n\t\tsuper.mostrarinfo(nombreclase);\n\t\tSystem.out.println(\"Corte : \" + corte);\n\t\tSystem.out.println(\"Sexo :\" + sexo);\n\t}",
"public String getItemInformation()\n {\n return this.aDescription + \" qui a un poids de \" + this.aWeight;\n\n }",
"public String toString(){\n return \"Codigo Produto: \"+this.idProduto+\n \"\\nNome do Produto \"+this.nomePro+\n \"\\nDescrição \"+this.descricao+\n \"\\nPreço: \"+this.preco;\n }",
"public void afficherListe(){\n StringBuilder liste = new StringBuilder(\"\\n\");\n logger.info(\"OUTPUT\",\"\\nLes produits en vente sont:\");\n for (Aliment aliment : this.productList) { liste.append(\"\\t\").append(aliment).append(\"\\n\"); }\n logger.info(\"OUTPUT\", liste+\"\\n\");\n }",
"private void mostrarInformacionP(){\n System.out.println(\"Nombre: \"+this.nombre);\n System.out.println(\"Sexo: \"+ this.sexo);\n System.out.println(\"Edad: \" + edad);\n\n }",
"public void reestablecerInfo(){\n panelIngresoControlador.getPanelIngreso().reestablecerInfo();\n }",
"@Override\n\tpublic String toString() {\n\t\tString description = \"Client n°\"+num+\" : [\"+super.toString()+\"]\";\n\t\tif(fournisseur) {\n\t\t\tdescription +=\"\\n\\t\\trole suplementaire : fournisseur\";\n\t\t}\n\t\treturn description;\n\t}",
"public Produit() {\n\t\tsuper();\n\t}",
"@Override\r\n\tpublic void commanderParMap(Map<Produit, Integer> mapOfProduits) {\n\r\n\t}",
"public static void afficherProduit(HttpServletRequest request,int idProduit) {\n\t\trequest.setAttribute(\"produit\", ManagerProduit.getById(idProduit));\n\t}",
"@Override\n public String getInformacionInstruccion() {\n\treturn \"comando desconocido\";\n }",
"@Override\n public String getInfo(){\n return info;\n }",
"@Override\r\n\tpublic void getInfo() {\n\t\tSystem.out.println(\"=== 선생 정보 ===\");\r\n\t\tsuper.getInfo();\r\n\t\tSystem.out.println(\"과목 : \" + text);\r\n\t}",
"public String getProfi() {\r\n\t\treturn profi;\r\n\t}",
"@Override\r\n\tpublic void notificationVente(CommandeProduc c) {\n\t}",
"@Override\n public Proposition proposerUneCombinaison(IResultat resultat) {\n DemandeInfo demandeInfo = new DemandeInfo();\n return demandeInfo.demandecombinaisonMastermind();\n }",
"public void afficheInfos() {\n int i;\n Polygone p;\n for(i=0;i<this.list.size();i++){\n p = (Polygone) this.list.get(i);\n System.out.println(\"–––––––––––––––––––––\");\n System.out.println(\"Type : \" + p.toString());\n System.out.println(\"Sommet :\");\n System.out.print(p.texteSommets());\n System.out.println(\"Perimetre : \" + p.perimetre());\n System.out.println(\"Surface : \" + p.surface());\n System.out.println(\"–––––––––––––––––––––\");\n } \n }",
"public void affiche() {\n\t\tSystem.out.println(\"Valeur: \" + cpt);\n\t}",
"public void afficherMessage () {\r\n System.out.println(\"(\"+valeur+\", \"+type+\")\"); \r\n }",
"public long getIdProduit() {\n\t\treturn idProduit;\n\t}",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n public void onDelectComfireInfo(ServResrouce info)\n {\n }",
"@Override\n\tpublic List<Produit> produitsParMotCle(String motCle) {\n\t\tList<Produit> listProduit = new ArrayList();\n\t\tString sql = \"SELECT * FROM produit WHERE designation LIKE ?\";\n\t\tConnection connection = SingletonConnection.getConnection();\n\t\ttry {\n\t\t\tPreparedStatement ps = connection.prepareStatement(sql);\n\t\t\tps.setString(1, motCle);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tProduit produit = new Produit();\n\t\t\t\tproduit.setId(rs.getInt(\"id\"));\n\t\t\t\tproduit.setDesignation(rs.getString(\"designation\"));\n\t\t\t\tproduit.setPrix(rs.getDouble(\"prix\"));\n\t\t\t\tproduit.setQuantite(rs.getInt(\"quantite\"));\n\t\t\t\t//produit.setImage(rs.getBytes(\"Image\"));\n\t\t\t\tlistProduit.add(produit);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn listProduit;\n\t}",
"@Override\npublic String toString() {\n\treturn \"Phieu tra [id=\" + getId() + \", reader= sqlite no supported, card= sqlite no supported]\";\n}",
"public void recuperarFactura(){\n int id = datosFactura.recuperarFacturaID();\n Factura factura = almacen.getFactura(id);\n System.out.println(\"\\n\");\n if(factura != null)\n System.out.print(factura.toString());\n System.out.println(\"\\n\");\n }",
"public Produit(String type, String titre, String categorie, String description, String dateDepot, String dateFin, String Prix, String loginUser) {\n this.type = type;\n this.titre = titre;\n this.categorie = categorie;\n this.description = description;\n this.dateDepot = dateDepot;\n this.dateFin = dateFin;\n this.Prix = Prix;\n this.loginUser = loginUser;\n }",
"public void recuperarFacturasCliente(){\n String NIF = datosFactura.recuperarFacturaClienteNIF();\n ArrayList<Factura> facturas = almacen.getFacturas(NIF);\n if(facturas != null){\n for(Factura factura : facturas) {\n System.out.println(\"\\n\");\n System.out.print(factura.toString());\n }\n }\n System.out.println(\"\\n\");\n }",
"Information getInfo();",
"@Override \r\n public String getProfilo(String profilo) {\n Iterator<Map<String, String>> iterator;\r\n iterator = getUltimaEntry().iterator();\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tMap<String, String> m = iterator.next();\r\n if(m.get(\"Iface\").equals(profilo))\r\n \r\n \r\n try {\r\n String json = new ObjectMapper().writeValueAsString(m);\r\n \r\n if (json!=null) return json ;\r\n } catch (JsonProcessingException ex) {\r\n Logger.getLogger(NetstatSingleton.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n \r\n \r\n return \"NOT WORKING\";\r\n \r\n }",
"@Override\n public String toString(){\n return Nombre + \", \" + Clave + \", de \" + horario + \", \" + Maestro;\n }",
"@Override\n public String toString() {\n return \"Id del Libro: \"+id+\" Nombre del Libro: \"+nombre+\" Disponibilidad: \"+disponibilidad;\n }",
"private void remplirPrestaraireData() {\n\t}",
"public void affiche () {\r\n\t\tSystem.out.println(\"Nom du porteur du compte: \" + this.porteur);\r\n\t\tSystem.out.println(\"numéro du compte: \" + this.IBAN);\r\n\t\tSystem.out.println(\"Solde du compte: \" + this.solde);\r\n\t}",
"@Override\n public ExtensionResult getProductInfo(ExtensionRequest extensionRequest) {\n String model = getEasyMapValueByName(extensionRequest, \"model\");\n String type = getEasyMapValueByName(extensionRequest, \"type\");\n\n Map<String, String> output = new HashMap<>();\n StringBuilder respBuilder = new StringBuilder();\n\n respBuilder.append(\"Untuk harga mobil \" + model + \" tipe \" + type + \" adalah 800,000,000\\n\");\n respBuilder.append(\"Jika kak {customer_name} tertarik, bisa klik tombol dibawah ini. \\n\");\n respBuilder.append(\"Maka nanti live agent kami akan menghubungi kakak ;)\");\n\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n\n output.put(OUTPUT, respBuilder.toString());\n extensionResult.setValue(output);\n return extensionResult;\n }",
"public ProveedorInfo() {\n\t\tnombre = EMPTY_STRING;\n\t\tdescripcion = EMPTY_STRING;\n\t\tcaHash = new Hashtable<String, String>();\n\t\tservidores = new Vector<ServidorOcsp>();\n\n\t}",
"@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }",
"@Override\n\tpublic DataTablesResponseInfo getMaterielInfo(Map<String, Object> map) {\n\t\tDataTablesResponseInfo info = new DataTablesResponseInfo();\n\t\tinfo.setData(purchaseDao.getMaterielInfo(map));\n\t\treturn info;\n\t}",
"public void addProdotto(String codice, int quantita, Request request) {\n\t\ttry {\n\t\t\tSystem.out.println(getSession().getCarrello());\n\t\t\tgetSession().getCarrello().addByCodice(codice, quantita);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn;\n\t}",
"@Override\n\tpublic void descriere() {\n\t\tSystem.out.println(\"Item: \"+this.numeSectiune);\n\t}",
"public void AfficherListProspect() throws Exception{\n laListeProspeect = Prospect_Db_Connect.tousLesProspects();\n laListeProspeect.forEach((p) -> {\n modelProspect.addRow(new Object[]{ p.getIdent(),\n p.getRaison(),\n p.getTypeSo(),\n p.getDomaine(),\n p.getAdresse(),\n p.getTel(),\n p.getCa(),\n p.getComment(),\n p.getNbrEmp(),\n p.getDateProspetc(),\n p.getInteretPropspect()});\n });\n }",
"@Override\n public String traerProyecto(Proyecto p) {\n JSONObject json = new JSONObject();\n //json.put(\"codigo\", 0004);\n json.put(\"nombre\", p.getNombre());\n json.put(\"descripcion\", p.getDescripcion());\n json.put(\"duracionSprints\", p.getDuracionDeSprints());\n json.put(\"numeroSprints\", p.getNumeroSprints());\n JSONArray jHUs = new JSONArray();\n for (HistoriaDeUsuario h : p.getProductBacklog().getHistorias()) {\n JSONObject historia = new JSONObject();\n historia.put(\"nombre\", h.getNombre());\n historia.put(\"descripcion\", h.getDescripcion());\n historia.put(\"puntos\", h.getPuntosHistoria());\n historia.put(\"estado\", h.getEstado());\n historia.put(\"prioridad\", h.getPrioridad());\n ArrayList<Criterio> criteriosH = h.getListaCriterios();\n JSONArray criterios = new JSONArray();\n for (Criterio crit : criteriosH) {\n criterios.add(crit.getDescripcion());\n }\n historia.put(\"criterios\", criterios);\n jHUs.add(historia);\n }\n json.put(\"historias\", jHUs);\n return json.toJSONString();\n }",
"public IProduto getCodProd();",
"public void printProduct() {\n System.out.println(\"nom_jeu : \" + name);\n System.out.println(\"price : \" + price);\n System.out.println(\"uniqueID : \" + identifier);\n System.out.println(\"stock : \" + stock);\n System.out.println(\"image : \" + image);\n System.out.println(\"genre : \" + genre);\n System.out.println(\"plateforme : \" + platform);\n System.out.println();\n }",
"public String getInfo(int type)\n\t{\n\t\tString[] typeInformations = {\"1. Liste employes\",\"2. Liste benevoles\",\n\t\t\t\t\"3. Liste donateur\",\"4. Moyenne des dons\",\"5. Total des dons\"};\n\t\t\n\t\tswitch(type){\n\t\t//liste d'employes\n\t\t\tcase 1:\n\t\t\t\treturn Gestion.getListeEmploye();\t\n\t\t\tcase 2:\n\t\t//liste des benevoles\t\n\t\t\t\treturn Gestion.getListeBenevoles();\n\t\t\tcase 3:\n\t\t//liste des donateurs\t\t\n\t\t\t\treturn Gestion.getListeDonateur();\t\t\n\t\t//moyennes des dons\n\t\t\tcase 4:\n\t\t\t\treturn Double.toString(Gestion.getMoyenneDons());\n\t\t//total des dons\n\t\t\tcase 5:\n\t\t\t\treturn Double.toString(Gestion.getTotalDons());\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn \"\";\n\t}",
"public String getProId() {\n return proId;\n }",
"@Override\n\tpublic void cargarInformacion_paciente() {\n\t\tinfoPacientes.cargarInformacion(admision, this,\n\t\t\t\tnew InformacionPacienteIMG() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void ejecutarProceso() {\n\t\t\t\t\t\tif (tbxAccion.getValue().equalsIgnoreCase(\"registrar\")) {\n\n\t\t\t\t\t\t\t// Map<String, Object> parametros = new\n\t\t\t\t\t\t\t// HashMap<String, Object>();\n\t\t\t\t\t\t\t// parametros.put(\"codigo_empresa\", codigo_empresa);\n\t\t\t\t\t\t\t// parametros.put(\"codigo_sucursal\",\n\t\t\t\t\t\t\t// codigo_sucursal);\n\t\t\t\t\t\t\t// parametros.put(\"identificacion\",\n\t\t\t\t\t\t\t// admision.getNro_identificacion());\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\ttoolbarbuttonTipo_historia\n\t\t\t\t\t\t\t\t\t.setLabel(\"Creando historia de Urgencia Odontologica\");\n\t\t\t\t\t\t\tadmision.setPrimera_vez(\"S\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"public String getInfoTitulos(){\r\n String infoTitulos = \"\";\r\n \r\n if(this.propriedadesDoJogador.size() > 0 || this.companhiasDoJogador.size() > 0){\r\n for(int i = 0; i < this.propriedadesDoJogador.size(); i++){\r\n infoTitulos += propriedadesDoJogador.get(i).getDescricao()+\"\\n\";\r\n }\r\n for(int i = 0; i < this.companhiasDoJogador.size(); i++){\r\n infoTitulos += companhiasDoJogador.get(i).getDescricao()+\"\\n\";\r\n }\r\n return infoTitulos;\r\n \r\n }else{\r\n return \"Você não possui títulos\";\r\n }\r\n }",
"public static void main(String[] args) {\n\t\tProduitDaoImpl dao = new ProduitDaoImpl();\n\t\t\n\t\t//création de nouveaux produits\n\t\tProduit p1 = dao.save(new Produit(\"HP 6580\", 1600, 10));\n\t\tProduit p2 = dao.save(new Produit(\"Imprimante Epson 760\", 1200, 15));\n\t\t\n\t\t//affichage de l'ensemble produit utilisant la méthode toString\n\t\tSystem.out.println(p1.toString());\n\t\tSystem.out.println(p2.toString());\n\t\t\n\t\t//affichage des produit par mot clé\n\t\tSystem.out.println(\"Chercher des produits\");\n\t\tList<Produit> produits = dao.produitsParMC(\"%H%\");\n\t\tfor(Produit p : produits) {\n\t\t\tSystem.out.println(p.toString());\n\t\t}\n\t}",
"public String getInfo()\n {\n return info;\n }",
"public String getInfo()\r\n\t{\r\n\t\treturn theItem.getNote();\r\n\t}",
"public void service_psy (Personne p) throws FileNotFoundException\r\n\t{\r\n\t\r\n\t\t\r\n\t\t \t\tString [] info_psy=null ;\r\n\t\t \t\tString [] cle_valeur=null;\r\n\t\t \t\tboolean spec,adr;\r\n\t\t \t\tFileInputStream f=new FileInputStream(\"C://Users/Azaiez Hamed/Desktop/workspace/Projet de programmation/src/Medecin.txt\");\r\n\t\t \t\ttry {\r\n\t\t \t\t\tBufferedReader reader =new BufferedReader (new InputStreamReader(f,\"UTF-8\"));\r\n\t\t \t\t\tString line=reader.readLine();\r\n\t\t \t\t\twhile(line!=null){\r\n\t\t \t\t\t\tinfo_psy=line.split(\"\\t\\t\\t\");\r\n\t\t \t\t\t\tspec=false;adr=false;\r\n\t\t \t\t\t\tfor(int i=0;i<info_psy.length;i++)\r\n\t\t \t\t\t\t{\r\n\t\t \t\t\t\t\t cle_valeur=info_psy[i].split(\":\");\r\n\t\t\t\t\t\t if ((cle_valeur[0].equals(\"specialite\"))&& (cle_valeur[1].equals(\"psy\")))\r\n\t\t\t\t\t\t \t spec=true;\r\n\t\t\t\t\t\t if ((cle_valeur[0].equals(\"gouvernerat\"))&&(cle_valeur[1].equals(p.getGouvernerat())))\r\n\t\t \t\t\t\t\t \tadr=true;\r\n\t\t\t\t\t\t}\r\n\t\t \t\t\t\tif (spec && adr) {\r\n\t\t \t\t\t\t\t System.out.println(\"voilà toutes les informations du psy, veuillez lui contacter immédiatement **\");\r\n\t\t \t\t\t\t\t System.out.println(line);return;}\r\n\t\t \t\t\t\telse\r\n\t\t \t\t\t\t line=reader.readLine();\r\n\t\t \t\t\t\t }\r\n\t\t \t\t }\r\n\t\t \t\t \tcatch(IOException e){e.printStackTrace();}\r\n\t\t \t\t System.out.println(\"Pas de psy trouvé dans votre gouvernerat\");\r\n\t}",
"public void info(){\r\n System.out.println(\"Title : \" + title);\r\n System.out.println(\"Author . \" + author);\r\n System.out.println(\"Location : \" + location);\r\n if (isAvailable){\r\n System.out.println(\"Available\");\r\n }\r\n else {\r\n System.out.println(\"Not available\");\r\n }\r\n\r\n }",
"public void showDetails (Player player) {\r\n\t\tString \tc\t= Term.COLOR_INACTIVE.get();\r\n\t\t\r\n\t\t// Get the color\r\n\t\tif (getActivity() == Activity.SELL\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_SELL.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.BUY\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_BUY.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.EXCHANGE\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_EXCHANGE.get();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<String>\tmessage\t= new ArrayList<String>();\r\n\t\t\t\t\t\tmessage.add(Term.INFO_1.get() + c + getActivity().toString() \t+ Term.INFO_2.get() + c +scs.formatCurrency(getPrice())\t\t+ Term.INFO_9.get() + c + getOwner());\r\n\t\t\r\n\t\tString \ttext\t= null;\r\n\t\tString\tname\t= getItemName();\r\n\t\t\r\n\t\tif (!isUnlimited()) {\r\n\t\t\tif (getActivity() == Activity.BUY)\r\n\t\t\t\ttext = getAmount()+ \"/\" + getMaxAmount();\r\n\t\t\telse\r\n\t\t\t\ttext = \"\" + getAmount();\r\n\t\t} else {\r\n\t\t\ttext = Term.INFO_UNLIMITED.get();\r\n\t\t}\r\n\t\t\r\n\t\tif (getItemStack().getType() == Material.WRITTEN_BOOK)\r\n\t\t\tname = getNBTStorage().getBookTitle();\r\n\t\t\r\n\t\tmessage.add(Term.INFO_4.get() + c + name\t\t\t\t+ Term.INFO_3.get() + c + text);\r\n//\t\t\t\t\t\tmessage.add(Term.INFO_4.get() + c + getItemName()\t\t\t\t+ Term.INFO_3.get() + c + (!isUnlimited() ? (getActivity() == Activity.BUY ? getMaxAmount() : getAmount()) : Term.INFO_UNLIMITED.get()));\r\n\t\t\r\n\t\tStringBuffer\tbuffer \t= new StringBuffer();\r\n\t\tString\t\t\tdelim\t= \"\";\r\n\t\r\n\t\tfor (Enchantment en : getEnchantments().keySet()) {\r\n\t\t\tint lvl\t= getEnchantments().get(en);\r\n\t\t\t\r\n\t\t\tbuffer.append(delim + en.getName() + \" lvl \" + lvl);\r\n\t\t\tdelim\t= \", \";\r\n\t\t}\r\n\t\t\r\n\t\tif (buffer.toString().length() > 0)\r\n\t\t\tmessage.add(Term.INFO_8.get() + c + buffer.toString());\r\n\t\t\r\n\t\tif (player.hasPermission(Properties.permAdmin))\r\n\t\t\tmessage.add(c + getSHA1());\r\n\t\t\r\n\t\tMessaging.mlSend(player, message);\r\n\t}",
"@Override\r\n\tpublic Map<String, Object> namaProdi(Integer id_univ, Integer id_fakultas, Integer id_prodi) {\n\t\treturn fakultas.namaProdi(id_univ, id_fakultas, id_prodi);\r\n\t}",
"public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}",
"Reserva Obtener();",
"public abstract String getInfo();",
"public abstract String getInfo();",
"@Override\n public String getInfo() {\n return this.info;\n }",
"public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t System.out.println(\"Je suis un animal et j'ai \" + this.nombreDePatte + \" pattes\");\n\t }",
"@Override\n public String toString() {\n return getDescricao();\n }",
"@Override\n public Coup getCoup(Partie p) {\n List<Coup> coups = p.getTousCoups();\n List<Coup> attaques = new ArrayList();\n for (Coup c : coups) {\n// System.out.println(\"Appliquer coup = \" + c.toString());\n// Partie cloneP = p.clone();\n// cloneP.appliquerCoup(c);\n// System.out.println(p + \" et \" + cloneP);\n// System.out.println(\"Original =\\n\"+p.getJoueurActuel().getEquipe().toString());\n// System.out.println(\"Clone = \\n\"+cloneP.getJoueurActuel().getEquipe().toString());\n if (contientAttaque(c)) {\n// System.out.println(Thread.currentThread().getName() + \": \" + \"Coup possible : \" + c.toString());\n attaques.add(c);\n }\n }\n Coup resultat;\n if (attaques.isEmpty()) {\n resultat = coups.get((int) (Math.random() * (coups.size() - 1)));\n } else {\n resultat = attaques.get((int) (Math.random() * (attaques.size() - 1)));\n }\n// System.out.println(Thread.currentThread().getName() + \": \" + \"Coup calcule = \" + resultat.toString());\n return resultat;\n }",
"@GetMapping(value=\"/listProduits/{id}\")\n public Produit produitById(@PathVariable(name = \"id\") Long id){\n return produitRepository.findById(id).get();\n }",
"private static void consultaProduto() throws Exception {\r\n boolean erro;\r\n int id;\r\n Produto p;\r\n Categoria c;\r\n System.out.println(\"\\t** Consultar produto **\\n\");\r\n do {\r\n erro = false;\r\n System.out.print(\"ID do produto a ser consultado: \");\r\n id = read.nextInt();\r\n if (id <= 0) {\r\n erro = true;\r\n System.out.println(\"ID Inválida! \");\r\n }\r\n System.out.println();\r\n } while (erro);\r\n p = arqProdutos.pesquisar(id - 1);\r\n if (p != null && p.getID() != -1) {\r\n c = arqCategorias.pesquisar(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (c != null) {\r\n System.out.println(\"Categoria: \" + c.nome);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n } else {\r\n System.out.println(\"Produto não encontrado!\");\r\n }\r\n }",
"private void getProfil() {\n Call<FeedUser> call = baseApiService.getAllProfile(sessionManager.getSpContenttype(),\n sessionManager.getSpAccept(), sessionManager.getSpAuthorization());\n call.enqueue(new Callback<FeedUser>() {\n @Override\n public void onResponse(Call<FeedUser> call, Response<FeedUser> response) {\n if (response.isSuccessful()) {\n try {\n name = response.body().getDataProfil().getName().toString();\n email = response.body().getDataProfil().getEmail();\n initComponetNavHeader();\n } catch (Exception e) {\n Log.d(TAG, \" error :\" + e);\n }\n\n } else {\n Toast.makeText(SettingActivity.this, \"Response not success\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<FeedUser> call, Throwable t) {\n Toast.makeText(SettingActivity.this, \"Cek Connection\", Toast.LENGTH_SHORT).show();\n }\n });\n }",
"@Override\n public String toString() {\n return \"Client{\" +\n \"nom='\" + nom + '\\'' +\n \", prenom='\" + prenom + '\\'' +\n \", adresse='\" + adresse + '\\'' +\n \", methode tarif=\" + calculerTarif.toString() +\n \", pointsDeFidelite=\" + pointsDeFidelite +\n \", listeVehicule=\" + listeVehicule +\n + '}';\n }",
"public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }",
"public Produit(String type, String titre, String categorie, String description, String loginUser) {\n this.type = type;\n this.titre = titre;\n this.categorie = categorie;\n this.description = description;\n this.loginUser = loginUser;\n }",
"public String getIdProcuratore() {\n return idProcuratore;\n }",
"public static void afficherTous(HttpServletRequest request) {\n\t\trequest.setAttribute(\"produits\", ManagerProduit.getAll());\n\t}",
"private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }",
"public static void promedioBoletaCliente() {\r\n\t\tPailTap clienteBoleta = getDataTap(\"C:/Paula/masterset/data/9\");\r\n\t\tPailTap boletaProperty = getDataTap(\"C:/Paula/masterset/data/4\");\r\n\t\t\r\n\t\tSubquery promedio = new Subquery(\"?Cliente_id\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(clienteBoleta, \"_\", \"?data\")\r\n\t\t\t\t.predicate(boletaProperty, \"_\", \"?data2\")\r\n\t\t\t\t.predicate(new ExtractClienteBoleta(), \"?data\").out(\"?Cliente_id\", \"?Boleta_id\", \"?Dia\")\r\n\t\t\t\t.predicate(new ExtractBoletaTotal(), \"?data2\").out(\"?Boleta_id\",\"?Total\")\r\n\t\t\t\t.predicate(new Avg(), \"?Total\").out(\"?Promedio\");\r\n\t\t\r\n\t\tSubquery tobatchview = new Subquery(\"?json\")\r\n\t\t\t\t.predicate(promedio, \"?Cliente\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(new ToJSON(), \"?Cliente\", \"?Promedio\", \"?Dia\").out(\"?json\");\r\n\t\tApi.execute(new batchview(), tobatchview);\r\n\t\t//Api.execute(new StdoutTap(), promedio);\r\n\t}",
"public String getInfo() {\n return info;\n }",
"public void show() {\r\n List<Benefit> listBeneficio = service.findAll();\r\n if(listBeneficio!=null && !listBeneficio.isEmpty()){\r\n for(Benefit c: listBeneficio){\r\n LOGGER.info(c.toString());\r\n }\r\n }\r\n }",
"public String getInfo() {\n return this.info;\n }",
"public VerInfoProd(Producto prod) {\n initComponents();\n \n Fabrica fabrica = Fabrica.getInstance();\n ICP = fabrica.getICtrlProducto();\n modelo = (DefaultTableModel) jTabla.getModel();\n this.txtNomProd.setText(prod.getNombre());\n this.txtDescProd.setText(prod.getDescripcion());\n String precio = Double.toString(prod.getPrecio());\n this.txtPrecioProd.setText(precio);\n p = prod;\n Promocional prom = (Promocional)p;\n if(prom.isActiva())\n this.txtEstadoPromo.setText(\"ACTIVA\");\n else\n this.txtEstadoPromo.setText(\"INACTIVA\");\n cargartabla();\n }",
"public void StampaPotenziali()\r\n {\r\n System.out.println(\"----\"+this.nome+\"----\\n\"); \r\n \r\n if(!Potenziale.isEmpty())\r\n {\r\n Set<Entry<Integer,ArrayList<Carta>>> Es = Potenziale.entrySet();\r\n \r\n for(Entry<Integer,ArrayList<Carta>> E : Es)\r\n {\r\n System.out.println(\" -OPZIONE \"+E.getKey()+\"\");\r\n\r\n for(Carta c : E.getValue())\r\n {\r\n System.out.println(\" [ \"+c.GetName()+\" ]\");\r\n }\r\n \r\n System.out.println(\"\\n\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"-NESSUNA CARTA O COMBINAZIONE DI CARTE ASSOCIATA-\\n\");\r\n }\r\n }",
"public String getProdotto() {\r\n\t\treturn prodotto;\r\n\t}",
"public void cargarProveedor() {\n\t}",
"@Override\n\tpublic void RecevoireRequete(Requete requete) {\n\t\tSystem.out.println(\"from \" + requete.getExpediteur().getNom() + \" to \" + requete.getDestinataire());\n\t}",
"@Override\n\tpublic DataTablesResponseInfo getPurchaserequisition(Map<String, Object> map) {\n\t\tDataTablesResponseInfo info = new DataTablesResponseInfo();\n\t\tinfo.setData(purchaseDao.getPurchaserequisition(map));\n\t\treturn info;\n\t}",
"public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }",
"public String afficherInfoFichierTexte(){\n\t\tString fichierComplet = \"\";\n\t\tfor (Joueur j: ListJoueur) {\n\t\t\tfichierComplet += j.afficherFichierTexte();\n\t\t}\n\t\treturn fichierComplet;\n\t}",
"public void getProdotti() {\r\n\t\tprodotti = ac.getProdotti();\r\n\r\n\t\t//la tabella sara' non nulla quando sara' caricato il file VisualizzaLog.fxml\r\n\t\tif(tabellaProdotti != null) {\r\n\t\t\tcodiceCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Integer>(\"codiceInteger\"));\r\n\t prodottoCol.setCellValueFactory(new PropertyValueFactory<Prodotto, String>(\"nome\"));\r\n\t descCol.setCellValueFactory(new PropertyValueFactory<Prodotto, String>(\"descrizione\"));\r\n\t prezzoCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Float>(\"prezzoFloat\"));\r\n\t disponibilitaCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Integer>(\"disponibilitaInteger\"));\r\n\t \r\n\t Collections.sort(prodotti);\r\n\t tabellaProdotti.getItems().setAll(prodotti);\t \r\n\t tabellaProdotti.setOnMouseClicked(e -> {\r\n\t \tif(tabellaProdotti.getSelectionModel().getSelectedItem() != null)\r\n\t \t\taggiornaQuantita(tabellaProdotti.getSelectionModel().getSelectedItem().getDisponibilita());\r\n\t });\r\n\t\t}\r\n\t}",
"String getInfo();",
"public void Get() { ob = ti.Get(currentrowi, \"persoana\"); ID = ti.ID; CNP = ob[0]; Nume = ob[1]; Prenume = ob[2]; }",
"public void recevoir(IPorcelet p);",
"public void acutualizarInfo(){\n String pibId = String.valueOf(comentario.getId());\n labelId.setText(\"#\" + pibId);\n\n String autor = comentario.getAutor().toString();\n labelAutor.setText(autor);\n\n String fecha = comentario.getFechaCreacion().toString();\n labelFecha.setText(fecha);\n \n String contenido = comentario.getContenido();\n textAreaContenido.setText(contenido);\n \n String likes = ((Integer)comentario.totalLikes()).toString();\n labelLikes.setText(likes);\n \n Collection<Comentario> comments = socialNetwork.searchSubComentarios(comentario);\n panelSubComentarios.loadItems(comments, 15);\n \n if(comentario.isSubcomentario()){\n jButton4.setEnabled(true);\n }\n else{\n jButton4.setEnabled(false);\n }\n }",
"private void remplirUtiliseData() {\n\t}",
"public Informations() {\n initComponents();\n \n Affichage();\n }",
"public void affiche() {\n System.out.println(\"le tapis porte \"+this.tapis.size()+\" caisse(s)\");\n for (Iterator it = this.tapis.iterator(); it.hasNext(); ) {\n System.out.println(it.next().toString());\n } \n }",
"public static void ajoutFacture() {\r\n Scanner myObj = new Scanner(System.in);\r\n int numeroFacture = Facture.nouvelleFacture();\r\n System.out.println(\"Création de la facture \" + numeroFacture);\r\n // création d'un boucle pour ajouter autant de produits souhaités à la même facture\r\n boolean continuer = true;\r\n do {\r\n System.out.print(\"Entrez le nom du produit à ajouter ................... \");\r\n String nomProduit = myObj.nextLine();\r\n // vérification que le produit soit dans le catalogue\r\n int indice = Catalogue.chercher(nomProduit);\r\n if(indice == -1) {\r\n System.out.println(\"Le produit demandé n'est pas dans le catalogue\");\r\n } else {\r\n //System.out.println(\"Vous avez choisi le produit \" + Catalogue.getNom(indice));\r\n System.out.print(\"Quelle quantité acheter ? ............................ \");\r\n int quantite = checkInt();\r\n Facture.ajouterProduit(numeroFacture,indice,quantite);\r\n }\r\n System.out.print(\"Souhaitez-vous ajouter un autre produit ? Y/N ........ \");\r\n String choix = myObj.nextLine();\r\n choix = choix.toUpperCase();\r\n if(!choix.equals(\"Y\")) continuer = false;\r\n }while(continuer);\r\n System.out.println(\"Facture \" + numeroFacture + \" ajoutée. FIN\");\r\n }",
"public Produit() {\n }"
]
| [
"0.677178",
"0.6295565",
"0.6198124",
"0.617472",
"0.6169003",
"0.6153098",
"0.6129433",
"0.6108742",
"0.60111254",
"0.5981519",
"0.5968237",
"0.59298813",
"0.5919506",
"0.59033936",
"0.5897462",
"0.58853495",
"0.5870305",
"0.58460027",
"0.5837941",
"0.5836323",
"0.583499",
"0.58274746",
"0.5820213",
"0.581506",
"0.580852",
"0.57960117",
"0.5789547",
"0.57596844",
"0.57424104",
"0.5725637",
"0.5722551",
"0.5719226",
"0.5693894",
"0.56908673",
"0.56877834",
"0.5686081",
"0.56797904",
"0.56699884",
"0.5664888",
"0.5654787",
"0.5628254",
"0.56219035",
"0.561087",
"0.5606397",
"0.56039256",
"0.56024796",
"0.55917865",
"0.55914474",
"0.55882686",
"0.558808",
"0.55856603",
"0.5582174",
"0.5580231",
"0.55738354",
"0.5562195",
"0.556185",
"0.5559148",
"0.55538434",
"0.5551685",
"0.5549627",
"0.554374",
"0.5541314",
"0.5536667",
"0.55331457",
"0.5529763",
"0.5529763",
"0.5525003",
"0.55229247",
"0.5521457",
"0.5517818",
"0.5513223",
"0.5513107",
"0.5509998",
"0.5508604",
"0.55044144",
"0.5500142",
"0.54953676",
"0.54923767",
"0.5491305",
"0.5489994",
"0.5487342",
"0.5486872",
"0.5482065",
"0.54808795",
"0.5477238",
"0.54758173",
"0.54665506",
"0.5466062",
"0.5465784",
"0.54542404",
"0.54531145",
"0.5452011",
"0.544868",
"0.54386795",
"0.5434628",
"0.5426859",
"0.54252213",
"0.54235446",
"0.5422854",
"0.5418739",
"0.5418205"
]
| 0.0 | -1 |
starting background task to update product | public void onClick(View v)
{
Intent fp=new Intent(getApplicationContext(),SignUpDetails.class);
startActivity(fp);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tGetProductItem();\r\n\t\t\t\t}",
"public void processProduct() {\n Product product = self.getCurrentProduct();\n ServiceManager sm = self.getServiceManager();\n boolean failure = false;\n\n if (product != null) {\n //update the product's location\n product.setLocation(self.getLocation());\n env.updateProduct(product);\n\n //process product if the current service equals the needed service and is available,\n //otherwise, just forward the product to the output-buffer without further action.\n if (sm.checkProcessingAllowed(product.getCurrentStepId())) {\n int processingSteps = sm.getCapability().getProcessingTime() * env.getStepTimeScaler();\n for (int i = 1; i <= processingSteps; i++) {\n if (i % env.getStepTimeScaler() == 0) {\n self.increaseWorkload();\n syncUpdateWithCheck(false);\n } else {\n waitStepWithCheck();\n }\n }\n failure = sm.checkFailure(getRandom());\n }\n\n //block until enough space on output-buffer\n while (!self.getOutputBuffer().tryPutProduct(product) && !getResetFlag()) {\n waitStepWithCheck();\n }\n // update product, no sync – does not change pf\n product.finishCurrentStep();\n product.setLocation(self.getOutputLocation());\n env.updateProduct(product);\n // move product to output-buffer + break a service (optional)\n self.setCurrentProduct(null);\n self.increaseFinishCount();\n syncUpdateWithCheck(failure);\n }\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\twhile(true) {\n\t\t\t\t\t\tProduct p = new Product(id, \"product\"+id++);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\tc.addProduct(p);\n\t\t\t\t\t\t\tSystem.out.println(\"成产好了一个产品\");\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"public void update(Product product) {\n\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\twhile(true) {\n\t\t\t\t\t\tProduct p;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tp = c.getProduct();\n\t\t\t\t\t\t\tSystem.out.println(\"消费产品\"+p);\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpc.product();\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpc.product();\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"Product updateProductInStore(Product product);",
"public void updateTask() {}",
"private void updateProductHandler(RoutingContext routingContext) {\n\n HttpServerResponse httpServerResponse = routingContext.response();\n\n try {\n Long productId = Long.parseLong(routingContext.request().getParam(\"productId\"));\n Instant start = Instant.now();\n\n logger.info(\"Received the update request for the productid \" + productId + \" at \" + start);\n\n JsonObject productJson = routingContext.getBodyAsJson();\n Product inputProduct = new Product(productJson);\n inputProduct.setId(productId);\n\n logger.info(\"The input product \" + inputProduct.toString());\n\n // Create future for DB call\n Future<Product> productDBPromise =\n Future.future(promise -> callDBService(promise, inputProduct, DBAction.UPDATE));\n\n productDBPromise.setHandler(\n dbResponse -> {\n if (dbResponse.succeeded()) {\n\n Product updatedProduct = dbResponse.result();\n logger.info(\"The updated product is \" + updatedProduct.toString());\n Gson gson = new GsonBuilder().create();\n String json = gson.toJson(updatedProduct);\n\n Long duration = Duration.between(start, Instant.now()).toMillis();\n logger.info(\"Total time taken to process the request \" + duration + \" milli-seconds\");\n\n httpServerResponse.setStatusCode(SUCCESS_CODE);\n httpServerResponse.end(new JsonObject(json).encodePrettily());\n } else {\n logger.error(dbResponse.cause());\n httpServerResponse.setStatusCode(INTERNAL_SERVER_ERROR);\n httpServerResponse.end(\n \"Error due to \"\n + dbResponse.cause().getMessage()\n + \". Please try again after sometime.\");\n }\n });\n\n } catch (Exception e) {\n\n logger.error(e);\n httpServerResponse.setStatusCode(INTERNAL_SERVER_ERROR);\n httpServerResponse.end(\n \"Error due to \" + e.getMessage() + \". Please try again after sometime.\");\n }\n }",
"public void run() {\n\n if (cancelUpdate(persistentEntity, entityAccess)) {\n return;\n }\n\n updateEntry(persistentEntity, updateId, e);\n firePostUpdateEvent(persistentEntity, entityAccess);\n }",
"public boolean update(Product product);",
"void updateOfProductById(long id);",
"public void run() {\n\t\t\t\t\tint success;\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Building Parameters\n\t\t\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n\t\t\t\t\t\tparams.add(new BasicNameValuePair(\"uid\", UserInfo.userid));\n\t\n\t\t\t\t\t\t// getting product details by making HTTP request\n\t\t\t\t\t\t// Note that product details url will use GET request\n\t\t\t\t\t\tJSONObject json = jsonParser.makeHttpRequest(\n\t\t\t\t\t\t\turl_note_color, \"GET\", params);\n\t\n\t\t\t\t\t\t// check your log for json response\n\t\t\t\t\t\tLog.d(\"Single Product Details\", json.toString());\n\t\t\t\t\t\t\n\t\t\t\t\t\t// json success tag\n\t\t\t\t\t\tsuccess = json.getInt(TAG_SUCCESS);\n\t\t\t\t\t\tif (success == 1) {\n\t\t\t\t\t\t\t// successfully received product details\n\t\t\t\t\t\t\tJSONArray productObj = json\n\t\t\t\t\t\t\t\t\t.getJSONArray(UserInfo.userid); // JSON Array\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// get first product object from JSON Array\n\t\t\t\t\t\t\tJSONObject product = productObj.getJSONObject(0);\n\t UserInfo.userR=product.getString(\"UserR\");\n\t UserInfo.userG=product.getString(\"UserG\");\n\t UserInfo.userB=product.getString(\"UserB\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t// product with pid not found\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n\tpublic void execute() {\n\t\tsuper.execute();\n\n\t\t// TBD Needs rewrite for multi tenant\n\t\ttry {\t\n\t\t\tif (async == null || !async)\n\t\t\t\tupdated = Crosstalk.getInstance().refresh(customer);\n\t\t\telse {\n\t\t\t\tfinal Long id = random.nextLong();\n\t\t\t\tfinal ApiCommand theCommand = this;\n\t\t\t\tThread thread = new Thread(new Runnable() {\n\t\t\t\t @Override\n\t\t\t\t public void run(){\n\t\t\t\t \ttry {\n\t\t\t\t\t\t\tupdated = Crosstalk.getInstance().refresh(customer);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\terror = true;\n\t\t\t\t\t\t\tmessage = e.toString();\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t});\n\t\t\t\tthread.start();\n\t\t\t\tasyncid = \"\" + id;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void startUpdateTask() {\n VoxelGamesLib.newChain().delay(config.signUpdateInterval, TimeUnit.SECONDS).sync(this::updateSigns).execute(this::startUpdateTask, (e, t) -> {\n log.warning(\"Error while updating signs, trying again...\");\n e.printStackTrace();\n startUpdateTask();\n });\n\n if (dirty) {\n persistenceHandler.getProvider().saveSigns(signLocations);\n if (markedForRemoval != null && markedForRemoval.size() > 0) {\n persistenceHandler.getProvider().deleteSigns(markedForRemoval);\n markedForRemoval.clear();\n }\n dirty = false;\n }\n }",
"public UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public static void startUpdateCartService(Context context) {\n\n Intent intent = new Intent(context, UpdateCartService.class);\n intent.setAction(ACTION_UPDATE);\n if(!OnlineMartApplication.isApplicationInBackground){\n context.startService(intent);\n }\n }",
"private void uploadProductImage() {\n Activity activity = getActivity();\n if (activity == null) {\n return;\n }\n final String imagePath = PhotoUtil.getPhotoPathCache(gtin, activity);\n Runnable uploadProductImage = new Runnable() {\n @Override\n public void run() {\n // TODO limit file size\n ImageService.uploadProductImage(sequentialClient, gtin, imagePath, new\n PLYCompletion<ProductImage>() {\n @Override\n public void onSuccess(ProductImage result) {\n Log.d(\"UploadPImageCallback\", \"New image for product with GTIN \" + gtin + \" \" +\n \"uploaded\");\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded_more_info,\n Snackbar.LENGTH_LONG).show();\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded, Snackbar\n .LENGTH_LONG).show();\n }\n DataChangeListener.imageCreate(result);\n }\n\n @Override\n public void onPostSuccess(ProductImage result) {\n loadProductImage(imagePath, productImage);\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"UploadPImageCallback\", error.getMessage());\n LoadingIndicator.hide();\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar\n .LENGTH_LONG).show();\n }\n });\n }\n };\n if (dbProduct == null) {\n createEmptyOrGetProduct(gtin, language, true, true, uploadProductImage);\n } else {\n uploadProductImage.run();\n }\n }",
"private synchronized void refreshProductModel(String pm_id)\r\n {\r\n DocmaSession docmaSess = mainWin.getDocmaSession();\r\n for (int i=0; i < products_listmodel.size(); i++) {\r\n ProductModel pm = (ProductModel) products_listmodel.get(i);\r\n if (pm.getId().equals(pm_id)) {\r\n ProductModel pm_updated = new ProductModel(docmaSess, pm_id, false);\r\n products_listmodel.set(i, pm_updated);\r\n boolean pending = pm_updated.isLoadPending();\r\n if (pending || (pm_updated.hasActivity() && !pm_updated.isActivityFinished())) {\r\n setListRefresh(true);\r\n if (pending) startDbConnectThread();\r\n }\r\n break;\r\n }\r\n }\r\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\r\n\t\t\t\tif(mSp.getBoolean(\"auto_update\", true)){\r\n\t\t\t\t\tupdateUtils.getCloudVersion();//当获取当前包名后就发出请求\r\n\t\t\t\t}else{\r\n\t\t\t\t\tupdateUtils.enterHome();\r\n\t\t\t\t}\t\r\n\t\t\t}",
"public void run() {\n\t\t\t\t\t\tint success;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// Building Parameters\r\n\t\t\t\t\t\t\tString Name = \"TempSensor\";\r\n\t\t\t\t\t\t\tString Subscription = paramInput.getText().toString();\r\n\t\t\t\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\r\n\t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_NAME, Name));\r\n\t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_SUB, Subscription));\r\n\t\t\t\t\t\t\t// getting product details by making HTTP request\r\n\t\t\t\t\t\t\t// Note that product details url will use GET request\r\n\t\t\t\t\t\t\tJSONObject json = jsonParser.makeHttpRequest(\r\n\t\t\t\t\t\t\t\t\turl_update_sensor, \"GET\", params);\r\n\t\t\t\t\t\t\t// check your log for json response\r\n\t\t\t\t\t\t\tLog.d(\"Smart Home\",\"============sensor_update=================\");\r\n\t\t\t\t\t\t\tLog.d(\"Smart Home\", json.getString(TAG_MSG));\t\t\t\t\t\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"@Override\n public void run() {\n ImageService.uploadProductImage(sequentialClient, gtin, imagePath, new\n PLYCompletion<ProductImage>() {\n @Override\n public void onSuccess(ProductImage result) {\n Log.d(\"UploadPImageCallback\", \"New image for product with GTIN \" + gtin + \" \" +\n \"uploaded\");\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded_more_info,\n Snackbar.LENGTH_LONG).show();\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded, Snackbar\n .LENGTH_LONG).show();\n }\n DataChangeListener.imageCreate(result);\n }\n\n @Override\n public void onPostSuccess(ProductImage result) {\n loadProductImage(imagePath, productImage);\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"UploadPImageCallback\", error.getMessage());\n LoadingIndicator.hide();\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar\n .LENGTH_LONG).show();\n }\n });\n }",
"public void run() {\n\t\t\t\t\t\tint success;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// Building Parameters\r\n\t\t\t\t\t\t\tString activity = \"set_sensor_subscription_value_\" + paramInput.getText().toString() ;\r\n\t\t\t\t\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(Calendar.getInstance().getTime());\r\n\t\t\t\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\r\n\t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_ACT, activity));\r\n\t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_DATE, date));\r\n\t\t\t\t\t\t\t// getting product details by making HTTP request\r\n\t\t\t\t\t\t\t// Note that product details url will use GET request\r\n\t\t\t\t\t\t\tJSONObject json = jsonParser.makeHttpRequest(\r\n\t\t\t\t\t\t\t\t\turl_update_record, \"GET\", params);\r\n\t\t\t\t\t\t// check your log for json response\r\n\t\t\t\t\t\t\tLog.d(\"Smart Home\",\"===========record_update=================\");\r\n\t\t\t\t\t\t\tLog.d(\"Smart Home\", json.getString(TAG_MSG));\t\t\t\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"@Override\n public void run() {\n new ImpresionTicketAsync(entity,printerBluetooth,null,getActivity()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }",
"private void callDBService(Promise<Product> promise, Product product, DBAction dbAction) {\n\n Instant start = Instant.now();\n logger.info(\"Calling ProductDBService for the productid \" + product.getId() + \" at \" + start);\n\n if (dbAction == DBAction.GET) {\n\n productService.getProduct(\n product.getId(),\n handler -> {\n if (handler.succeeded()) {\n\n logger.info(\"The response from the service \" + handler.result().toString());\n\n Long duration = Duration.between(start, Instant.now()).toMillis();\n logger.info(\n \"Total time taken to process the request by ProductDBVerticle \"\n + duration\n + \" milli-seconds\");\n promise.complete(handler.result());\n } else {\n handler.cause().printStackTrace();\n promise.fail(handler.cause());\n }\n });\n\n } else if (dbAction == DBAction.UPDATE) {\n\n productService.updateProduct(\n product,\n handler -> {\n if (handler.succeeded()) {\n\n logger.info(\"The response from the service \" + handler.result().toString());\n\n Long duration = Duration.between(start, Instant.now()).toMillis();\n logger.info(\n \"Total time taken to process the request by ProductDBVerticle \"\n + duration\n + \" milli-seconds\");\n promise.complete(handler.result());\n } else {\n handler.cause().printStackTrace();\n promise.fail(handler.cause());\n }\n });\n }\n }",
"@Override\n\tprotected void start() {\n\t\tDeferred<Tool> promise = _warehouse.acquireTool(_toolName);\n\t\tif (promise.isResolved()) {\n\t\t\t_product.setFinalId(promise.get().useOn(_product));\n\t\t\t_warehouse.releaseTool(promise.get());\n\t\t\tcomplete(promise.get());\n\t\t} \n\t\telse {\n\t\t\tpromise.whenResolved(() -> {\n\t\t\t\t_product.setFinalId(promise.get().useOn(_product));\n\t\t\t\t_warehouse.releaseTool(promise.get());\n\t\t\t\tcomplete(promise.get());\n\t\t\t});\n\t\t}\n\n\t}",
"void update(Product product) throws IllegalArgumentException;",
"@FXML\n private void updatePrice()\n {\n running = true;\n scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();\n\n scheduledExecutorService.scheduleAtFixedRate(() ->\n {\n try {\n currentPrice.setText(api.getPrice(selectedComboBoxPairing));\n } catch (BinanceApiException e) {\n e.printStackTrace();\n }\n\n }, 0, 4, TimeUnit.SECONDS);\n }",
"void setUpdatedProduct(ObservableList<MotorCycleProduct> productSelected, String updatedPartNumber, String updatedName, Integer updatedQuantity, Double updatedPrice, String updatedCategory, String updatedDate);",
"@Override\n public void updateProductCounter() {\n\n }",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tif(dbHelper.InsertItem(listResult))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSharedPreferences sharedPrefer = getSharedPreferences(getResources().getString(R.string.information_string), Context.MODE_PRIVATE);\r\n\t\t\t\t\t\t \tSharedPreferences.Editor sharedEditor = sharedPrefer.edit();\r\n\t\t\t\t\t\t \tsharedEditor.putString(getResources().getString(R.string.masterversion), Common.serverTime);\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \tsharedEditor.commit();\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\t\t\t\t\tmsg.obj = \"ProductItemSave\";\r\n\t\t\t\t\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}",
"public CountDownLatch updateProductAsync(com.mozu.api.contracts.productadmin.Product product, String productCode, AsyncCallback<com.mozu.api.contracts.productadmin.Product> callback) throws Exception\r\n\t{\r\n\t\treturn updateProductAsync( product, productCode, null, callback);\r\n\t}",
"@Override\r\n\tpublic int updateProduct(Product product) {\n\t\treturn 0;\r\n\t}",
"public final void update(){\n if(waitingToExecute){\n execute();\n waitingToExecute = false;\n }\n }",
"public void updateDb(View view) {\n String productName = getIntent().getStringExtra(\"product\");\n Product p = db.getProductByName(productName);\n p.setName(name.getText().toString());\n p.setAvail(availSpinner.getSelectedItem().toString());\n p.setDescription(desc.getText().toString());\n p.setPrice(new BigDecimal(price.getText().toString()));\n p.setWeight(Double.parseDouble(weight.getText().toString()));\n db.updateProduct(p);\n finish();\n }",
"void execute() throws Exception {\n\n\t\tif (getSystemState(db) != SYSTEM_STATE_CREATED_COULD_BE_EXACTLY_ONE) {\n\t\t\tInteger ss = getSystemState(db);\n\t\t\tshutDown();\n\t\t\tthrow new Exception(\"System in wrong state for this task: \" + ss);\n\t\t}\n\n\t\tloadExecutionEngine(db);\n\t\tperformUpdate();\n\t\tshutDown();\n\t}",
"@Override\r\n\tpublic Long update(Producto entity) throws Exception {\n\t\treturn productRepository.update(entity);\r\n\t}",
"private void updateTask(final Model model) {\n final String DECRIPTION = editTextDescription.getText().toString().trim();\r\n final String NAME = editTextName.getText().toString().trim();\r\n final String REGULAR_PRICE = editTextRegularPrice.getText().toString().trim();\r\n final String SALE_PRICE = editTextSalePrice.getText().toString().trim();\r\n final String COLORS = editTextColors.getText().toString().trim();\r\n final String STORES = editTextStores.getText().toString().trim();\r\n final String ADDRESS = editTextAddress.getText().toString().trim();\r\n\r\n\r\n if (DECRIPTION.isEmpty()) {\r\n editTextDescription.setError(\"Description required\");\r\n editTextDescription.requestFocus();\r\n return;\r\n }\r\n\r\n if (NAME.isEmpty()) {\r\n editTextName.setError(\"Name required\");\r\n editTextName.requestFocus();\r\n return;\r\n }\r\n if (REGULAR_PRICE.isEmpty()) {\r\n editTextRegularPrice.setError(\"Regular Price required\");\r\n editTextRegularPrice.requestFocus();\r\n return;\r\n }\r\n if (SALE_PRICE.isEmpty()) {\r\n editTextSalePrice.setError(\"Sale Price required\");\r\n editTextSalePrice.requestFocus();\r\n return;\r\n }\r\n\r\n\r\n if (COLORS.isEmpty()) {\r\n editTextColors.setError(\"Color required\");\r\n editTextColors.requestFocus();\r\n return;\r\n }\r\n if (STORES.isEmpty()) {\r\n editTextStores.setError(\"Store required\");\r\n editTextStores.requestFocus();\r\n return;\r\n }\r\n\r\n int sale_price = 0, regular_price = 0;\r\n\r\n try {\r\n\r\n sale_price = Integer.parseInt(SALE_PRICE);\r\n regular_price = Integer.parseInt(REGULAR_PRICE);\r\n\r\n\r\n } catch (Exception e) {\r\n\r\n }\r\n int finalRegular_price = regular_price;\r\n int finalSale_price = sale_price;\r\n\r\n class UpdateTask extends AsyncTask<Void, Void, Void> {\r\n\r\n @Override\r\n protected Void doInBackground(Void... voids) {\r\n\r\n Model product = new Model();\r\n product.setId(model.getId());\r\n product.setName(NAME);\r\n product.setDescription(DECRIPTION);\r\n product.setRegular_price(finalRegular_price);\r\n product.setSale_price(finalSale_price);\r\n Log.e(\"image\",image);\r\n if (image.equals(\"\")){\r\n product.setImage(model.getImage());\r\n\r\n }else {\r\n product.setImage(Objects.requireNonNull(getBytesFromBitmap(BitmapFactory.decodeFile(image))));\r\n }\r\n product.setColors(getArrayListFromColorString(COLORS));\r\n product.setStores(Utility.getStoreInformation(STORES, ADDRESS));\r\n AppDatabase.getInstance(getApplicationContext())\r\n .taskDao()\r\n .update(product);\r\n Log.e(\"model\", model.toString());\r\n Log.e(\"product\", product.toString());\r\n\r\n return null;\r\n }\r\n\r\n @Override\r\n protected void onPostExecute(Void aVoid) {\r\n super.onPostExecute(aVoid);\r\n Toast.makeText(getApplicationContext(), R.string.updated, Toast.LENGTH_LONG).show();\r\n finish();\r\n }\r\n }\r\n\r\n UpdateTask ut = new UpdateTask();\r\n ut.execute();\r\n }",
"Product update(Product product, long id);",
"public void updateData() {\n\n ProgramWorker pw = new ProgramWorker();\n pw.execute();\n\n }",
"public CountDownLatch updateProductAsync(com.mozu.api.contracts.productadmin.Product product, String productCode, String responseFields, AsyncCallback<com.mozu.api.contracts.productadmin.Product> callback) throws Exception\r\n\t{\r\n\t\tMozuClient<com.mozu.api.contracts.productadmin.Product> client = com.mozu.api.clients.commerce.catalog.admin.ProductClient.updateProductClient(_dataViewMode, product, productCode, responseFields);\r\n\t\tclient.setContext(_apiContext);\r\n\t\treturn client.executeRequest(callback);\r\n\r\n\t}",
"Product updateProductById(Long id);",
"@Override\n\tpublic void run() {\n\t\twhile(true) {\n\t\tsale();\n\t\t}\n\t\t\n\t}",
"public void run() {\n\t\t\t\t\t\tint success;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// Building Parameters\r\n\t\t\t\t\t\t\tString Name = paramInput.getText().toString();\r\n\t\t\t\t\t\t\tString description = \"main_door\";\r\n\t\t\t\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\r\n\t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_ID, Name));\r\n\t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_AR, description));\r\n\t\t\t\t\t\t\t// getting product details by making HTTP request\r\n\t\t\t\t\t\t\t// Note that product details url will use GET request\r\n\t\t\t\t\t\t\tJSONObject json = jsonParser.makeHttpRequest(\r\n\t\t\t\t\t\t\t\t\turl_update_door, \"GET\", params);\r\n\r\n\t\t\t\t\t\t\t// check your log for json response\r\n\t\t\t\t\t\t\tLog.d(\"Smart Home\",\"============sensor_update=================\");\r\n\t\t\t\t\t\t\tLog.d(\"Smart Home\", json.getString(TAG_MSG));\t\t\t\t\t\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"@Override\n\tpublic void run() {\n\t\tMyLog.Trace(\"UpdateThread:run:start.\");\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(Config.update_time * 60 * 1000);\n\t\t\t\t//检查当前时间是否在交易时间内\n\t\t\t\t//交易时间段:9:30--11:30,1:00--3:00\n\t\t\t\t//排除周末\n\t\t\t\tDate time = new Date();\n\t\t\t\tCalendar c = Calendar.getInstance();\n\t\t\t\tc.setTime(time);\n\t\t\t\tif(Calendar.SATURDAY == c.get(Calendar.DAY_OF_WEEK) || \n\t\t\t\t\t\tCalendar.SUNDAY == c.get(Calendar.DAY_OF_WEEK) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint hour = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t\tint minute = c.get(Calendar.MINUTE);\n\t\t\t\tif( (hour >= 9 && hour <= 11)) {\n\t\t\t\t\tif((hour == 9 && minute < 30) || (hour == 11 && minute > 30)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}else if(hour < 13 || hour > 15) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tMyLog.Trace(\"UpdateThread:run:start update.\");\n\t\t\t\tStockCache.update(StockCache.UPDATE_TYPE_HQ);\n\t\t\t\t\n\t\t\t\t//提示更新\n\t\t\t\tsynchronized (lock) {\n\t\t\t\t\tMyLog.Trace(\"UpdateThread:run:notify lock.\");\n\t\t\t\t\tlock.notify();\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tMyLog.Error(\"UpdateThread:run:Exception \" + e.toString());\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public void run() {\n while (true) {\n Producto[] ps;\n int n;\n n = random.nextInt(maxProd) + 1;\n ps = Fabrica.producir(n);\n ConcIO.printfnl(\"inicio almacenamiento de \" + n + \" productos...\");\n multiAlmacenCompartido.almacenar(ps);\n ConcIO.printfnl(\"fin almacenamiento de \" + n + \" productos...\");\n }\n }",
"@Override \n public void run() {\n\t\tString path = Urls.URL_14;\n\t\t\n\t\tMap<String, String> map = new HashMap<String, String>();\n\n\t \tList<BasicNameValuePair> params = HttpUtils.setParams(map);\n\n\t \tLog.i(TAG, path);\n\t\t\n\t\tApkInfoItem apk = new ApkInfoItem();\n\t\ttry {\n\t\t\tString jsonStr = RequestService.getInstance().getRequest(params, path, new HashMap<String, String>());\n\t\t \tJSONObject jsonObject = new JSONObject(jsonStr);\n\t\t \t\n\t\t\tapk.setApkPath(jsonObject.getString(\"apkPath\"));\n\t\t\tapk.setVersion(jsonObject.getString(\"apkVersion\"));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tMessage msg = new Message();\n\t\t\tmsg.obj = apk;\n\t\t\tmsg.what = Constants.GET_UPDATEINFO_ERROR;\n\t\t\thandler.sendMessage(msg);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tMessage msg = new Message();\n\t\tmsg.obj = apk;\n\t\tmsg.what = Constants.UPDATE_CLIENT;\n\t\thandler.sendMessage(msg);\n }",
"public void updateProduct(SiteProduct product) {\n dataProvider.save(product);\n }",
"public void testUpdateProduct() {\n\t\tProduct product=productDao.selectProducts(33);\n\t\tproduct.setPrice(100.0);\n\t\tproduct.setQuantity(1);\n\t\tproductDao.updateProduct(product);//product has updated price and update quantity\n\t\tassertTrue(product.getPrice()==100.0);\n\t\tassertTrue(product.getQuantity()==1);\n\t}",
"private void saveProduct() {\n Product product;\n String name = productName.getText().toString();\n if (name.isEmpty()) {\n productName.setError(getResources().getText(R.string.product_name_error));\n return;\n }\n String brandStr = brand.getText().toString();\n String brandOwnerStr = brandOwner.getText().toString();\n if (dbProduct == null) {\n product = new Product();\n product.setGtin(gtin);\n product.setLanguage(language);\n } else {\n product = dbProduct;\n }\n if (!name.isEmpty()) {\n product.setName(name);\n }\n if (!brandStr.isEmpty()) {\n product.setBrand(brandStr);\n }\n if (!brandOwnerStr.isEmpty()) {\n product.setBrandOwner(brandOwnerStr);\n }\n product.setCategory(selectedCategoryKey);\n LoadingIndicator.show();\n // TODO enable/disable save button\n PLYCompletion<Product> completion = new PLYCompletion<Product>() {\n @Override\n public void onSuccess(Product result) {\n Log.d(\"SavePDetailsCallback\", \"Product details saved\");\n dbProduct = result;\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.product_saved, Snackbar\n .LENGTH_LONG).show();\n DataChangeListener.productCreate(result);\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.product_edited, Snackbar\n .LENGTH_LONG).show();\n DataChangeListener.productUpdate(result);\n }\n }\n\n @Override\n public void onPostSuccess(Product result) {\n FragmentActivity activity = getActivity();\n if (activity != null) {\n activity.onBackPressed();\n }\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"SavePDetailsCallback\", error.getMessage());\n if (isNewProduct || !error.isHttpStatusError() || !error.hasInternalErrorCode\n (PLYStatusCodes.OBJECT_NOT_UPDATED_NO_CHANGES_CODE)) {\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar.LENGTH_LONG)\n .show();\n }\n LoadingIndicator.hide();\n }\n\n @Override\n public void onPostError(PLYAndroid.QueryError error) {\n if (!isNewProduct && error.isHttpStatusError() && error.hasInternalErrorCode(PLYStatusCodes\n .OBJECT_NOT_UPDATED_NO_CHANGES_CODE)) {\n FragmentActivity activity = getActivity();\n if (activity != null) {\n activity.onBackPressed();\n }\n }\n }\n };\n if (dbProduct == null) {\n ProductService.createProduct(sequentialClient, product, completion);\n } else {\n ProductService.updateProduct(sequentialClient, product, completion);\n }\n }",
"public void pickUp(Product product) {\n\t\tgetProductsOnFork().add(product);\n\t}",
"@ScheduledMethod(start = 1, interval = 1)\n\tpublic void update() {\n\t\tupdateParameters();\t\t\t// update bee coefficients using parameters UI\n\t\tkillBee();\t\t\t\t\t// (possibly) kill the bee (not currently used)\n\t\tlowFoodReturn();\n\t\tif(state == \"SLEEPING\"){\n\t\t\tsleep();\n\t\t}\n\t\tif(state == \"SCOUTING\"){\n\t\t\tscout();\n\t\t}\n\t\tif(state == \"TARGETING\"){\n\t\t\ttarget();\n\t\t}\n\t\tif(state == \"HARVESTING\"){\n\t\t\tharvest();\n\t\t}\n\t\tif(state == \"RETURNING\"){\n\t\t\treturnToHive();\n\t\t}\n\t\tif(state == \"AIMLESSSCOUTING\"){\n\t\t\taimlessScout();\n\t\t}\n\t\tif(state == \"DANCING\"){\n\t\t\tdance();\n\t\t}\n\t\tif(state == \"FOLLOWING\"){\n\t\t\tfollow();\n\t\t}\n\t}",
"public void updateInBackground(){\n synchronized (syncLock){\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n updateAllSync();\n }\n });\n t.start();\n }\n }",
"public void execute() {\n\t\tthis.badgeId = studentWorkerOperation.AddNewBadge(this.badgeName, this.badgeDescription);\n\t}",
"private void saveChanges() {\n product.setName(productName);\n product.setPrice(price);\n\n viewModel.updateProduct(product, new OnAsyncEventListener() {\n @Override\n public void onSuccess() {\n Log.d(TAG, \"updateProduct: success\");\n Intent intent = new Intent(EditProductActivity.this, MainActivity.class);\n startActivity(intent);\n }\n\n @Override\n public void onFailure(Exception e) {\n Log.d(TAG, \"updateProduct: failure\", e);\n final androidx.appcompat.app.AlertDialog alertDialog = new androidx.appcompat.app.AlertDialog.Builder(EditProductActivity.this).create();\n alertDialog.setTitle(\"Can not save\");\n alertDialog.setCancelable(true);\n alertDialog.setMessage(\"Cannot edit this product\");\n alertDialog.setButton(androidx.appcompat.app.AlertDialog.BUTTON_NEGATIVE, \"ok\", (dialog, which) -> alertDialog.dismiss());\n alertDialog.show();\n }\n });\n }",
"void syncImmediately() {\r\n // Utilize the current time as the seed time for each of the RecipeSyncServices\r\n long currentTime = Utilities.getCurrentTime();\r\n\r\n // Initialize and start the Services\r\n Intent allRecipesIntent = new Intent(this, AllRecipesService.class);\r\n allRecipesIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(allRecipesIntent);\r\n\r\n Intent epicuriousIntent = new Intent(this, EpicuriousService.class);\r\n epicuriousIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(epicuriousIntent);\r\n\r\n Intent foodIntent = new Intent(this, FoodDotComService.class);\r\n foodIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(foodIntent);\r\n\r\n Intent seriousIntent = new Intent(this, SeriousEatsService.class);\r\n seriousIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(seriousIntent);\r\n }",
"@Override\n public void onClick(View v) {\n AsyncCallGetProducts task = new AsyncCallGetProducts(MainActivity.this);\n task.execute();\n }",
"private void handleCommand(Intent intent) {\r\n\t\t//obtain the wake lock \r\n\t\tPowerManager pm = (PowerManager) getSystemService(POWER_SERVICE); \r\n\t\tmPartialWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, \"ItemUpdateService\"); \r\n\t\tmPartialWakeLock.acquire(); \r\n\t\t// do the actual work, in a separate thread \r\n\t\tnew UpdateItemTask().execute();\t\t\r\n\t}",
"@Override\n public void updateProduct(TradingQuote tradingQuote) {\n }",
"private void updateSoldProductInfo() { public static final String COL_SOLD_PRODUCT_CODE = \"sells_code\";\n// public static final String COL_SOLD_PRODUCT_SELL_ID = \"sells_id\";\n// public static final String COL_SOLD_PRODUCT_PRODUCT_ID = \"sells_product_id\";\n// public static final String COL_SOLD_PRODUCT_PRICE = \"product_price\";\n// public static final String COL_SOLD_PRODUCT_QUANTITY = \"quantity\";\n// public static final String COL_SOLD_PRODUCT_TOTAL_PRICE = \"total_price\";\n// public static final String COL_SOLD_PRODUCT_PENDING_STATUS = \"pending_status\";\n//\n\n for (ProductListModel product : products){\n soldProductInfo.storeSoldProductInfo(new SoldProductModel(\n printInfo.getInvoiceTv(),\n printInfo.getInvoiceTv(),\n product.getpCode(),\n product.getpPrice(),\n product.getpSelectQuantity(),\n printInfo.getTotalAmountTv(),\n paymentStatus+\"\"\n ));\n\n }\n }",
"private void updateFromProvider() {\n if(isUpdating.get()){\n isHaveUpdateRequest.set(true);\n return;\n }\n mUpdateExecutorService.execute(new UpdateThread());\n }",
"@FXML\n\tpublic void updateProduct(ActionEvent event) {\n\t\tProduct productToUpdate = restaurant.returnProduct(LabelProductName.getText());\n\t\tif (!txtUpdateProductName.getText().equals(\"\") && !txtUpdateProductPrice.getText().equals(\"\")\n\t\t\t\t&& selectedIngredients.isEmpty() == false) {\n\n\t\t\ttry {\n\t\t\t\tproductToUpdate.setName(txtUpdateProductName.getText());\n\t\t\t\tproductToUpdate.setPrice(txtUpdateProductPrice.getText());\n\t\t\t\tproductToUpdate.setSize(ComboUpdateSize.getValue());\n\t\t\t\tproductToUpdate.setType(toProductType(ComboUpdateType.getValue()));\n\t\t\t\tproductToUpdate.setIngredients(toIngredient(selectedIngredients));\n\n\t\t\t\tproductToUpdate.setEditedByUser(restaurant.returnUser(empleadoUsername));\n\n\t\t\t\trestaurant.saveProductsData();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Producto actualizado satisfactoriamente\");\n\t\t\t\tdialog.setTitle(\"Proceso Satisfactorio\");\n\t\t\t\tdialog.show();\n\n\t\t\t\ttxtUpdateProductName.setText(\"\");\n\t\t\t\ttxtUpdateProductPrice.setText(\"\");\n\t\t\t\tComboUpdateSize.setValue(\"\");\n\t\t\t\tComboUpdateType.setValue(\"\");\n\t\t\t\tChoiceUpdateIngredients.setValue(\"\");\n\t\t\t\tLabelProductName.setText(\"\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tFXMLLoader optionsFxml = new FXMLLoader(getClass().getResource(\"Options-window.fxml\"));\n\t\t\t\toptionsFxml.setController(this);\n\t\t\t\tParent opWindow = optionsFxml.load();\n\t\t\t\tmainPaneLogin.getChildren().setAll(opWindow);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}",
"private static void update(int portNummber, InetAddress address, Product product){\n\n for(SensorData sensorData : actualSensorDatas){\n if((sensorData.getPortNummber() == portNummber)\n || (sensorData.getAddress() == address)\n || (sensorData.getProduct().getNameOfProduct() == product.getNameOfProduct()) ){\n sensorData.setProduct(product) ;\n }\n }\n }",
"@Scheduled(cron = \"0 5 21 ? * THU,SUN\")\n @Async\n protected void updatePowerBallBote() throws IOException {\n LOGGER.info(\"update powerBall bote\");\n americanaService.updatePowerBallBote();\n\n }",
"public void handleModifyProducts()\n {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/UI/Views/product.fxml\"));\n Parent root = null;\n try {\n root = (Parent) fxmlLoader.load();\n\n if (getProductToModify() != null)\n {\n // Get controller and configure controller settings\n ProductController productController = fxmlLoader.getController();\n productController.setModifyProducts(true);\n productController.setProductToModify(getProductToModify());\n productController.setInventory(inventory);\n productController.setHomeController(this);\n productController.updateParts();\n\n // Spin up product form\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.DECORATED);\n stage.setTitle(\"Modify Products\");\n stage.setScene(new Scene(root));\n stage.show();\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No product was selected!\");\n alert.setContentText(\"Please select a product to modify from the product table!\");\n alert.show();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private synchronized void refreshProductModel(ProductModel pm)\r\n {\r\n int idx = products_listmodel.indexOf(pm);\r\n if (idx >= 0) {\r\n DocmaSession docmaSess = mainWin.getDocmaSession();\r\n // Create new model object to force GUI update\r\n ProductModel pm_updated = new ProductModel(docmaSess, pm.getId(), false);\r\n products_listmodel.set(idx, pm_updated);\r\n boolean pending = pm_updated.isLoadPending();\r\n if (pending || (pm_updated.hasActivity() && !pm_updated.isActivityFinished())) {\r\n setListRefresh(true);\r\n if (pending) startDbConnectThread();\r\n }\r\n } else {\r\n Log.warning(\"ProductModel not contained in list: \" + pm.getId());\r\n }\r\n }",
"public void updateProducts()\n {\n ObservableList<Product> inventoryProducts = this.inventory.getAllProducts();\n\n // Configure product table and bind with inventory products\n productIDColumn.setCellValueFactory(new PropertyValueFactory<Product, String>(\"id\"));\n productNameColumn.setCellValueFactory(new PropertyValueFactory<Product, String>(\"name\"));\n productInventoryColumn.setCellValueFactory(new PropertyValueFactory<Product, String>(\"stock\"));\n productPriceColumn.setCellValueFactory(new PropertyValueFactory<Product, String>(\"price\"));\n\n productTable.setItems(inventoryProducts);\n // Unselect parts in table after part is updated\n productTable.getSelectionModel().clearSelection();\n productTable.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\n }",
"protected void uploadPsIndustry() {\n\t\tnew Thread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tPsXqyz psXqyz = createPollution();\r\n\t\t\t\tMessage msg = new Message();\r\n\t\t\t\tmsg.what = sendPs;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tHttpUtil.uploadPollutionSource(psXqyz, \"Xqyzwry\");\r\n\t\t\t\t\tmsg.obj = \"上传成功\";\r\n\t\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\t\tsetResult(1000);\r\n\t\t\t\t\tAddPsXqyzActivity.this.finish();\r\n\t\t\t\t} catch (Throwable e) {\r\n\t\t\t\t\tmsg.obj = \"上传失败\";\r\n\t\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}).start();\r\n\t}",
"public void execute(){\n\t\tnew PayCarOrderTask().execute();\n\t}",
"public void updateProductByRest(long id, HttpServletRequest request) {\n // set URL\n String url = String.format(\"%s://%s:%d/products/\" + id, request.getScheme(), request.getServerName(), request.getServerPort());\n // execute rest api update product request using RestTemplate.put method\n HttpEntity<Product> entity = getHttpEntity(request);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.put(url, entity, id);\n }",
"public final void start(){\n cpt = 0;\n inProgress = true;\n init();\n UpdateableManager.addToUpdate(this);\n }",
"public static void startActionUpdate(Context context) {\n Intent intent = new Intent(context, UpdateIntentService.class);\n intent.setAction(ACTION_UPDATE_EPO);\n context.startService(intent);\n }",
"@Override\n public Product process(Product product) throws Exception\n {\n List<Product> productList = jdbcTemplate.query(GET_PRODUCT, new Object[] {product.getProductCode()}, new RowMapper<Product>() {\n @Override\n public Product mapRow( ResultSet resultSet, int rowNum ) throws SQLException {\n Product p = new Product();\n p.setProductCode( resultSet.getInt( 1 ) );\n p.setProductName( resultSet.getString( 2 ) );\n p.setMrp( resultSet.getString( 3 ) );\n p.setDicountedPrice( resultSet.getString( 4 ) );\n p.setStock( resultSet.getString( 4 ) );\n return p;\n }\n });\n\n if( productList.size() > 0 )\n {\n // Add the new quantity to the existing quantity\n Product existingProduct = productList.get( 0 );\n int stock = Integer.parseInt(existingProduct.getStock()) + Integer.parseInt(product.getStock());\n product.setStock(Integer.toString(stock));\n }\n\n // Return the (possibly) update prduct\n return product;\n }",
"@Override\r\n\tpublic void ManageProduct() {\n\t\tint id = this.view.enterId();\r\n\t\tString name = this.view.enterName();\r\n\t\tfloat price = this.view.enterPrice();\r\n\t\tint quantity = this.view.enterQuantity();\r\n\t\t\r\n\t\tthis.model.updProduct(id, name, price, quantity);\r\n\t}",
"@Override\n protected void onPreExecute(){\n //do before task doing in background\n }",
"@Override\n public void execute() {\n Time.sleep(3000);\n Starting.execute();\n }",
"public synchronized void startUpdates(){\n mStatusChecker.run();\n }",
"public synchronized void run() {\n AmazonOrder currentOrder = null;\n\n do {\n try {\n currentOrder = shippingCenterToSection.blockingGet();\n currentOrder.setShippingSectionID(section);\n\n Thread.sleep(generator.nextInt(5000));\n\n if(currentOrder.getTerminatingKey() != true) {\n\n //System.out.println(\"** Center \"+ currentOrder.getShippingCenterID()+ \" Section\"+ currentOrder.getShippingSectionID()+\" | \"+currentOrder.getCategory());\n sendOrder(sectionToShippingDock, currentOrder);\n\n }\n else if(section == 1){\n Thread.sleep(generator.nextInt(6000));\n sendOrder(sectionToShippingDock, currentOrder);\n }\n } catch (InterruptedException exception) {\n Thread.currentThread().interrupt();\n }\n\n }\n while(currentOrder.getTerminatingKey() != true);\n\n //System.out.println(\"\\nCenter \"+center+\" section \"+section +\" terminating\\n\");\n }",
"private void updateProductQnt(List<Product> productList) {\n if (productList != null) {\n productList.forEach(product -> {\n Product productToSave = productService.findOne(product.getId());\n productToSave.setQuantity(productToSave.getQuantity() - product.getQuantity());\n productService.save(productToSave);\n });\n }\n }",
"public void execute() {\n\t\tlaunch();\n\t}",
"public void start() {\n\t\tinstanceConfigUpdated();\n\n\t\tnew Thread(getUsageData, \"ResourceConsumptionManager : GetUsageData\").start();\n\n\t\tLoggingService.logInfo(MODULE_NAME, \"started\");\n\t}",
"@FXML\n\t private void updateProductPrice (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.updateProdPrice(prodIdText.getText(),newPriceText.getText());\n\t resultArea.setText(\"Price has been updated for, product id: \" + prodIdText.getText() + \"\\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while updating price: \" + e);\n\t }\n\t }",
"default void update() throws ResourceActivatorException, InterruptedException, ExecutionException {\n deactivate();\n activate();\n }",
"public void run() {\n\t\t\n\t\t\n\t\t\tsaleMethod1();\n\t\t\t//saleMethod3();\n\t\t\t//saleMethod2();\n\t}",
"private void updateProduct(boolean rebuild) {\n\n // Save the product.\n PshUtil.savePshData(pshData);\n\n // Build report and display.\n if (rebuild) {\n previewProduct = PshUtil.buildPshReport(pshData);\n previewText.setText(previewProduct);\n }\n }",
"@Override\n protected Void doInBackground() {\n System.out.println(\"SwingWorker has started working.\");\n updateFields(gameService.receiveUpdates());\n return null;\n }",
"@Override\r\n\tpublic int update(Product product) throws Exception {\n\t\treturn this.dao.update(product);\r\n\t}",
"public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);",
"public void updateProduct(Product catalog) throws BackendException;",
"ManagementLockObject.Update update();",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (InterruptedException 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// 获取当前要更新的数据\r\n\t\t\t\tList<Data> updateDataList = createUpdateData(currentPage,\r\n\t\t\t\t\t\tpageSize);\r\n\t\t\t\t// 需要更新的数据加入当前数据集合\r\n\t\t\t\tonLoadComplete.onLoadComplete(updateDataList);\r\n\r\n\t\t\t}",
"@Override\r\n\tpublic void update(Product product) {\n\t\tproductMapper.updateByPrimaryKeySelective(product);\r\n\t}",
"private void updateDatFile() {\n\t\tIOService<?> ioManager = new IOService<Entity>();\n\t\ttry {\n\t\t\tioManager.writeToFile(FileDataWrapper.productMap.values(), new Product());\n\t\t\tioManager = null;\n\t\t} catch (Exception ex) {\n\t\t\tDisplayUtil.displayValidationError(buttonPanel, StoreConstants.ERROR + \" saving new product\");\n\t\t\tioManager = null;\n\t\t}\n\t}",
"public boolean update(Product p){\n ContentValues contvalu= new ContentValues();\n //contvalu.put(\"date_created\", \"datetime('now')\");\n contvalu.put(\"name\",p.getName());\n contvalu.put(\"feature\",p.getFeature());\n contvalu.put(\"price\",p.getPrice());\n return (cx.update(\"Product\",contvalu,\"id=\"+p.getId(),null))>0;\n//-/-update2-////\n\n\n }",
"protected void onPostExecute(String file_url) {\r\n\t\t\t// dismiss the dialog after getting all products\r\n\t\t\t// pDialog.dismiss();\r\n\t\t\trefreshMenuItem.collapseActionView();\r\n\t\t\t// remove the progress bar view\r\n\t\t\trefreshMenuItem.setActionView(null);\r\n\t\t\t// updating UI from Background Thread\r\n\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tproductArrayAdapter = new CustomAdapter(\r\n\t\t\t\t\t\t\tgetApplicationContext(), productList);\r\n\t\t\t\t\tproductListView.setAdapter(productArrayAdapter);\r\n\t\t\t\t\tcacheObjectWriting(productList);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\trefreshFlag = true;\r\n\t\t}",
"private void getProductHandler(RoutingContext routingContext) {\n\n HttpServerResponse httpServerResponse = routingContext.response();\n\n try {\n\n Long productId = Long.parseLong(routingContext.request().getParam(\"productId\"));\n Instant start = Instant.now();\n\n logger.info(\"Received the get request for the productid \" + productId + \" at \" + start);\n Product inputProduct = new Product.ProductBuilder(productId).build();\n\n // Create future for external api call\n Future<Product> externalApiPromise =\n Future.future(promise -> messagingExternalApiVerticle(promise, productId));\n\n // Create future for DB call\n Future<Product> productDBPromise =\n Future.future(promise -> callDBService(promise, inputProduct, DBAction.GET));\n\n // Concatenate result from external api and database future\n CompositeFuture.all(externalApiPromise, productDBPromise)\n .setHandler(\n result -> {\n if (result.succeeded()) {\n Product productInfo = externalApiPromise.result();\n Product productDBInfo = productDBPromise.result();\n\n productInfo.setPrice(productDBInfo.getPrice());\n productInfo.setCurrency(productDBInfo.getCurrency());\n productInfo.setLast_updated(productDBInfo.getLast_updated());\n\n logger.info(\"The retrieved product is \" + productInfo.toString());\n\n Gson gson = new GsonBuilder().create();\n String json = gson.toJson(productInfo);\n\n Long duration = Duration.between(start, Instant.now()).toMillis();\n logger.info(\n \"Total time taken to process the request \" + duration + \" milli-seconds\");\n\n httpServerResponse.setStatusCode(SUCCESS_CODE);\n httpServerResponse.end(new JsonObject(json).encodePrettily());\n\n } else {\n logger.error(result.cause());\n httpServerResponse.setStatusCode(INTERNAL_SERVER_ERROR);\n httpServerResponse.end(\n \"Error due to \"\n + result.cause().getMessage()\n + \". Please try again after sometime.\");\n }\n });\n\n } catch (Exception e) {\n logger.error(e);\n httpServerResponse.setStatusCode(INTERNAL_SERVER_ERROR);\n httpServerResponse.end(\n \"Error due to \" + e.getMessage() + \". Please try again after sometime.\");\n }\n }",
"@Scheduled(cron = \"0 0 0 * * ?\")\n\tpublic void callPurger() {\n\t\tlogger.info(\"Planner::callPurger [START]\");\n\n\t\t//call purger\n\t\tpurger.purgeDatabase();\n\n\t\tlogger.info(\"Planner::callPurger [END]\");\n\t}",
"public static boolean startProcess() {\n String query = \"UPDATE producto_inicial SET procesado2=2\";\n try (Connection conn = ConnectionPool.getInstance().getConnection();\n PreparedStatement st2 = conn.prepareStatement(query);) {\n st2.executeUpdate();\n st2.close();\n conn.close();\n return true;\n } catch (SQLException e) {\n e.printStackTrace();\n return false;\n }\n }",
"public void run()\n\t{\n\t\tString releaseFilename = null;\n\n\t\t// 1. Find the local release.xml file. Bail with exception if we cannot find it.\n\t\ttry\n\t\t{\n\t\t\treleaseFilename = _util.getLocalReleaseFile().getAbsolutePath();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\ts_log.error(\"Unexpected exception while attempting to find local release file: \"+e.getMessage(), e);\n\t\t\tif (_callback != null) {\n\t\t\t\t_callback.updateCheckFailed(e);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// 2. Load the local release.xml file as a ChannelXmlBean.\n\t\tChannelXmlBean installedChannelBean = _util.getLocalReleaseInfo(releaseFilename);\n\n\t\t// 3. & 3a. Get the release.xml file as a ChannelXmlBean from the server or\n\t\t// filesystem.\n\t\tChannelXmlBean currentChannelBean = getCurrentChannelXmlBean(installedChannelBean);\n\n\t\t// Record now as the last time we checked for updates.\n\t\t_settings.setLastUpdateCheckTimeMillis(\"\" + currentTimeMillis());\n\t\t_app.getSquirrelPreferences().setUpdateSettings(_settings);\n\n\t\t// 5. Is it the same as the local copy, which was placed either by the\n\t\t// installer or the last update?\n\t\tif (currentChannelBean == null)\n\t\t{\n\t\t\ts_log.warn(\"run: currentChannelBean was null - it is inconclusive whether or not the software \"\n\t\t\t\t+ \"is current : assuming that it is for now\");\n\t\t\tif (_callback != null) {\n\t\t\t\t_callback.updateCheckFailed(null);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tisUpToDate = currentChannelBean.equals(installedChannelBean);\n\t\t\tif (_callback != null)\n\t\t\t{\n\t\t\t\t_callback.updateCheckComplete(isUpToDate, installedChannelBean, currentChannelBean);\n\t\t\t}\n\t\t}\n\t}",
"public void run() {\n int success;\n try {\n // Building Parameters\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n params.add(new BasicNameValuePair(\"id\", pid));\n\n // getting product details by making HTTP request\n // Note that product details url will use GET request\n JSONObject json = jsonParser.makeHttpRequest(\n url_product_detials, \"GET\", params);\n\n // check your log for json response\n Log.d(\"Single Product Details\", json.toString());\n\n // json success tag\n success = json.getInt(TAG_SUCCESS);\n if (success == 1) {\n // successfully received product details\n JSONArray productObj = json\n .getJSONArray(TAG_PRODUCT); // JSON Array\n\n // get first product object from JSON Array\n JSONObject product = productObj.getJSONObject(0);\n\n // product with this pid found\n // Edit Text\n nama = (TextView) findViewById(R.id.nama);\n desc = (TextView) findViewById(R.id.desc);\n\n // display product data in EditText\n nama.setText(product.getString(TAG_NAME));\n desc.setText(product.getString(TAG_DESCRIPTION));\n\n }else{\n // product with pid not found\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }"
]
| [
"0.67090094",
"0.65789396",
"0.6555532",
"0.63846225",
"0.6332941",
"0.62714887",
"0.62714887",
"0.62446856",
"0.62320334",
"0.61853945",
"0.616618",
"0.60944754",
"0.60763294",
"0.6022168",
"0.5989909",
"0.5956248",
"0.59393984",
"0.59087056",
"0.58584905",
"0.5843696",
"0.58196294",
"0.5818699",
"0.58041966",
"0.578385",
"0.57834244",
"0.57472855",
"0.57387197",
"0.5735875",
"0.5726382",
"0.57078534",
"0.5692821",
"0.56743383",
"0.5670868",
"0.56292915",
"0.56244785",
"0.56184244",
"0.5610001",
"0.5598424",
"0.5594121",
"0.55912626",
"0.5567011",
"0.5557581",
"0.55484146",
"0.5522555",
"0.55070364",
"0.549779",
"0.549399",
"0.5483912",
"0.5482435",
"0.54807",
"0.5477459",
"0.5469984",
"0.54695743",
"0.54546076",
"0.5454558",
"0.5445967",
"0.5445272",
"0.5443793",
"0.5436067",
"0.5435297",
"0.542683",
"0.54216397",
"0.54191214",
"0.54146856",
"0.54080236",
"0.5401221",
"0.53992313",
"0.53862196",
"0.53850657",
"0.5380348",
"0.5375818",
"0.53717804",
"0.5362872",
"0.53502935",
"0.5341438",
"0.53414273",
"0.53360933",
"0.53327584",
"0.53187656",
"0.5315065",
"0.5310677",
"0.53098965",
"0.53084385",
"0.5306202",
"0.530425",
"0.5302938",
"0.53029305",
"0.5294568",
"0.5291706",
"0.5290666",
"0.5285286",
"0.5282316",
"0.5278676",
"0.5276796",
"0.52756846",
"0.5273889",
"0.5270912",
"0.52706033",
"0.52681303",
"0.5262112",
"0.52506006"
]
| 0.0 | -1 |
TODO Autogenerated method stub | protected IPhynixxConnectionProxy getObservableProxy() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
methods of the IConnectionProxy are redirected to the current object | public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
{
if(logger.isDebugEnabled() ) {
logger.debug("Calling "+method.getDeclaringClass()+"."+method.getName()+" on Object "+ this);
}
// execute
try {
if( method.getDeclaringClass().equals(IPhynixxConnection.class) &&
method.equals(PooledDynaProxyFactory.closeMethod))
{
if (this.getPooledConnectionFactory()==null) {
throw new IllegalStateException("No PooledConnectionFactoryx assigned and the current proxy could not be released");
}
this.close();
return null;
} else if ( method.getDeclaringClass().equals(IPhynixxConnectionProxy.class)||
method.getDeclaringClass().equals(IPhynixxConnection.class)||
method.getDeclaringClass().equals(IPhynixxConnectionHandle.class) ||
method.getDeclaringClass().equals(IPooledConnection.class) )
{
return method.invoke(this,args);
} else {
Object target= this.getConnection();
// all methods of the interfaces joins the TX
this.fireConnectionRequiresTransaction();
Object obj= method.invoke(target,args);
return obj;
}
} catch( InvocationTargetException targetEx) {
throw new DelegatedRuntimeException("Invoke "+method, targetEx.getTargetException());
} catch( Throwable ex) {
throw new DelegatedRuntimeException("Invoke "+method, ex);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\t\t\t\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\t\t\t\t\t\tif(!method.getName().equals(\"close\")){\r\n\t\t\t\t\t\t\t\treturn method.invoke(conn, args);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tlistConnection.add(conn);\r\n\t\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}",
"@Override\n\tpublic void connect() {\n\t\t\n\t}",
"@Override\n\tpublic void connect() {\n\t\t\n\t}",
"protected IPhynixxConnectionProxy getObservableProxy() {\n\t\t\treturn null;\r\n\t\t}",
"Proxy getProxy();",
"@Override\r\n\t\tpublic void onConnect(Connection connection) {\n\r\n\t\t}",
"@Override\n public abstract void connect();",
"private DataConnection() {\n \tperformConnection();\n }",
"InstrumentedConnection getConnection();",
"public void setConn(Connection conn) {this.conn = conn;}",
"public Connection getMyConnection(){\n return myConnection;\n }",
"public static interface Proxy {\r\n\t\t/** \r\n\t\t * Returns self of current context.\r\n\t\t * @return self of current context.\r\n\t\t */\r\n\t\tpublic Component getSelf(ExecutionCtrl exec);\r\n\t\t/** Sets an execution attribute.\r\n\t\t */\r\n\t\tpublic void setAttribute(Execution exec, String name, Object value);\r\n\t\t/** Removes an execution attribute.\r\n\t\t */\r\n\t\tpublic void removeAttribute(Execution exec, String name);\r\n\t\t\r\n\t\t/** Sets an session attribute.\r\n\t\t */\r\n\t\tpublic void setAttribute(Session ses, String name, Object value);\r\n\t\t\r\n\t\t/** Removes an session attribute.\r\n\t\t */\r\n\t\tpublic void removeAttribute(Session session, String name);\r\n\t\t\r\n\t\t/** Called when ZK Update Engine has sent a response to the client.\r\n\t\t *\r\n\t\t * <p>Note: the implementation has to maintain one last-sent\r\n\t\t * response information for each channel, since a different channel\r\n\t\t * has different set of request IDs and might resend in a different\r\n\t\t * condition.\r\n\t\t *\r\n\t\t * @param channel the request channel.\r\n\t\t * For example, \"au\" for AU requests and \"cm\" for Comet requests.\r\n\t\t * @param reqId the request ID that the response is generated for.\r\n\t\t * Ingore if null.\r\n\t\t * @param resInfo the response infomation. Ignored if reqId is null.\r\n\t\t * The real value depends on the caller.\r\n\t\t */ \r\n\t\tpublic void responseSent(DesktopCtrl desktopCtrl, String channel, String reqId, Object resInfo);\r\n\t}",
"public void connect() {}",
"abstract T connect();",
"public InternalConnectionHandler() {\r\n\t\tthis.setPacketProcessor(InternalPacketProcessor.getInstance());\r\n\t}",
"public void setConnection(Connection conn);",
"protected abstract void onConnect();",
"protected Connection getConnection () {\n \t\treturn connection;\n \t}",
"public P6HaConnectionInvocationHandler(Connection underlying) {\n super(underlying);\n\n ConnectionInformation connectionInformation = new ConnectionInformation();\n\n P6HaConnectionCommitDelegate commitDelegate = new P6HaConnectionCommitDelegate(connectionInformation);\n P6HaConnectionRollbackDelegate rollbackDelegate = new P6HaConnectionRollbackDelegate(connectionInformation);\n P6HaConnectionPrepareStatementDelegate prepareStatementDelegate = new P6HaConnectionPrepareStatementDelegate(connectionInformation);\n P6HaConnectionCreateStatementDelegate createStatementDelegate = new P6HaConnectionCreateStatementDelegate(connectionInformation);\n P6HaConnectionAutoCommitDelegate autoCommitDelegate = new P6HaConnectionAutoCommitDelegate(connectionInformation);\n P6HaConnectionCloseDelegate closeDelegate = new P6HaConnectionCloseDelegate(connectionInformation);\n // prepare call ?\n\n addDelegate(\n new MethodNameMatcher(\"commit\"),\n commitDelegate\n );\n addDelegate(\n new MethodNameMatcher(\"rollback\"),\n rollbackDelegate\n );\n\n // add delegates to return proxies for other methods\n addDelegate(\n new MethodNameMatcher(\"prepareStatement\"),\n prepareStatementDelegate\n );\n\n addDelegate(\n new MethodNameMatcher(\"createStatement\"),\n createStatementDelegate\n );\n\n addDelegate(\n new MethodNameMatcher(\"setAutoCommit\"),\n autoCommitDelegate\n );\n\n addDelegate(\n new MethodNameMatcher(\"close\"),\n closeDelegate\n );\n }",
"@Override\n \tpublic void reconnectingIn(int arg0) {\n \t}",
"abstract void onConnect();",
"public IConnection getConnection () { \n\t\treturn connection;\n\t}",
"public void onConnection();",
"@Override\n public void establishConnectionWithYourTower() {\n }",
"public void setConnection(Connection connection) {\n //doNothing\n }",
"protected void onConnect() {}",
"public abstract void onConnect();",
"void getConnection() {\n }",
"private RCProxy() {\n\t\tstate = new DefaultState();\n\t\tSTBListener.instance().addObserver(this);\n\t}",
"public void returnConnection(Connection connection) {\n if (connection instanceof ProxyConnection) {\n ProxyConnection proxyConnection = (ProxyConnection) connection;\n try {\n connections.put(proxyConnection);\n } catch (InterruptedException e) {\n logger.log(Level.ERROR, e);\n Thread.currentThread().interrupt();\n }\n }\n }",
"public Proxy getProxy() {\n return proxy;\n }",
"public abstract Connection getConnection();",
"@Override\n public boolean isConnectable() {\n return true;\n }",
"protected void connectionEstablished() {}",
"public interface PersistentConnectionListener extends ArrangeableProxyListener {\n\n /**\n * Allows to keep the connection open and perform advanced operations on the Socket. Consider\n * WebSocket connections or Server-Sent Events.\n *\n * @param httpMessage Contains request and response.\n * @param inSocket Contains TCP connection to browser.\n * @param method May contain TCP connection to server.\n * @return True if connection is took over, false if not interested.\n */\n boolean onHandshakeResponse(\n HttpMessage httpMessage,\n Socket inSocket,\n @SuppressWarnings(\"deprecation\") ZapGetMethod method);\n}",
"public void connecting() {\n\n }",
"public Proxy getProxy(){\n mode = COMMAND_MODE;\n pack();\n show();\n return proxy;\n }",
"@Override\n public List<Link> getConnectionList()\n {\n return connections;\n }",
"@Override\n public void disconnect() {\n\n }",
"@Override\r\n\tpublic ServerBean connect() throws RemoteException {\n\t\tSystem.out.println(\"coming from DealServerImp\");\r\n\t\treturn null;\r\n\t}",
"public WarpConnection getConnection() {\r\n return(this.connection);\r\n }",
"public void setConnection(WarpConnection connection) {\r\n this.connection=connection;\r\n }",
"protected Proxy(InvocationHandler h) { }",
"public void connect() throws IOException {\n/* 151 */ this.delegate.connect();\n/* */ }",
"public Connection getConnection(){\r\n\t\treturn connection;\r\n\t}",
"public Connection getConn() {return conn;}",
"void copyToProxy (ClassType c) {\r\n package_name = c.getPackage ();\r\n initialize (c.getModifier () ^ GLOBAL);\r\n if (c.isClassInterface ())\r\n method_table = c.getMethodTable ();\r\n }",
"public ProxyableObject()\r\n {\r\n id = new command.GlobalObjectId();\r\n command.ObjectDB.getSingleton().store(id.getLocalObjectId(), this);\r\n \r\n //observable = new ObservabilityObject();\r\n }",
"public void connect();",
"public void connect();",
"public void connect();",
"public Object getProxy() {\n\t\t\r\n\t\treturn getProxy(this.advised.getTargetClass().getClassLoader());\r\n\t}",
"public Object getConnectionContext() {\n return connectionContext;\n }",
"protected boolean isConnected() {\n/* 160 */ return this.delegate.isConnected();\n/* */ }",
"default void connect() { }",
"public interface Connector {\n}",
"void onConnect(IServerConnection<_ATTACHMENT> connection);",
"@Override\n public void onServiceConnected(ComponentName componentName, IBinder iBinder) {\n remoteServiceMethodSolver = IRemoteServiceMethod.Stub.asInterface(iBinder);\n Log.d(\"BindLog\", \"bind远程服务连接已成功,并获取了代理\");\n }",
"public interface ProxySkeletonInterface {\n /**\n * Writes a command on the socket by writing the command first\n * and any other object just after.\n *\n * @param command the command\n * @param params the params\n * @throws IOException the io exception\n */\n void writeCommand(CommProtocolCommands command, Object ... params) throws IOException;\n\n /**\n * Reads a command from the socket and executes a reserved\n * portion of code according to the type of command.\n *\n * @param command the command\n * @throws IOException the io exception\n * @throws ClassNotFoundException the class not found exception\n */\n void readCommand(String command) throws IOException, ClassNotFoundException, InterruptedException;\n}",
"public void connect() { \t\n \tbindService(IChatService.class, apiConnection);\n }",
"@Override\r\n\tpublic Connection getConnection() throws SQLException {\n\t\tif(listConnection.size() > 0){\r\n\t\t\tfinal Connection conn = listConnection.removeFirst();\r\n\t\t\treturn (Connection) Proxy.newProxyInstance(JdbcPool.class.getClassLoader(),\r\n\t\t\t\t\tconn.getClass().getInterfaces(), \r\n\t\t\t\t\tnew InvocationHandler() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tif(!method.getName().equals(\"close\")){\r\n\t\t\t\t\t\t\t\treturn method.invoke(conn, args);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tlistConnection.add(conn);\r\n\t\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t}else{\r\n\t\t\tthrow new RuntimeException(\"对不起,数据库忙\");\r\n\t\t}\r\n\t}",
"@ Override\r\n\tpublic void start(Connection connection)\r\n\t{\n\r\n\t}",
"private void openConnection(){}",
"public void onBindMethods() {\n super.onBindMethods();\n addMethodProxy((MethodProxy) new GetAddress());\n }",
"@Override\n\tpublic void reconnect() {\n\n\t}",
"protected Connection getConnection() {\r\n\t\treturn getProcessor().getConnection();\r\n\t}",
"@Override\n public void socket() {\n }",
"Connection getConnection() {\n\t\treturn connection;\n\t}",
"public IRemoteConnection getConnection() {\n \t\treturn fSelectedConnection;\n \t}",
"public interface ChannelConnection {\n public Channel getChannel();\n public Connector getConnector();\n}",
"interface Connect extends RconConnectionEvent, Cancellable {}",
"public Connection getConnection();",
"public Connection getConnection();",
"public Connection getConnection();",
"public Connection getConnection() {\r\n return connection;\r\n }",
"public Connection getConnection() {\r\n return connection;\r\n }",
"public void setConnection(Connection connection) {\n this.connection = connection;\n }",
"public interface Connection extends java.sql.Connection {\n\n\t/**\n\t * Get the database credentials required to gain access to the remote database server.\n\t *\n\t * @return A one way hash that includes this Connections database login details\n\t * as supplied when this Connection was created.\n\t */\n\tpublic String getCredentials();\n\n\t/**\n\t * Returns the database's numeric type as defined in this Connections Driver class.<br />\n\t * The numeric type is set based on the request url used to create this Connection.\n\t *\n\t * @return The numeric typeName for this Connection.\n\t */\n\tpublic int getDbType();\n\n\t/**\n\t * Gets the remote URL this Connection is connected to.\n\t *\n\t * @return The URL this Connection instance is using.\n\t */\n\tpublic String getUrl();\n\n\t/**\n\t *\n\t * @return this HttpClient\n\t */\n\tpublic HttpClient getClient();\n\n\t/**\n\t *\n\t * @return get the current timeout in ms\n\t */\n\tpublic int getTimeOut();\n\n\t/**\n\t *\n\t * @param timeOut the timeout period in ms\n\t */\n\tpublic void setTimeOut(int timeOut);\n\n\t/**\n\t *\n\t * @return current Session limit\n\t */\n\tpublic boolean getSessLimit();\n\n\t/**\n\t *\n\t * @param sessLimit\n\t */\n\tpublic void setSessLimit(boolean sessLimit);\n\n\t/**\n\t * Returns the name of the requested database that was used when this Connection was created.\n\t *\n\t * @return the active database's name that this Connection Object is using.\n\t */\n\tpublic String getDatabase();\n}",
"protected ConnectionProxy getConnectionProxy() throws ServiceException {\n ConnectionProxy connection;\n\n try {\n connection = ConnectionPool.getInstance().getConnection();\n } catch (ConnectionPoolException e) {\n throw new ServiceException(\"Exception while trying to get connection in service\", e);\n }\n\n return connection;\n }",
"public\n Connection getConnection();",
"public IBrowserConnection getSelectedConnection()\n {\n return selectedConnection;\n }",
"@Override\r\n\tpublic Connection getConnection() {\n\t\treturn null;\r\n\t}",
"protected Connection getConnection() {\n return con;\n }",
"private void bindObject() {\n }",
"public Connection getConnection() {\n \t\treturn this.connect;\n \t}",
"public interface Connection\n{\n public java.net.Socket getSocket();\n}",
"@Override\n public void onDisconnectForwardConnectionWithArgumentRequest(DisconnectForwardConnectionWithArgumentRequest ind) {\n\n }",
"ConnectionImpl getNewConnection() {\n if (injectedConnection != null) {\n return injectedConnection;\n }\n return new ConnectionImpl();\n }",
"void setProxyConnectionState(ProxyConnectionState proxyConnectionState) {\n this.proxyConnectionState = proxyConnectionState;\n }",
"Stub.Proxy(IBinder ibinder)\n\t\t{\n\t\t\tmRemote = ibinder;\n\t\t// 2 4:aload_0 \n\t\t// 3 5:aload_1 \n\t\t// 4 6:putfield #19 <Field IBinder mRemote>\n\t\t// 5 9:return \n\t\t}",
"@Override\n default UserpostPrx ice_connectionCached(boolean newCache)\n {\n return (UserpostPrx)_ice_connectionCached(newCache);\n }",
"public void reconnected() { }",
"@Override\r\n protected void onConnected() {\n \r\n }",
"protected IXConnection getConnection() {\n return eloCmisConnectionManager.getConnection(this.getCallContext());\n }",
"public interface ProxyInterface {\n public String execute();\n\n public String execute0();\n}",
"ClientConnection connection();",
"@Override\n public void connectionLost() {\n }",
"@Override\r\n\tpublic void update(Connection con, Object obj) throws Exception {\n\t}",
"@Override\n public void sendToProxy(String message) {\n }",
"@Override\n\tpublic boolean usingProxy() {\n\t\treturn false;\n\t}"
]
| [
"0.641337",
"0.6325275",
"0.6325275",
"0.63046616",
"0.62960917",
"0.6296081",
"0.6291998",
"0.6171848",
"0.61527544",
"0.6130302",
"0.6075504",
"0.6038264",
"0.60158783",
"0.6015299",
"0.5984104",
"0.595592",
"0.5945128",
"0.59429014",
"0.5896088",
"0.5894784",
"0.58888334",
"0.58187133",
"0.5780601",
"0.5780169",
"0.57728386",
"0.5769755",
"0.5769527",
"0.576605",
"0.5754453",
"0.57532024",
"0.5752865",
"0.5750795",
"0.573805",
"0.57352424",
"0.573421",
"0.5722662",
"0.5720995",
"0.5720748",
"0.5702939",
"0.5699296",
"0.5697982",
"0.5691954",
"0.56863356",
"0.5684493",
"0.56558645",
"0.5655077",
"0.56510836",
"0.56470394",
"0.56386197",
"0.56386197",
"0.56386197",
"0.5637132",
"0.5606613",
"0.5600594",
"0.5598204",
"0.5594491",
"0.5593171",
"0.5593007",
"0.55896354",
"0.5589484",
"0.5583263",
"0.5582541",
"0.55786467",
"0.5568445",
"0.5557969",
"0.5552128",
"0.555169",
"0.5543144",
"0.55341077",
"0.55314684",
"0.552887",
"0.55266994",
"0.55266994",
"0.55266994",
"0.55232733",
"0.55232733",
"0.5520298",
"0.5520289",
"0.55120426",
"0.5510589",
"0.5506544",
"0.5502909",
"0.5501992",
"0.5500542",
"0.5497116",
"0.5494679",
"0.54903424",
"0.5489495",
"0.54882926",
"0.54836506",
"0.5479358",
"0.54708725",
"0.5470278",
"0.54685014",
"0.54541826",
"0.5445737",
"0.544287",
"0.5439035",
"0.5436602",
"0.54274607"
]
| 0.5678058 | 44 |
metodo interno che fa il lavro sporco livello= lunghezza della soluzione parziale lievello iniziale=0 parziale=stringa che contiene anagramma incompleto i fase di costruzione lettere=numero di lettere rimaste da mettere in soluzione | private void permuta(String parziale,String lettere,int livello, List<String> risultato) {
if(lettere.length()==0) { //caso terminale
//la soluzione parziale è anche sol completa
//if(parziale è una parola valida?){ -->bisogna dargli accesso a dizionario
risultato.add(parziale);
}else {
//fai ricorsione
//sottoproblema== una lettera(un singolo carattere) di 'lettere'
for(int pos=0;pos<lettere.length();pos++) {
char tentativo= lettere.charAt(pos);
String nuovaParziale=parziale+tentativo;
String nuovaLettere= lettere.substring(0,pos)+ lettere.substring(pos+1);
//if(nuovaParziale è un Prefisso valido di almeno una parola nel dizionario){
//esempio aqz-->NO car-->SI
permuta(nuovaParziale, nuovaLettere, livello+1,risultato);
//backtracking -->si può escludere introducendo nuove parziali senza toccare i parametri di input
//rimettere a posto parziale
//rimettere a posto lettere
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String ingresarLetra(String letra, String palabra)throws MyException{\n String respuesta=\"\";\n if(Integer.toString(1).equals(letra)||Integer.toString(2).equals(letra)||Integer.toString(3).equals(letra)||Integer.toString(4).equals(letra)||Integer.toString(5).equals(letra)||Integer.toString(6).equals(letra)||Integer.toString(7).equals(letra)||Integer.toString(8).equals(letra)||Integer.toString(9).equals(letra)||Integer.toString(0).equals(letra)||letra.equals(letra.toUpperCase())){\n throw new MyException(\"Debe ingresar una letra en minúsculas(a-z)\");\n }else{\n if(palabra.contains(letra)){\n if(this.palabra.contains(\"-\")){\n for(int i=0;i<this.palabra.length();i++){\n if((letra.toLowerCase().equals(palabra.toLowerCase().substring(i,i+1)))){\n respuesta+=palabra.subSequence(i, i+1);\n }else{\n respuesta+=\"-\";\n }\n }\n }else{\n for(int i=0;i<this.palabra.length();i++){\n if((letra.toLowerCase().equals(palabra.toLowerCase().substring(i,i+1)))){\n respuesta+=palabra.subSequence(i, i+1);\n }else{\n respuesta+=\"-\";\n }\n }\n this.palabra=respuesta;\n }\n }else{\n respuesta=this.ocultarPalabra(this.palabra);\n this.oportunidades-=1;\n try{\n this.cambiarEstadoImagen();\n }\n catch(NullPointerException ex){\n JOptionPane.showMessageDialog(null, \"No se pudo actualizar la imagen del ahorcado :(\\n\\n Imagen no encontrada\");\n }\n }\n return respuesta;\n }\n }",
"public static void main(String[] args) {\n String X_awal = \"my name is marouane, and i'm sick, thank you very much\";\n String Y = \"my name is adeleye, but you are very sick, thank you \";\n String X = match(X_awal, Y);\n int[] Penanda_Y = new int[Y.length()];\n int y_length = Y.length();\n for (int k = 0; k < y_length; k++) {\n Penanda_Y[k] = 0;\n }\n int m = X.length();\n int n = Y.length();\n String L = \"\";\n String LSym = \"\";\n int R = 0;\n int i = 1;\n int[] P = new int[100];\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n i = 1;\n while (i <= m) {\n if (i != m) {\n P[i + 1] = posisi(X, Y, (i + 1), Penanda_Y, R);\n }\n if (P[i + 1] == 0) {\n if (P[i] > R) {\n L = L + \" \" + Integer.toString(P[i]);\n LSym = LSym + \" \" + X.charAt(i - 1);\n }\n break;\n }\n\n if (P[i + 1] < R || P[i] < R) {\n R = 0;\n }\n if (P[i] > P[i + 1]) {\n if (R == 0 && i > 1) {\n L = L + \" \" + Integer.toString(P[i]);\n LSym = LSym + \" \" + X.charAt(i - 1);\n Penanda_Y[P[i] - 1] = 1;\n R = P[i];\n i = i + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n } else {\n L = L + \" \" + Integer.toString(P[i + 1]);\n LSym = LSym + \" \" + X.charAt(i + 1 - 1);\n Penanda_Y[P[i + 1] - 1] = 1;\n R = P[i + 1];\n i = (i + 1) + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n }\n\n } else {\n\n if (R == 0 && i > 1) {\n L = L + \" \" + Integer.toString(P[i + 1]);\n LSym = LSym + \" \" + X.charAt(i + 1 - 1);\n Penanda_Y[P[i + 1] - 1] = 1;\n R = P[i + 1];\n i = (i + 1) + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n } else {\n L = L + \" \" + Integer.toString(P[i]);\n LSym = LSym + \" \" + X.charAt(i - 1);\n Penanda_Y[P[i] - 1] = 1;\n R = P[i];\n i = i + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n }\n }\n }\n System.out.println(\"X = \" + X_awal);\n System.out.println(\"X = \" + Y);\n System.out.println(\"L = \" + L);\n System.out.println(\"LSym = \" + LSym);\n System.out.println(\"Length = \" + LSym.length() / 2);\n}",
"public static void main(String[] args) {\n ArrayList<Integer> taszkok = new ArrayList<>();\r\n String text = null;\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\r\n try {\r\n text = reader.readLine();\r\n\r\n String[] taszkfeltolt = text.split(\",\");\r\n for(int i = 0; i<taszkfeltolt.length ;i++){\r\n taszkok.add(Integer.parseInt(taszkfeltolt[i])) ;\r\n }\r\n\r\n }\r\n catch(Exception e){\r\n\r\n }\r\n\r\n int laphibak=0;\r\n ArrayList<String> abc = new ArrayList<>();\r\n ArrayList<Integer> fagyi = new ArrayList<>();\r\n ArrayList<Integer> szam = new ArrayList<>();\r\n for(int i = 0; i<taszkok.size();i++){\r\n boolean csillag=false;\r\n boolean nemvoltlaphiba=false;\r\n int fagyilesz=-1;\r\n //System.out.print(taszkok.get(i));\r\n\r\n if(0>taszkok.get(i)){\r\n //valami történik\r\n taszkok.set(i, taszkok.get(i)*(-1));\r\n fagyilesz=0;\r\n }\r\n if(abc.size()<3){\r\n\r\n int vanilyen = vanilyen(taszkok.get(i),szam);\r\n if(vanilyen==-1){\r\n if (abc.size()==2){\r\n abc.add(\"C\");\r\n System.out.print(\"C\");\r\n }\r\n else if (abc.size()==1){\r\n abc.add(\"B\");\r\n System.out.print(\"B\");\r\n }\r\n else if (abc.size()==0){\r\n abc.add(\"A\");\r\n System.out.print(\"A\");\r\n }\r\n szam.add(taszkok.get(i));\r\n if(fagyilesz!=0){\r\n fagyi.add(4); // a kör végén ugy is csökkentem 1el elsőre is\r\n }\r\n else{\r\n fagyi.add(0);\r\n }\r\n }\r\n else{\r\n String temp=abc.get(vanilyen);\r\n abc.remove(vanilyen); //a tömb végére rakom és 0 ra allitom a fagyasztast\r\n abc.add(temp);\r\n //System.out.print(abc);\r\n int tempfagyi=fagyi.get(vanilyen);\r\n fagyi.remove(vanilyen);\r\n if(fagyilesz!=0){\r\n fagyi.add(tempfagyi);\r\n }\r\n else{\r\n fagyi.add(0);\r\n }\r\n szam.remove(vanilyen);\r\n szam.add(taszkok.get(i));\r\n //System.out.print(temp+\"e,\");\r\n nemvoltlaphiba=true;\r\n }\r\n\r\n }\r\n else if(abc.size()==3){\r\n int vanilyen = vanilyen(taszkok.get(i),szam);\r\n if(vanilyen==-1){ //ha ez egy uj szam\r\n int hanyadikbet=vanszabad(fagyi);\r\n if(hanyadikbet!=-1){\r\n String temp=abc.get(hanyadikbet);\r\n szam.remove(hanyadikbet);\r\n szam.add(taszkok.get(i));\r\n abc.remove(hanyadikbet); //a tömb végére rakom és 4 ra allitom a fagyasztast\r\n abc.add(temp);\r\n\r\n fagyi.remove(hanyadikbet);\r\n if(fagyilesz!=0){\r\n fagyi.add(4);\r\n }\r\n else{\r\n fagyi.add(0);\r\n }\r\n\r\n System.out.print(temp);\r\n }\r\n else{\r\n csillag=true;\r\n }\r\n }\r\n else{\r\n String temp=abc.get(vanilyen);\r\n abc.remove(vanilyen); //a tömb végére rakom és 0 ra allitom a fagyasztast\r\n abc.add(temp);\r\n szam.remove(vanilyen);\r\n szam.add(taszkok.get(i));\r\n int fagyitemp=fagyi.get(vanilyen);\r\n fagyi.remove(vanilyen);\r\n fagyi.add(fagyitemp);\r\n nemvoltlaphiba=true;\r\n }\r\n\r\n\r\n }\r\n\r\n if (csillag==true){\r\n System.out.print(\"*\");\r\n }\r\n if(nemvoltlaphiba==true){\r\n System.out.print(\"-\");\r\n }\r\n else{\r\n laphibak++;\r\n }\r\n for(int j = 0; j<fagyi.size();j++){\r\n if(fagyi.get(j)!=0){\r\n fagyi.set(j,fagyi.get(j)-1); //csokkentem a fagyasztast\r\n }\r\n }\r\n }\r\n\r\n\r\n System.out.println();\r\n System.out.print(laphibak);\r\n }",
"public static void main(String[] args) {\n char [] letra = new char [27];\n letra [0] = 'A';\n letra [1] = 'B';\n letra [2] = 'C';\n letra [3] = 'D';\n letra [4] = 'E';\n letra [5] = 'F';\n letra [6] = 'G';\n letra [7] = 'H';\n letra [8] = 'I';\n letra [9] = 'J';\n letra [10] = 'K';\n letra [11] = 'L';\n letra [12] = 'M';\n letra [13] = 'N';\n letra [14] = 'Ñ';\n letra [15] = 'O';\n letra [16] = 'P';\n letra [17] = 'Q';\n letra [18] = 'R';\n letra [19] = 'S';\n letra [20] = 'T';\n letra [21] = 'U';\n letra [22] = 'V';\n letra [23] = 'W';\n letra [24] = 'X';\n letra [25] = 'Y';\n letra [26] = 'Z';\n int [] contadores = new int [27];\n pedirCadena();\n comprobarvocales(letra,contadores);\n }",
"static String solve(String puzzle, String delimiter) {\n char cc = 0; // Current character\n\n // Melakukan iterasi ke dalam string dan menyimpan alfabet ke dalam cc\n for (int i = 0; i < puzzle.length(); i++) {\n if (isAlphabetic(puzzle.charAt(i))) {\n cc = puzzle.charAt(i);\n break;\n }\n }\n\n if (cc == 0) {\n // Jika seluruh karakter dalam string sudah diganti dengan digit angka, maka akan dilakukan pengujian\n // terhadap kombinasi angka\n\n totalTest++; // Menghitung total tes yang dilakukan untuk menemukan kombinasi angka yang benar\n String[] operands = puzzle.split(delimiter);\n int op1 = check(operands[0]);\n int op2 = check(operands[1]);\n if (op1 == op2) {\n return puzzle;\n } else {\n return \"\";\n }\n } else {\n // Buat array of numbers [0..9] untuk menyimpan angka-angka yang sudah digunakan\n boolean[] numbers = new boolean[10];\n\n // Melakukan iterasi ke dalam string untuk menandai angka-angka yang sudah digunakan\n for (int i = 0; i < puzzle.length(); i++)\n if (isDigit(puzzle.charAt(i)))\n numbers[puzzle.charAt(i) - '0'] = true;\n\n for (int i = 0; i < 10; i++) {\n if (!numbers[i]) {\n\n // Melakukan substitusi alfabet dengan angka sampai ketemu kombinasi angka yang sesuai\n String solution = solve(puzzle.replaceAll(String.valueOf(cc),\n String.valueOf(i)), delimiter);\n\n // Jika kombinasi angka sudah teruji benar secara matematis,\n // kita akan cek apakah ada angka 0 di depan\n if (!solution.isEmpty()) {\n String[] split = solution.split(\"\\n\");\n boolean zeroAtLeft = false;\n\n for (int j = 0; j < split.length; j++){\n split[j] = split[j].trim();\n if (split[j].charAt(0) == '0'){\n zeroAtLeft = true;\n break;\n }\n }\n // Jika tidak ada angka 0 di depan, solusi ditemukan dan di-return ke main\n if (!zeroAtLeft) {\n return solution;\n }\n }\n }\n }\n }\n return \"\";\n }",
"@Override\n\tpublic void llenarArreglo(){\n\n\t\tString[] textoSeparado = texto.toLowerCase().split(\"\\\\W+\"); //pasa todo a minusculas y despues busca todas las no palabras con W y con + junta los que estan seguidos para separador, ver http://regexr.com/3dcpk\n\n\t\tif (palabras==null) {\n\t\t\t//agregar el primer elemento manualmente\n\t\t\tLabel etiqueta = new Label(textoSeparado[0]);\n\t\t\tpalabras = new Palabra[1];\n\t\t\tpalabras[0] = new Palabra(textoSeparado[0], etiqueta);\n\t\t}\n\n\t\t\tfor (int i=1; i<textoSeparado.length; i++) { //importante el uno para no contar la primera palabra dos veces\n\t\t\t\tString buscar= textoSeparado[i];\n\t\t\t\tif (!checarListaNegra(buscar)) { //solo se hace la operacion por cada palabra si no esta en la lista negra\n\t\t\t\t\tboolean yaExiste = false;\n\t\t\t\t\tfor (Palabra palabraActual : palabras) {\n\t\t\t\t\t\tif (palabraActual.getContenido().equals(buscar)) {\n\t\t\t\t\t\t\tyaExiste = true;\n\t\t\t\t\t\t\tpalabraActual.actualizarFrecuencia();\n\t\t\t\t\t\t//\tSystem.out.println(\"se actualizo\"+ palabraActual.getContenido());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!yaExiste) {\n\t\t\t\t\t\t//no se encontro la palabra (String buscar) en el gran arreglo de palabras entonces hay que crearla\n\t\t\t\t\t\tagregarPalabra(buscar);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private static void esPalindromo(String palabraUsuario) {\n\t\tString primeraParte = \"\";\n\t\tString segundaParte = \"\";\n\t\tif (palabraUsuario.length() % 2 == 0) {// Es Par\n\t\t\tfor (int i = 0; i < palabraUsuario.length() / 2; i++) {//Recorro lo caracteres de la palabra introducida hasta la mitad\n\t\t\t\tprimeraParte += palabraUsuario.charAt(i); //Los meto en una cadena\n\t\t\t}\n\t\t\tfor (int i = palabraUsuario.length() / 2 - 1; i >= 0; i--) {//Recorro la mitad de la palabra introducida pero al reves\n\t\t\t\tsegundaParte += palabraUsuario.charAt(i);\n\t\t\t}\n\t\t\tString palabraCreada = primeraParte + segundaParte;// Creo una palabra a partir de la primera y segunda parte\n\t\t\tif (palabraCreada.equalsIgnoreCase(palabraUsuario))//Si la palabra que ha introducido es igual a la que he compuesto \n\t\t\t\tSystem.out.println(\"Es palindromo\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No es palindromo\");\n\t\t} else {// Es impar\n\t\t\tfor (int i = 0; i < palabraUsuario.length() / 2 + 1; i++) {//Recorro lo caracteres de la palabra introducida un caracter mas de la mitad\n\t\t\t\tprimeraParte += palabraUsuario.charAt(i); // Los meto en una cadena\n\t\t\t}\n\t\t\tfor (int i = primeraParte.length() - 2; i >= 0; i--) {//Le doy i el valor de la longitud de la primera parte -2 porque es impar \n\t\t\t\tsegundaParte += primeraParte.charAt(i);\n\t\t\t}\n\t\t\tString palabraComprobar = primeraParte + segundaParte;\n\t\t\tif (palabraUsuario.equalsIgnoreCase(palabraComprobar)) {//Igual que antes\n\t\t\t\tSystem.out.println(\"Es un palindromo\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"No es un palindromo\");\n\t\t\t}\n\t\t}\n\n\t}",
"public void getPalavraMatriz(char [][] lista, String texto, int indexL, int indexC, int indexP, ArrayList<String> aux){\n if (lista[indexL][indexC] == texto.charAt(indexP)){\n //se eu encontrar a ultima letra\n if(texto.length()-1 == indexP){\n aux.add(indexL + \".\" + indexC);\n //return ; //se der return acha apenas a primeira ocorrencia\n }\n else{\n getPalavraMatriz(lista, texto, indexL, indexC+1, indexP+1, aux);\n \n }\n //procura horizontal\n \n //procura vertical\n }\n else{\n if (listaInteiros[index] > listaInteiros[aux]){\n aux = index;\n return getMaiorNumero(listaInteiros, index+1);\n }\n else{\n return getMaiorNumero(listaInteiros, index +1);\n }\n }\n }",
"public char controlloOrizzontale(char[][] scacchiera)\n {\n for (int h=0;h<3;h++)\n {\n if (scacchiera[h][0]==scacchiera[h][1]&&scacchiera[h][1]==scacchiera[h][2]) return scacchiera[h][0];\n }\n return ' ';\n }",
"public char controlloVerticale(char[][] scacchiera)\n {\n for (int w=0;w<3;w++)\n {\n if (scacchiera[0][w]==scacchiera[1][w]&&scacchiera[1][w]==scacchiera[2][w]) return scacchiera[0][w];\n }\n return ' ';\n }",
"public void ComenzarJuego() {\n Random R = new Random();\n int i = -1; // declaro una variable i(intentos como deducion) para realizar la la busqueda de dicha palabra\n do{ //inicio un ciclo tipo (do) para que intentos sea igual a R.nextInt(palabras) en teoria el bucle\n //se ejecuta obligatoriamente\n i = R.nextInt(PalabrasAdivinar.length);\n \n }while (posicion == i); //si la condicion posicion se cumple, posicion va ser igual a i(intentos)\n posicion = i;\n palabras = PalabrasAdivinar[posicion];\n \n // y palbras va ser igual a PalabrasAdivinadar\n for (i = 0; i < palabras.length(); i++);{ \n //el ciclo for que es i(intentos) va ser igual a cero, donde inicia posicion, la condicion i va ser menor a palabras (relaciona),{ // y la ultima va manipular los valores que mencionamos\n if(palabras.charAt(i)!) // si se cumple palabras va ser igual a '' y solucion = caract sino = espacio para generar las palabras\n Solucion += (\"_\"); // debemos pensar que es muy necesario por el hecho de los espacios si por ejemplo gears of war \n else \n Solucion += (\" \");\n \n }\n \n Dibujar();\n \n }",
"public int orientaceGrafu(){\n\t\tint poc = 0;\n\t\tfor(int i = 0 ; i < hrana.length ; i++){\n\t\t\tif(!oriNeboNeoriHrana(hrana[i].zacatek,hrana[i].konec))\n\t\t\t poc++;\n\t\t}\n\t\tif(poc == 0 )\n\t\t\treturn 0;\n\t\t\n\t\tif(poc == pocetHr)\n\t\t\treturn 1;\n\t\t\n\t\t\n\t\t\treturn 2;\n\t\t \n\t\t\n\t\t\t\t\t\n\t}",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n String word = \"Tenet\";\n String word3 = \"tenet\";\n System.out.println(\"word \" + word);\n word.toLowerCase(); //porównanie bez wielkosci znakow\n //charAt(0) - zero,\n String[] Tablica = new String[word.length()];\n for (int i = 0; i < word.length(); i++) {\n Tablica[i] = String.valueOf(word.charAt(i));\n }\n String word2 = \"\";\n\n for (int i = (word.length() - 1); i >= 0; i--) {\n //System.out.print(Tablica[i]);\n word2 = word2 + Tablica[i];\n }\n //System.out.println();\n System.out.println(\"word 2 \" + word2);\n System.out.println(\"word 3 \" + word3);\n\n System.out.print(\"word 3 i word 2 \");\n if (word3.toLowerCase().equals(word2.toLowerCase())) {\n System.out.println(\"jest palidronem\");\n } else {\n System.out.println(\"nie jest palidronem\");\n }\n\n//koniec\n\n }",
"public static void main(String[] args) {\n \n String palabaras[], palabraSelected=\"\";\n char juego[];\n char letra; \n char seguir; \n \n \n //puede volver a jugar.\n //con las palabras que no ha salido. Gastando palabras\n //en caso de no existir palabra terminar el juego e indicar el mensaje respectivo.\n\n\n do {\n aciertos=0; errores=0;\n bandera=false;\n\n palabaras= leerArchivo();\n \n if(palabaras.length==0){\n System.out.println(\"No se puede jugar porque no hay palabras\");\n break; \n }\n\n \n \n String nombre= palabaras[0].substring(0,18).trim().toUpperCase();\n\n String pa= String.format(\"%1$-20s\", \"walter\");\n System.out.println(pa.length());\n\n // escribirLineaArchivo(palabaras);\n \n //obtenerPalabra\n //random para obtener la palabara\n \n palabraSelected= obtenerPalabra(palabaras);\n //palabraSelected= palabraSelected.toUpperCase();\n \n //obtnerVectorJuego\n //instacia del venctor juego con el tamaño de la palabra seleccionada\n juego= obtenerVectorJuego(palabraSelected);\n \n /*//1 manera apata de llenar el vector juego con la palabra seleccinada\n for(int i=0; i<palabraSelected.length(); i++){\n \n juego[i]=palabraSelected.charAt(i);\n \n }\n */\n \n //segunda manera\n\n /* if(!palabraSelected.equals(\"fdd\")){\n\n\n }*/\n \n System.out.println(\"BIENVENIDO AL JUEGO DEL AHORCADO..\"); \n \n do {\n \n bandera=false;\n //imprimirJuego\n imprimirJuego(palabraSelected, juego);\n \n letra = solicitarLetra();\n \n //validarLetra\n validarLetra(letra, juego);\n \n //imprimirResultado\n imprimirResultado();\n \n \n } while (aciertos!=juego.length && errores!=7);\n \n \n //imprimirResultadoFinal\n imprimirResultadoFinal(juego, palabraSelected);\n\n\n\n System.out.println(\"Desea volver a jugar(S/N)? \"); \n seguir= scan.next().toUpperCase().charAt(0);\n \n eliminarPalabraArchivo(palabraSelected, palabaras);\n \n\n\n\n\n } while (seguir=='S');\n }",
"private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }",
"public String corrector () {\n String aux = tabla_lexica.peek();\n \n if (aux.equals(\"$\") || aux.equals(\".\") || aux.equals(\"(\") || aux.equals(\")\") || aux.equals(\",\") || aux.equals(\"'\") || aux.equals(\"+\") || aux.equals(\"-\") || aux.equals(\"*\") || aux.equals(\"/\") || aux.equals(\"r\") || aux.equals(\"i\") || aux.equals(\"d\") || aux.equals(\"a\")) {\n return aux;\n } \n \n Pattern p1 = Pattern.compile(\"(([>\\\\<])+([=])|[(\\\\)\\\\;\\\\+\\\\-\\\\–\\\\*\\\\/\\\\'\\\\’\\\\‘\\\\,\\\\.\\\\>\\\\<\\\\=]|([@0-9A-Za-z]*)+([#\\\\.\\\\%\\\\_\\\\-]*)?[0-9]+([#\\\\%\\\\_\\\\-\\\\[0-9A-Za-z]*)?([#\\\\%\\\\-\\\\_\\\\[0-9A-Za-z]*)\"\n + \"|([@A-Za-z]*)+([#\\\\%\\\\_\\\\-]*)?[A-Za-z0-9]+([#\\\\%\\\\_\\\\-\\\\[0-9A-Za-z]*)?([#\\\\%\\\\-\\\\_\\\\[0-9A-Za-z]*)|[!\\\\$\\\\%\\\\&\\\\?\\\\¿\\\\¡\\\\_]|[a-zA-Z])\");\n \n Matcher m2 = p1.matcher(aux);\n while (m2.find()) {\n if(m2.group().matches(\"SELECT|FROM|WHERE|IN|AND|OR|CREATE|TABLE|CHAR|NUMERIC|NOT|NULL|CONSTARINT|KEY|PRIMARY|FOREIGN|REFERENCES|INSERT|INTO|VALUES|GO|CREATE|PROCEDURE|VARCHAR\"\n + \"|AS|IF|EXISTS|BEGIN|PRINT|END|ELSE\")) //Palabras reservadas\n {\n String pal = m2.group();\n switch (pal) {\n case \"SELECT\": aux = \"s\";\n auxLinea = m2.group();\n break;\n case \"FROM\": aux = \"f\";\n auxLinea = m2.group();\n break;\n case \"WHERE\": aux = \"w\";\n auxLinea = m2.group();\n break;\n case \"IN\": aux = \"n\";\n auxLinea = m2.group();\n break;\n case \"AND\": aux = \"y\";\n auxLinea = m2.group();\n break;\n case \"OR\": aux = \"o\";\n auxLinea = m2.group();\n break;\n case \"CREATE\": aux = \"c\";\n auxLinea = m2.group();\n break;\n case \"TABLE\": aux = \"t\";\n auxLinea = m2.group();\n break;\n case \"CHAR\": aux = \"h\";\n auxLinea = m2.group();\n break;\n case \"NUMERIC\": aux = \"u\";\n auxLinea = m2.group();\n break;\n case \"NOT\": aux = \"e\";\n auxLinea = m2.group();\n break;\n case \"NULL\": aux = \"g\";\n auxLinea = m2.group();\n break;\n case \"CONSTRAINT\": aux = \"b\";\n auxLinea = m2.group();\n break;\n case \"KEY\": aux = \"k\";\n auxLinea = m2.group();\n break;\n case \"PRIMARY\": aux = \"p\";\n auxLinea = m2.group();\n break;\n case \"FOREIGN\": aux = \"j\";\n auxLinea = m2.group();\n break;\n case \"REFERENCES\": aux = \"l\";\n auxLinea = m2.group();\n break;\n case \"INSERT\": aux = \"m\";\n auxLinea = m2.group();\n break;\n case \"INTO\": aux = \"q\";\n auxLinea = m2.group();\n break;\n case \"VALUES\": aux = \"v\";\n auxLinea = m2.group();\n break;\n }\n } else {\n \n }\n }\n return aux;\n }",
"private char hallarLetra() {\r\n\t\tchar[] letra= {'T','R','W','A','G','M','Y','F','P','D','X',\r\n\t\t\t\t\t'B','N','J','Z','S','Q','V','H','L','C','K','E'};\r\n\t\treturn letra[numeroDNI%23];\r\n\t}",
"public void rozseparujDokladnie() {\r\n\t\tboolean wSpacjach, wWyrazie;\r\n\t\tString[] liniaRozseparowana = null;\r\n\t\tArrayList<Integer> lista = null;\r\n\t\tArrayList<String> lista2 = null;\r\n\r\n\t\tfor (String linia : calaZawartosc) {\r\n\t\t\twSpacjach = false;\r\n\t\t\twWyrazie = false;\r\n\r\n\t\t\tlista = new ArrayList<Integer>();\r\n\r\n\t\t\tfor (int i = 0; i < linia.length(); ++i) {\r\n\t\t\t\tif (Character.isWhitespace(linia.charAt(i))) {\r\n\t\t\t\t\tif (!wSpacjach) {\r\n\t\t\t\t\t\twSpacjach = true;\r\n\t\t\t\t\t\twWyrazie = false;\r\n\t\t\t\t\t\tlista.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!wWyrazie) {\r\n\t\t\t\t\t\twSpacjach = false;\r\n\t\t\t\t\t\twWyrazie = true;\r\n\t\t\t\t\t\tlista.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlista.add(linia.length());\r\n\r\n\t\t\tlista2 = new ArrayList<String>();\r\n\r\n\t\t\tfor (int i = 0; i < lista.size() - 1; ++i)\r\n\t\t\t\tlista2.add(linia.substring(lista.get(i), lista.get(i + 1)));\r\n\r\n\t\t\tliniaRozseparowana = new String[lista2.size()];\r\n\t\t\tfor (int i = 0; i < liniaRozseparowana.length; ++i) {\r\n\t\t\t\tliniaRozseparowana[i] = lista2.get(i);\r\n\t\t\t}\r\n\r\n\t\t\tcalaZawartoscRozsep.add(liniaRozseparowana);\r\n\t\t}\r\n\t}",
"void Hrana(String start,String cil, char druh){\n\t\tint iStart = index(start);\n\t\tint iCil = index(cil);\n\t\t\n\t\tif(iStart == -1)\n\t\t\treturn;\n\t\tif(iCil == -1)\n\t\t\treturn;\n\t\t//orientovana hrana\n\t\tif(druh == '-' || druh == '>'){\n\t\t\tmatice[iStart][iCil] = 1;\n\t\t\tvrchP[iStart].pocetSousedu = vrchP[iStart].pocetSousedu +1;\n\t\t}\n\t\t\n\t\t//neorientovana\n\t\tif(druh == '-'){\n\t\t\tmatice[iCil][iStart] = 1;\n\t\t\tvrchP[iCil].pocetSousedu = vrchP[iCil].pocetSousedu +1;\t\n\t\t}\n\t\t\n\t\tHrana pom = new Hrana(start,cil,'W',druh);\n\t\thrana[pocetHr] = pom;\n\t\tpocetHr++;\n\t\t\n\t\t\n\t}",
"public static void laukiHorizontalaIrudikatu(int neurria, char ikurra) {\n int altuera=neurria/2;\n int zabalera=neurria;\n for(int i=1; i<=altuera; i++){//altuera\n System.out.println(\" \");\n \n \n for(int j=1; j<=zabalera; j++){//zabalera\n \n System.out.print(ikurra);\n }\n\n}\n }",
"@Override\n\tprotected char scegliMossaDaFare(int iAvversario, int jAvversario, char[][] scacchiera) {\n\t\t\n\t\tif(this.storicoMosseAvversario.isEmpty()) {\n\t\t\tswitch(new Random(2).nextInt()) {\n\t\t\t\tcase 0: return 'U';\n\t\t\t\tcase 1: return 'D';\n\t\t\t\tcase 2: if(this.posX == 4 && this.posY == DIM - 1)\n\t\t\t\t\t\t\treturn 'R';\n\t\t\t\t\t\treturn 'L';\n\t\t\t}\n\t\t}\n\n\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'U' && rimaneNellaScacchiera(this.posY + 1))\n\t\t\t//if(casellaLibera)\n\t\t\treturn 'D';\n\t\telse\n\t\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'D' && rimaneNellaScacchiera(this.posY - 1))\n\t\t\t\treturn 'U';\n\t\t\telse \n\t\t\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'L' && rimaneNellaScacchiera(this.posX + 1))\n\t\t\t\t\treturn 'R';\n\t\t\t\telse\n\t\t\t\t\treturn 'L';\n\t}",
"public void llenarDiccionario(){\n String[] letras = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\n \"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"1\",\"2\",\"3\",\"4\",\n \"5\",\"6\",\"7\",\"8\",\"9\",\" \"};\n String[] encriptado = {\"!\",\"]\",\"^\",\"æ\",\"ü\",\"×\",\"¢\",\"þ\",\"@\",\"§\",\"«\",\n \"A\",\"¥\",\"~\",\"c\",\"r\",\"z\",\"W\",\"8\",\"ç\",\"2\",\"L\",\"f\",\"&\",\"#\",\"[\",\",\",\n \"p\",\"Q\",\"K\",\"m\",\"s\",\"J\",\"V\",\"b\",\"U\",\"-\"};\n for (int i = 0; i < 36; i++) {\n diccionarioEncriptado.put(letras[i], encriptado[i]);\n }\n \n }",
"public String traduciraMorse(String texto, Boolean condicion) {\n String cadena = \"\";\n Boolean encontrada;\n\n // TEXTO a MORSE\n if (condicion == false) {\n for (int i = 0; i < texto.length(); i++) {\n String refuerzo = String.valueOf(texto.charAt(i));\n encontrada = false;\n for (Morse aux : AccesoFichero.lMorse) {\n if (aux.getLetra().equalsIgnoreCase(refuerzo)) {\n cadena += aux.getCodigo() + \" \";\n encontrada = true;\n }\n }\n if (encontrada == false) {\n cadena += \" \";\n }\n\n }\n // MORSE a TEXTO\n } else {\n String[] refuerzo = texto.split(\" \");\n for (int i = 0; i < refuerzo.length; i++) {\n\n encontrada = false;\n for (Morse aux : AccesoFichero.lMorse) {\n if (aux.getCodigo().equalsIgnoreCase(refuerzo[i])) {\n cadena += aux.getLetra() + \" \";\n encontrada = true;\n }\n }\n if (encontrada == false) {\n cadena += \" \";\n }\n\n }\n }\n\n return cadena;\n }",
"private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"protected void jouerOrdinateur() {\n Random rdmPropoOrdi = new Random();\n\n for (int i = 0; i < nbrPosition; i++) {\n int min = 0;\n int max = propositionHaute[i];\n if (propositionBasse[i] != 0) {\n min = propositionBasse[i] + 1;\n }\n\n if (propositionOrdinateur[i] != combinaisonJoueur[i]) {\n int propoOrdi = min + rdmPropoOrdi.nextInt(max - min);\n propositionOrdinateur[i] = (byte) (propoOrdi);\n\n if (propositionOrdinateur[i] < combinaisonJoueur[i]) {\n propositionBasse[i] = propositionOrdinateur[i];\n } else {\n propositionHaute[i] = propositionOrdinateur[i];\n }\n }\n }\n }",
"public static String sorte(String chaine) {\r\n boolean estNumerique = false;\r\n boolean estAlphabetique = false;\r\n\r\n char car;\r\n\r\n if (chaine != null){\r\n if(!chaine.isEmpty()){\r\n for (int i = 0; i < chaine.length(); i++){\r\n car = chaine.charAt(i);\r\n if(car >= '0' && car <= '9' ){\r\n estNumerique = true;\r\n }else{\r\n estAlphabetique = true;\r\n }\r\n }\r\n if(estNumerique && estAlphabetique){\r\n chaine = \"alphanumerique\";\r\n }else if(estNumerique){\r\n chaine = \"numerique\";\r\n }else{\r\n chaine = \"alphabetique\";\r\n }\r\n }else {\r\n chaine = \"vide\";\r\n }\r\n }else{\r\n chaine = \"nulle\";\r\n }\r\n\r\n\r\n\r\n return chaine; //pour compilation\r\n }",
"public static void main(String[] args) {\n System.out.println(\"***************************\");\n System.out.println(\"****** Jeux du Pendu ******\");\n System.out.println(\"***************************\");\n System.out.println(\"***** Moins de points *****\");\n System.out.println(\"******** tu auras *********\");\n System.out.println(\"****** Mieux ce sera ******\");\n System.out.println(\"***************************\");\n System.out.println(\"***************************\");\n\n //init tableau de mots\n String[] listeDeMots = { \"css\", \"html\", \"diagramme\", \"linux\", \"windows\" };\n\n boolean victory = false;\n int nbErreur = 0;\n //choix random dans la liste de mots\n String motCache = listeDeMots[(int) (Math.random() * listeDeMots.length)];\n\n //transformation des caractères du mot en underscore\n char[] tabMotCache = new char[motCache.length()];\n for (int i = 0; i < motCache.length(); i++) {\n tabMotCache[i] = '_';\n }\n System.out.println(\n \"Le mot caché contient \" + motCache.length() + \" lettres.\"\n );\n System.out.println(tabMotCache);\n\n Scanner lettre = new Scanner(System.in);\n while ((victory == false) || (nbErreur <= 7)) {\n String lettreChoisie = lettre.next();\n\n System.out.println(\"Veuillez saisir une lettre !\");\n // prend la première lettre saisi par l'user\n if (lettreChoisie.length() > 1) {\n lettreChoisie = lettreChoisie.substring(0, 1);\n }\n // si la lettre tapée est dans le mot remplace l'underscore par la lettre\n // et répète l'occurence pour plusieurs fois la même lettre dans le mot\n if (motCache.contains(lettreChoisie)) {\n int index = motCache.indexOf(lettreChoisie);\n\n while (index >= 0) {\n tabMotCache[index] = lettreChoisie.charAt(0);\n index = motCache.indexOf(lettreChoisie, index + 1);\n System.out.println(tabMotCache);\n }\n } else {\n nbErreur++;\n System.out.println(\"Tu as commis \" + nbErreur + \" erreurs..\");\n System.out.println(\"Il te reste \" + (7 - nbErreur) + \" essais !\");\n System.out.println(tabMotCache);\n }\n\n // on récupère le tableau de caractère en string pour vérifier l'égalité\n // avec le mot caché et déclarer la victoire\n String motDeviner = new String(tabMotCache);\n if (motDeviner.equals(motCache)) {\n victory = true;\n System.out.println(\"You win !\");\n System.out.println(\"Tu as commis \" + nbErreur + \" erreur !\");\n System.out.println(\"Tu as obtenu \" + (nbErreur * 5) + \" points !\");\n break;\n }\n if (nbErreur == 7) {\n System.out.println(\n \"You looose ! Le mot à deviner était : \" + motCache + \" !\"\n );\n System.out.println(\"Tu as obtenu \" + (nbErreur * 5) + \" points !\");\n break;\n }\n }\n lettre.close();\n }",
"public String Alrevez() {\n String retorno = \"\";\n for (int i = getCadena().length() - 1; i >= 0; i--) {\n retorno += getCadena().charAt(i);\n }\n return retorno;\n }",
"public String ocurrencia() {\n String palabra = \"\";\n int retorno = 0;\n for (int i = 0; i < getCadena().length(); i++) {\n\n if ((getCadena().charAt(i) == ' ') || (i > getCadena().length() - 2)) {\n if (palabra.equals(getBuscar())) {\n retorno++;\n palabra = \"\";\n } else {\n palabra = \"\";\n }\n\n } else {\n palabra += getCadena().charAt(i);\n\n }\n }\n return (\"La cantida de ocurrencias son de:\" + '\\n' + retorno);\n }",
"private String tulostuksenApu(){\r\n String apu = \"Rivitiedosto: \";\r\n for(int i = 0; i<rivitiedot.length; i++){\r\n apu = apu + i+\": \";\r\n for(int k = 1; k <= rivitiedot[i].getKoko(); k++){\r\n apu = apu + \" \"+rivitiedot[i].get(k);\r\n }\r\n apu = apu + \" \";\r\n }\r\n\r\n return apu;\r\n }",
"public static void main(String[] args) {\n\t\t\n\t\tScanner lector= new Scanner(System.in);\n\t System.out.println(\"Escriu una frase, et donare info:\");\n\t \n\t String primera = lector.nextLine();\n\t int [] lala = new int[26];\n\t int contador = 0;\n\t \n\t for(int i=0;i<primera.length();i++){\n\t \tchar a = primera.charAt(i);\n\t \tfor (int j=0;j<abe.length();j++){\n\t \t\tchar e = abe.charAt(j);\n\t \t\tif(a==e){lala[j]=lala[j]+1;}\n\t \t}\n\t \n\t }\n\t \n\t for(int i=0;i<lala.length;i++){\n\t \t\tif(lala[i]!=0){\n\t \t\tchar e = abe.charAt(i);\n\t \t\tSystem.out.print(e+\" aparaeix: \");\n\t \t\n\t \tSystem.out.println(lala[i]+ \"vegades.\");}}\n\t }",
"public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"isminizi giriniz\");\n//\t\tString isim=scan.nextLine().toLowerCase();\n//\t\tSystem.out.println(\"soyadinizi giriniz\");\n//\t\tString soyisim=scan.nextLine().toLowerCase();\n//\t\tSystem.out.print(isim.substring(0, 1).toUpperCase()+isim.substring(1, isim.length()));\n//\t\tSystem.out.print(\" \" +soyisim.substring(0, 1).toUpperCase() +soyisim.substring(1, soyisim.length()));\n\n\t\t/// hocanin cozumu\n\t\t// int ikinciBasNok = isimSoyIsim.indexOf(\" \");\n// System.out.print(isimSoyIsim.substring(0,1).toUpperCase());\n// System.out.print(isimSoyIsim.substring(1, ikinciBasNok+1).toLowerCase());\n// System.out.print(isimSoyIsim.substring(ikinciBasNok+1, ikinciBasNok+2).toUpperCase());\n// System.out.println(isimSoyIsim.substring(ikinciBasNok+2).toLowerCase());\n\n\t\t/// Array ile cozum\n\t\tString isimSoyIsim = scan.nextLine();\n\t\t\n// 0/fedai 1/ocak //isimler.length => 2 - 1 1 != 1\n\t\tString[] isimler = isimSoyIsim.split(\" \");\n\n\t\tfor (int i = 0; i < isimler.length; i++) {\n\t\t\tisimler[i] = isimler[i].toLowerCase();\n\t\t\t\tif(isimler.length-1 != i ) //\n\t\t\tSystem.out.print(isimler[i].substring(0, 1).toUpperCase() + isimler[i].substring(1) + \" \");\n\t\t\t\telse\n\t\t System.out.print(isimler[i].substring(0,1).toUpperCase()+isimler[i].substring(1));\n\t\t}\nscan.close();\n\t}",
"public static void main(String[] args) throws IOException {\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\r\n System.out.println(\" Escribe : \");\r\n String texto=br.readLine().toUpperCase();\r\n String alfabeto = \"ABCDEFGHIJKLMNÑOPQRSTUVWXYZ\";\r\n\r\n int[] recuento=new int[alfabeto.length()];\r\n contarLetra(texto,alfabeto,recuento);\r\n visualizarRecuento(alfabeto,recuento);\r\n\r\n }",
"public void resolver(){\n\t\tfor(int i = 0 ; i < tablero.getTamanio(); i++){\n\t\t\tfor(int j = 0 ; j < diccionario.getCantPalabras(); j++){\n\t\t\t\tif(tablero.getTablero()[i].contains(diccionario.getPalabra()[j].getPalabra()) && !diccionario.getPalabra()[j].isEncontrada()){\n\t\t\t\t\tdiccionario.getPalabra()[j].setEncontrada(true);\n\t\t\t\t\trespuesta.add(Integer.toString(j+1) + \"\\tE\");\n\t\t\t\t} else if (tablero.getTablero()[i].contains(diccionario.getPalabra()[j].invertirPalabra()) && !diccionario.getPalabra()[j].isEncontrada()){\n\t\t\t\t\tdiccionario.getPalabra()[j].setEncontrada(true);\n\t\t\t\t\trespuesta.add(Integer.toString(j+1) + \"\\tO\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Busca sentido Norte y Sur\n\t\tString aux = \"\";\n\t\tfor(int i = 0 ; i < tablero.getTamanio(); i++){\n\t\t\tfor(int j = 0 ; j < tablero.getTamanio(); j++){\n\t\t\t\taux += tablero.getTablero()[j].charAt(i);\n\t\t\t}\n\t\t\tfor(int j = 0 ; j < diccionario.getCantPalabras() ; j++){\n\t\t\t\tif(aux.contains(diccionario.getPalabra()[j].getPalabra()) && !diccionario.getPalabra()[j].isEncontrada()){\n\t\t\t\t\tdiccionario.getPalabra()[j].setEncontrada(true);\n\t\t\t\t\trespuesta.add(Integer.toString(j+1) + \"\\tS\");\n\t\t\t\t} else if(aux.contains(diccionario.getPalabra()[j].invertirPalabra()) && !diccionario.getPalabra()[j].isEncontrada()){\n\t\t\t\t\tdiccionario.getPalabra()[j].setEncontrada(true);\n\t\t\t\t\trespuesta.add(Integer.toString(j+1) + \"\\tN\");\n\t\t\t\t}\n\t\t\t}\n\t\t\taux = \"\";\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tPrintWriter pw = new PrintWriter(new File(\"Rapigrama1.out\"));\n\t\t\tfor(int i = 0 ; i < respuesta.size(); i++){\n\t\t\t\tpw.println(respuesta.get(i));\n\t\t\t}\n\t\t\tpw.close();\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) {\n String a = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ#-\";\r\n //---------------------------------------------------------------------\r\n \r\n //Memanggil alfabet String yang diinginkan\r\n //Menentukan alfabet untuk Nama\r\n char hasil1 = a.charAt(0);\r\n char hasil2 = a.charAt(25);\r\n char hasil3 = a.charAt(7);\r\n char hasil4 = a.charAt(0);\r\n char hasil5 = a.charAt(17);\r\n char hasil6 = a.charAt(27);\r\n char hasil7 = a.charAt(1);\r\n char hasil8 = a.charAt(4);\r\n char hasil9 = a.charAt(17);\r\n char hasil10 = a.charAt(11);\r\n char hasil11 = a.charAt(8);\r\n char hasil12 = a.charAt(0);\r\n char hasil13 = a.charAt(13);\r\n char hasil14 = a.charAt(0);\r\n //---------------------------------------------------------------------\r\n \r\n //Menentukan alfabet untuk Kelas\r\n char hasil15 = a.charAt(23);\r\n char hasil16 = a.charAt(8);\r\n char hasil17 = a.charAt(8);\r\n char hasil18 = a.charAt(27);\r\n char hasil19 = a.charAt(17);\r\n char hasil20 = a.charAt(15);\r\n char hasil21 = a.charAt(11);\r\n char hasil22 = a.charAt(27);\r\n char hasil23 = a.charAt(1);\r\n //---------------------------------------------------------------------\r\n \r\n //Saat nya memanggil output yang telah di tentukan pada variable-variable diatas\r\n System.out.println(\"ALFABET TERSEDIA : \"+a);\r\n //---------------------------------------------------------------------\r\n \r\n //---------------------------------------------------------------------\r\n System.out.println(\"---------------------------------------------------\"\r\n + \"------------------\");\r\n //---------------------------------------------------------------------\r\n \r\n //Pemanggilan Nama\r\n System.out.println(\"Nama : \"+hasil1+\"\"+hasil2+\"\"+hasil3+\"\"+hasil4+\r\n \"\"+hasil5+\"\"+hasil6+\"\"+hasil7+\"\"+hasil8+\"\"+hasil9+\"\"+hasil10+\"\"\r\n +hasil11+\"\"+hasil12+\"\"+hasil13+\"\"+hasil14);\r\n //---------------------------------------------------------------------\r\n \r\n //Pemanggilan Kelas\r\n System.out.println(\"Kelas : \"+hasil15+\"\"+hasil16+\"\"+hasil17+\"\"+\r\n hasil18+\"\"+hasil19+\"\"+hasil20+\"\"+hasil21+\"\"+hasil22+\"\"+hasil23);\r\n //---------------------------------------------------------------------\r\n \r\n //---------------------------------------------------------------------\r\n System.out.println(\"---------------------------------------------------\"\r\n + \"------------------\");\r\n //---------------------------------------------------------------------\r\n \r\n }",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }",
"@Override\r\n\tpublic String encriptar(String string) {\n\r\n \r\n String newName=\"\";\r\n for (int i = 0; i < string.length(); i++) {\r\n // instrucción switch con tipo de datos int\r\n switch (string.charAt(i)) \r\n {\r\n case 'a' : newName+=\"1,\";\r\n break;\r\n case 'b' : newName+=\"2,\";\r\n break;\r\n case 'c' : newName+=\"3,\";\r\n break;\r\n case 'd' : newName+=\"4,\";\r\n break;\r\n case 'e' : newName+=\"5,\";\r\n break;\r\n case 'f' : newName+=\"6,\";\r\n break;\r\n case 'g' : newName+=\"7,\";\r\n break;\r\n case 'h' : newName+=\"8,\";\r\n break;\r\n case 'i' : newName+=\"9,\";\r\n break;\r\n case 'j' : newName+=\"10,\";\r\n break;\r\n case 'k' : newName+=\"11,\";\r\n break;\r\n case 'l' : newName+=\"12,\";\r\n break;\r\n case 'm' : newName+=\"13,\";\r\n break;\r\n case 'n' : newName+=\"14,\";\r\n break;\r\n case 'ñ' : newName+=\"15,\";\r\n break;\r\n case 'o' : newName+=\"16,\";\r\n break;\r\n case 'p' : newName+=\"17,\";\r\n break;\r\n case 'q' : newName+=\"18,\";\r\n break;\r\n case 'r' : newName+=\"19,\";\r\n break;\r\n case 's' : newName+=\"20,\";\r\n break;\r\n case 't' : newName+=\"21,\";\r\n break;\r\n case 'u' : newName+=\"22,\";\r\n break;\r\n case 'v' : newName+=\"23,\";\r\n break;\r\n case 'w' : newName+=\"24,\";\r\n break;\r\n case 'x' : newName+=\"25,\";\r\n break;\r\n case 'y' : newName+=\"26,\";\r\n break;\r\n case 'z' : newName+=\"27,\";\r\n break;\r\n case ' ' : newName+=\"0,\";\r\n break;\r\n \r\n \r\n }\r\n \r\n }\r\n \r\n String palabraFinal= eliminarComaSi(newName);\r\n return palabraFinal;\r\n\t}",
"static String pangrams(String str) {\n boolean[] mark = new boolean[26]; \n \n int index=0; \n \n for (int i=0;i<str.length();i++) \n { \n \n if ('A'<=str.charAt(i) && str.charAt(i)<='Z') \n {\n index=str.charAt(i)-'A'; \n }\n \n else if ('a'<=str.charAt(i) && str.charAt(i)<='z') \n {\n index=str.charAt(i)-'a'; \n }\n \n else\n continue; \n mark[index]=true; \n } \n \n for (int i =0;i<=25;i++) \n {\n if (mark[i]==false) \n {\n return \"not pangram\";\n }\n }\n \n return \"pangram\";\n\n\n }",
"private static String criaStringDeSaida(Graph grafo, ArrayList<Integer> busca) {\r\n\t\tint[] ordenaSaida = new int[grafo.getVertexNumber() * 3 + 3];\r\n\r\n\t\tfor (int i = 0; i < busca.size(); i += 3) {\r\n\t\t\tordenaSaida[busca.get(i) * 3] = busca.get(i); // vertice\r\n\t\t\tordenaSaida[busca.get(i) * 3 + 1] = busca.get(i + 1); // nivel\r\n\t\t\tordenaSaida[busca.get(i) * 3 + 2] = busca.get(i + 2); // pai\r\n\t\t}\r\n\r\n\t\tString retorno = \"\";\r\n\r\n\t\tfor (int i = 3; i < ordenaSaida.length; i += 3) {\r\n\t\t\tretorno += ordenaSaida[i] + \" - \" + ordenaSaida[i + 1] + \" \";\r\n\t\t\tif (ordenaSaida[i + 2] == 0) {\r\n\t\t\t\tretorno += \"-\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tretorno += ordenaSaida[i + 2];\r\n\t\t\t}\r\n\r\n\t\t\tretorno += \"\\n\";\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}",
"public static void main(String[] args) {\n\t\t\tScanner tastiera=new Scanner(System.in);\r\n\t\t\tint k=0, j=0;\r\n\t\t\tint conta=0;\r\n\t\t\tString risposta=\"\";\r\n\t\t\tRandom r=new Random();\r\n\t\t\tArrayList<Giocatore> partecipantiOrdinati=new ArrayList<Giocatore>();\r\n\t\t\tArrayList<Giocatore> partecipantiMescolati=new ArrayList<Giocatore>();\r\n\t\t\tArrayList<Giocatore> perdenti=new ArrayList<Giocatore>();\r\n\t\t\tfor(int i=0;i<GIOCATORI.length;i++) {\r\n\t\t\t\tpartecipantiOrdinati.add(new Giocatore(GIOCATORI[i]));\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<GIOCATORI.length;i++) {\r\n\t\t\t\tint indice=Math.abs(r.nextInt()%partecipantiOrdinati.size());\r\n\t\t\t\tpartecipantiMescolati.add(partecipantiOrdinati.get(indice));\r\n\t\t\t\tpartecipantiOrdinati.remove(indice);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"INIZIA IL TORNEO DI BRISCOLA!\");\r\n\t\t\twhile(partecipantiMescolati.size()!=1) {\r\n\t\t\t\tSystem.out.println(\"Fase \"+(j+1));\r\n\t\t\twhile(conta<partecipantiMescolati.size()) {\r\n\t\t\t\tMazzo m=new Mazzo();\r\n\t\t\t\tm.ordinaMazzo();\r\n\t\t\t\tm.mescolaMazzo();\r\n\t\t\t\tGiocatore g1=partecipantiMescolati.get(conta);\r\n\t\t\t\tGiocatore g2=partecipantiMescolati.get(conta+1);\r\n\t\t\t\tPartita p=new Partita(g1,g2,m);\r\n\t\t\t\tSystem.out.println(\"Inizia la partita tra \"+g1.getNickName()+\" e \"+g2.getNickName());\r\n\t\t\t\tSystem.out.println(\"La briscola è: \"+p.getBriscola().getCarta());\r\n\t\t\t\tSystem.out.println(\"Vuoi skippare la partita? \"); risposta=tastiera.next();\r\n\t\t\t\tif(risposta.equalsIgnoreCase(\"si\")) {\r\n\t\t\t\t\tg1.setPunteggio(p.skippa());\r\n\t\t\t\t\tg2.setPunteggio(PUNTI_MASSIMI-g1.getPunteggio());\r\n\t\t\t\t\tif(p.vittoria()) {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto \"+g1.getNickName());//vince g1\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g1.getPunteggio());\r\n\t\t\t\t\t\tp.aggiungiPerdente(g2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto \"+g2.getNickName());// vince g2\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g2.getPunteggio());\r\n\t\t\t\t\t\tp.aggiungiPerdente(g1);\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\tp.daiLePrimeCarte();\r\n\t\t\t\t\tCarta c1=new Carta(g1.gioca().getCarta());\r\n\t\t\t\t\tCarta c2=new Carta(g2.gioca().getCarta());\r\n\t\t\t\t\tg1.eliminaDaMano(c1); g2.eliminaDaMano(c2);\r\n\t\t\t\t\tint tracciatore=1; //parte dal giocatore 1\r\n\t\t\t\t\twhile(!m.mazzoMescolato.isEmpty())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(c1.getCarta()+\" \"+c2.getCarta());\r\n\t\t\t\t\t\tif(p.chiPrende(c1, c2) && tracciatore==1){\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g1.getNickName());\r\n\t\t\t\t\t\t\tg1.setPunteggio(g1.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tp.pesca(g1); p.pesca(g2);\r\n\t\t\t\t\t\t\tc1=g1.gioca(); c2=g2.gioca();\r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(p.chiPrende(c2, c1)) {\r\n\t\t\t\t\t\t\ttracciatore=2;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g2.getNickName());\r\n\t\t\t\t\t\t\tg2.setPunteggio(g2.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tp.pesca(g2); p.pesca(g1);\r\n\t\t\t\t\t\t\tc2=g2.gioca(); c1=g1.gioca();\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2); \r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{tracciatore = 1; k--;}\r\n\t\t\t\t\t\tSystem.out.println(g1.getPunteggio()+\" \"+g2.getPunteggio());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"Manche Finale\");\r\n\t\t\t\t\twhile(!g1.carteInMano.isEmpty() || !g2.carteInMano.isEmpty()) {\r\n\t\t\t\t\t\tSystem.out.println(c1.getCarta()+\" \"+c2.getCarta());\r\n\t\t\t\t\t\tif(p.chiPrende(c1, c2) && tracciatore==1){\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g1.getNickName());\r\n\t\t\t\t\t\t\tg1.setPunteggio(g1.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tc1=g1.gioca(); c2=g2.gioca();\r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(p.chiPrende(c2, c1)) {\r\n\t\t\t\t\t\t\ttracciatore=2;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g2.getNickName());\r\n\t\t\t\t\t\t\tg2.setPunteggio(g2.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tc2=g2.gioca(); c1=g1.gioca();\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2);\r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\ttracciatore = 1;\r\n\t\t\t\t\t\tSystem.out.println(g1.getPunteggio()+\" \"+g2.getPunteggio());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(p.chiPrende(c1, c2) && tracciatore==1) {\r\n\t\t\t\t\t\tSystem.out.println(\"Prende \"+g1.getNickName());\r\n\t\t\t\t\t\tg1.setPunteggio(g1.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Prende \"+g2.getNickName());\r\n\t\t\t\t\t\tg2.setPunteggio(g2.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"Situazione: \"+g1.getNickName()+\": \"+g1.getPunteggio());\r\n\t\t\t\t\tSystem.out.println(g2.getNickName()+\": \"+g2.getPunteggio());\r\n\t\t\t\t\tif(p.vittoria()) {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto il giocatore \"+g1.getNickName());\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g1.getPunteggio());\r\n\t\t\t\t\t\tperdenti.add(g2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto il giocatore \"+g2.getNickName());\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g2.getPunteggio());\r\n\t\t\t\t\t\tperdenti.add(g1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tconta+=2;\r\n\t\t\t\tSystem.out.println(\"Premi una lettera per continuare: \"); risposta=tastiera.next();\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\tconta=0;\r\n\t\t\tfor(int i=0;i<perdenti.size();i++)\r\n\t\t\t\tpartecipantiMescolati.remove(perdenti.get(i));\r\n\t\t\tSystem.out.println(\"Restano i seguenti partecipanti: \");\r\n\t\t\tfor(int i=0;i<partecipantiMescolati.size();i++) {\r\n\t\t\t\tSystem.out.println(partecipantiMescolati.get(i).getNickName());\r\n\t\t\t\tpartecipantiMescolati.get(i).setPunteggio(0);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Il vincitore del torneo è: \"+partecipantiMescolati.get(0).getNickName());\r\n\t\t\t\t\r\n\t}",
"static public String a_letraAzar() {\n\t\tRandom azar= new Random();\n\n\t\tString letraAzar[]={\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"ó\",\"O\",\"P\",\"Q\",\"R\",\"S\",\n\t\t\t\t\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\"};\n\n\t\treturn letraAzar[azar.nextInt(letraAzar.length)];\n\t}",
"public void tradOra(){\r\n leerOracion();\r\n String res=\"\";\r\n for(int i=0; i<orac.size(); i++){\r\n res+=tradPal(rz, orac.get(i).trim())+\" \";\r\n }\r\n System.out.println(res);\r\n }",
"public void insertar (String p) {\n int x = p.length();\n for (int i = x-1; i >=0; i--) {\n System.out.println(p.charAt(i));\n pila.add(p.charAt(i)+\"\");\n }\n }",
"public static int convert3(String a)\r\n {\r\n HashMap<String,Integer> map = new HashMap<String,Integer>();\r\n \r\n map.put(\"ORADEA\", 0);\r\n\t\tmap.put(\"SIBIU\", 1);\r\n\t\tmap.put(\"ZERIND\", 2);\r\n\t\tmap.put(\"ARAD\", 3);\r\n\t\tmap.put(\"TIMISOARA\", 4);\r\n\t\tmap.put(\"LUGOJ\", 5);\r\n\t\tmap.put(\"MEHADIA\", 6);\r\n\t\tmap.put(\"DROBETA\", 7);\r\n\t\tmap.put(\"FAGARAS\", 8);\r\n\t\tmap.put( \"PITESTI\", 9);\r\n\t\tmap.put(\"CRAIOVA\", 10);\r\n\t\tmap.put(\"Giugiu\", 11);\r\n\t\tmap.put(\"Neamt\", 12);\r\n\t\tmap.put(\"Pitesti\", 13);\r\n\t\tmap.put(\"Rimnicu_Vikea\", 14);\r\n\t\tmap.put(\"Urziceni\", 15);\r\n\t\tmap.put(\"Valsui\", 16);\r\n\t\tmap.put( \"BUCHAREST\", 17);\r\n\t\tmap.put(\"LASI\",18);\r\n\t\tmap.put(\"EFORIE\", 19);\r\n\t\tmap.put(\"HIRSOVA\",20);\r\n \r\n return(map.get(a));\r\n \r\n }",
"private int patikrinimas(String z) {\n int result = 0;\n for (int i = 0; i < z.length(); i++) {\n if (z.charAt(i) == 'a') {\n result++;\n }\n }\n System.out.println(\"Ivestas tekstas turi simboliu a. Ju suma: \" + result);\n return result;\n }",
"@Override\r\n\t\tpublic GeometrijskiLik stvoriIzStringa(String parametri) {\r\n\r\n\t\t\tString[] parametriNiz = parametri.split(\"\\\\s+\");\r\n\t\t\tif (parametriNiz.length != 4) {\r\n\t\t\t\tthrow new IllegalArgumentException(\"Netocan broj argumenata.\");\r\n\t\t\t}\r\n\t\t\tint[] parametriBrojevi = new int[4];\r\n\t\t\tfor (int i = 0; i < parametriNiz.length; i++) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tparametriBrojevi[i] = Integer.parseInt(parametriNiz[i]);\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\t\t\"Nisu dani integer brojevi.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn new Elipsa(parametriBrojevi[0], parametriBrojevi[1],\r\n\t\t\t\t\tparametriBrojevi[2], parametriBrojevi[3]);\r\n\t\t}",
"public AnalizadorDeTexto(String t) {\n String[] palabras = t.split(\" +\");\n m = new TablaHash<String, Integer>(palabras.length);\n for (int i = 0; i < palabras.length; i++) { \n String pal = palabras[i].toLowerCase();\n Integer frec = m.recuperar(pal); \n if (frec != null) {\n frec++;\n m.insertar(pal, frec); \n }\n else { m.insertar(pal, 1); }\n }\n }",
"public static void main(String[] args) {\n int kor,eng,math;\r\n char score='A';\r\n // 사용자가 입력 \r\n /*Scanner scan=new Scanner(System.in);\r\n System.out.print(\"국어 점수 입력:\");\r\n kor=scan.nextInt();\r\n System.out.print(\"영어 점수 입력:\");\r\n eng=scan.nextInt();\r\n System.out.print(\"수학 점수 입력:\");\r\n math=scan.nextInt();*/\r\n kor=input(\"국어\");\r\n eng=input(\"영어\");\r\n math=input(\"수학\");\r\n \r\n // 학점 \r\n int avg=(kor+eng+math)/30;\r\n score=hakjum(avg);// 메소드는 호출 => 메소드 처음부터 실행 => 결과값을 넘겨주고 다음문장으로 이동\r\n /*switch(avg)\r\n {\r\n case 10:\r\n case 9:\r\n \tscore='A';\r\n \tbreak;\r\n case 8:\r\n \tscore='B';\r\n \tbreak;\r\n case 7:\r\n \tscore='C';\r\n \tbreak;\r\n case 6:\r\n \tscore='D';\r\n \tbreak;\r\n default:\r\n \tscore='F';\r\n }*/\r\n \r\n System.out.println(\"국어:\"+kor);\r\n System.out.println(\"영어:\"+eng);\r\n System.out.println(\"수학:\"+math);\r\n System.out.println(\"총점:\"+(kor+eng+math));\r\n System.out.printf(\"평균:%.2f\\n\",(kor+eng+math)/3.0);\r\n System.out.println(\"학점:\"+score);\r\n\t}",
"public String alienOrder(String[] words) {\n // HashMap to maintain the map relationship between letters\n HashMap<Character, HashSet<Character>> hashMap = new HashMap<Character, HashSet<Character>>();\n // Store the indegree of each letter\n HashMap<Character, Integer> degree = new HashMap<Character, Integer>();\n StringBuilder ret = new StringBuilder();\n if (words == null || words.length < 1) return ret.toString();\n\n // Init indegree for every letter\n for (int i = 0; i < words.length; i++) {\n String word = words[i];\n for (int j = 0; j < word.length(); j++) {\n degree.put(word.charAt(j), 0);\n }\n }\n\n // Build graph\n for (int i = 0; i < words.length - 1; i++) {\n String currentWord = words[i];\n String nextWord = words[i + 1];\n int diffCharIndex = 0;\n int minLength = Math.min(currentWord.length(), nextWord.length());\n while (diffCharIndex < minLength && currentWord.charAt(diffCharIndex) == nextWord.charAt(diffCharIndex))\n diffCharIndex++;\n if (diffCharIndex < minLength) {\n Character currentChar = currentWord.charAt(diffCharIndex);\n Character nextChar = nextWord.charAt(diffCharIndex);\n // Add next letter to the map of current letter\n HashSet<Character> setForCurrentLetter = hashMap.get(currentChar);\n if (setForCurrentLetter == null) {\n setForCurrentLetter = new HashSet<Character>();\n }\n if (!setForCurrentLetter.contains(nextChar)) {\n setForCurrentLetter.add(nextChar);\n hashMap.put(currentChar, setForCurrentLetter);\n // Add 1 to next letter's indegree\n degree.put(nextChar, degree.get(nextChar) + 1);\n }\n }\n }\n\n Queue<Character> queue = new LinkedList<Character>();\n for (Character c: degree.keySet()) {\n if (degree.get(c) == 0) {\n queue.add(c);\n }\n }\n while (!queue.isEmpty()) {\n Character c = queue.poll();\n ret.append(c);\n\n HashSet<Character> setForCurrentChar = hashMap.get(c);\n if (setForCurrentChar != null) {\n for (Character ch: setForCurrentChar) {\n int indegree = degree.get(ch);\n degree.put(ch, indegree - 1);\n if (indegree - 1 == 0) {\n queue.add(ch);\n }\n }\n }\n }\n String retString = ret.toString();\n if (retString.length() != degree.size()) return \"\";\n return retString;\n }",
"public void pararPersonaje(char letra) {\n switch (letra) {\n case 'd':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Derecha\";//Guarda en la variable jugadorVista hacia donde miramos\n }\n break;\n case 's':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Abajo\";\n }\n break;\n case 'a':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Izquierda\";\n }\n break;\n case 'w':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Arriba\";\n }\n break;\n }\n\n }",
"private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public static String seuraavaArvaus(HashMap<String, Integer> muisti, String viimeisimmat, String kaikki) {\n if (kaikki.length() < 3) {\n return \"k\";\n }\n\n String viimKivi = viimeisimmat + \"k\";\n String viimPaperi = viimeisimmat + \"p\";\n String viimSakset = viimeisimmat + \"s\";\n \n int viimKiviLkm = 0;\n int viimPaperiLkm = 0;\n int viimSaksetLkm = 0;\n String arvaus = \"k\";\n int viimValueMax = 0;\n /*\n Sopivan valinnan etsiminen tehdään tarkastelemalla käyttäjän kahta viimeistä\n syötettä ja vertailemalla niitä koko historiaan. Mikäli historian mukaan\n kahta viimeistä syötettä seuraa useimmin kivi, tekoälyn tulee pelata paperi.\n Mikäli kahta viimeistä syötettä seuraa useimmin paperi, tekoälyn tulee \n pelata sakset. Mikäli taas kahta viimeistä syötettä seuraa useimmin sakset, \n tekoälyn tulee pelata kivi. Muissa tapauksissa pelataan kivi.\n */\n if (muisti.containsKey(viimKivi)) {\n viimKiviLkm = muisti.get(viimKivi);\n }\n if (muisti.containsKey(viimPaperi)) {\n viimPaperiLkm = muisti.get(viimPaperi);\n }\n if (muisti.containsKey(viimSakset)) {\n viimSaksetLkm = muisti.get(viimSakset);\n }\n\n if (viimKiviLkm > viimPaperiLkm && viimKiviLkm > viimSaksetLkm) {\n return \"p\";\n }\n if (viimPaperiLkm > viimKiviLkm && viimPaperiLkm > viimSaksetLkm) {\n return \"s\";\n }\n if (viimSaksetLkm > viimKiviLkm && viimSaksetLkm > viimPaperiLkm) {\n return \"k\";\n }\n\n return arvaus;\n }",
"private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }",
"private String Interpretar(String num) {\r\n\t\tif(num.length() > 3)\r\n\t\t\treturn \"\";\r\n\t\tString salida=\"\";\r\n\t\t\r\n\t\tif(Dataposi(num,2) != 0)\r\n\t\t\tsalida = Centenas[Dataposi(num,2)-1];\r\n\t\t\r\n\t\tint k = Integer.parseInt(String.valueOf(Dataposi(num,1))+String.valueOf(Dataposi(num,0)));\r\n\r\n\t\tif(k <= 20)\r\n\t\t\tsalida += Numero[k];\r\n\t\telse {\r\n\t\t\tif(k > 30 && Dataposi(num,0) != 0)\r\n\t\t\t\tsalida += Decenas[Dataposi(num,1)-2] + \"Y \" + Numero[Dataposi(num,0)];\r\n\t\t\telse\r\n\t\t\t\tsalida += Decenas[Dataposi(num,1)-2] + Numero[Dataposi(num,0)];\r\n\t\t}\r\n\t\t//Caso especial con el 100\r\n\t\tif(Dataposi(num,2) == 1 && k == 0)\r\n\t\t\tsalida=\"CIEN\";\r\n\t\t\r\n\t\treturn salida;\r\n\t}",
"public static void partida(String vpalabra[],String verror[],String vacierto[],String palabra){\r\n //comienzo ahorcado\r\n System.out.println(\"******************* AHORCADO *******************\");\r\n String letra;\r\n \r\n int contador=7;\r\n //bucle\r\n while ((contador>0)&&(ganarPartida(vacierto,vpalabra)==false)){\r\n //for (int i=0;i<verror.length;i++){\r\n //muestra el dibujo para que sepa por donde va \r\n mostrarDibujo(contador);\r\n System.out.println(\"VIDAS: \"+ contador);\r\n //mostrar vector acierto\r\n mostrarAcierto(palabra, vacierto);\r\n \r\n \r\n //pregunta letra al jugador \r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n System.out.println(\"Escribe una única letra: \");\r\n letra=leer.next();\r\n \r\n //muestra vector verror las letras erroneas que vas introduciendo\r\n muestraError(verror);\r\n System.out.println(\"\");\r\n System.out.println(\"\"); \r\n //comprueba si letra esta en la matriz palabra para acertar o fallar\r\n if (buscarLetra(vpalabra, vacierto, verror, letra)==false){\r\n //recorro verror guardando letra erronea\r\n \r\n // verror[i]=letra;\r\n contador--;\r\n } \r\n \r\n //}\r\n }\r\n \r\n if (ganarPartida(vacierto,vpalabra)==true){\r\n System.out.println(\"La palabra es: \");\r\n mostrarPalabra(palabra, vpalabra);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"¡HAS GANADO!\");\r\n } else{\r\n System.out.println(\" _ _ _ \");\r\n System.out.println(\" |/ | \");\r\n System.out.println(\" | 0 \");\r\n System.out.println(\" | /ºº/ \");\r\n System.out.println(\" | | \");\r\n System.out.println(\" | / / \");\r\n System.out.println(\" | \");\r\n System.out.println(\"---------------\");\r\n System.out.println(\"---------------\");\r\n System.out.println(\" HAS PERDIDO \");\r\n }\r\n }",
"public String ocultarPalabra(String palabra){\n String resultado=\"\";\n for(int i=0;i<palabra.length();i++){\n resultado+=\"-\";\n }\n return resultado;\n }",
"public static void main(String args[]) throws Exception{\n Pattern patron = Pattern.compile(\"\\\\s+\");\n\n //leer todas las lineas del archivo\n Stream<String> lineas = Files.lines(Paths.get(\"./data/alicia.txt\"),StandardCharsets.ISO_8859_1);\n\n //eliminamos signos de puntuacion\n Stream<String> lineasProcesadas = lineas.map(linea -> linea.replaceAll(\"(?!')\\\\p{Punct}\", \"\"));\n\n //trocear las lineas para tratar con palabras\n\n Stream<String> palabras = lineasProcesadas.flatMap(linea -> patron.splitAsStream(linea));\n\n //filtrar palabras vacias\n\n Stream<String> sinVacias = palabras.filter(palabra -> !palabra.isEmpty());\n\n // generar un diccionario con entradas tipo <palabra, numero de ocurrencias>\n // queremos que el diccionario sea tipo TreeMap\n\n TreeMap<String,Long> mapa = sinVacias.collect(Collectors.groupingBy(String::toLowerCase, TreeMap::new,Collectors.counting()));\n\n\n //Ahora todo compactado\n\n TreeMap<String,Long> mapa2 = Files.lines(Paths.get(\"./data/alicia.txt\"),StandardCharsets.ISO_8859_1).\n map(linea -> linea.replaceAll(\"(?!')\\\\p{Punct}\", \"\")).\n flatMap(linea -> patron.splitAsStream(linea)).\n filter(palabra -> !palabra.isEmpty()).\n collect(Collectors.groupingBy(String::toLowerCase, TreeMap::new,Collectors.counting()));\n\n\n mapa2.forEach(\n (palabra, numero) -> System.out.println(palabra + \" : \" + numero)\n );\n\n //Con esto pedo crear un stream\n //mapa2.entrySet().stream().forEach();\n\n\n //agrupamiento por inicales, todas las palabras con dicha inicial y contadores\n\n TreeMap<Character, List<Map.Entry<String,Long>>> mapa3 = mapa2.\n entrySet().\n stream().\n collect(Collectors.groupingBy(entrada -> entrada.getKey().charAt(0),TreeMap::new,Collectors.toList()));\n\n mapa3.forEach((inicial,listaPalabras) -> {\n System.out.printf(\"%n%c%n\", inicial);\n listaPalabras.stream().forEach( entrada -> {\n System.out.printf(\"%13s: %d%n\", entrada.getKey(), entrada.getValue());\n });\n });\n\n\n\n\n }",
"public static void letra(){\n\t\tScanner sc=new Scanner(System.in);\n\t\tchar letra;\n\t\tSystem.out.println(\"Introduzca una letra: \");\n\t\tletra=sc.next().charAt(0);\n\t\t\n\t\tswitch(letra){\n\t\t\tcase 'a': case 'A':\n\t\t\tcase 'e':case 'E':\n\t\t\tcase 'i':case'I':\n\t\t\tcase 'o': case'O':\n\t\t\tcase'u': case 'U':\n\t\t\t\tSystem.out.println(\"Es una vocal\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Es una consonante.\");\n\t\t}\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}",
"public static void main(String[] args) {\n\n\t\tScanner teclado = new Scanner(System.in);\n\t\tRandom aleatorio = new Random();\n\t\t// variables\n\t\tString pais = \"\";\n\t\tint contador = 0;\n\t\tint contador1 = 0;\n\t\tint maximo = 0;\n\t\tString ganador = \" \";\n\t\t// declaro hasmap\n\t\tHashMap<String, Integer> paises = new HashMap<String, Integer>();\n\n\t\tSystem.out.println(\"Bienvenido al festival de Eurovision!\");\n\t\t// bucle para introducir paises\n\t\twhile (!pais.equals(\"salir\") || contador <= 3) {\n\t\t\tSystem.out.println(\"Introduzca nombre del pais \" + contador);\n\t\t\t// generera numeros alatorios\n\t\t\tint numerosaleatorios = aleatorio.nextInt(10) + 10;\n\t\t\tpais = teclado.nextLine();\n\t\t\t// insertar en el hasmap pais y numero aleatorio generado\n\t\t\tpaises.put(pais, numerosaleatorios);\n\t\t\t//maxima puntuacion\n\t\t\tif (numerosaleatorios > maximo) {\n\t\t\t\tmaximo = numerosaleatorios;\n\t\t\t\tganador = pais;\n\t\t\t}\n\t\t\t//para que salir no lo cuente como un pais\n\t\t\tif (pais.equals(\"salir\")) {\n\t\t\t\tpaises.remove(pais, numerosaleatorios);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcontador++;\n\t\t}\n\t\tSystem.out.println(\n\t\t\t\t\"con las puntuaciones repartidas, el pais ganador es :\" + ganador + \" con \" + maximo + \" puntos\");\n\t\tSystem.out.println(paises);\n\t\t// bucle para verificar pais con su puntuacion\n\t\twhile (!pais.equals(\"salir\") || contador1 <= contador) {\n\t\t\tSystem.out.println(\" introduzca el nombre de pais para saber su puntuacion:\");\n\t\t\tpais = teclado.nextLine();\n\t\t\tSystem.out.println(pais + \" ha recibido \" + paises.get(pais) + \" votos \");\n\t\t\tif (pais.equals(\"salir\")) {\n\t\t\t\tSystem.out.println(\"salir no es un pais\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"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[][] acomodamiento(char direccion, String[][] cuadricula) {\n int numeroA;\n int espacios;\n for (int fila = 0; fila < 4; fila++) {\n\n for (int columna = 0; columna < 4; columna++) {\n\n switch (direccion) {\n case 'w':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia, cuando la encuentra mueve desde esa posicion hacia arriba\n del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[columna][fila].equals(\" \") == false) {\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n //Verigica si hay un numero igual arriba suyo para sumarse\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento - 1][fila])) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de arriba\n */\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento - 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento - 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento - 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion arriba la sustituye la de abajo\n else if (cuadricula[vecesMovimiento - 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento - 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 's':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de abajo para arriba, cuando la encuentra mueve\n desde esa posicion hacia abajo del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[3 - columna][fila].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de abajo de la matriz\n // llegaremos hasta 2 ya que sigue comparando con una posicion abajo extra gracias al +1\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de abajo\n */\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento + 1][fila])) {\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento + 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento + 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento + 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion abajo la sustituye la de arriba\n else if (cuadricula[vecesMovimiento + 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento + 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 'a':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de izquierda a derecha, cuando la encuentra mueve\n desde esa posicion hacia la izquierda del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[fila][columna].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de la izquierda de la matriz, es decir inicializada en 0\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de izquierda\n */\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento - 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento - 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento - 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento - 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion izquierda la sustituye la de derecha\n else if (cuadricula[fila][vecesMovimiento - 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento - 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n //Lo mismo establecido pero orientado a la derecha, y en lugar del -1 de los vectores lo pasamos como +1 siguiendo la estructura\n //de la opcion 's'\n case 'd':\n if (cuadricula[fila][3 - columna].equals(\" \") == false) {\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento + 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento + 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento + 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento + 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } else if (cuadricula[fila][vecesMovimiento + 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento + 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n }\n\n }\n }\n return cuadricula;\n }",
"private void casoFor(ArrayList codigoFuente) {\n try {\n\n String texto = \"\", linea = \"\";\n String var[] = null;\n\n byte parenDerecho = 0;\n for (int i = 0; i < codigoFuente.size(); i++) {\n linea = codigoFuente.get(i).toString();\n for (int j = 0; j < linea.length(); j++) {\n if (linea.charAt(j) == ')') {\n parenDerecho++;\n\n if (j < linea.length() - 1) {\n if (linea.charAt(j + 1) == '{') {\n var = contenidoFor(texto);\n\n if (var[0].equals(\"0\")) {\n ta_output.setText(\"Línea \" + (i + 1) + \":\" + var[1]);\n break;\n } else {\n if (codigoFuente.get(codigoFuente.size() - 1).toString().charAt(codigoFuente.get(codigoFuente.size() - 1).toString().length() - 1) == '}') {\n ta_output.setText(\"Compilado Correctamente\");\n break;\n } else {\n ta_output.setText(\"Línea \" + (codigoFuente.size() - 1) + \": Sintáctico: falta llave derecha\");\n break;\n }\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n } else {//Evalua si la llave izquierda esta en la siguiente linea\n if (i < codigoFuente.size() - 1) {\n linea = codigoFuente.get(i + 1).toString();\n if (linea.charAt(0) == '{') {\n var = contenidoFor(texto);\n\n if (var[0].equals(\"0\")) {\n ta_output.setText(\"Línea \" + (i + 1) + \":\" + var[1]);\n break;\n } else {\n if (codigoFuente.get(codigoFuente.size() - 1).toString().charAt(codigoFuente.get(codigoFuente.size() - 1).toString().length() - 1) == '}') {\n ta_output.setText(\"Compilado Correctamente\");\n break;\n } else {\n ta_output.setText(\"Línea \" + (codigoFuente.size()) + \": Sintáctico: falta llave derecha\");\n break;\n }\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n }\n }\n texto += linea.charAt(j);\n if (texto.equals(\"for\")) {\n if (linea.length() > 5) {\n if (linea.charAt(j + 1) == '(') {\n texto = \"\";\n } else {\n if (linea.charAt(j + 2) == '(') {\n ta_output.setText(\"Línea \" + (i + 1) + \": Lexico: Caracter sobrante en sentencia for.\");\n parenDerecho++;\n break;\n } else {\n parenDerecho++;\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: mala construcción de la sentencia.\");\n break;\n }\n }\n } else {\n parenDerecho++;\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: mala construcción de la sentencia.\");\n break;\n }\n }\n }\n }\n if (parenDerecho == 0) {\n ta_output.setText(\"Sintáctico: falta paréntesis Derecho\");\n }\n\n } catch (Exception e) {\n System.out.println(\"Error en caso for \" + e.getClass());\n }\n }",
"private CategoriaLexica simbolo(String palabra) {\n\t\t\n\t if (palabra.equals(\":=\"))\n\t {\n\t return CategoriaLexica.OpAsignConst;\n\t }\n\t else if (palabra.equals(\"'\"))\n\t {\n\t return CategoriaLexica.ComillaSimple;\n\t }\n \t\telse if (palabra.equals(\",\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Coma;\n\t\t\t}\n \t\telse if (palabra.equals(\";\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.PuntoComa;\n\t\t\t}\n\t\telse if (palabra.equals(\"(\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.AbreParentesis;\n\t\t\t}\n\t\telse if (palabra.equals(\")\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CierraParentesis;\n\t\t\t}\n\t\telse if (palabra.equals(\"{\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.AbreLlave;\n\t\t\t}\n\t\telse if (palabra.equals(\"}\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CierraLlave;\n\t\t\t}\n\t\telse if (palabra.equals(\"[\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.AbreCorchete;\n\t\t\t}\n\t\t\t\telse if (palabra.equals(\"]\"))\n\t\t\t{\n\t\t\treturn CategoriaLexica.CierraCorchete;\n\t\t\t}\n\t\telse if (palabra.equals(\".\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Punto;\n\t\t\t}\n\t\telse if (palabra.equals(\":\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.DosPuntos;\n\t\t\t}\n\t\telse if (palabra.equals(\"=\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.OpAsignVar;\n\t\t\t}\n\t\telse if (palabra.equals(\"+\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Mas;\n\t\t\t}\n\t\telse if (palabra.equals(\"-\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Menos;\n\t\t\t}\n\t\telse if (palabra.equals(\"*\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Por;\n\t\t\t}\n\t\telse if (palabra.equals(\"/\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Divide;\n\t\t\t}\n\t\telse if (palabra.equals(\"%\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Modulo;\n\t\t\t}\n\t\telse if (palabra.equals(\"<<\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.DesplazIz;\n\t\t\t}\n\t\telse if (palabra.equals(\">>\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.DesplazDer;\n\t\t\t}\n\t\telse if (palabra.equals(\">\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Mayor;\n\t\t\t}\n\t\telse if (palabra.equals(\"<\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Menor;\n\t\t\t}\n\t\telse if (palabra.equals(\">=\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.MayorIgual;\n\t\t\t}\n\t\telse if (palabra.equals(\"<=\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.MenorIgual;\n\t\t\t}\n\t\telse if (palabra.equals(\"!=\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Distinto;\n\t\t\t}\n\t\telse if (palabra.equals(\"==\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.Igual;\n\t\t\t}\n\t\telse if (palabra.equals(\"_\"))\n\t\t{\n\t\t\treturn CategoriaLexica.BarraBaja;\n\t\t}\n\t\telse if (palabra.equals(\"(integer)\") || palabra.equals(\"(int)\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CastingEntero;\n\t\t\t}\n\t\telse if (palabra.equals(\"(natural)\") || palabra.equals(\"(nat)\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CastingNatural;\n\t\t\t}\n\t\telse if (palabra.equals(\"(float)\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CastingDecimal;\n\t\t\t}\n\t\telse if (palabra.equals(\"(character)\") || palabra.equals(\"(char)\"))\n\t\t\t{\n\t\t\t\treturn CategoriaLexica.CastingCaracter;\n\t\t\t}\n\t\telse \n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t}",
"public String llenarBase(){\n String estadoBase=\"\";\n //Vectores para cada uno de los campos de cada tabla\n //vectores empleado\n final String[] nombreEmpleado = {\"Jorge Pérez\",\"Maritza Cañas\",\"Sebastian Funes\",\"Carlos Dominguez\"};\n final int [] duiEmpleado={050034561,060023567,030034561,0500325677};\n final String[] sexoEmpleado={\"M\",\"F\",\"M\",\"M\"};\n final int[] edadEmpleado={24,50,32,40};\n final String[] direccionEmpleado={\"25 Av.Norte #17H, San Salvador\",\"Res.Los Altos,#5,Mejicanos\",\"Calle Las Flores #5A,Cuscatlan\",\"49 Av. Norte, Res.Los Lirios #6B,San Salvador\"};\n final int[] telefonoEmpleado={22563456,22784567,75946754,23564788};\n final int[] cantApEmpleado={1,3,5,2};\n final int[] cantRefEmpleado={3,2,2,3};\n\n //vectores Experiencia Laboral\n final String[] idTodos={\"1\",\"2\",\"3\",\"4\"};\n final String[] duracionExpLab={\"6\",\"8\",\"12\",\"16\"};\n //vectorees Empresa\n final String[] nombreEmpresa={\"Pizza Hut\",\"Office Depot\",\"C.E San Antonio\",\"Telefonica\"};\n final String[] nitEmpresa={\"0614-220605-113-0\",\"0675-330734\",\"0423-220812\",\"0614-345632-551-0\"};\n final String[] dirEmpresa={\"Blv.Los Proceres, Local 5A,San Salvador\",\"49 Av. Norte,#45, San Salvador\",\"Barrio San Juan,Boque 1A,Sonsonate\",\"Centro Comercial Metrocentro, 2° Nivel,San Salvador\"};\n final String[] telEmpresa={\"2276-4533\",\"79567843\",\"2233-6755\",\"2256-8977\"};\n final int[] canOfertasEmpresa={6,4,1,5};\n //vectores detalleestudio\n final int[] idEmpleadoDE={1,2,3,4};\n final int[] idEspecializacionDE={1,2,3,4};\n final int[] idInstEstudioDE={1,2,3,4};\n final int[] anyoGraducionDE={2008,2014,2010,2012};\n //Vectores tabla Moni\n //para la tabla cargo\n final String[] nombreCargo={\"Gerente de Creditos\",\"Jefe de Planta\",\"Jefe de tecnología\",\"Jefe de Reacciones\"};\n final String[] descripcionCargo={\"gerente para la gestion de creditos\",\"Ingeniero industrial para control de planta\",\"Ingeniero de Sistemas para el area de TI\",\"Ingeniero Quimico encargado de planta de reactivos\"};\n // para la tabla aplicacion\n final int[] idsAplicacionTodos={1,2,3,4};\n final String[] fechaAplicacion={\"23/05/15\",\"13/05/15\",\"20/05/15\",\"24/05/15\"};\n final String[] estadoAplicacion={\"Aceptada\",\"Aceptada\",\"En Proceso\",\"En Proceso\"};\n //Vectoress tabla Edgardo\n\n //Vectores tabla Eduardo\n final int[] gradoEspeIdSpe={1,2,3,4};\n final String[] gradoEspeNombre={\"Java Junior\",\"Oracle 11g\",\"Tecnico De Sistemas\",\"Java Senior\"};\n final int[] gradoEspeDuration={2,1,3,4};\n final int[] gradoEspeIdInsti={1,2,3,4};\n\n final int[] referenceId={1,2,3,4};\n final String[] referenceName={\"Juan Perez\",\"Rafael Molina\",\"Pompilio Marcebundo\",\"José Menjivar\"};\n final String[] referencePhone={\"22002200\",\"77777777\",\"22222222\",\"225777777\"};\n final int[] referenceIdEmple={1,2,3,4};\n final int[] referenceIdBusiness={1,2,3,4};\n\n /*------EMPIEZA LA INSERCION ---*/\n for (int i = 0; i < 4; i++) {\n //tabla empresa\n ContentValues values = new ContentValues();\n values.put(\"NOMBRE_EMPRESA\", nombreEmpresa[i]);\n values.put(\"NIT_EMPRESA\",nitEmpresa[i]);\n values.put(\"DIR_EMPRESA\",dirEmpresa[i]);\n values.put(\"TEL_EMPRESA\", telEmpresa[i]);\n values.put(\"CANTOFERTAS_EMPRESA\",canOfertasEmpresa[i]);\n db.insert(\"EMPRESA\", null, values);\n\n //tabla Empleado, se reutilizara el metodo insertarEmpleado\n Empleado empleado = new Empleado();\n empleado.setNombre_empleado(nombreEmpleado[i]);\n empleado.setDui_empleado(duiEmpleado[i]);\n empleado.setSexo_empleado(sexoEmpleado[i]);\n empleado.setEdad_empleado(edadEmpleado[i]);\n empleado.setDireccion_empleado(direccionEmpleado[i]);\n empleado.setTelefono_empleado(telefonoEmpleado[i]);\n empleado.setCantAplicaciones_empleado(cantApEmpleado[i]);\n empleado.setCantReferencias_empleado(cantRefEmpleado[i]);\n insertarEmpleado(empleado);\n\n //tabla ExperienciaLaboral, se reutilizara el metodo insertarExpLab\n insertarExpLab(idTodos[i],idTodos[i],idTodos[i],duracionExpLab[i]);\n //tabla DetalleEstudio\n ContentValues values2 = new ContentValues();\n values2.put(\"ID_EMPLEADO\",idEmpleadoDE[i]);\n values2.put(\"ID_ESPECIALIZACION\",idEspecializacionDE[i]);\n values2.put(\"ID_INSTITUTOESTUDIO\",idInstEstudioDE[i]);\n values2.put(\"ANYOGRADUACION_DETALLEEST\",anyoGraducionDE[i]);\n db.insert(\"DETALLEESTUDIO\", null, values2);\n\n //Tabla Cargo, se reutiliza el metodo insertar(cargo\n Cargo cargo= new Cargo();\n cargo.setNombreCargo(nombreCargo[i]);\n cargo.setDescripcionCargo(descripcionCargo[i]);\n insertar(cargo);\n\n //tabla Aplicacion se reutiliza el metodo inserta(aplicacion)\n Aplicacion aplicacion= new Aplicacion();\n aplicacion.setIdEmpleado(idsAplicacionTodos[i]);\n aplicacion.setIdEmpresa(idsAplicacionTodos[i]);\n aplicacion.setIdOfertaLaboral(idsAplicacionTodos[i]);\n aplicacion.setFechaAplicacion(fechaAplicacion[i]);\n aplicacion.setEstadoAplicacion(estadoAplicacion[i]);\n insertar(aplicacion);\n\n //tabla Referencia\n Referencia refe=new Referencia();\n refe.setNombre_referencia(referenceName[i]);\n refe.setId_empleado(referenceIdEmple[i]);\n refe.setId_empresa(referenceIdBusiness[i]);\n refe.setTelefono_referencia(referencePhone[i]);\n refe.setId_referencia(referenceId[i]);\n insertar(refe);\n\n\n //tabla GradoEspecializacion\n\n GradoEspecializacion grade=new GradoEspecializacion();\n grade.setId_especializacion(gradoEspeIdSpe[i]);\n grade.setNombre_especializacion(gradoEspeNombre[i]);\n grade.setId_institutoEstudio(gradoEspeIdInsti[i]);\n grade.setDuracion_especializacion(gradoEspeDuration[i]);\n insertar(grade);\n\n\n }//fin for\n\n return estadoBase=\"El llenado de la Base de Datos se hizo Satisfactoriamente\";\n }",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.out.print(\"Unesi ime: \");\n\t\tScanner unos = new Scanner(System.in);\n\t\tString ime = unos.next();\n\t\t\n\t\t//prvi red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t System.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//drugi red crtica\n\t\tSystem.out.println(\": : : TABLICA MNOZENJA : : :\");\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tSystem.out.print(\" * |\");\n\t\tfor(int j=1;j<=9;j++){\n\t\t\tSystem.out.printf(\"%3d\",j);\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//treci red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tfor(int i=1;i<=9;i++){\n\t\t\tSystem.out.printf(\"%2d |\",i);\n\t\t\tfor(int j=1;j<=9;j++){\n\t\t\t\tSystem.out.printf(\"%3d\",i*j);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t//cetvrti red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t\n\t\tfor(int k=0;k<8;k++){\n\t\t\tSystem.out.printf(\": \");\n\t\t}\n\t\tSystem.out.print(\":by \"+ime);\n\t\tSystem.out.println();\n\t\t\n\t\t//peti red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\tunos.close();\n\t}",
"public static void main(String[] args) {\n\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tint kor, eng, math, avg, total;\r\n\t\tString result = \"\";\r\n\r\n\t\tint i = 1;\r\n\t\tdo {\r\n\t\t\tSystem.out.print(\"국어 점수 : \");\r\n\t\t\tkor = scan.nextInt();\r\n\t\t\tSystem.out.print(\"영어 점수 : \");\r\n\t\t\teng = scan.nextInt();\r\n\t\t\tSystem.out.print(\"수학 점수 : \");\r\n\t\t\tmath = scan.nextInt();\r\n\r\n\t\t\ttotal = kor + eng + math;\r\n\t\t\tavg = total / 3;\r\n\r\n\t\t\tchar c = 'A';\r\n\t\t\tswitch (avg / 10) {\r\n\t\t\tcase 10:\r\n\t\t\tcase 9:\r\n\t\t\t\tc = 'A';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\tc = 'B';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\tc = 'C';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\tc = 'D';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tc = 'F';\r\n\t\t\t}\r\n\t\t\tresult += kor + \" \" + eng + \" \" + math + \" \" + total + \" \" + avg + \" \" + c + \"\\n\";\r\n\t\t\ti++;\r\n\t\t} while (i <= 3);\r\n\t\t\r\n\t\tSystem.out.println(\"국어 영어 수학 총점 평균 학점\");\r\n\t\tSystem.out.println(result);\r\n\r\n\r\n\t}",
"public static String ControllaPIVA(String pi)\r\n\t{\r\n\t\tint i, c, s;\r\n\t\tif( pi.length() == 0 ) return \"\";\r\n\t\tif( pi.length() != 11 )\r\n\t\t\treturn IConstanti.PIVA_ERRORE_LUNGHEZZA;\r\n\t\tfor( i=0; i<11; i++ ){\r\n\t\t\tif( pi.charAt(i) < '0' || pi.charAt(i) > '9' )\r\n\t\t\t\treturn IConstanti.PIVA_ERRORE_CARATTERI_NON_VALIDI;\r\n\t\t}\r\n\t\ts = 0;\r\n\t\tfor( i=0; i<=9; i+=2 )\r\n\t\t\ts += pi.charAt(i) - '0';\r\n\t\tfor( i=1; i<=9; i+=2 ){\r\n\t\t\tc = 2*( pi.charAt(i) - '0' );\r\n\t\t\tif( c > 9 ) c = c - 9;\r\n\t\t\ts += c;\r\n\t\t}\r\n\t\tif( ( 10 - s%10 )%10 != pi.charAt(10) - '0' )\r\n\t\t\treturn IConstanti.PIVA_ERRORE_CODICE_CONTROLLO;\r\n\t\treturn \"\";\r\n\t}",
"public KI(String spielerwahl){\n\t\teigenerStein = spielerwahl;\n\t\t\n\t\tswitch (spielerwahl) {\n\t\tcase \"o\":\n\t\t\tgegnerStein = \"x\";\n\t\t\tbreak;\n\t\tcase\"x\":\n\t\t\tgegnerStein = \"o\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Ungueltige Spielerwahl.\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\thatAngefangen = gegnerStein;\n\t\t\n\t\tfor(int i=0; i<7; i++) { //initialisiert spielfeld\n\t\t\tfor(int j=0; j<6; j++){\t\t\t\t\n\t\t\t\tspielfeld[i][j] = \"_\";\n\t\t\t}\n\t\t\tmoeglicheZuege[i] = -1; //initialisiert die moeglichen zuege\n\t\t}\n\t\t\n\t}",
"public int solve(String A) {\n int c=0;\n int n=A.length();\n for(int i=0;i<n;i++){\n if(A.charAt(i)=='A'||A.charAt(i)=='E'||A.charAt(i)=='I'||A.charAt(i)=='O'||A.charAt(i)=='U'||A.charAt(i)=='a'||A.charAt(i)=='e'||A.charAt(i)=='i'||A.charAt(i)=='o'||A.charAt(i)=='u'){\n c+= (n-i);\n }\n }\n \n return (c%10003);\n }",
"private String construyeCaracter(String palabra) throws IOException {\n\t\tToken aux = null;\n \t\twhile(!((aux = this.nextTokenWithWhites()).get_lexema().equals(\"'\"))) {\n \t\t\tif (aux.get_lexema().equals(\"fin\"))\n \t\t\t\treturn palabra;\n \t\t\tpalabra = palabra + aux.get_lexema();\n \t\t\t// Si vemos que el caracter se alarga mucho, paramos de leer\n \t\t\tif (palabra.length() > 4) {\n \t\t\t\treturn palabra;\n \t\t\t}\n \t\t}\n \t\tpalabra = palabra + aux.get_lexema();\n\t\treturn palabra;\n\t}",
"public String gjejZinxhirin(String start, String end) throws Exception {\n\t\tif (start.length() != end.length())\n\t\t\tthrow new RuntimeException(\"fjalet duhet te jene te te njejtes gjatesi\");\n\n\t\t// nese fjala e pare dhe fjala destinuese jane te njejta nuk ka nevoj per kerkim\n\t\tif (start.equals(end))\n\t\t\treturn start;\n\n\t\t// lexojm dhe i shtojm fjalet nga skedari ku gjinden te gjitha fjalet\n\t\tlexoFjaletNeKeteGjatesi(start.length());\n\n\t\t/*\n\t\t * Kontrollojm se a e ekziston ajo fjale ne fjalor qe te mos behet kerkimi per\n\t\t * dicka qe nuk ekziston\n\t\t */\n\t\tif (!fjalet.contains(start)) {\n\t\t\tthrow new Exception(\"Kjo fjale nuk ekziston ne fjalor\");\n\t\t}\n\t\tif (!fjalet.contains(end)) {\n\t\t\tthrow new Exception(\"Kjo fjale nuk ekziston ne fjalor\");\n\t\t}\n\n\t\t// riinicializojm kandidatet e ri dhe fjalet e shtuara\n\t\tkandidatet = new LinkedList<>();\n\t\tshtuar = new HashMap<>();\n\t\tnumerimi = 0;\n\n\t\tkandidatet.add(start);\n\t\tshtuar.put(start, null);\n\n\t\t/*\n\t\t * fillojm kerkimin e fjaleve por i vendosim nje limit deri 15000 fjale, qe te\n\t\t * mos mbetet programi duke kerkuar pafundesisht\n\t\t */\n\t\twhile (kandidatet.size() > 0) {\n\t\t\tif (numerimi++ > 15000)\n\t\t\t\tthrow new RuntimeException(\"exceeded search limit\");\n\n\t\t\tString c = (String) kandidatet.remove(0);\n\n\t\t\tIterator<String> iter = fjalet.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tString w = (String) iter.next();\n\t\t\t\tif (!shtuar.containsKey(w) && adjacent(c, w)) {\n\t\t\t\t\tshtuar.put(w, c);\n\n\t\t\t\t\tif (end.equals(w)) {\n\t\t\t\t\t\treturn rregulloParaqitjenEZinxhirit(w);\n\t\t\t\t\t}\n\n\t\t\t\t\tkandidatet.add(w);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\t}",
"public String IndicadorCaracteres(String palabra){\n\t\tint aux=-1;\n\t\t\t//Analiza los 17 primeros símbolos de la matriz \"simbolos\" que son los caracteres\n\t\t\t//tentativos que la palabra podría tener\n\t\t\tfor(int i=0; i<17; i++) {\n\t\t\t\t//Se verifica si la palabra contiene algún de los símbolos\n\t\t\t\tif(palabra.contains(simbolos[0][i])) {\n\t\t\t\t\t//Variable auxiliar para conocer el caracter \n\t\t\t\t\taux=i;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn (aux!=-1)? simbolos[0][aux]:\"\";\n\t}",
"public static int drwal(String[] args){\n if (args.length == 5) {\n //Sprawdzanie czy argument 1,2,4,5 to inty\n try {\n Integer.parseInt(args[0]);\n Integer.parseInt(args[1]);\n Integer.parseInt(args[3]);\n Integer.parseInt(args[4]);\n }catch (NumberFormatException e){\n System.out.println(\"klops\");\n return 0;\n }\n int xStart = Integer.parseInt(args[1]);\n int yStart = Integer.parseInt(args[0]);\n Character kolor = args[2].charAt(0);\n int szerokosc = Integer.parseInt(args[3]);\n int wysokosc = Integer.parseInt(args[4]);\n Scanner input = new Scanner(System.in);\n char[][] output1 = new char[wysokosc][szerokosc];\n int wyscount = 0;\n int counter = 0;\n //Jezeli szerokosc albo wysokosc > 5000\n //Jezeli xstart > szerokosc, ystart > wysokosc\n if (!((szerokosc > 5000 || wysokosc > 5000)||(xStart > szerokosc || yStart > wysokosc))){\n while(input.hasNextLine()){\n String tmp;\n byte[] isUTF = null;\n try {\n tmp = input.nextLine();\n isUTF = tmp.getBytes(\"UTF-8\");\n }\n catch(UnsupportedEncodingException e){\n System.out.println(\"klops\");\n return 0;\n }\n if (wyscount > wysokosc || tmp.length() > szerokosc){\n System.out.println(\"klops\");\n return 0;\n }\n for (int i = 0;i<tmp.length();i++){\n output1[counter][i] = tmp.charAt(i);\n }\n counter++;\n wyscount++;\n }\n int startx = xStart -1;\n int starty = yStart -1;\n //Jezeli punkt startowy to spacja to zaczynamy kolorowanie\n if (output1[startx][starty]==' '){\n output1 = color(output1,kolor,startx,starty);\n }\n //wypisywanie na wyjsciu pokolorwanego obrazka\n for (int i=0;i<wyscount;i++){\n for (int j=0;j<szerokosc;j++){\n System.out.print(output1[i][j]);\n }\n System.out.println();\n }\n }\n else {\n System.out.println(\"klops\");\n return 0;\n }\n }\n else{\n System.out.println(\"klops\");\n return 0;\n }\n return 0;\n }",
"public void actualizarPalabra(String ocultarRespuesta){\n String respuesta=\"\";\n \n for(int i=0;i<this.palabra.length();i++){\n if(!(this.palabra.toLowerCase().substring(i,i+1).equals(ocultarRespuesta.toLowerCase().substring(i,i+1)))&&\"-\".equals(this.palabra.substring(i, i+1))){\n respuesta+=ocultarRespuesta.substring(i,i+1);\n }\n if(!(this.palabra.toLowerCase().substring(i,i+1).equals(ocultarRespuesta.toLowerCase().substring(i,i+1)))&&\"-\".equals(ocultarRespuesta.substring(i, i+1))){\n respuesta+=this.palabra.substring(i,i+1);\n }\n if(this.palabra.toLowerCase().substring(i,i+1).equals(ocultarRespuesta.toLowerCase().substring(i,i+1))){\n respuesta+=ocultarRespuesta.substring(i, i+1);\n }\n }\n this.setPalabra(respuesta);\n }",
"public static void main(String[] args) throws IOException {\n\t\t\tBufferedReader entrada = new BufferedReader(new FileReader(\"src\\\\ListaEnlazada3\\\\F.txt\"));\n\t\t\tPrintWriter salida = new PrintWriter(new FileWriter(\"src\\\\ListaEnlazada3\\\\Fsalida.txt\"));\n\t\t\tPilaEnListaEnlazada pila = new PilaEnListaEnlazada();\n\t\t\tPilaEnListaEnlazada pila2 = new PilaEnListaEnlazada();\n\t\t\tPilaEnListaEnlazada result = new PilaEnListaEnlazada();\n\t\t\tColaEnListaEnlazada cola = new ColaEnListaEnlazada();\n\t\t\tColaEnListaEnlazada cola2 = new ColaEnListaEnlazada();\n\t\t\tString str;\n\t\t\tint linea=0;\n\t\t\tint lleva=0;\n\t\t\twhile(entrada.ready())\n\t\t\t{\n\t\t\t\tstr = entrada.readLine();\n\t\t\t\tlinea++;\n\t\t\t\tif(linea==1)\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0; i<str.length();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(Integer.parseInt(str.substring(i, i+1)));//guarda el primer caracter de la cadena de texto.\n\t\t\t\t\t\t\t //En la pila, e incrementa el contador.\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(NumberFormatException eq)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Hay una letra o caracter en la pila 1, la cual fue borrada.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(linea==2)\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0; i<str.length();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila2.push(Integer.parseInt(str.substring(i, i+1)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(NumberFormatException ea)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Hay una letra o caracter en la pila 2, la cual fue borrada.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse//De no cumplise las condiciones anterirores entramos a este ciclo else.\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0; i<str.length();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(Integer.parseInt(str.substring(i, i+1)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(NumberFormatException ea)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Hay una letra o caracter en la pila 1, la cual fue borrada.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(!pila.isEmpty()&&!pila2.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tint numero = (int)pila.pop()+(int)pila2.pop()+lleva;\n\t\t\t\t\tif(numero>9)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero%10);//sacamos el residuo del numero y lo guardamos en la cola\n\t\t\t\t\t\tlleva=1;//Incrementamos el lleva en 1, ya que hay un exceso en el numero.\n\t\t\t\t\t}\n\t\t\t\t\telse//Si el numero no es mayor que 9.\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero);//Se guarda el numero sin sacarle su residuo.\n\t\t\t\t\t\tlleva=0;//le bajamos el valor del lleva a 0, para evitar problemas de acarreo posteriores.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(pila.isEmpty()||pila2.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tif(pila.size()>pila2.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila2.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(pila.size()<pila2.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(pila.isEmpty()&&pila2.isEmpty()&&lleva==1)//Si la pila, la pila2 estan vacias y el lleva ==1 \n\t\t\t\t\t\t //significa que no hay un numero para sumar, pero estoy llevando \n\t\t\t\t\t\t //un acarreo\n\t\t\t\t\t\t //el cual tengo que tener en cuenta para la sig suma.\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(lleva);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(!cola.isEmpty()&&!pila.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tint numero = (int)cola.dequeue()+(int)pila.pop()+lleva;\n\t\t\t\t\tif(numero>9)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola2.enqueue(numero%10);\n\t\t\t\t\t\tlleva=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcola2.enqueue(numero);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t\tif(pila.isEmpty()||cola.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cola.size()>pila.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(pila.size()>cola.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcola.enqueue(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(cola.isEmpty()&&pila.isEmpty()&&lleva==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola2.enqueue(lleva);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(!pila.isEmpty()&&!cola2.isEmpty())\n\t\t\t\t{\n\t\t\t\n\t\t\t\t\tint numero = (int)cola2.dequeue()+(int)pila.pop()+lleva;\n\t\t\t\t\tif(numero>9)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero%10);\n\t\t\t\t\t\tlleva=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(pila.isEmpty()||cola2.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cola2.size()>pila.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(pila.size()>cola2.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcola2.enqueue(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(cola2.isEmpty()&&pila.isEmpty()&&lleva==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(lleva);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sirve para invertir los valores y mostrarlos como una suma normal.\n\t\t\twhile(!cola.isEmpty()||!cola2.isEmpty()||!pila.isEmpty())\n\t\t\t{\n\t\t\t\tif(!cola.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tresult.push((int)cola.dequeue());\n\t\t\t\t}\n\t\t\t\telse if(!cola2.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tresult.push((int)cola2.dequeue());\n\t\t\t\t}\n\t\t\t\telse if(!pila.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tresult.push((int)pila.pop());\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile(!result.isEmpty())\n\t\t\t{\n\t\t\t\tcola2.enqueue((int)result.pop());\n\t\t\t}\n\t\t\tSystem.out.print(\"Suma: \"+cola2.toString());\n\t\t\tsalida.print(\"Suma total:\"+cola2.toString());\n\t\t\tentrada.close();\n\t\t\tsalida.close();\n\t}",
"public void solve(Scanner in) {\n\tint K = in.nextInt();\n\tint L = in.nextInt();\n\tint S = in.nextInt();\n\t\n\tint[] letters = new int[26];\n\t\n\tin.nextLine();\n\n\tString keyboard = in.nextLine(), word = in.nextLine();\n\tchar c;\n\t\n\t\n\n\tfor (int i = 0; i < K; i++) {\n\t\tc = keyboard.charAt(i);\n\t\tletters[c - 'A']++;\n\t}\n\t\n\tdouble chanceOfWord = 1;\n\n\tfor (int i = 0; i < L; i++) {\n\t\tchanceOfWord *= (letters[word.charAt(i)-'A']+0.0)/(K+0.0);\n\t}\n\t\n \tif (chanceOfWord == 0 || chanceOfWord == 1){\n\t\tSystem.out.println (0.0);\n\t\treturn;\n\t}\n\telse if (L == S) {\n\t\tSystem.out.println (1.0-chanceOfWord);\n\t\treturn;\n\t}\t\n\n\tmax = 0;\n\tcol = 0;\n\tdouble result = full (letters,\"\",word,S);\n\tSystem.out.println ((max - (result+0.0)/(col+0.0)));\n}",
"private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}",
"SpacesInvaders_recupererEspaceJeuDansChaineASCII createSpacesInvaders_recupererEspaceJeuDansChaineASCII();",
"public String cekPengulangan(String kata) throws IOException{\n String hasil=\"\";\n if(cekUlangSemu(kata)){\n return kata+\" kata ulang semu \";\n }\n if(kata.contains(\"-\")){\n String[] pecah = kata.split(\"-\");\n String depan = pecah[0];\n String belakang = pecah[1];\n ArrayList<String> depanList = new ArrayList<String>();\n ArrayList<String> belakangList = new ArrayList<String>();\n if(!depan.equals(\"\")){\n depanList.addAll(morpParser.cekBerimbuhan(depan, 0));\n }\n if(!belakang.equals(\"\")){\n belakangList.addAll(morpParser.cekBerimbuhan(belakang, 0));\n }\n for(int i = 0; i < depanList.size(); i++){\n for(int j = 0; j < belakangList.size(); j++){\n if(depanList.get(i).equals(belakangList.get(j))){\n return depan+\" kata ulang penuh \";\n }\n }\n }\n if(depan.equals(belakang)){\n return depan+\" kata ulang penuh \";\n }\n char[] isiCharDepan = depan.toCharArray();\n char[] isiCharBelakang = belakang.toCharArray();\n boolean[] sama = new boolean[isiCharDepan.length];\n int jumlahSama=0;\n int jumlahBeda=0;\n for(int i =0;i<sama.length;i++){\n if(isiCharDepan[i]==isiCharBelakang[i]){\n sama[i]=true;\n jumlahSama++;\n }\n else{\n sama[i]=false;\n jumlahBeda++;\n }\n }\n \n if(jumlahBeda<jumlahSama && isiCharDepan.length==isiCharBelakang.length){\n return depan+\" kata ulang berubah bunyi \";\n }\n \n \n }\n else{\n if(kata.charAt(0)==kata.charAt(2)&&kata.charAt(1)=='e'){\n if((kata.charAt(0)=='j'||kata.charAt(0)=='t')&&!kata.endsWith(\"an\")){\n return kata.substring(2)+\" kata ulang sebagian \";\n }\n else if(kata.endsWith(\"an\")){\n return kata.substring(2,kata.length()-2)+\" kata ulang sebagian \";\n }\n \n }\n }\n return hasil;\n }",
"public void ReiniciarPalabra() {\n\t\t\n\t\t/*limpiarCasillero();*/\n\t\t\t\t\n\t\tString palabra = palabras[(int)(Math.random()*5)];\n\t\t\n\t\tSystem.out.println(\" \"+palabra+\" \"+palabra.length());\n\t\t\n\t\tMostrarCasillero(palabra);\n\t\t\n\t\t\n\t}",
"public void printNo(String numar)\r\n {\r\n //toate verificarile posibile pentru a afisa ce trebuie\r\n //mi-e lene sa scriu la fiecare in parte, daca vrei ti le explic la telefon\r\n if(Character.getNumericValue(numar.charAt(0)) ==0 && Character.getNumericValue(numar.charAt(1)) == 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else{\r\n if(Character.getNumericValue(numar.charAt(0)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(0))] + \" hundread \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 1){\r\n System.out.print(v1[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if (Character.getNumericValue(numar.charAt(1)) > 1 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if(Character.getNumericValue(numar.charAt(2)) == 0 && Character.getNumericValue(numar.charAt(1)) > 1){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + \" \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 0 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n }\r\n }",
"public boolean potezLijevo() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer='a';\n\t\t\n\t\tif (j-1 >= 0) {\n\t\t\tif ((this.tabla[i][j-1] == '#')||(this.tabla[i][j-1] == 'o'))\n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i][j-1] == '*') \n\t\t\t\tthis.pojedi(i, j-1);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i, j-1);\n\t\t}\n\t\telse if (j-1 < 0 ) {\n\t\t\tif ((this.tabla[i][this.sirinaTable-1] == '#')||(this.tabla[i][this.sirinaTable-1] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i][this.sirinaTable-1] == '*') \n\t\t\t\tthis.pojedi(i, this.sirinaTable-1);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i, this.sirinaTable-1);\n\t\t}\n\t\treturn true;\n\t}",
"public void nuevoJuego() {\n fallos = 0;\n finDePartida = false;\n\n for (TextView b : botonesLetras) {\n b.setTextColor(Color.BLACK);\n b.setOnClickListener(clickListenerLetras);\n b.setPaintFlags(b.getPaintFlags() & (~ Paint.STRIKE_THRU_TEXT_FLAG));\n }\n ImageView img_ahorcado = (ImageView) findViewById(es.makingapps.ahorcado.R.id.img_ahorcado);\n img_ahorcado.setImageResource(R.drawable.ahorcado_0);\n\n BaseDatos bd = new BaseDatos(this);\n palabraActual = bd.queryPalabraAleatoria(nivelSeleccionado, esAcumulativo);\n\n palabraEspaniol.setText(palabraActual.getEspaniol());\n\n progreso = \"\";\n boolean parentesis = false;\n for(int i = 0; i<palabraActual.getIngles().length(); i++) {\n if(parentesis){\n progreso += palabraActual.getIngles().charAt(i);\n }\n else {\n// if (palabraActual.getIngles().charAt(i) == ' ')\n// progreso += ' ';\n// else if (palabraActual.getIngles().charAt(i) == '-')\n// progreso += '-';\n// else if (palabraActual.getIngles().charAt(i) == '/')\n// progreso += '/';\n// else if (palabraActual.getIngles().charAt(i) == '(') {\n// progreso += '(';\n// parentesis = true;\n// }\n// else if (palabraActual.getIngles().charAt(i) == ')') {\n// progreso += ')';\n// parentesis = false;\n// }\n// else\n// progreso += '_';\n if(Character.isLowerCase(palabraActual.getIngles().charAt(i)))\n progreso += '_';\n else if (palabraActual.getIngles().charAt(i) == '(') {\n progreso += '(';\n parentesis = true;\n }\n else if (palabraActual.getIngles().charAt(i) == ')') {\n progreso += ')';\n parentesis = false;\n }\n else\n progreso += palabraActual.getIngles().charAt(i);\n }\n }\n\n palabraIngles.setText( progreso );\n }",
"String algorithm();",
"public Loup(String ligne){\n String delimiteur = \" \";\n StringTokenizer tokenizer = new StringTokenizer(ligne, delimiteur);\n String inutile = tokenizer.nextToken();\n this.ptVie = Integer.parseInt(tokenizer.nextToken());\n this.pourcentageAtt = Integer.parseInt(tokenizer.nextToken());\n this.pourcentagePar = Integer.parseInt(tokenizer.nextToken());\n this.degAtt = Integer.parseInt(tokenizer.nextToken());\n this.ptPar = Integer.parseInt(tokenizer.nextToken());\n this.pos = new Point2D(Integer.parseInt(tokenizer.nextToken()),Integer.parseInt(tokenizer.nextToken()));\n }",
"public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }",
"private String cadenaABinario(String cadena){\n String cb = \"\";\n int longitud;\n for(int i = 0; i < cadena.length(); i++){\n cb += String.format(\"%8s\",Integer.toBinaryString(cadena.charAt(i)));\n }\n cb = formato(cb);\n return cb;\n }",
"@Override\n public ArrayList<String> kaikkiMahdollisetSiirrot(int x, int y, Ruutu[][] ruudukko) {\n ArrayList<String> siirrot = new ArrayList<>();\n if (x - 1 >= 0 && y - 2 >= 0 && (ruudukko[x - 1][y - 2].getNappula() == null || !onkoSamaVari(ruudukko[x - 1][y - 2].getNappula()))) {\n siirrot.add(\"\" + (x - 1) + (y - 2));\n }\n if (x - 2 >= 0 && y - 1 >= 0 && (ruudukko[x - 2][y - 1].getNappula() == null || !onkoSamaVari(ruudukko[x - 2][y - 1].getNappula()))) {\n siirrot.add(\"\" + (x - 2) + (y - 1));\n }\n if (x - 1 >= 0 && y + 2 <= 7 && (ruudukko[x - 1][y + 2].getNappula() == null || !onkoSamaVari(ruudukko[x - 1][y + 2].getNappula()))) {\n siirrot.add(\"\" + (x - 1) + (y + 2));\n }\n if (x - 2 >= 0 && y + 1 <= 7 && (ruudukko[x - 2][y + 1].getNappula() == null || !onkoSamaVari(ruudukko[x - 2][y + 1].getNappula()))) {\n siirrot.add(\"\" + (x - 2) + (y + 1));\n }\n if (x + 1 <= 7 && y - 2 >= 0 && (ruudukko[x + 1][y - 2].getNappula() == null || !onkoSamaVari(ruudukko[x + 1][y - 2].getNappula()))) {\n siirrot.add(\"\" + (x + 1) + (y - 2));\n }\n if (x + 2 <= 7 && y - 1 >= 0 && (ruudukko[x + 2][y - 1].getNappula() == null || !onkoSamaVari(ruudukko[x + 2][y - 1].getNappula()))) {\n siirrot.add(\"\" + (x + 2) + (y - 1));\n }\n if (x + 1 <= 7 && y + 2 <= 7 && (ruudukko[x + 1][y + 2].getNappula() == null || !onkoSamaVari(ruudukko[x + 1][y + 2].getNappula()))) {\n siirrot.add(\"\" + (x + 1) + (y + 2));\n }\n if (x + 2 <= 7 && y + 1 <= 7 && (ruudukko[x + 2][y + 1].getNappula() == null || !onkoSamaVari(ruudukko[x + 2][y + 1].getNappula()))) {\n siirrot.add(\"\" + (x + 2) + (y + 1));\n }\n return siirrot;\n }",
"public static void main(String[] args) {\n\n String text= \"merhaba arkadaslar \";\n System.out.println( \"1. bolum =\" + text .substring(1,5));// 1 nolu indexten 5 e kadar. 5 dahil degil\n System.out.println(\"2. bolum =\"+ text.substring(0,3));\n System.out.println(\"3. bolum =\"+ text.substring(4));// verilen indexten sonun akadar al\n\n String strAlinan= text.substring(0,3);\n\n\n\n\n\n }",
"protected void pretragaGledalac() {\n\t\tString Gledalac=tfPretraga.getText();\r\n\r\n\t\tObject[]redovi=new Object[9];\r\n\t\tdtm.setRowCount(0);\r\n\t\t\r\n\t\tfor(Rezervacije r:Kontroler.getInstanca().vratiRezervacije()) {\r\n\t\t\tif(r.getImePrezime().toLowerCase().contains(Gledalac.toLowerCase())) {\r\n\t\t\t\r\n\t\t\t\tredovi[0]=r.getID_Rez();\r\n\t\t\t\tredovi[1]=r.getImePrezime();\r\n\t\t\t\tredovi[2]=r.getImePozorista();\r\n\t\t\t\tredovi[3]=r.getNazivPredstave();\r\n\t\t\t\tredovi[4]=r.getDatumIzvodjenja();\r\n\t\t\t\tredovi[5]=r.getVremeIzvodjenja();\r\n\t\t\t\tredovi[6]=r.getScenaIzvodjenja();\r\n\t\t\t\tredovi[7]=r.getBrRezUl();\r\n\t\t\t\tredovi[8]=r.getCenaUlaznica();\r\n\t\t\t\tdtm.addRow(redovi);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public static String crypter (String chaineACrypter, int codeCryptage) {\r\n char car;\r\n char newCar;\r\n int charLength = chaineACrypter.length();\r\n\r\n for(int i = 0; i < charLength; i++){\r\n car = chaineACrypter.charAt(i);\r\n if(car >= 'a' && car <= 'z'){\r\n newCar = (char)(car + codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= 'A' && car <= 'Z'){\r\n newCar = (char)(car - codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= '0' && car <= '9'){\r\n newCar = (char)(car + 7 % codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }\r\n }\r\n\r\n\r\n return chaineACrypter;\r\n }",
"private int createPosition (String s) {\r\n\t\tint x = 37;\r\n\t\tdouble hashCode=0;\r\n\t\tfor (int i=0; i<s.length(); i++) {\r\n\t\t\thashCode = (double) (hashCode+ (int)(s.charAt(s.length()-(i+1)))*(Math.pow(x,i)));\r\n\t\t}\r\n\t\treturn (int)(hashCode % size);\r\n\t}",
"static String MostrarPergunta(int pergunta)\n {\n String montada = \"\";\n \n montada = montada + Perguntas(pergunta); //pega as perguntas na função de Perguntas, contatena com a String montada\n montada = montada + \"\\n\";\n \n String [] opcoes = Opcoes(pergunta); //pega as opções de acordo com a numeração da pergunta \n \n for (int i = 0; i < opcoes.length; i++) \n {\n montada = montada + (opcoes[i] + \"\\n\"); //monta as opções com as perguntas com as respectivas numeração \n }\n montada = montada + \"\\n\";\n montada = montada + \"\\n\";\n \n return montada;\n \n }",
"private int Dataposi(String cadena,int posicion){\r\n\t\tif(cadena.length() > posicion && posicion >= 0)\r\n\t\t\treturn cadena.charAt(cadena.length()-posicion-1)-48;\r\n\t\treturn 0;\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a word\");\n\t\tString a=scan.nextLine();\n\n\t\tint sayac=0;\n\t\tint sayac1=0;\n\t\tint sayac2=0;\n\t\tint sayac3=0;\n\t\tint sayac4=0;\n\t\tint sayac5=0;\n\t\tint sayac6=0;\n\t\tint sayac7=0;\n\t\tint sayac8=0;\n\t\tint sayac9=0;\n\t\n\t\n\tint b=a.toLowerCase().length();\n\t\nchar[] alphabet= {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','u','p','r','s','t','u','z','w','x','v'};\n\t\n\t\n\t\t\n\tfor(int i=0; i<=b-1; i++) {\n\t\tfor(int j=0; j<alphabet.length; j++) {\n\t\tif(a.charAt(i)==alphabet[j] ) {\n\t\t\tSystem.out.println(\"a harfi \"+(i+1)+\". siradadir\");\n\t\t\tsayac++;\n\t\t\tSystem.out.println(sayac+\"tane a.charAt(i) harfi vardir\");\n\t\t}\n\t\t\n\t\t\n\t\n\t\t}}\n\n\n\t}",
"private int separarCoordenadasFil(String[] pCasilla){\n\t\treturn Integer.parseInt(pCasilla[0]);\n\t}",
"public Polinomio(String cadenaPolinomio) {\n patron = Pattern.compile(PATRON_POLINOMIO);//se carga el patron polinomio\n polinomio = ConvertirPolinomio(cadenaPolinomio);\n }",
"public void hitunganRule4(){\n penebaranBibitBanyak = 1900;\r\n hariPanenLama = 110;\r\n \r\n //menentukan niu bibit\r\n nBibit = (penebaranBibitBanyak - 1500) / (3000 - 1500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenLama >=80) && (hariPanenLama <=120)) {\r\n nPanen = (hariPanenLama - 100) / (180 - 100);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a4 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a4 = nPanen;\r\n }\r\n \r\n //tentukan Z3\r\n z4 = (penebaranBibitBanyak + hariPanenLama) * 500;\r\n System.out.println(\"a4 = \" + String.valueOf(a4));\r\n System.out.println(\"z4 = \" + String.valueOf(z4));\r\n }"
]
| [
"0.6783893",
"0.6567767",
"0.61800975",
"0.6158889",
"0.6119519",
"0.6092881",
"0.60822517",
"0.6059614",
"0.60120463",
"0.5990451",
"0.5968348",
"0.59659785",
"0.5933313",
"0.58883375",
"0.5880712",
"0.58234113",
"0.5808429",
"0.57851934",
"0.5767811",
"0.575934",
"0.57588094",
"0.5736092",
"0.5731084",
"0.5721371",
"0.57154566",
"0.5676737",
"0.5652784",
"0.5651508",
"0.5639385",
"0.5637997",
"0.5635475",
"0.5635355",
"0.56302655",
"0.5626607",
"0.56103903",
"0.56056625",
"0.56054103",
"0.5588495",
"0.5581508",
"0.5581182",
"0.5573787",
"0.55672646",
"0.5564065",
"0.5563591",
"0.55589646",
"0.5558584",
"0.5552923",
"0.55451465",
"0.5541461",
"0.5528898",
"0.5518406",
"0.55134416",
"0.550605",
"0.54995584",
"0.5492878",
"0.54818434",
"0.5481184",
"0.5480674",
"0.54804415",
"0.546788",
"0.54663473",
"0.5461613",
"0.54599744",
"0.5456126",
"0.54506457",
"0.5448322",
"0.5448093",
"0.54341435",
"0.5432894",
"0.54294944",
"0.5422735",
"0.5414615",
"0.5410176",
"0.540988",
"0.54093885",
"0.54078496",
"0.5407491",
"0.5403697",
"0.5401601",
"0.5393601",
"0.5389412",
"0.53851765",
"0.5381248",
"0.5380263",
"0.5375156",
"0.536904",
"0.5365639",
"0.53644097",
"0.53631425",
"0.5361276",
"0.5361002",
"0.53533006",
"0.5351483",
"0.5351469",
"0.5350142",
"0.5349111",
"0.53476155",
"0.53454113",
"0.5341893",
"0.53313017"
]
| 0.6633772 | 1 |
TODO Autogenerated method stub | public void actionPerformed(ActionEvent e) {
Index = Main.getIndex();
myBf = new BufferedImage(1050,820,BufferedImage.TYPE_INT_RGB);
Graphics2D gd = (Graphics2D) myBf.createGraphics();
/*gd.setColor(Color.WHITE);
gd.fillRect(0,0,1050,820);*/
Color c = Main.arr.get(Index).jp.getBackground();
gd.setColor(c);
gd.fillRect(0,0,1050,820);
//gd.setBackground(Color.WHITE);
gd.drawImage(Main.arr.get(Index).bf,null,0,0);
FileDialog fd = new FileDialog(Main.frame,"",FileDialog.SAVE);
fd.setVisible(true);
File outputFile = new File (fd.getDirectory()+"/" + fd.getFile()+ ".jpg");
try {
ImageIO.write(myBf, "jpg",outputFile);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
System.out.println("file not saved");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
get the word in the node | public Movies getMovie () {
return movie;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getWord();",
"public String getWord()\n\t{\n\t\treturn word.get(matcher());\n\t}",
"public void getWord() {\n\t\t\n\t}",
"public String getWord()\r\n\t\t{\r\n\t\t\treturn word;\r\n\t\t}",
"public String getWord(){\r\n\t\treturn word;\r\n\t}",
"public String getTextValue (Node node);",
"public String getWord()\n\t{\n\t\treturn word;\n\t}",
"public String getWord(){\n\t\treturn word;\n\t}",
"public String getWord() {\n return this.word;\n }",
"public String getWord(){\r\n\t\t return word;\r\n\t }",
"public String getWord() {\n return word;\n }",
"public String getWord() {\n\t\treturn word;\r\n\t}",
"@Override\n public String getWord(){\n return word;\n }",
"public String getWord(){\n return this.word;\n }",
"public String getNodeValue ();",
"public Word getWord() {\n return word;\n }",
"public StringNode locate(String word) {\n StringNode current = first;\n while (true) {\n if (current == null) {\n return null;\n }\n if (current.getWord().equalsIgnoreCase(word)) {\n return current;\n }\n else {\n if (current.hasNext()) {\n current = current.getNext();\n }\n else {\n return null;\n }\n }\n }\n }",
"public String getWord() {\n if(words[index] != null) {\n return words[index];\n } else {\n return \"\";\n }\n }",
"private V get(StringIterator iter)\n {\n \tEntry curr = root;\n \twhile(iter.hasNext())\n \t{\n \t\tchar ch = iter.next();\n \t\tEntry node = curr.child.get(ch);\n \t\t//If node does not exist for given character\n \t\tif (node == null) \n \t\t{\n \t\t return null;\t\n \t\t}\n \t\tcurr = node;\n \t}\n \t//If word exists but it was not added individually into Trie\n \treturn curr.EndOfWord == true ? curr.value : null;\n }",
"Term getNodeTerm();",
"public V get(String str) \n {\n \tEntry curr = root;\n \tfor (int i=0; i<str.length(); i++)\n \t{\n \t\tchar ch = str.charAt(i);\n \t\tEntry node = curr.child.get(ch);\n \t\t//If node does not exist for given character\n \t\tif (node == null) \n \t\t{\n \t\t return null;\t\n \t\t}\n \t\tcurr = node;\n \t}\n \t//If word exists but it was not added individually into Trie\n \treturn curr.EndOfWord == true ? curr.value : null;\n }",
"public static String getWord() {\r\n\t\treturn Text;\r\n\t}",
"public String getWord (int wordIndex) {\n if (wordIndex < 0 ) {\n return \"\";\n } else {\n int s = getWordStart (wordIndex);\n int e = indexOfNextSeparator (tags, s, true, true, slashToSeparate);\n if (e > s) {\n return tags.substring (s, e);\n } else {\n return \"\";\n }\n }\n }",
"public Verbum getWord(){\r\n\t\t// Pick random starting point in the linked list\r\n\t\tint start = (int)(Math.random() * words.size());\r\n\t\tDSElement<Verbum> w = words.first;\r\n\t\tfor(int i = 0; i < start; i++)\r\n\t\t\tw = w.getNext();\r\n\t\treturn w.getItem();\r\n\t}",
"private String wordToFind() {\n\t\t\n\t\t//It actually just gets the incomplete version of the word, with underscores.\n\t\t//By the point this method is called, the server will have created a thread for\n\t\t//this client and generated a random word for this client to aim for. \n\t\t//The underscore variant will be just as long as the real word, so it can be used\n\t\t//for array lengths and, since it'll be all underscores, even if a hacker went to\n\t\t//print out the value of temp, they wouldn't get anywhere.\n\t\tout.println(\"GetWord\");\n\t\tString temp = null;\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\ttemp = in.readLine();\n\t\t\t\tif(temp!=null) {\n\t\t\t\t\tcurrentWordLabel = new Label(temp);\n\t\t\t\t\treturn temp;\n\t\t\t\t}\n\t\t\t}catch(IOException ioe) {\n\t\t\t}\n\t\t}\n\t}",
"String getWordIn(String schar, String echar);",
"Node getVariable();",
"public String getWordAt(int pos){\n\t\treturn sentence.get(pos).getWord();\n\t}",
"String getElement();",
"public String getElement()\n {\n return nodeChoice;\n }",
"public String toString()\n\t{\n\t\treturn word;\n\t}",
"public String getMyword() {\n return myword;\n }",
"private LexiNode search_specific_word(String word, int index){\n\t\tif(current_word != null && !current_word.isEmpty()){\n\t\tint local_index = index + 1;\n\t\t//if we found the word, we make the change\n\t\tif(current_word != null && \n\t\t !current_word.isEmpty() && \n\t\t\tword.toLowerCase().equals(current_word.toLowerCase()))\n\t\t\treturn this;\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs)\n\t\t\tif(word.toLowerCase().charAt(local_index) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\treturn child.search_specific_word(word, local_index);\n\t\t}\n\t\treturn null;\n\t}",
"WordBean getWord(String word);",
"@AutoEscape\n\tpublic String getNode_2();",
"@Override\n public String search(String word) {\n return search(word, root);\n }",
"@AutoEscape\n\tpublic String getNode_1();",
"public String getNodeValue(Node node) throws Exception;",
"public String getSecondWord()\r\n {\r\n return this.aSecondWord; \r\n }",
"public String search_words(String word){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs)\n\t\t\tif(word.toLowerCase().charAt(0) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\tfound_words += child.search_words(word, 0);\n\t\t\n\t\treturn found_words;\n\t}",
"@NonNull\n @Override\n public String toString() {\n return word;\n }",
"@Override\n\tpublic java.lang.String getNode_2() {\n\t\treturn _dictData.getNode_2();\n\t}",
"public String getValue(Node node) {\n return (node == null) ? null : node.getTextContent();\n }",
"public java.lang.String getWord() {\n java.lang.Object ref = word_;\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 if (bs.isValidUtf8()) {\n word_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getWord() {\n java.lang.Object ref = word_;\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 if (bs.isValidUtf8()) {\n word_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private String search_words(String word, int index){\n\t\tString found_words = \"\";\n\t\tint local_index = index +1;\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\tif(local_index > word.length()-1 || word.toLowerCase().charAt(local_index) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\tfound_words += child.search_words(word, local_index);\n\t\t}\n\t\tif(current_word != null && word.length() > current_word.length())\n\t\t\treturn found_words;\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word.toLowerCase().equals(word.toLowerCase()) ? current_word +\" & \" + definition + \"#\" + found_words +\"#\" : current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word.toLowerCase().equals(word.toLowerCase()) ? current_word +\" & \" + definition + \"#\": current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}",
"@Override\n\tpublic java.lang.String getNode_1() {\n\t\treturn _dictData.getNode_1();\n\t}",
"public String getWord(int index){\n\t\treturn (String)list.get(index);\n\t}",
"public int getNodeLabel ();",
"public String getWord(int value) {\n String nextWord = \"\";\n boolean found = false;\n\n for (MainNode n = mainList; n != null && !found; n = n.mainNext) {\n //System.out.println(\"wordCount: \" + n.wordCount);\n if (n.wordCount >= value) {\n nextWord = n.input;\n }\n }\n\n return nextWord;\n }",
"@AutoEscape\n\tpublic String getNode_3();",
"public String getNode() {\n return node;\n }",
"public String getCurrent_word(){\n\t\treturn current_word;\n\t}",
"public String get_all_words(){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\t\tfound_words += child.get_all_words();\n\t\t}\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}",
"String getKeyword();",
"private String getHongbaoText(AccessibilityNodeInfo node) {\n String content;\n try {\n AccessibilityNodeInfo i = node.getParent().getChild(0);\n content = i.getText().toString();\n } catch (NullPointerException npe) {\n return null;\n }\n return content;\n }",
"public String value() {\n return node.getTextContent();\n }",
"private String getWord(final int index) {\n int start = 0;\n int length = 0;\n String result = null;\n try {\n start = TextUtils.getWordStart(textKit, index);\n length = TextUtils.getWordEnd(textKit, index) - start;\n result = document.getText(start, length);\n } catch (final BadLocationException e) {\n }\n\n return result;\n }",
"String getNodeName();",
"public String get(String key) {\n \ttmp = getNode(key);\n \tif (tmp != null) { \n \t\treturn tmp.getVal();\n \t}\n \treturn null;\n }",
"java.lang.String getKeyword();",
"public String getNode()\n {\n return node;\n }",
"@Override\n public String getText() {\n return analyzedWord;\n }",
"@Override\n public String toString() {\n if (restOfSentence instanceof WordNode) {\n return word + \" \" + restOfSentence.toString();\n } else if (restOfSentence instanceof EmptyNode) {\n return word + \".\" + restOfSentence.toString();\n } else {\n return word + restOfSentence.toString();\n }\n }",
"public WordNode(String word, ISentence restOfSentence) {\n this.word = word;\n this.restOfSentence = restOfSentence;\n }",
"public String getWord(int i) {\n\t\treturn ((String) wc.elementAt(i));\n\t}",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"public boolean search(String word) {\n char[] chars = word.toCharArray();\n Node theNode = root;\n for (char c : chars) {\n if (theNode.children.containsKey(c)) {\n theNode = theNode.children.get(c);\n } else {\n return false;\n }\n }\n return theNode.leaf;\n }",
"public static FeatureNode getFirstWord(FeatureNode word)\n\t{\n\t\tFeatureNode fn = word.get(\"phr-head\");\n\t\twhile (fn != null)\n\t\t{\n\t\t\tFeatureNode wd = fn.get(\"phr-word\");\n\t\t\tif (wd != null) return wd;\n\n\t\t\tFeatureNode subf = fn.get(\"phr-head\");\n\t\t\tif (subf != null)\n\t\t\t{\n\t\t\t\twd = getFirstWord(fn);\n\t\t\t\tif (wd != null) return wd;\n\t\t\t}\n\t\t\tfn = fn.get(\"phr-next\");\n\t\t}\n\t\treturn null;\n\t}",
"Node getTemplateTextNode();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"public void addWord(String word) {\r\n Node node = root;\r\n for(char c : word.toCharArray()){\r\n node.nodes[c-'a'] = new Node();\r\n node = node.nodes[c-'a'];\r\n }\r\n node.isLeaf = true;\r\n }",
"public String getNode() {\n return node;\n }",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"String getShortToken();",
"private TrieNode searchPrefix(String word) {\n\t\tTrieNode node = root;\n\t\tfor (char c: word.toCharArray()) {\n\t\t\tif (node.containsKey(c)) {\n\t\t\t\tnode = node.get(c);\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}",
"public static String getNodeStr(Node curr) {\r\n\t\treturn curr.str;\r\n\t}",
"public static CommandType getWord(String word){\r\n\t\treturn dictionary.get(word);\r\n\t}",
"public String lookup(String key){\n Node N;\n N = findKey(root, key);\n return ( N == null ? null : N.item.value );\n }",
"@Override\n public String toString() {\n \treturn title + \":\" + word ;\n }"
]
| [
"0.7474127",
"0.68532354",
"0.68491626",
"0.68194723",
"0.6779375",
"0.67663556",
"0.67257565",
"0.6711786",
"0.6704968",
"0.6701906",
"0.67010486",
"0.6685749",
"0.65614146",
"0.65605545",
"0.6504578",
"0.64845306",
"0.6433477",
"0.6344555",
"0.63139784",
"0.63108975",
"0.63088316",
"0.62975025",
"0.62912995",
"0.6130227",
"0.6107313",
"0.6100281",
"0.60812575",
"0.60766846",
"0.6050985",
"0.6023885",
"0.60164046",
"0.5990279",
"0.596983",
"0.59653234",
"0.5964116",
"0.5963288",
"0.59434414",
"0.5930861",
"0.5917568",
"0.59099334",
"0.5893795",
"0.5825977",
"0.581619",
"0.58160627",
"0.58062476",
"0.57945895",
"0.5791663",
"0.57773834",
"0.577565",
"0.57735795",
"0.57730675",
"0.5768671",
"0.575636",
"0.57417166",
"0.57413834",
"0.5737686",
"0.5732961",
"0.5720759",
"0.57152456",
"0.5705034",
"0.5704151",
"0.5700612",
"0.5698394",
"0.5693889",
"0.56881857",
"0.56827885",
"0.56667995",
"0.56667995",
"0.56667995",
"0.56667995",
"0.56667995",
"0.56667995",
"0.56667995",
"0.56667995",
"0.5655052",
"0.56491834",
"0.564569",
"0.5635899",
"0.5635899",
"0.5635899",
"0.5635899",
"0.5635899",
"0.5635899",
"0.5635899",
"0.5635225",
"0.56349504",
"0.5626166",
"0.5626166",
"0.5626166",
"0.5626166",
"0.5626166",
"0.5626166",
"0.5626166",
"0.5626166",
"0.5626166",
"0.5626166",
"0.56259525",
"0.56207025",
"0.5617477",
"0.5608183",
"0.5602905"
]
| 0.0 | -1 |
set the left Node of the word | public void setLeft (Node l) {
left = l;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLeft(Node left) {\n this.left = left;\n }",
"public void setLeft(BinNode<E> l)\n {\n left = l;\n }",
"public void setLeft(TreeNode left) {\n\t\tthis.left = left;\n\t}",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }",
"public void setLeft(Node<T> left) {\n this.left = left;\n if (left != null)\n left.setParent(this);\n }",
"public void setLeftChild(Node<T> leftChild) {\n this.leftChild = leftChild;\n }",
"public void setLeft(IAVLNode node);",
"public void setLeft(IAVLNode node);",
"public void setLeft(AVLNode<E> left) {\r\n\t\tthis.left = left;\r\n\t}",
"void setLeft(TreeNode<T> left);",
"public void setLeftChild(TreeNode left){\n\t\tleftChild = left;\n\t}",
"void setLeft(T data) {\n\t\tthis.left = new TreeNode<T>(data, null, null, null, this);\n\t}",
"public void setLeft(BSTItem n)\r\n\t{\r\n\t\tleft = n;\r\n\t}",
"public void setLeft(Node<T> val) {\r\n\r\n\t\tif (getLeft() != null)\r\n\t\t\tgetLeft().setParent(null);\r\n\r\n\t\tif (val != null) {\r\n\t\t\tval.removeParent();\r\n\t\t\tval.setParent(this);\r\n\t\t}\r\n\r\n\t\tthis.left = val;\r\n\t}",
"public void setLeft(final BinaryTreeNode<E> left) {\n this.left = left;\n }",
"public void setLeft(IAVLNode node) {\n\t\t\tthis.left = node; // to be replaced by student code\n\t\t}",
"public void setLeftChild(BSTNode left) {\n\t\tthis.leftChild = left;\n\t}",
"public void setLeft(BinaryTree<E> newLeft)\r\n\t// post: sets left subtree to newLeft\r\n\t// re-parents newLeft if not null\r\n\t{\r\n\t\tif (isEmpty()) return;\r\n\t\tif (left != null && left.parent() == this) left.setParent(null);\r\n\t\tleft = newLeft;\r\n\t\tleft.setParent(this);\r\n\t}",
"@Override\n\tpublic void setLeftChild(WhereNode leftChild) {\n\n\t}",
"public void setLeftChild(BinaryNode leftChild) {\n\t\tthis.leftChild = leftChild;\n\t}",
"@Override\n\tpublic void setLeftChild(ASTNode node) {\n\t\tthis.leftChild = node;\n\n\t}",
"public void setLeft(int x) {\r\n leftSide = x;\r\n }",
"public BTNode setLeft(BTNode t, T n)\r\n {\r\n t.left =new BTNode(n);\r\n\t\t return t.left;\r\n }",
"public void setLeftChild(TreeNode leftChild) {\n this.leftChild = leftChild;\n }",
"public void setLeft() {\n\t\tstate = State.LEFT;\n\t}"
]
| [
"0.760427",
"0.7515429",
"0.73311085",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.73277295",
"0.7161484",
"0.7157786",
"0.7147867",
"0.7147867",
"0.7080676",
"0.7062867",
"0.70552224",
"0.7054911",
"0.7005834",
"0.6986532",
"0.6958778",
"0.6931647",
"0.6911948",
"0.6883751",
"0.68734837",
"0.68712467",
"0.6833164",
"0.6786908",
"0.67801964",
"0.6776312",
"0.6725053"
]
| 0.7795993 | 0 |
get the left Node | public Node getLeft () {
return left;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Node getLeft() {\n return left;\n }",
"public Node getLeft() {\n return left;\n }",
"public Node getLeft() {\n return left;\n }",
"public Node getLeft() {\n return left;\n }",
"public MyNode getLeft()\r\n {\r\n \treturn left;\r\n }",
"public Node<T> getLeft() {\r\n\t\treturn left;\r\n\t}",
"public Node getLeftChild() {\r\n \treturn getChild(true);\r\n }",
"public Node getLeft(){\r\n return this.left;\r\n }",
"TreeNode<T> getLeft();",
"private Node getLeft() {\n return this.left;\n }",
"public HuffmanNode getLeftNode()\n\t{\n\t\treturn left;\n\t}",
"public TreeNode getLeft() {\n\t\treturn left;\n\t}",
"public BinaryTreeNode getLeft() {\n\t\treturn left;\n\t}",
"protected final IntervalNode getLeft() {\n\treturn(this.left);\n }",
"@Override\n\t\tpublic PrintNode getLeft() {\n\t\t\treturn this.left;\n\t\t}",
"public BinNode<T> getLeft();",
"public AVLNode<E> getLeft() {\r\n\t\treturn left;\r\n\t}",
"@Override\r\n\tpublic BinaryNodeInterface<E> getLeftChild() {\n\t\treturn left;\r\n\t}",
"public BTNode getLeft(){\r\n return leftLeaf;\r\n }",
"public BinaryTreeNode getLeftChild() { \n\t\t\treturn null;\n\t\t}",
"public Node<T> getLeftChild() {\n return this.leftChild;\n }",
"@Override\n\tpublic INode getLeft() {\n\t\treturn left;\n\t}",
"public BSTItem getLeft()\r\n\t{\r\n\t\treturn left;\r\n\t}",
"public BinaryNode getLeftChild() {\n\t\treturn leftChild;\n\t}",
"private BSTNode<E> getLeftmostNode() {\r\n\t\tif (this.left != null) {\r\n\t\t\treturn this.left.getLeftmostNode();\r\n\t\t} else {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}",
"public BinarySearchTreeNode<T> getLeft() {\r\n return left;\r\n }",
"public IAVLNode getLeft() {\n\t\t\treturn this.left; // to be replaced by student code\n\t\t}",
"EObject getLeft();",
"@Override\n public Object left(Object node) {\n return ((Node<E>) node).left;\n }",
"@Override\n public Object left(Object node) {\n return ((Node<E>) node).left;\n }",
"public BinarySearchTree getLeftChild(){\r\n\t\treturn leftChild;\r\n\t}",
"public Expr left() {\n\treturn this.left;\n }",
"public TreeNode getLeftChild() {\n return leftChild;\n }",
"public AST getLeft() {\n\t\treturn left;\n\t}",
"public BinaryTreeADT<T> getLeft();",
"public int getLeft() {\n\t\treturn this.left;\n\t}",
"protected BinarySearchTree<K, V> getLeft() {\n return this.left;\n }",
"public HuffmanNode getLeftSubtree () {\n \treturn left;\n }",
"@Override\n\tpublic BTree<T> left() \n\t{\n\t\t\n\t\treturn root.left;\n\t}",
"@Override\n public AVLTreeNode<E> getLeft() {\n return (AVLTreeNode<E>) super.getLeft();\n }",
"public BSTNode getLeftChild() {\n\t\treturn leftChild;\n\t}",
"Node findLeftmost(Node R){\n Node L = R;\n if( L!= null ) for( ; L.left != null; L = L.left);\n return L;\n }",
"public BinaryTree leftTree()\n { return left;}",
"@Override\n\tpublic ASTNode getLeftChild() {\n\t\treturn this.leftChild ;\n\t}",
"public TreeNode getLeft(){ return leftChild;}",
"@Override\n\tpublic WhereNode getLeftChild() {\n\t\treturn null;\n\t}",
"public Lane getLeft() {\r\n\t\treturn left;\r\n\t}",
"public Node popLeftChild() {\n if (leftChild == null) {\n return null;\n }\n else {\n Node tmp = leftChild;\n leftChild = null;\n return tmp;\n }\n }",
"public int getLeft(int position) {\r\n\t\treturn this.treeLeft[position];\r\n\t}",
"public abstract Position<E> getLeftRoot();",
"public int getLeft() {\n\t\treturn left;\n\t}",
"@Pure\n public QuadTreeNode<D> getLowerLeftChild() {\n QuadTreeNode<D>[] _children = this.children;\n QuadTreeNode<D> _get = null;\n if (_children!=null) {\n _get=_children[0];\n }\n return _get;\n }",
"public Node getSibling(String leftOrRight) {\r\n\t\t\tif (parent == null) return null;\r\n\t\t\tNode ret = null;\r\n\t\t\t//get this node's position in the parent\r\n\t\t\tint position;\r\n\t\t\t\r\n\t\t\tif (data.size() > 0)\r\n\t\t\t\tposition = parent.getChildNumber(data.get(0).getKey());\r\n\t\t\telse\r\n\t\t\t\tposition = parent.getEmptyChild();\r\n\t\t\t\r\n\t\t\tif (leftOrRight.compareTo(\"left\") == 0) {\r\n\t\t\t\tif (position != 0)\r\n\t\t\t\t\tret = parent.getChild(position - 1);\r\n\t\t\t} else if (leftOrRight.compareTo(\"right\") == 0) {\r\n\t\t\t\tif (position != parent.getChildren().size() - 1)\r\n\t\t\t\t\tret = parent.getChild(position + 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn ret;\r\n\t\t}",
"LogicExpression getLeft();",
"public CellIDExpression getLeftCell() {\n\t\treturn leftCell;\n\t}",
"protected int getGraphLeft() {\r\n\t\treturn leftEdge;\r\n\t}",
"public Board getLeftNeighbor() {\r\n\t\treturn leftNeighbor;\r\n\t}",
"public int getLeftEdge() {\n return leftEdge;\n }",
"public Fork getLeft() {\n\t\treturn left;\n\t}",
"Binarbre<E> getLeft();",
"public final L getFst() {\n return leftMember;\n }",
"public static Node leftDescendant(Node node){\n if(node.left!=null){\n return leftDescendant(node.left); // คือการ (findMin) ด้ายซ้าย\n }\n else{\n return node;}\n }",
"public Player getLeftNeighbor() {\n\t\tif(players.indexOf(current)==0) {\n\t\t\treturn players.get(players.size()-1);\n\t\t}\n\t\telse {\n\t\t\treturn players.get(players.indexOf(current)-1);\n\t\t}\n\t}",
"public String getLeftKey() {\n return this.leftKey;\n }",
"public int getLeftNumber() {\n return leftNumber;\n }",
"public Direction left() {\n\t\treturn left;\n\t}",
"private BinaryTreeNode getSuccessorFromLeft(BinaryTreeNode node) {\n\n\t\tBinaryTreeNode nodeLeft = node.left;\n\n\t\twhile(nodeLeft.right != null) {\n\t\t\tnodeLeft = nodeLeft.right;\n\t\t}\n\n\t\treturn nodeLeft;\n\n\t}",
"private int leftChild ( int pos )\n\t{\n\t\treturn -1; // replace this with working code\n\t}",
"private int leftChild(int pos)\n {\n return (2 * pos);\n }",
"public Direction left() {\r\n\t\tint newDir = this.index - 1;\r\n\r\n\t\tnewDir = (newDir == 0) ? 4 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}",
"void findLeft(Board board) {\n if (tile.getColPos() != 0) {\n Tile leftTile = board.getTileObjByPosition(tile.getRowPos(), tile.getColPos() - 1);\n if (leftTile != null) {\n if (RailroadInk.areConnectedNeighbours(tile.getPlacementStr(), leftTile.getPlacementStr())) {\n Node leftNode;\n if ((leftTile.graphId > 0) || ((leftTile.graphId == -1) && (leftTile.leftId == graphId))) {\n leftNode = nodeMap.get(leftTile.pos);\n } else {\n leftNode = new Node(leftTile);\n if (leftTile.name.equals(\"B2\")) {\n leftTile.rightId = graphId;\n }\n nodeMap.put(leftTile.pos, leftNode);\n }\n\n // Update the connection relationship.\n this.left = leftNode;\n leftNode.right = this;\n if (this.tile.name.equals(\"B2\")) {\n this.tile.leftId = graphId;\n }\n\n if ((!leftTile.name.equals(\"B2\")) && (leftNode.up == null)) {\n leftNode.findUp(board);\n }\n if ((!leftTile.name.equals(\"B2\")) && (leftNode.down == null)) {\n leftNode.findDown(board);\n }\n if (leftNode.left == null) {\n leftNode.findLeft(board);\n }\n }\n }\n }\n }",
"private Node rotateLeft() {\n Node right = this.rightChild;\n this.rightChild = right.leftChild;\n right.leftChild = this;\n\n this.updateHeight();\n right.updateHeight();\n\n return right;\n }",
"public Direction left() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}",
"OrExp getLeft();",
"public BoardCoordinate getLeft() {\n return new BoardCoordinate(x-1, y);\n }",
"private static Position getLeftNeighbor(Position curr, int side) {\n int newX = curr.getX() - getNumElement(0, side) - getNumSpacePerSide(0, side) - 1;\n int newY = curr.getY() - side;\n return new Position(newX, newY);\n }",
"private int findTreeNodeLeftBoundary(RSTTreeNode node)\n {\n // recursive call for children (if applicable)\n if (node instanceof DiscourseRelation) {\n return findTreeNodeLeftBoundary(((DiscourseRelation) node).getArg1());\n }\n\n // it's EDU\n return node.getBegin();\n }",
"public Pixel downLeft() {\n if (this.down == null) {\n return null;\n }\n else {\n return this.down.left;\n }\n }",
"public AVLNode delUnaryLeft() {\n\t\t\tchar side = this.parentSide();\n\t\t\tif (side == 'L') {\n\t\t\t\tthis.parent.setLeft(this.getLeft());\n\t\t\t} else { // side == 'R', 'N' cannot happen\n\t\t\t\tthis.parent.setRight(this.getLeft());\n\t\t\t}\n\t\t\tthis.left.setParent(this.parent);\n\t\t\tAVLNode parent = (AVLNode) this.parent;\n\t\t\tthis.parent = null;\n\t\t\tthis.left = null;\n\t\t\treturn parent;\n\t\t}",
"public void setLeft (Node l) {\r\n\t\tleft = l;\r\n\t}",
"private int left(int parent) {\n\t\treturn (parent*2)+1;\n\t}",
"public SegmentTreeNode<T> getLeftSon() {\n\t\treturn lson;\n\t}",
"public static int leftChildIdx(int nodeIdx) {\n\t\treturn (2 * nodeIdx + 1);\n\t}",
"public Location left() {\n return new Location(row, column - 1);\n }",
"public abstract Position<E> getLeftChild(Position<E> p);",
"protected long getLeftPosition() {\n return leftPosition;\n }",
"void leftView(Node node)\r\n {\r\n \tif(node == null)\r\n \t\treturn;\r\n \t\r\n \tif(node.leftChild != null)\r\n \t\tSystem.out.print(\" \"+node.leftChild.data);\r\n \t\r\n \tleftView(node.leftChild);\r\n \tleftView(node.rightChild);\r\n }",
"Node minValueNode(Node node) \n { \n Node current = node; \n \n /* loop down to find the leftmost leaf */\n while (current.left != null) \n current = current.left; \n \n return current; \n }",
"private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }",
"public abstract Position<E> getLeftSibling(Position<E> p);",
"public BTreeNode<Integer, Integer> findLeftChild(final BTreeNode<Integer, Integer> node) {\n\t\t/*no recursion needed*/\n\t\tif(node == null) {\n\t\t\treturn null;\n\t\t}\n\t\tBTreeNode<Integer, Integer> currentNode = node;\n\t\twhile(currentNode.getLeftNode() != null) {\n\t\t\tcurrentNode = currentNode.getLeftNode();\n\t\t}\n\t\treturn currentNode;\n\t}",
"private Cell get_left_cell(int row, int col) {\n return get_cell(row, --col);\n }",
"public Vertex moveLeft() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x - 1, e);\n }\n return current;\n }",
"public Binary left(Expr left) {\n\tBinary_c n = (Binary_c) copy();\n\tn.left = left;\n\treturn n;\n }",
"public TreeNode getRandomNodeLeftSize(){\n\n Random random = new Random();\n int randomIndex = random.nextInt(size());\n return getRandomIndexNode(randomIndex);\n }",
"public Node getChild(boolean isLeft) {\r\n if (isLeft) {\r\n return leftChild;\r\n }\r\n else {\r\n return rightChild;\r\n }\r\n }",
"@Override\r\n\tpublic MoveLeftCommand getLeft() {\n\t\treturn null;\r\n\t}",
"public Location getLeft()\n\t{\n\t\tif(checkLeft())\n\t\t{\n\t\t\treturn new Location(row,col-1);\n\t\t}\n\t\treturn this;\n\t}",
"AVLTreeNode Min() {\r\n\r\n AVLTreeNode current = root;\r\n\r\n /* loop down to find the leftmost leaf */\r\n while (current.left != null)\r\n current = current.left;\r\n\r\n return current;\r\n\r\n\r\n }",
"private static TreeNode getNode() {\n TreeNode treeNode = new TreeNode(1);\n TreeNode left = new TreeNode(2);\n TreeNode right = new TreeNode(3);\n treeNode.left = left;\n treeNode.right = right;\n\n left.left = new TreeNode(4);\n right.left = new TreeNode(5);\n right.right = new TreeNode(6);\n return treeNode;\n }"
]
| [
"0.8566683",
"0.8566683",
"0.8566683",
"0.8566683",
"0.85462093",
"0.8436039",
"0.8418367",
"0.8409914",
"0.8407475",
"0.8376523",
"0.83388233",
"0.8289053",
"0.8229951",
"0.81989056",
"0.8164036",
"0.81447726",
"0.81057477",
"0.8010819",
"0.8009472",
"0.79993707",
"0.7987212",
"0.79740566",
"0.7949213",
"0.78947973",
"0.7871222",
"0.7856533",
"0.78326285",
"0.7810007",
"0.775668",
"0.775668",
"0.77405775",
"0.77394134",
"0.7709166",
"0.7701191",
"0.7637117",
"0.76094794",
"0.7603339",
"0.75548047",
"0.75229394",
"0.7513652",
"0.74940425",
"0.74820286",
"0.74269974",
"0.7417177",
"0.73794055",
"0.737939",
"0.7350434",
"0.7338349",
"0.73149526",
"0.7293506",
"0.7279383",
"0.72751516",
"0.7264684",
"0.72413945",
"0.7226442",
"0.72080284",
"0.71944517",
"0.71910787",
"0.71803594",
"0.71598405",
"0.715428",
"0.7137257",
"0.7119877",
"0.7110337",
"0.6995983",
"0.6968601",
"0.69434375",
"0.6938088",
"0.6927716",
"0.6907304",
"0.6902806",
"0.68787855",
"0.6878567",
"0.6866994",
"0.68667215",
"0.68663436",
"0.6860501",
"0.6858724",
"0.6850563",
"0.684159",
"0.6836348",
"0.68291044",
"0.6826993",
"0.68181235",
"0.6812291",
"0.68047184",
"0.6804397",
"0.67887086",
"0.6775355",
"0.6755125",
"0.67495966",
"0.6727146",
"0.67187667",
"0.67168033",
"0.6708655",
"0.6707195",
"0.6704187",
"0.6699636",
"0.66901624",
"0.6688156"
]
| 0.8702377 | 0 |
set the Right Node | public void setRight (Node r) {
right = r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRight(Node right) {\n this.right = right;\n }",
"public void setRight(BTNode myNode){\n rightleaf = myNode;\r\n }",
"public void setRight(Node node) {\n right = node;\n }",
"public void setRight(Node<T> right) {\n this.right = right;\n if (right != null)\n right.setParent(this);\n }",
"public void setRight(TreeNode right) {\n\t\tthis.right = right;\n\t}",
"void setRight(TreeNode<T> right);",
"public void setRight(IAVLNode node);",
"public void setRight(IAVLNode node);",
"public void setRight(BinNode<E> r)\n {\n right = r;\n }",
"public void setRight(AVLNode<E> right) {\r\n\t\tthis.right = right;\r\n\t}",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }",
"public void setRight(Node<T> val) {\r\n\r\n\t\tif (getRight() != null) {\r\n\t\t\tgetRight().setParent(null);\r\n\t\t}\r\n\r\n\t\tif (val != null) {\r\n\t\t\tval.removeParent();\r\n\t\t\tval.setParent(this);\r\n\t\t}\r\n\r\n\t\tthis.right = val;\r\n\t}",
"public void setRightChild(Node<T> rightChild) {\n this.rightChild = rightChild;\n }",
"public void setRightChild(TreeNode right){\n\t\trightChild = right;\n\t}",
"public void setRight(BSTItem n)\r\n\t{\r\n\t\tright = n;\r\n\t}",
"public void setRight(final BinaryTreeNode<E> right) {\n this.right = right;\n }",
"@Override\n\tpublic void setRightChild(ASTNode node) {\n\t\tthis.rightChild = node;\n\n\t}",
"public void setRightChild(BSTNode right) {\n\t\tthis.rightChild = right;\n\t}",
"void setRight(T data) {\n\t\tthis.right = new TreeNode<T>(data, null, null, null, this);\n\t}",
"public void setRight(IAVLNode node) {\n\t\t\tthis.right = node; // to be replaced by student code\n\t\t}",
"@Override\n\tpublic void setRightChild(WhereNode rightChild) {\n\n\t}",
"public void setRightChild(BinaryNode rightChild) {\n\t\tthis.rightChild = rightChild;\n\t}",
"public void setRight(Fork right) {\n\t\tthis.right = right;\n\t}",
"public void setRightChild(TreeNode rightChild) {\n this.rightChild = rightChild;\n }",
"public BTNode setRight(BTNode t,T n)\r\n {\r\n t.right =new BTNode(n);\r\n\t\t return t.right;\r\n }"
]
| [
"0.8377698",
"0.82450676",
"0.82437146",
"0.8089644",
"0.8073307",
"0.7957637",
"0.79428756",
"0.79428756",
"0.79284",
"0.78878665",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.7865065",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.78643006",
"0.7813804",
"0.77636755",
"0.7757184",
"0.7753618",
"0.7740543",
"0.7688393",
"0.765717",
"0.76342595",
"0.75963664",
"0.7571528",
"0.7375506",
"0.7365194",
"0.7338476",
"0.7326049"
]
| 0.8505472 | 0 |
get the right Node | public Node getRight () {
return right;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Node getNode();",
"public Node getNode();",
"public abstract Node getNode();",
"public Node getNode (){\n if (_node == null){\n Label label = new Label(_value);\n label.setFont(DEFAULT_FONT);\n _node = label;\n }\n return _node;\n }",
"@AutoEscape\n\tpublic String getNode_2();",
"public Node getNode() {\n\t\treturn null;\n\t}",
"OperationNode getNode();",
"Object get(Node node);",
"private Node getNode(String n1)\n\t{\n\t\tif (n1 == null) throw new RuntimeException(\"Attempt to add null node\");\n\t\tif (nodes.containsKey(n1)) return nodes.get(n1);\n\t\tnodes.put(n1, new Node(n1));\n\t\treturn nodes.get(n1);\n\t}",
"public final IRNode getNode() {\r\n return f_node;\r\n }",
"@AutoEscape\n\tpublic String getNode_1();",
"public int Node() { return this.Node; }",
"public String getNode() {\n return node;\n }",
"public String getNode()\n {\n return node;\n }",
"public Node getNode(String key) {\n \ttmp = first;\n \tint i;\n \tfor (i=0;i<len;i++) {\n \t\tif (tmp.key == key) {\n \t\t\treturn tmp;\n \t\t}\n \t\ttmp = tmp.getNext();\n \t}\n \treturn null;\n }",
"int getBaseNode();",
"Node getNode(int n) {\n switch (type) {\n\n case EDGE:\n case PATH:\n case EVAL:\n\n if (n < edge.nbNode()) {\n return edge.getNode(n);\n } else {\n return edge.getEdgeVariable();\n }\n\n case OPT_BIND:\n return get(n).getNode();\n }\n return null;\n }",
"@Override\n public Node getNode() throws ItemNotFoundException, ValueFormatException,\n RepositoryException {\n return null;\n }",
"public String getNode() {\n return node;\n }",
"Node currentNode();",
"public Node getNode() {\n return node;\n }",
"public Node getNode() {\n return node;\n }",
"private static TreeNode getNode() {\n TreeNode treeNode = new TreeNode(1);\n TreeNode left = new TreeNode(2);\n TreeNode right = new TreeNode(3);\n treeNode.left = left;\n treeNode.right = right;\n\n left.left = new TreeNode(4);\n right.left = new TreeNode(5);\n right.right = new TreeNode(6);\n return treeNode;\n }",
"private Node getNode(char c) {\n if (!alreadyExists(c)) {\n Node innerNode = new Node(null, 1);\n Node newNode = new Node(String.valueOf(c), 1);\n //make the newly inserted node as new\n newNode.isNew = true;\n\n innerNode.left = nytNode;\n innerNode.right = newNode;\n innerNode.parent = nytNode.parent;\n if (nytNode.parent == null) {\n //first node\n root = innerNode;\n\n } else {\n nytNode.parent.left = innerNode;\n }\n nytNode.parent = innerNode;\n newNode.parent = innerNode;\n\n return innerNode.parent;\n }\n //char exists, get the existing node\n return findNode(c);\n }",
"public NodeT getNode(String key) {\n return nodeTable.get(key);\n }",
"TreeNode getTreeNode();",
"private Node<T> getNode(int idx) {\r\n\t\treturn getNode(idx, 0, size() - 1);\r\n\t}",
"public short getNode() {\n return node;\n }",
"private Node getNode(String nodeName)\r\n\t{\r\n\t return nodeMap.get(nodeName);\r\n\t}",
"private Node getNode(int index) {\n\t\treturn getNode(index, 0, size() - 1);\n\t}",
"public TMNode getNode() {\n return node;\n }",
"public String getNodeValue ();",
"public Node get(double x, double y){\n\t\t\treturn null;\n\t\t}",
"public Node getNewNode(){\n for (Node n:nodes) {\n if(n.isNewTag()){\n return n;\n }\n }\n return null;\n }",
"public Node getL2pNode() {\n\t\treturn myNode;\n\t}",
"@Override\n\tpublic node_data getNode(int key) {\n\n\t\treturn this.Nodes.get(key);\n\n\t}",
"java.lang.String getEntryNode();",
"@AutoEscape\n\tpublic String getNode_3();",
"public Node getNode(String nodeName) {\n\t\t\t\n\t\tfor(Node n : nodes)\n\t\t{\n\t\t\tif(n.getName().equals(nodeName.toUpperCase()))\n\t\t\t\treturn n;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public Node getNode()\n\t{\n\t\treturn root;\n\t}",
"public Node<?> getNode() {\n return observedNode;\n }",
"@Override\n\tpublic java.lang.String getNode_2() {\n\t\treturn _dictData.getNode_2();\n\t}",
"public Node getNode(int position)throws ListExeption;",
"@Override\r\n public Node getNodeFromValue(Object value_p, Document doc_p) throws Exception\r\n {\n return null;\r\n }",
"N getNode(int id);",
"public DefaultMutableTreeNode getNode(){\n\t\t\n\t\treturn this.node;\n\t\t\n\t}",
"@Override\n public node_data getNode(int key) {\n return nodes.get(key);\n }",
"private Node getNode(String resource)\r\n {\r\n return Node.getNode(resource);\r\n }",
"Node getSourceNode();",
"public node_info getNode(int key)\n{\n\treturn getNodes().get(key);\n\t\n}",
"protected NNode getNode(int ID) {\n\t\treturn nodes.get(ID);\n\t}",
"private static Node mrvFindNode() {\n\t\tif (constrainedNodes.size() == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// Was able to use this by 'implementing Comparable'\r\n\t\t// in the Node class\r\n\t\t// return max value node of constrained nodes\r\n\t\treturn Collections.max(constrainedNodes);\r\n\r\n\t}",
"RootNode getRootNode();",
"public Node returnNodeById(Id id){\n\t\tif(id.indice >= listOfNodes.size()) return null;\n\t\tNode n = listOfNodes.elementAt(id.indice);\n\t\tif(n == null) return null;\n\t\tId nid = n.getId();\n\t\tif(nid.indice != id.indice || nid.unique != id.unique) return null; \n\t\treturn n;\n\t}",
"protected Node<T> getNode(T key) {\n\t\tNode<T> node = root;\n\t\twhile (node != null) {\n\t\t\tif (key.compareTo(node.value) == 0) {\n\t\t\t\treturn node;\n\t\t\t} else if (key.compareTo(node.value) < 0) {\n\t\t\t\tnode = node.right;\n\t\t\t} else {\n\t\t\t\tnode = node.left;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Node getNode() {\r\n return channel.attr(NetworkConstants.ATTRIBUTE_NODE).get();\r\n }",
"private Node getNodeAt(int index) {\n\t\tNode node = head;\n\t\t// follow the links between nodes until it counts off the right number\n\t\tfor (int i = 0; i < index; i++) {\n\t\t\tif (node == null) {\n\t\t\t\t// In case we run out of nodes before we get up to the desired index, return null\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tnode = node.getNext();\n\t\t}\n\t\treturn node;\n\t}",
"@Override\n public Cluster.Node getNode() {\n return node;\n }",
"public Node getChild();",
"public SecurityNode getNode() {\n\t return fo;\n\t}",
"public Node getSibling(String leftOrRight) {\r\n\t\t\tif (parent == null) return null;\r\n\t\t\tNode ret = null;\r\n\t\t\t//get this node's position in the parent\r\n\t\t\tint position;\r\n\t\t\t\r\n\t\t\tif (data.size() > 0)\r\n\t\t\t\tposition = parent.getChildNumber(data.get(0).getKey());\r\n\t\t\telse\r\n\t\t\t\tposition = parent.getEmptyChild();\r\n\t\t\t\r\n\t\t\tif (leftOrRight.compareTo(\"left\") == 0) {\r\n\t\t\t\tif (position != 0)\r\n\t\t\t\t\tret = parent.getChild(position - 1);\r\n\t\t\t} else if (leftOrRight.compareTo(\"right\") == 0) {\r\n\t\t\t\tif (position != parent.getChildren().size() - 1)\r\n\t\t\t\t\tret = parent.getChild(position + 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn ret;\r\n\t\t}",
"public SqlNode asNode() {\n return node;\n }",
"public Node get_node(String node) {\n return this.nodes.get(node);\n }",
"public Node getNode(Object element) {\n return nodes.get(element);\n }",
"@JsOverlay\n\tpublic final ChartNode getNode() {\n\t\t// gets native chart\n\t\tChart nativeChart = getNativeChart();\n\t\t// gets chart\n\t\tIsChart chart = nativeChart.getChart();\n\t\t// creates and returns a char node\n\t\treturn new ChartNode(chart.getId(), nativeChart);\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 }",
"private Node getNodeById(int objId){\n return dungeonPane.lookup(\"#\" + Integer.toString(objId));\n }",
"public SoNode getNodeAppliedTo() {\n \t \t return pimpl.appliedcode == SoAction.AppliedCode.NODE ? pimpl.applieddata.node : null;\n \t \t }",
"public abstract TreeNode getNode(int i);",
"public Node getRootNode() throws Exception;",
"private Node findNode(int index){\n Node current = start;\n for(int i = 0; i < index; i++){\n current = current.getNext();\n }\n return current;\n }",
"public DefaultMutableTreeNode getRequestedNode()\n {\n // Reset node to be displayed\n displayNode = root;\n \n // Iterate trough the path array\n for (int i = 0; i < pathArray.length; i++)\n {\n if (displayNode.getDepth() > 1)\n {\n displayNode = (DefaultMutableTreeNode)\n displayNode.getChildAt(pathArray[i]);\n }\n }\n \n // Return node to be displayed\n return displayNode;\n }",
"public GraphNode getNode(String key) {\n\treturn nodes.get(key);\n }",
"public DEPNode getNode()\n\t{\n\t\treturn node;\n\t}",
"public final native Element node()/*-{\n\t\treturn this.node();\n\t}-*/;",
"public int getNode() {\r\n\t\t\treturn data;\r\n\t\t}",
"public Node getNode(Reference ref, Presentation presentation);",
"private Node pickRandomNode(){\r\n\t\tNode node = null;\r\n\r\n\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t//Find a random node from the database, using the unique id attribute\r\n\t\t\tint nodeId = random.nextInt(totalGraphNodes);\r\n\t\t\t//node = graphDb.findNode(LabelEnum.Person, \"id\" , nodeId);\r\n\t\t\tnode = graphDb.getNodeById(nodeId);\r\n\t\t\ttx.success();\r\n\t\t}\r\n\t\treturn node;\r\n\t}",
"public node_type getNode(int idx) {\n assert (idx < (int) nodeVector.size())\n && (idx >= 0) :\n \"<SparseGraph::GetNode>: invalid index\";\n\n return (node_type) nodeVector.get(idx);\n }",
"public Node getNode(int index)\r\n {\r\n\tif (nodes == null)\r\n\t getNodes();\r\n return nodes[index];\r\n }",
"@AutoEscape\n\tpublic String getNode_5();",
"private FigNode getFigNode(String figId) throws IllegalStateException {\n if (figId.contains(\".\")) {\n // If the id does not look like a top-level Fig then we can assume\n // that this is an id of a FigEdgePort inside some FigEdge.\n // So extract the FigEdgePort from the FigEdge and return that as\n // the FigNode.\n figId = figId.substring(0, figId.indexOf('.'));\n FigEdgeModelElement edge = (FigEdgeModelElement) findFig(figId);\n if (edge == null) {\n throw new IllegalStateException(\"Can't find a FigNode with id \"\n + figId);\n }\n edge.makeEdgePort();\n return edge.getEdgePort();\n } else {\n // If there is no dot then this must be a top level Fig and can be\n // assumed to be a FigNode.\n Fig f = findFig(figId);\n if (f instanceof FigNode) {\n return (FigNode) f;\n } else {\n LOG.log(Level.SEVERE,\n \"FigID \" + figId + \" is not a node, edge ignored\");\n return null;\n }\n }\n }",
"public SortableDefaultMutableTreeNode getNode() {\n return node;\n }",
"public Node getRightChild() {\r\n \treturn getChild(false);\r\n }",
"HNode getFirstChild();",
"public Node getNode(String nodeName)\n\t{\n\t\tfor(Node n : nodes)\n\t\t\tif(n.getName().toLowerCase().trim().equals(nodeName.toLowerCase().trim()))\n\t\t\t\treturn n;\n\t\t\n\t\treturn null;\n\t}",
"public String getNodeValue(Node node) throws Exception;",
"public Node<E> get(E e){\n Node<E> current = head.getNext();\n while (current != tail) {\n if (current.getValue() == e) {\n return current;\n }\n current = current.getNext();\n }\n return null;\n }",
"INodeState getCurrentNode();",
"public Node getFirst() {\r\n\t\treturn getNode(1);\r\n\t}",
"public String getElement()\n {\n return nodeChoice;\n }",
"public Node getRight(){\r\n return this.right;\r\n }",
"public Node getNode(int index) {\r\n\t\tif (index < 1 || index > this.size()) {\r\n\t\t\ttry {\r\n\t\t\t\tthrow new IllegalIndexException(\"Exception: the index's out of boundary!\");\r\n\t\t\t} catch (IllegalIndexException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (index == 1) {\r\n\t\t\treturn head;\r\n\t\t}else if (index == this.size()) {\r\n\t\t\treturn tail;\r\n\t\t}else {\r\n\t\t\tint pointerIndex = 1;\r\n\t\t\tpointer = head;\r\n\t\t\twhile (pointerIndex < index) {\r\n\t\t\t\tpointer = pointer.getNext();\r\n\t\t\t\tpointerIndex++;\r\n\t\t\t}\r\n\t\t\treturn pointer;\r\n\t\t}\r\n\t}",
"public Node getNode(Character charId) {\n return graph.get(charId);\n }",
"Node firstNode() {\r\n\t\treturn first.next.n;\r\n\t}",
"@AutoEscape\n\tpublic String getNode_4();",
"abstract protected UiElementNode getRootNode();",
"public MyNode findMyNode(Node node){\r\n\t\treturn nodesMap.get(node);\r\n\t}",
"@Override\n public IGridNode getActionableNode() {\n if (FMLCommonHandler.instance().getEffectiveSide().isClient()) {\n return null;\n }\n if (this.node == null) {\n this.node = AEApi.instance().createGridNode(this.gridBlock);\n }\n return this.node;\n }",
"String getIdNode2();",
"public TSTNode<E> getNode(String key) {\n return getNode(key, rootNode);\n }"
]
| [
"0.7776525",
"0.7330812",
"0.7114544",
"0.7067301",
"0.69872314",
"0.6951097",
"0.68319076",
"0.6831051",
"0.6801676",
"0.67604333",
"0.6733507",
"0.67272425",
"0.6722421",
"0.6697837",
"0.6665105",
"0.6652229",
"0.6647137",
"0.66130143",
"0.6611891",
"0.6591638",
"0.6589586",
"0.6589586",
"0.65611136",
"0.6533878",
"0.65260863",
"0.65260386",
"0.6524774",
"0.6518688",
"0.6507443",
"0.6504498",
"0.646569",
"0.6456016",
"0.6443759",
"0.6437945",
"0.6433201",
"0.64310837",
"0.6411011",
"0.6408087",
"0.6406009",
"0.6388928",
"0.6387275",
"0.6368833",
"0.6365195",
"0.63483936",
"0.6343058",
"0.6340878",
"0.6340286",
"0.6335211",
"0.6329037",
"0.63198984",
"0.6312122",
"0.6309121",
"0.6295787",
"0.6289781",
"0.6264669",
"0.62601095",
"0.6248154",
"0.62456906",
"0.6242665",
"0.623934",
"0.62350184",
"0.6232277",
"0.62174284",
"0.6212635",
"0.6206514",
"0.62002665",
"0.61914223",
"0.61833066",
"0.6182975",
"0.61792797",
"0.61768156",
"0.61689365",
"0.6164967",
"0.6157188",
"0.6154367",
"0.61537254",
"0.61485624",
"0.61465704",
"0.61465555",
"0.61283654",
"0.61234075",
"0.61231005",
"0.61212933",
"0.6115245",
"0.61117494",
"0.6111458",
"0.61093026",
"0.61051553",
"0.6099515",
"0.6098661",
"0.6084442",
"0.60771346",
"0.6075516",
"0.6072447",
"0.6071669",
"0.607036",
"0.6068491",
"0.60641754",
"0.6055627",
"0.6048545",
"0.60400486"
]
| 0.0 | -1 |
Ensures the given ID belongs to a table and that the user can access it. | private boolean validateId(String tableId) throws IOException {
try {
Asset asset = engine.assets().get(tableId).execute();
return "table".equalsIgnoreCase(asset.getType());
} catch (GoogleJsonResponseException ex) {
// A "400 Bad Request" is thrown when the asset ID is missing or invalid
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Boolean isTableIdValid(Integer id){\n if(MIN_TABLE_ID < id && id < MAX_TABLE_ID){\n return true;\n }else{\n return false;\n }\n }",
"@Override\n public boolean userCanAccess(int id) {\n return true;\n }",
"void check(Object dbobject, int rights) throws HsqlException {\n Trace.check(isAccessible(dbobject, rights), Trace.ACCESS_IS_DENIED);\n }",
"public boolean checkTable(int layerId)\n\n {\n boolean isAvailable = false;\n try {\n\n //This statement will fetch all tables available in database.\n\n ResultSet rs1 = conn.getMetaData().getTables(null, null, null, null);\n while (rs1.next()) {\n\n String ld = rs1.getString(\"TABLE_NAME\");\n\n //This statement will extract digits from table names.\n if(!(ld.equals(\"PurgeTable\")||ld.equals(\"UserToCertMap\"))){\n String intValue = ld.replaceAll(\"[^0-9]\", \"\");\n int v;\n if (intValue != null) {\n v = Integer.parseInt(intValue);\n if (v == layerId) {\n isAvailable = true;\n }\n }\n }\n /* String intValue = ld.replaceAll(\"[^0-9]\", \"\");\n int v;\n if (intValue != null) {\n v = Integer.parseInt(intValue);\n if (v == layerId) {\n isAvailable = true;\n }\n }\n //This statement will compare layerid with digits of table names.*/\n\n }\n rs1.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return isAvailable;\n }",
"@Override\r\n\tpublic User check(Integer id) {\n\t\treturn null;\r\n\t}",
"void check(Permission permission, DBObject dBObject) throws T2DBException;",
"public boolean checkDb() {\n\t\t\n\t\tint userId = Auth.getCurrentUser().getId();\n\t\tString sql = \"select id from PersonalDetails where id='\"+userId+\"'\";\n\t\tint gotId;\n\t\t//connectToDb();\n\t\t\n\t\ttry(Connection conn = myDb;\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql)){\n\t\t\tgotId = rs.getInt(\"id\");\n\t\t}catch(SQLException e){\n\t\t\t\n\t\t\tmyDb = null;\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(gotId == userId) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\t//return false;\n\t\t\treturn false;\n\t\t}\n\n\t}",
"@Override\n public void checkCanSelectFromColumns(ConnectorTransactionHandle transactionHandle, ConnectorIdentity identity, AccessControlContext context, SchemaTableName tableName, Set<Subfield> columnOrSubfieldNames)\n {\n if (!checkTablePermission(identity, tableName, SELECT)) {\n denySelectTable(tableName.toString());\n }\n }",
"public abstract boolean isValidID(long ID);",
"@Override\r\n\tpublic int idcheck(String loginId) {\n\t\treturn dao.idcheck(loginId);\r\n\t}",
"public boolean existsAttempt(String id) {\r\n return ctrlDomain.existsAttempt(id);\r\n }",
"boolean isAccessible(Object dbobject) throws HsqlException {\n return isAccessible(dbobject, GranteeManager.ALL);\n }",
"public boolean checkUser(int id) {\n String[] columns = {\n KEY_ID\n };\n SQLiteDatabase db = this.getReadableDatabase();\n // selection criteria\n String selection = KEY_ID+ \" = ?\";\n\n // selection arguments\n String[] selectionArgs = {String.valueOf(id)};\n\n // query user table with conditions\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]' AND user_password = 'qwerty';\n */\n Cursor cursor = db.query(tabela, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n\n int cursorCount = cursor.getCount();\n\n cursor.close();\n db.close();\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }",
"public void iHave(String table, int id) throws SQLException {\n\t\tquery = \"UPDATE \" + table + \" SET ihave=1 WHERE id=\" + id;\n\t\tstmt.execute(query);\n\t\tif(table.equals(\"publication\")) {\n\t\t\tquery = \"UPDATE dance SET ihave=1 WHERE id in \"\n\t\t\t\t\t+ \"(SELECT dance_id FROM dancespublicationsmap WHERE publication_id=\" + id + \")\";\n\t\t\tstmt.execute(query);\n\t\t} else if(table.equals(\"album\")) {\n\t\t\tquery = \"UPDATE recording SET ihave=1 WHERE id in \"\n\t\t\t\t\t+ \"(SELECT recording_id FROM albumsrecordingsmap WHERE album_id=\" + id + \")\";\n\t\t\tstmt.execute(query);\n\t\t}\n\t}",
"public SecurityUserBaseinfo checkByIdNo(String idNo) {\n\t\treturn securityUserBaseinfoDAO.getByIdNo(idNo);\r\n\t}",
"public boolean hasAccess(String accessId);",
"private void checkTableRecord(final String value) {\n final DataSource dsValidatation = DataSourceFactory.createDataSource();\n dsValidatation.addTable(AFM_TBLS);\n dsValidatation.addField(TABLE_NAME);\n dsValidatation.addRestriction(Restrictions.eq(AFM_TBLS, TABLE_NAME, value));\n if (dsValidatation.getRecords().isEmpty() && !isTableNameSelected(value)) {\n this.requiredTablesNames.add(value);\n this.isDependencyNeeded = true;\n }\n }",
"public static boolean checkTableForLogIn( Connection con, String tableName )\n \t\tthrows SQLException\n {\n if(con.isValid(0))\n {\n DatabaseMetaData md = con.getMetaData();\n ResultSet rs = md.getTables(null, null, \"%\", null);\n if( !rs.next() )\n {\n return false;\n }\n else\n {\n do\n {\n if( tableName.equals(rs.getString(3)) )\n {\n return true;\n }\n }while (rs.next());\n }\n }\n return false;\n }",
"abstract boolean tableExist() throws SQLException;",
"@Override\n public void checkCanCreateViewWithSelectFromColumns(ConnectorTransactionHandle transactionHandle, ConnectorIdentity identity, AccessControlContext context, SchemaTableName tableName, Set<String> columnNames)\n {\n if (!checkTablePermission(identity, tableName, SELECT)) {\n denySelectTable(tableName.toString());\n }\n if (!checkTablePermission(identity, tableName, GRANT_SELECT)) {\n denyCreateViewWithSelect(tableName.toString(), identity);\n }\n }",
"public boolean checkId(String id){\r\n\t\treturn motorCycleDao.checkId(id);\r\n\t}",
"@Override\n\tpublic String ifTable(String table) {\n\t\treturn \"select 1 from user_tables where table_name ='\"+table+\"'\";\n\t}",
"public int SelectTable(Integer space_id) {\n\t\treturn postDao.SelectTable(space_id);\r\n\t}",
"public static void accessoriesstatuspage(Long id){\r\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\tif (a != null){\r\n\t\t\tOrderAccessories o = OrderAccessories.findById(id);\r\n\t\t\trender(o);\r\n\t\t}\r\n\t\telse\t\r\n\t\t\tDealerControllerMap.pleaselogin();\r\n\t}",
"public void setTableID(int tableID) {\r\n\t\tthis.tableID = tableID;\r\n\t}",
"public static int askTableID() {\n\t\tSystem.out.println(\"Please enter the table ID:\");\n\t\tint tableID = ExceptionHandler.scanIntRange(1, TOTALTABLES);\n\t\treturn (tableID);\n\t}",
"public void setTableId(String tableId) {\n this.tableId = tableId;\n }",
"public void setTableId(String tableId) {\n this.tableId = tableId;\n }",
"boolean check(Permission permission, DBObject dBObject,\n\t\t\tboolean permissionRequired) throws T2DBException;",
"@Override\n\tpublic User findNeedById(int id) {\n\t\treturn userdao.findNeedById(id);\n\t}",
"public boolean existUser(String id);",
"public boolean claim(String id);",
"public interface PermissionChecker {\n\n\t/**\n\t * Check if a permission is available on a database object. Depending on\n\t * <code>permissionRequired</code> throw an exception or return false on\n\t * failure.\n\t * \n\t * @param permission\n\t * a permission\n\t * @param dBObject\n\t * a database object\n\t * @param permissionRequired\n\t * if true throw an exception on failure else return false\n\t * @return true if the permission is available, else false\n\t * @throws T2DBException\n\t */\n\tboolean check(Permission permission, DBObject dBObject,\n\t\t\tboolean permissionRequired) throws T2DBException;\n\n\t/**\n\t * Check if a permission is available on a database object. Throw an\n\t * exception if not.\n\t * \n\t * @param permission\n\t * a permission\n\t * @param dBObject\n\t * a database object\n\t * @throws T2DBException\n\t */\n\tvoid check(Permission permission, DBObject dBObject) throws T2DBException;\n\t\n\t/**\n\t * Check if a permission is available on a database object. Depending on\n\t * <code>permissionRequired</code> throw an exception or return false on\n\t * failure.\n\t * \n\t * @param permission\n\t * a permission\n\t * @param surrogate\n\t * a surrogate identifying a database object\n\t * @param permissionRequired\n\t * if true throw an exception on failure else return false\n\t * @return true if the permission is available, else false\n\t * @throws T2DBException\n\t */\n\tboolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;\n\n\t/**\n\t * Check if a permission is available on a database object. Throw an\n\t * exception if not.\n\t * \n\t * @param permission\n\t * a permission\n\t * @param surrogate\n\t * if true throw an exception on failure else return false\n\t * @throws T2DBException\n\t */\n\tvoid check(Permission permission, Surrogate surrogate) throws T2DBException;\n\t\n}",
"void check(Permission permission, Surrogate surrogate) throws T2DBException;",
"public boolean tableRequired()\n {\n return true;\n }",
"private void checkID(int ID)\r\n {\r\n if(student_IDs.contains(ID))\r\n {\r\n throw new IllegalArgumentException(\"There is already a student that exists with this ID: \" + ID);\r\n }\r\n }",
"boolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;",
"public static Boolean checkUser( String id ) {\r\n\t\tif( id == null ) return false;\r\n\t\t\r\n\t\tResultSet resultSet = DBConnector.getQueryResult( \"SELECT * FROM User WHERE userID='\"+id+\"'\" );\r\n\t\ttry {\r\n\t\t\tif( resultSet.next() ){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse return false;\r\n\t\t} \r\n\t\tcatch (SQLException e) {\r\n\t\t\tSystem.out.println(\"DBUtilUser.loginUser() : Error getting user\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tDBConnector.closeDBConnection();\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"public boolean supportsTableCheck() {\n \t\treturn true;\n \t}",
"public boolean isExist(String ID) {\n\t\tboolean verdict = false;\n\t\tPreparedStatement prpstmt = null;\n\t\tResultSet rset;\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM userinfo.user WHERE ID=?\";\n\n\t\t\tif (ID != \"\" && ID != null) {\n\n\t\t\t\tprpstmt = conn.prepareStatement(sql);\n\t\t\t\tprpstmt.setString(1, ID);\n\t\t\t\trset = prpstmt.executeQuery();\n\t\t\t\tif (rset.first()) {\n\t\t\t\t\tverdict = true;\n\t\t\t\t\treturn verdict;\n\t\t\t\t}\n\t\t\t}\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 verdict;\n\n\t}",
"AdminTab selectByPrimaryKey(String id);",
"private boolean checkInputTableName(AccessInputMeta meta){\n if (meta.getTableName()==null || meta.getTableName().length()<1)\n {\n MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );\n mb.setMessage(BaseMessages.getString(PKG, \"AccessInputDialog.TableMissing.DialogMessage\"));\n mb.setText(BaseMessages.getString(PKG, \"System.Dialog.Error.Title\"));\n mb.open(); \n\n return false;\n }\n else\n {\n \treturn true;\n }\n\t}",
"void checkNotFound(Integer id);",
"private void checkAdminInDB(DB db) {\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tlong hashCode = (long) \"admin\".hashCode();\n\t\tif(!users.containsKey(hashCode))\n\t\t\tusers.put(hashCode, new Admin(\"admin\", \"admin\"));\n\t}",
"@Override\r\n\tpublic int userIdProvided(String id) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"SELECT COUNT(*) FROM \\\"Registration DB\\\".\\\"Universitydetails\\\" where id=?\";\r\n\t\treturn jdbcTemplate.queryForObject(sql, new Object[] { id }, Integer.class);\r\n\t}",
"void ensureConnection(String id);",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"Permission selectByPrimaryKey(String id);",
"boolean presentInTable( String tableString ) {\n\t try {\n\t\tStatement statement = connection.createStatement( );\n\t\tResultSet resultSet = statement.executeQuery( \"SELECT vertalers_id FROM \" + tableString + \" WHERE vertalers_id = \" + id );\n\t\tif ( resultSet.next( ) ) {\n\t\t JOptionPane.showMessageDialog(EditVertalers.this,\n \"Tabel \" + tableString + \" heeft nog verwijzing naar '\" + string +\"'\",\n \"Edit vertalers error\",\n\t\t\t\t\t\t JOptionPane.ERROR_MESSAGE );\n\t\t return true;\n\t\t}\n\t } catch ( SQLException sqlException ) {\n JOptionPane.showMessageDialog(EditVertalers.this,\n \"SQL exception in select: \" + sqlException.getMessage(),\n \"EditVertalers SQL exception\",\n JOptionPane.ERROR_MESSAGE );\n\t\tlogger.severe( \"SQLException: \" + sqlException.getMessage( ) );\n\t\treturn true;\n\t }\n\t return false;\n\t}",
"public static boolean delete(final int id, final int tableId)\n {\n return delete(id, tableId, false);\n }",
"public void setTableId(Long tableId) {\n this.tableId = tableId;\n }",
"int getTableID() {\r\n return table_id;\r\n }",
"@Test\n public void testCheckIDPass() {\n System.out.println(\"checkIDPass\");\n School instance = new School();\n\n users.get(\"admin\").setIsActive(true);\n users.get(\"admin2\").setIsActive(false);\n instance.setUsers(users);\n\n assertEquals(users.get(\"admin\"), instance.checkIDPass(\"admin\",\n users.get(\"admin\").getPassword().toCharArray()));\n System.out.println(\"PASS with active user\");\n\n assertEquals(new String(), instance.checkIDPass(users.get(\"admin2\").getId(),\n users.get(\"admin2\").getPassword().toCharArray()));\n System.out.println(\"PASS with inactive user\");\n\n assertNull(instance.checkIDPass(users.get(\"admin\").getId(), \"Lamasia2**\".toCharArray()));\n System.out.println(\"PASS with wrong password\");\n\n assertNull(instance.checkIDPass(\"admin1\", users.get(\"admin\").getPassword().toCharArray()));\n System.out.println(\"PASS with wrong ID\");\n\n System.out.println(\"PASS ALL\");\n }",
"@Override\r\n\tpublic Permission queryById(Integer id) {\n\t\treturn permissionDao.queryById(id);\r\n\t}",
"public UserEntity containsUserAndValid(long id) {\n Query query = manager.createQuery(\"select e from UserEntity e where e.id=:id\");\n List<UserEntity> list = query.setParameter(\"id\", id).getResultList();\n if (list.size() > 0) {\n UserEntity entity = list.get(0);\n FindIterable<Document> users = database.getCollection(\"users\").find(Filters.and(\n Filters.eq(UserMongo.objectId, new ObjectId(entity.getMongoId())),\n Filters.eq(UserMongo.isAccept, true),\n Filters.eq(UserMongo.isActive, true),\n Filters.or(\n Filters.eq(UserMongo.role, Role.manager),\n Filters.eq(UserMongo.role, Role.teacher)\n )\n ));\n if (users.iterator().hasNext()) {\n return entity;\n }\n }\n return null;\n }",
"private boolean checkTableExists(String plate){\n //there is no need to close or start connection\n //function is only used in the context of an already created connection\n \n try {\n rs = stmt.executeQuery(\"SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'PUBLIC'\");\n \n while(rs.next()){\n if(plate.equalsIgnoreCase(rs.getString(\"TABLE_NAME\"))){\n return true;\n }\n }\n \n rs.close();\n \n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return false;\n }",
"@JsonIgnore\n\tpublic boolean isPermission(String id) {\n\t\t // Fix, if prefix layers\n return layerIds.contains(getBaseLayerId(id));\n\t}",
"@Override\r\n\tpublic void SavePrivilege(String[] check,String id)\r\n\t{\n\t\tList a = Sel.HSQL(\"from Userprivileges where users.userId='\" + id + \"'\");\r\n\r\n\t\tif (a != null && a.size() > 0)\r\n\t\t{\r\n\t\t\tDel.Delhql(\"delete from Userprivileges where users.userId='\" + id + \"'\");\r\n\t\t}\r\n\r\n\t\tif (check.length != 0)\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < check.length; i++)\r\n\t\t\t{\r\n\t\t\t\tUserprivileges u = new Userprivileges();\r\n\t\t\t\tu.setUsers((Users) Sel.getHQL(Users.class, id));\r\n\t\t\t\tu.setPrivileges((Privileges) Sel.getHQL(Privileges.class, check[i]));\r\n\t\t\t\tIns.INS(u);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n\tpublic boolean overlapCheck(String id) {\n\t\tboolean result = true;\r\n\r\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"select * from member where id=?\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\trs = ps.executeQuery();\r\n\r\n\t\t\twhile (!rs.next()) {\r\n\t\t\t\treturn false;// 결과가 없다면 중복되지 않음\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tresult = false;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"public static void checkAccess(int userId) throws SecurityException {\n if(userId == -1) {\n throw new SecurityException(\"Invalid Permissions\");\n }\n if(getCurrentUserId() == -1) {\n return;\n }\n checkAccess();\n }",
"@Override\n public boolean checkExists(int userID) throws DAOException{\n\n try{\n Session session = HibernateConnectionUtil.getSession();\n UserProfile up = (UserProfile)session.get(UserProfile.class, userID);\n session.close();\n return up != null;\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }",
"public boolean openTable(String tblName)\r\n {\r\n String sql = \"Select * From \" + tblName;\r\n return querySql(sql);\r\n }",
"boolean existeId(Long id);",
"public boolean checkDating(int id);",
"public static boolean isLoginable(Long id)\r\n {\r\n User u = get(id);\r\n return(\r\n User.ACTIVATED.equals(u.getStatus())\r\n );\r\n }",
"TableId table();",
"final protected boolean verifySecretID(Object ID) {\n\t\tif(this.SecretID == null) return true;\n\t\treturn UObject.equal(this .SecretID, ID); \n\t}",
"@Override\n\tpublic int idCheck(String id) {\n\t\treturn sqlSession.selectOne(NS+\".idCheck\", id);\n\t}",
"public Object queryByID(Class<?> tableClass, Serializable id) throws Exception;",
"@Override\r\n\tprotected void checkDelete(Serializable id) throws BusinessException {\n\t\t\r\n\t}",
"final protected boolean verifySecretID(Object ID) {\n\t\t\tif(this.SecretID == null) return true;\n\t\t\treturn UObject.equal(this .SecretID, ID); \n\t\t}",
"User loadUser(int id) throws DataAccessException;",
"public abstract boolean checkPolicy(User user);",
"private void createRolePermissionsTableIfNotExist() {\n Connection conn = null;\n PreparedStatement ps = null;\n String query = null;\n try {\n conn = getConnection();\n conn.setAutoCommit(false);\n query = queryManager.getQuery(conn, QueryManager.CREATE_ROLE_PERMISSIONS_TABLE_QUERY);\n ps = conn.prepareStatement(query);\n ps.executeUpdate();\n conn.commit();\n } catch (SQLException e) {\n log.debug(\"Failed to execute SQL query {}\", query);\n throw new PermissionException(\"Unable to create the '\" + QueryManager.ROLE_PERMISSIONS_TABLE +\n \"' table.\", e);\n } finally {\n closeConnection(conn, ps, null);\n }\n }",
"private boolean studentTableExists() throws SQLException{\n\n String checkTablePresentQuery = \"SHOW TABLES LIKE '\" + STUDENT_TABLE_NAME + \"'\"; //Can query the database schema\n ResultSet tablesRS = ConnectDB.statement.executeQuery(checkTablePresentQuery);\n return (tablesRS.next());\n }",
"boolean isDirectlyAccessible(Object dbobject,\n int rights) throws HsqlException {\n\n if (isAdministrator) {\n return true;\n }\n\n if (dbobject instanceof String) {\n if (((String) dbobject).startsWith(\"org.hsqldb.Library\")\n || ((String) dbobject).startsWith(\"java.lang.Math\")) {\n return true;\n }\n }\n\n int n = rightsMap.get(dbobject, 0);\n\n if (n != 0) {\n return (n & rights) != 0;\n }\n\n return false;\n }",
"TableImpl(int id) {\n this.id = id;\n }",
"@Override\r\n\tpublic int userExists(String id) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"SELECT COUNT(*) FROM \\\"Registration DB\\\".\\\"Userdetails\\\" where id=?\";\r\n\t\treturn jdbcTemplate.queryForObject(sql, new Object[] { id }, Integer.class);\r\n\t}",
"private void createCheckingAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE checkingAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 1000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table checkingAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of checkingAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}",
"public boolean checkIn(int id) {\n HabitacionDAO hdao = new HabitacionDAO();\n return hdao.modificarCheckIn(id);\n }",
"@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }",
"@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }",
"@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }",
"@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }",
"@Override\n public boolean compruebaPorId(Integer id) {\n return usuarioRepository.existsById(id);\n }",
"private void deleteTable(String tableId) throws IOException {\n LOG.info(\"Finding layers belonging to table.\");\n ParentsListResponse tableParents = engine.tables().parents().list(tableId).execute();\n LOG.info(\"Layers retrieved.\");\n\n // Collect the layer IDs to ensure we can safely delete maps.\n Set<String> allLayerIds = new HashSet<String>();\n for (Parent tableParent : tableParents.getParents()) {\n allLayerIds.add(tableParent.getId());\n }\n\n // We need to delete layers before we can delete the table.\n deleteLayers(allLayerIds);\n\n LOG.info(\"Deleting table.\");\n engine.tables().delete(tableId).execute();\n LOG.info(\"Table deleted.\");\n\n }",
"@Test(expected = DataAcessException.class)\n\t public void testRetrieveByIdExcep() throws DataAcessException {\n\t\twhen(entityManager.find(Users.class,\"A1007483\")).thenThrow(new RuntimeException());\n\t\tuserDao.retrieveById(\"A1007483\");\n\t }",
"private boolean tableExists(String table) throws SQLException {\n if (HAVE_DB) {\n Connection con = DriverManager.getConnection(dbConnection, dbUser, dbPass);\n Statement stmt = con.createStatement();\n ResultSet rs;\n \n if (dbType.equals(\"mysql\")) {\n rs = stmt.executeQuery(\"SHOW TABLES\");\n }\n else {\n rs = stmt.executeQuery(\"select * from pg_tables\");\n }\n while(rs.next()) {\n String result = rs.getString(1);\n if (result.equals(table)) {\n return true;\n }\n }\n rs.close();\n stmt.close();\n con.close();\n return false;\n }\n else {\n return true;\n }\n }",
"boolean isAccessible(Object dbobject, int rights) throws HsqlException {\n\n /*\n * The deep recusion is all done in getAllRoles(). This method\n * only recurses one level into isDirectlyAccessible().\n */\n if (isDirectlyAccessible(dbobject, rights)) {\n return true;\n }\n\n if (pubGrantee != null && pubGrantee.isAccessible(dbobject, rights)) {\n return true;\n }\n\n RoleManager rm = getRoleManager();\n Iterator it = getAllRoles().iterator();\n\n while (it.hasNext()) {\n if (((Grantee) rm.getGrantee(\n (String) it.next())).isDirectlyAccessible(\n dbobject, rights)) {\n return true;\n }\n }\n\n return false;\n }",
"boolean tableExists(ObjectPath tablePath) throws CatalogException;",
"public void iDontHave(String table, int id) throws SQLException {\n\t\tquery = \"UPDATE \" + table + \" SET ihave=0 WHERE id=\" +id;\n\t\tstmt.execute(query);\n\t\tif(table.equals(\"publication\")) {\n\t\t\tquery = \"UPDATE dance SET ihave=0 WHERE id in \"\n\t\t\t\t\t+ \"(SELECT dance_id FROM dancespublicationsmap WHERE publication_id=\" + id + \")\";\n\t\t\tstmt.execute(query);\n\t\t} else if(table.equals(\"album\")) {\n\t\t\tquery = \"UPDATE recording SET ihave=0 WHERE id in \"\n\t\t\t\t\t+ \"(SELECT recording_id FROM albumsrecordingsmap WHERE album_id=\" + id + \")\";\n\t\t\tstmt.execute(query);\n\t\t}\n\t}",
"@Override\n public TableUserManager getEntityItem(Object id) {\n TableUserManager manager=null;\n for (TableUserManager tableUserManager : getListDataFromDB()) {\n if(tableUserManager.getId()==(int)id){\n manager=tableUserManager;\n break;\n }\n }\n return manager;\n }"
]
| [
"0.640678",
"0.62294865",
"0.5729668",
"0.56712365",
"0.5561446",
"0.5499353",
"0.54194874",
"0.5387855",
"0.5348778",
"0.52985936",
"0.52720064",
"0.51957005",
"0.5188143",
"0.51371527",
"0.51267344",
"0.5116485",
"0.5094586",
"0.5087678",
"0.5069947",
"0.50358385",
"0.5010381",
"0.5010149",
"0.5007142",
"0.50054055",
"0.50028586",
"0.49668187",
"0.49660513",
"0.49660513",
"0.49653915",
"0.49558407",
"0.49292856",
"0.49161392",
"0.49128902",
"0.4889374",
"0.4887268",
"0.48771638",
"0.48749015",
"0.48716214",
"0.48591456",
"0.48560664",
"0.48540503",
"0.4850248",
"0.4828444",
"0.48102424",
"0.4796409",
"0.4786226",
"0.47809842",
"0.47809842",
"0.47809842",
"0.47809842",
"0.47809842",
"0.47809842",
"0.47809842",
"0.47809842",
"0.47809842",
"0.47744232",
"0.47522053",
"0.47489148",
"0.47481507",
"0.47461945",
"0.47407025",
"0.47406107",
"0.4738359",
"0.47256866",
"0.47206384",
"0.47125438",
"0.47122297",
"0.4708954",
"0.47064713",
"0.47056818",
"0.47050244",
"0.469889",
"0.46987846",
"0.46940124",
"0.4690683",
"0.4688371",
"0.46851295",
"0.4684424",
"0.46827802",
"0.46794546",
"0.46769416",
"0.4672877",
"0.46727145",
"0.46709472",
"0.46610466",
"0.46489134",
"0.4648056",
"0.46426433",
"0.4641243",
"0.4641243",
"0.4641243",
"0.4641243",
"0.46310148",
"0.46137854",
"0.46131542",
"0.46117747",
"0.45951027",
"0.45867974",
"0.4583582",
"0.4582009"
]
| 0.5927027 | 2 |
Deletes a table, including any layers displaying the table. | private void deleteTable(String tableId) throws IOException {
LOG.info("Finding layers belonging to table.");
ParentsListResponse tableParents = engine.tables().parents().list(tableId).execute();
LOG.info("Layers retrieved.");
// Collect the layer IDs to ensure we can safely delete maps.
Set<String> allLayerIds = new HashSet<String>();
for (Parent tableParent : tableParents.getParents()) {
allLayerIds.add(tableParent.getId());
}
// We need to delete layers before we can delete the table.
deleteLayers(allLayerIds);
LOG.info("Deleting table.");
engine.tables().delete(tableId).execute();
LOG.info("Table deleted.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;",
"public void deleteTableRecords()\n {\n coronaRepository.deleteAll();\n }",
"void delete_table(String table_name) {\n //table does not exist\n if (!get_table_names().contains(table_name) && !table_name.equals(\"relationship\")) {\n throw new RuntimeException(\"Table does not exists and can therefore not be deleted.\");\n }\n\n String sql = \"drop table if exists \" + table_name;\n\n execute_statement(sql, false);\n }",
"public void dropTable();",
"public void deleteTable(String tableName) {\n try {\n connectToDB(\"jdbc:mysql://localhost/EmployeesProject\");\n } catch (Exception e) {\n System.out.println(\"The EmployeesProject db does not exist!\\n\"\n + e.getMessage());\n }\n String sqlQuery = \"drop table \" + tableName;\n try {\n stmt.executeUpdate(sqlQuery);\n } catch (SQLException ex) {\n System.err.println(\"Failed to delete '\" + tableName + \n \"' table.\\n\" + ex.getMessage());\n }\n }",
"private void clearTable()\n {\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n table.removeViews(1, table.getChildCount() - 1);\n }",
"void deleteTable(String tableName) {\n\t\tthis.dynamoClient.deleteTable(new DeleteTableRequest().withTableName(tableName));\n\t}",
"public void clearAllTable() {\n\t\tint rowCount = dmodel.getRowCount();\n\t\tfor (int i = rowCount - 1; i >= 0; i--) {\n\t\t\tdmodel.removeRow(i);\n\t\t}\n\t}",
"public void deleteTable(final String tableName) throws IOException {\n deleteTable(Bytes.toBytes(tableName));\n }",
"@Override\r\n public boolean deleteAll(String strTable)\r\n { try\r\n { String strSQL = \"DELETE * FROM \" + strTable;\r\n status(strSQL);\r\n dbCmdText.executeUpdate(strSQL);\r\n\r\n // dbRecordset.close();\r\n } catch (SQLException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n return false;\r\n }",
"private void clearTable(DefaultTableModel table){\n\t\t\n\t\tfor(int i = 0; i < table.getRowCount(); i++){\n\t\t\ttable.removeRow(i);\n\t\t}\n\t}",
"public void ColorsTableDelete() {\n DatabaseSqliteRootHandler rootHandler = new DatabaseSqliteRootHandler(context);\n SQLiteDatabase db = rootHandler.getWritableDatabase();\n db.delete(SINGLA_COLORS_TABLE, null, null);\n db.close();\n }",
"boolean dropTable();",
"public ClearTableResponse clearTable(ClearTableRequest request) throws GPUdbException {\n ClearTableResponse actualResponse_ = new ClearTableResponse();\n submitRequest(\"/clear/table\", request, actualResponse_, false);\n return actualResponse_;\n }",
"public void removeSimpleTable(SimpleTable table) {\n removeSimpleTable(table.getName());\n }",
"public void doDropTable();",
"public void clearTable() {\n\t\tfor (int i = modelCondTable.getRowCount() - 1; i >= 0; i--) {\n\t\t\tmodelCondTable.removeRow(i);\n\t\t}\n\t}",
"private void clearTable() {\n fieldTable.removeAllRows();\n populateTableHeader();\n }",
"public void dropTable(String tableName);",
"public void deleteAll(String tableName) {\n Cursor c = getAllRows(tableName.replaceAll(\"\\\\s\", \"_\"));\n long rowId = c.getColumnIndexOrThrow(KEY_ROWID);\n if (c.moveToFirst()) {\n do {\n deleteRow(c.getLong((int) rowId), tableName.replaceAll(\"\\\\s\",\"_\"));\n } while (c.moveToNext());\n }\n c.close();\n //db.execSQL(\"TRUNCATE TABLE '\" + tableName.replaceAll(\"\\\\s\",\"_\") + \"';\");\n }",
"public final void clearTable() {\n while (this.getRowCount() > 0) {\n this.removeRow(0);\n }\n\n // Notify observers\n this.fireTableDataChanged();\n }",
"public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }",
"public void removeAllRecords(String tableName)\r\n {\r\n try {\r\n stmt = con.createStatement();\r\n stmt.execute(\"DELETE FROM \"+tableName);\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n }",
"public void clearTable(){\n\t\tloaderImage.loadingStart();\n\t\tfullBackup.clear();\n\t\tlist.clear();\n\t\toracle.clear();\n\t\tselectionModel.clear();\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}",
"public void deletarTabela(String tabela){\n try{\n db.execSQL(\"DROP TABLE IF EXISTS \" + tabela);\n }catch (Exception e){\n\n }\n }",
"public void delete_all(String tablename){\n try{\n db.execSQL(\"DELETE FROM \" + tablename);\n }catch(Exception e){\n Log.d(Settings.Error_logTag,e.toString());\n Toast.makeText(mContext,\"Deleteing Table \" + tablename + \" Failed.\", Toast.LENGTH_SHORT).show();\n }\n }",
"private void clearTable(String tableName) throws SQLException {\n Connection conn = getConnection();\n String setStatement = \"DELETE FROM \" + tableName;\n Statement stm = conn.createStatement();\n stm.execute(setStatement);\n }",
"public Table deleteTable(String tableName) {\n\t\tif (tables.containsKey(tableName)) {\n\t\t\tTable table = tables.get(tableName);\n\t\t\ttables.remove(tableName);\n\t\t\treturn table;\n\t\t}\n\t\treturn null;\n\t}",
"public void dropTable() {\n }",
"public void emptyTable()\r\n {\r\n final int lastRow = table.getRowCount();\r\n if (lastRow != 0)\r\n {\r\n ((JarModel) table.getModel()).fireTableRowsDeleted(0, lastRow - 1);\r\n }\r\n }",
"public void clearTable() {\n reportTable.getColumns().clear();\n }",
"void dropAllTables();",
"public void eliminar_datos_de_tabla(String tabla_a_eliminar){\n try {\n Class.forName(\"org.postgresql.Driver\");\n Connection conexion = DriverManager.getConnection(cc);\n Statement comando = conexion.createStatement();\n //Verificar dependiendo del tipo de tabla lleva o no comillas\n \n String sql=\"delete from \\\"\"+tabla_a_eliminar+\"\\\"\";\n \n comando.executeUpdate(sql);\n \n comando.close();\n conexion.close();\n } catch(ClassNotFoundException | SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public void clearTables() {\n\t _database.delete(XREF_TABLE, null, null);\n\t _database.delete(ORDER_RECORDS_TABLE, null, null); \n\t}",
"@Override\n\tpublic void emptyTable() {\n\t\tresTable.deleteAll();\n\t}",
"public void delete(String tableName, String name) {\n boolean delete;\n if (tableName.equals(\"reviewer\")) {\n tableName = tableName.substring(0, 1).toUpperCase() + tableName\n .substring(1);\n delete = reviewerTable.delete(name, tableName);\n if (delete) {\n matrix.deleteReviewers(name);\n }\n }\n else { // then it is the movie\n tableName = tableName.substring(0, 1).toUpperCase() + tableName\n .substring(1);\n delete = movieTable.delete(name, tableName);\n if (delete) {\n matrix.deleteMovies(name);\n }\n\n }\n }",
"public void vaciarTabla() {\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n int total = table1Calificaciones.getRowCount();\n for (int i = 0; i < total; i++) {\n modelo.removeRow(0);\n }\n\n }",
"protected void clearTable() {\n\ttable.setModel(new javax.swing.table.AbstractTableModel() {\n\t public int getRowCount() { return 0; }\n\t public int getColumnCount() { return 0; }\n\t public Object getValueAt(int row, int column) { return \"\"; }\n\t});\n }",
"public void clearTable(String tableName) throws Exception {\n DefaultDataSet dataset = new DefaultDataSet();\n dataset.addTable(new DefaultTable(tableName));\n DatabaseOperation.DELETE_ALL.execute(conn, dataset);\n }",
"@Override\r\n public void dropTable() {\n if(tableIsExist(TABLE_NAME)){\r\n String sql = \"drop table \" + TABLE_NAME;\r\n database.execSQL(sql);\r\n }\r\n }",
"void clearDeletedItemsTable();",
"static void emptyTable () {\n Session session = null;\n Transaction transaction = null;\n try {\n session = sessionFactory.openSession();\n transaction = session.beginTransaction();\n Query query = session.createQuery(\"DELETE from ReservationsEntity \");\n query.executeUpdate();\n Query query2 = session.createQuery(\"DELETE from OrdersEntity \");\n query2.executeUpdate();\n\n Query query3 = session.createQuery(\"DELETE from TablesEntity \");\n query3.executeUpdate();\n transaction.commit();\n }\n catch (Exception e)\n {\n if (transaction != null) {\n transaction.rollback();\n }\n throw e;\n } finally {\n if (session != null) {\n session.close();\n }\n }\n }",
"public void deleteSelectionRowTable(boolean status) {\n tableList.deleteSelectionItem(status);\n }",
"public void resetTable() {\n\t\tif (table != null) {\n\t\t\ttable.removeAll();\n\t\t}\n\t}",
"public void cleanTable() throws ClassicDatabaseException;",
"void removeTable(String tableName) throws SQLException {\n\t\tstmt = con.createStatement();\n\t\tString sql = (new StringBuilder(\"drop table \")).append(tableName)\n\t\t\t\t.toString();\n\t\tstmt.executeUpdate(sql);\n\t\tstmt.close();\n\t}",
"public void DeleteAllRecordsInTable() {\n\n final List<Address> gndPlan = GetAllRecordsFromTable();\n for (int i = 0; i < gndPlan.size(); i++) {\n\n gndPlan.get(i).delete();\n //delete all item in table House\n }\n\n }",
"public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }",
"public void deleteRowMain(String tableName) {\n db.execSQL(\"DELETE FROM \" + MAIN_TABLE_NAME + \" WHERE \" + KEY_TABLE_NAME_MAIN + \"='\" + tableName + \"';\");\n }",
"public void limpiarTabla(JTable tbl, DefaultTableModel plantilla) {\n for (int i = 0; i < tbl.getRowCount(); i++) {\n plantilla.removeRow(i);\n i -= 1;\n }\n }",
"public ClearTableResponse clearTable(String tableName, String authorization, Map<String, String> options) throws GPUdbException {\n ClearTableRequest actualRequest_ = new ClearTableRequest(tableName, authorization, options);\n ClearTableResponse actualResponse_ = new ClearTableResponse();\n submitRequest(\"/clear/table\", actualRequest_, actualResponse_, false);\n return actualResponse_;\n }",
"public void dropTables()\n {\n String tableName;\n\n for (int i=0; i<tableNames.length; i++)\n {\n tableName = tableNames[i];\n System.out.println(\"Dropping table: \" + tableName);\n try\n {\n Statement statement = connect.createStatement();\n\n String sql = \"DROP TABLE \" + tableName;\n\n statement.executeUpdate(sql);\n }\n catch (SQLException e)\n {\n System.out.println(\"Error dropping table: \" + e);\n }\n }\n }",
"public void dropTable(AccumuloTable table)\n {\n SchemaTableName stName = new SchemaTableName(table.getSchema(), table.getTable());\n String tableName = table.getFullTableName();\n\n // Drop cardinality cache from index lookup\n sIndexLookup.dropCache(stName.getSchemaName(), stName.getTableName());\n\n // Remove the table metadata from Presto\n if (metaManager.getTable(stName) != null) {\n metaManager.deleteTableMetadata(stName);\n }\n\n if (!table.isExternal()) {\n // delete the table and index tables\n if (tableManager.exists(tableName)) {\n tableManager.deleteAccumuloTable(tableName);\n }\n\n if (table.isIndexed()) {\n String indexTableName = Indexer.getIndexTableName(stName);\n if (tableManager.exists(indexTableName)) {\n tableManager.deleteAccumuloTable(indexTableName);\n }\n\n String metricsTableName = Indexer.getMetricsTableName(stName);\n if (tableManager.exists(metricsTableName)) {\n tableManager.deleteAccumuloTable(metricsTableName);\n }\n }\n }\n }",
"@Override\n public void clearTable() {\n final var query = \"TRUNCATE TABLE piano_project.pianos\";\n try(final var statement = connection.createStatement()) {\n statement.executeUpdate(query);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }",
"public void dropTable(String table) {\n SQLiteDatabase db = openConnection();\n db.execSQL(\"DROP TABLE IF EXISTS \" + table);\n closeConnection();\n }",
"public static void effaceTable(JTable table, DefaultTableModel mode) {\n while (table.getRowCount() > 0) {\n mode.removeRow(table.getRowCount() - 1);\n }\n }",
"void cleanupTable(TableName tablename) throws Exception {\n if (tbl != null) {\n tbl.close();\n tbl = null;\n }\n\n ((ClusterConnection) connection).clearRegionCache();\n deleteTable(TEST_UTIL, tablename);\n }",
"public void clear() {\n\t\tfor (int i = 0; i < table.size(); i++) {\n\t\t\ttable.get(i).clear();\n\t\t}\n\t}",
"public void clearTables()\n\t{\n\t\ttry {\n\t\t\tclearStatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tif (DEBUG) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static void deleteFromTables(Session session, String... tableNames) {\n\t\tObjects.requireNonNull(session, \"Session must not be null\");\n\t\tObjects.requireNonNull(tableNames, \"Tables must not be null\");\n\t\tfor (String tableName : tableNames) {\n\t\t\texecuteStatement(session, String.format(\"TRUNCATE TABLE %s\", tableName));\n\t\t}\n\t}",
"public abstract void destroyTables() throws DataServiceException;",
"@Override\n public void dropTable(String table_name) {\n\n // silently return if connection is closed\n if (!is_open) {\n return;\n }\n\n // try to delete the table\n try {\n String drop_table = \"DROP TABLE \" + table_name;\n statement.execute(drop_table);\n connection.commit();\n } catch (SQLException e) {\n System.out.println(\"Could not delete table \" + table_name);\n e.printStackTrace();\n }\n\n //System.out.println(\"Deleted table \" + table_name);\n\n }",
"public void deleteAllRecords(String tableName) throws SQLException {\n throw new UnsupportedOperationException();\n }",
"public void clearTable() {\n this.lstDaqHware.clear();\n this.mapDevPBar.clear();\n this.mapDevMotion.clear();\n }",
"private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }",
"private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }",
"@Override\n public void run() {\n\n String filename = \"PurgeTable\";\n\n PreparedStatement stmt1 = null;\n try {\n stmt1 = conn.prepareStatement(\"delete from \" + filename);\n stmt1.executeUpdate();\n System.out.println(\"Deletion successful\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"public void doEmptyTableList() {\n tableList.deleteList();\n }",
"public final void deleteSatement() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:88:2: ( DELETE tablename ( where )? )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:88:4: DELETE tablename ( where )?\r\n {\r\n match(input,DELETE,FOLLOW_DELETE_in_deleteSatement242); \r\n out(\"delete from \"); \r\n pushFollow(FOLLOW_tablename_in_deleteSatement249);\r\n tablename();\r\n\r\n state._fsp--;\r\n\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:90:3: ( where )?\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( (LA10_0==WHERE) ) {\r\n alt10=1;\r\n }\r\n switch (alt10) {\r\n case 1 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:90:4: where\r\n {\r\n pushFollow(FOLLOW_where_in_deleteSatement254);\r\n where();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n finally {\r\n }\r\n return ;\r\n }",
"int deleteByExample(Assist_tableExample example);",
"public void execute() {\n if (DeleteTableCommand.confirmDeletion()) {\n\n TopsoilTabPane topsoilTabPane = (TopsoilTabPane) topsoilTab.getTabPane();\n topsoilTabPane.getTabs().remove(topsoilTabPane.getSelectedTab());\n }\n\n }",
"public void deleteClassNameFromMaster(String tableName) throws RelationException;",
"public void dropTable(Class<?> clz) {\n\t\tdropTable(getTableName(clz));\n\t}",
"private void deletes() {\n \tDBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n for (Delete delete: deletes) {\n \tdelete.init();\n }\n \n //DBPeer.updateTableIndexes(); //Set min max of indexes not implemented yet\n }",
"private void removeRedundantGreyTable()\r\n \t{\r\n \t\tdeleteNodes(XPath.GREY_TABLE.query);\r\n \t}",
"CustomDeleteQuery deleteFrom(String table) throws JpoException;",
"@Override\n public Status delete(String table, String key) {\n DeleteM request = DeleteM.newBuilder().setTable(table).build();\n Result response;\n try {\n response = blockingStub.ldelete(request);\n } catch (StatusRuntimeException e) {\n return Status.ERROR;\n }\n return Status.OK;\n }",
"public void clearUserTable() {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\tdeleteStatament.clearUserTable();\n\t}",
"public void deleteAll(){\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"delete from \" + TABLE_NAME);\n }",
"public void clear() {\r\n\t\tfor (int i = 0; i < table.length; i++) {\r\n\t\t\ttable[i] = null;\r\n\t\t}\r\n\r\n\t\tmodificationCount++;\r\n\t\tsize = 0;\r\n\t}",
"public void limpiar(DefaultTableModel tabla) {\n for (int i = 0; i < tabla.getRowCount(); i++) {\n tabla.removeRow(i);\n i -= 1;\n }\n }",
"public static void deleteDataInExistingTable(ISession session,\n String catalogName,\n String schemaName, \n String tableName) \n throws SQLException, UserCancelledOperationException\n {\n ISQLConnection con = session.getSQLConnection();\n boolean useTrunc = PreferencesManager.getPreferences().isUseTruncate();\n String fullTableName = \n getQualifiedObjectName(session, \n catalogName, \n schemaName, \n tableName, \n DialectFactory.DEST_TYPE);\n String truncSQL = \"TRUNCATE TABLE \"+fullTableName;\n String deleteSQL = \"DELETE FROM \"+fullTableName;\n try {\n if (useTrunc) {\n DBUtil.executeUpdate(con, truncSQL, true);\n } else {\n DBUtil.executeUpdate(con, deleteSQL, true);\n }\n } catch (SQLException e) {\n // If truncate was attempted and not supported, then try delete. \n // If on the other hand delete was attempted, just throw the \n // SQLException that resulted from the delete.\n if (useTrunc) {\n DBUtil.executeUpdate(con, deleteSQL, true);\n } else {\n throw e;\n }\n }\n }",
"public static void deleteTable(HBaseTestingUtility testUtil, TableName tableName)\n throws Exception {\n MasterSyncObserver observer = (MasterSyncObserver)testUtil.getHBaseCluster().getMaster()\n .getMasterCoprocessorHost().findCoprocessor(MasterSyncObserver.class.getName());\n observer.tableDeletionLatch = new CountDownLatch(1);\n try {\n admin.disableTable(tableName);\n } catch (Exception e) {\n LOG.debug(\"Table: \" + tableName + \" already disabled, so just deleting it.\");\n }\n admin.deleteTable(tableName);\n observer.tableDeletionLatch.await();\n observer.tableDeletionLatch = null;\n }",
"int delete(String tableName, String selectionCriteria, String[] selectionArgs);",
"public void deleteInstances(String tableName) {\n log.info(\"Starting to delete table with name [{}]\", tableName);\n jdbcTemplate.execute(String.format(DROP_TABLE_QUERY_FORMAT, tableName));\n log.info(\"Table [{}] has been deleted\", tableName);\n }",
"void deleteItem(\n String tableName,\n MapStoreKey key\n );",
"public void truncateTable(String TableName)\n {\n db.execSQL(\"DELETE FROM \"+TableName);\n }",
"public void delete(final String tableName, final Hashtable<Enum<?>, Object> vals) {\n\n\t\tString compare = \"\";\n\t\tfinal Enumeration<?> keys = vals.keys();\n\t\tfinal Object[] values = vals.values().toArray();\n\t\tfor (int x = 0; x < values.length; x++) {\n\t\t\tcompare += \"`\" + keys.nextElement() + \"`='\" + values[x] + \"' AND \";\n\t\t}\n\t\tcompare = compare.substring(0, compare.lastIndexOf(\"AND \"));\n\n\t\t// Remove the data into the database.\n\t\tfinal String remove = \"DELETE FROM `\" + tableName + \"` WHERE \" + compare + \";\";\n\t\texecute(remove);\n\n\t}",
"public void deleteTable(String resourceGroupName, String accountName, String tableName) {\n deleteTableWithServiceResponseAsync(resourceGroupName, accountName, tableName).toBlocking().last().body();\n }",
"public void delete() throws SQLException {\r\n\t\t//SQL Statement\r\n\r\n\t\tString sql = \"DELETE FROM \" + table+ \" WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setInt(1, this.getGenreID());\r\n\r\n\t\tint rowsDeleted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsDeleted+ \"Zeilen gelöscht\");\r\n\t\tstmt.close();\r\n\t}",
"@Override\r\n\tpublic boolean dropTable() {\n\t\treturn false;\r\n\t}",
"public void removeTablesInNavigationTable(String panelTitle) {\n\t\tConsoleTableNavigation table = (ConsoleTableNavigation) getBoard(panelTitle);\n\t\ttable.removeTables();\n\t}",
"public Builder clearTables() {\n if (tablesBuilder_ == null) {\n tables_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n tablesBuilder_.clear();\n }\n return this;\n }",
"public void clear(AbsoluteTableIdentifier absoluteTableIdentifier) {\n // removing all the details of table\n tableLockMap.remove(absoluteTableIdentifier);\n tableBlocksMap.remove(absoluteTableIdentifier);\n }",
"public int dropTable() \n throws InterruptedException, IOException \n {\n return dropTable(false);\n }",
"public void removeSimpleTable(String name) {\n String nameInLowerCase = Ascii.toLowerCase(name);\n Preconditions.checkState(!registered);\n Preconditions.checkArgument(tables.containsKey(nameInLowerCase), \"missing key: %s\", name);\n Preconditions.checkArgument(globalNames.contains(nameInLowerCase), \"missing key: %s\", name);\n SimpleTable table = tables.remove(nameInLowerCase);\n tablesById.remove(table.getId());\n globalNames.remove(nameInLowerCase);\n }",
"public static boolean delete(final int id, final int tableId)\n {\n return delete(id, tableId, false);\n }",
"private void rydStuderendeJTable() {\n tm = (DefaultTableModel)jTable1.getModel();\n\n // vi rydder alle rækker fra JTable's TableModel\n while (tm.getRowCount()>0) {\n tm.removeRow(0);\n }\n }",
"public void delete_entity(String table, int id) {\n //table does not exist\n if (!get_table_names().contains(table) && !table.equals(\"relationship\")) {\n throw new RuntimeException(\"Table does not exist.\");\n }\n //invalid id\n if (!get_valid_ids(table).contains(id)) {\n throw new RuntimeException(\"Id does not exist in this table.\");\n }\n\n String sql = \"delete from \" + table + \" where id = \" + id + \";\"; //delete corresponding entity\n\n execute_statement(sql, false);\n }",
"public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}"
]
| [
"0.6817768",
"0.6708099",
"0.6659194",
"0.6645784",
"0.66397345",
"0.65894264",
"0.65756154",
"0.65602016",
"0.6558431",
"0.65173453",
"0.6504192",
"0.6407469",
"0.6352143",
"0.6351437",
"0.6322889",
"0.63188034",
"0.6316076",
"0.6263902",
"0.6246844",
"0.62035865",
"0.61932766",
"0.6179272",
"0.6176821",
"0.6159457",
"0.6136767",
"0.61348647",
"0.61136657",
"0.6112826",
"0.6110061",
"0.6102725",
"0.60989994",
"0.60870516",
"0.6068164",
"0.60504735",
"0.6028274",
"0.6024324",
"0.6005499",
"0.60040605",
"0.60040355",
"0.60034543",
"0.5974697",
"0.5963089",
"0.5951533",
"0.591819",
"0.5883334",
"0.5877911",
"0.5872727",
"0.5860885",
"0.5846426",
"0.58416027",
"0.58374155",
"0.5834206",
"0.58221555",
"0.58026433",
"0.5781232",
"0.5776735",
"0.5774334",
"0.5770368",
"0.57688916",
"0.57660985",
"0.57631844",
"0.5752001",
"0.57518095",
"0.574647",
"0.5734064",
"0.5728756",
"0.5720296",
"0.5706643",
"0.5695524",
"0.5669",
"0.56604904",
"0.56599617",
"0.5656133",
"0.5655337",
"0.56521827",
"0.5649657",
"0.5647674",
"0.5637191",
"0.56282884",
"0.562485",
"0.5615208",
"0.5612584",
"0.56085557",
"0.5598656",
"0.5592339",
"0.55902416",
"0.55899423",
"0.5580745",
"0.5577668",
"0.55769706",
"0.55758315",
"0.55755913",
"0.5564948",
"0.5564348",
"0.55600005",
"0.5549286",
"0.55323505",
"0.5530787",
"0.5523685",
"0.55231833"
]
| 0.7565443 | 0 |
Deletes the provided layers, including any maps where they are used. | private void deleteLayers(Set<String> layerIds) throws IOException {
for (String layerId : layerIds) {
assertLayerIsNotPublished(layerId);
LOG.info("Layer ID: " + layerId + ", finding maps.");
ParentsListResponse layerParents = engine.layers().parents().list(layerId).execute();
// Delete each layer. Note that these operations are not transactional,
// so if a later operation fails, the earlier assets will still be deleted.
for (Parent layerParent : layerParents.getParents()) {
String mapId = layerParent.getId();
deleteMap(layerIds, mapId);
}
LOG.info("Deleting layer.");
engine.layers().delete(layerId).execute();
LOG.info("Layer deleted.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void clearLayers(){\n\t\tfor(int i=0;i<ChangeLayer.Layers.length;i++){\n\t\t\tChangeLayer.Layers[i].clear();\n\t\t\t}\n\t}",
"public void clearMapLayers() {\n if(internalNative != null) {\n internalNative.removeAllMarkers();\n markers.clear();\n } else {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.removeAllLayers();\n points = null;\n } else {\n // TODO: Browser component \n }\n }\n }",
"void removeLayer(int whichLayer);",
"public void removeAllOverlayObj(String layer)\n/* 185: */ {\n/* 186:261 */ this.mapPanel.removeAllOverlayObj(layer);\n/* 187: */ }",
"public void removeLayer(Editor layerEditor) {\n\n layers.remove(layerEditor);\n\n for (Map.Entry<Editor, HashMap<Editor, LayerPanel>> entry : layers.entrySet()) {\n\n LayerPanel layer = entry.getValue().get(layerEditor);\n entry.getKey().remove(layer);\n }\n }",
"private void deleteMap(Set<String> layerIdsPendingDeletion, String mapId) throws IOException {\n assertMapIsNotPublished(mapId);\n\n LOG.info(\"Checking for other layers on this map (ID: \" + mapId + \")\");\n Set<String> mapLayerIds = getLayerIdsFromMap(mapId);\n\n // Determine if this map will still have layers once we perform our delete.\n mapLayerIds.removeAll(layerIdsPendingDeletion);\n if (mapLayerIds.size() == 0) {\n // Map will not contain any more Layers when done, so delete it.\n LOG.info(\"Deleting map.\");\n engine.maps().delete(mapId).execute();\n LOG.info(\"Map deleted.\");\n } else {\n // Map will contain Layers not scheduled for deletion, so we can't continue.\n throw new IllegalStateException(\"Map \" + mapId + \" contains layers not scheduled for \"\n + \"deletion. You will need to remove them before we can delete this map.\");\n }\n }",
"public void removeAllAgents(String layer)\n/* 180: */ {\n/* 181:254 */ this.mapPanel.removeAllAgents(layer);\n/* 182: */ }",
"public void removeLayer(Layer layer) {\r\n\t\tLayerList layers = getWWD().getModel().getLayers();\r\n\t\tlayers.remove(layer);\r\n\t}",
"void releaseOldLayers() throws IOException;",
"public void clear() {\n this.layers.clear();\n list.clear();\n }",
"@Override\n public void onRemoveLayer(GPLayerBean layerBean) {\n this.removeLayer(layerBean);\n }",
"@Test\n public void testDeleteLayer() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n instance.deleteLayer(2);\n assertEquals(instance.getVxQueryCollection().getHighestQueryIndex(), 3);\n\n }",
"public void removeOverlayObj(String layer, IOverlay a)\n/* 190: */ {\n/* 191:268 */ this.mapPanel.removeOverlayObj(layer, a);\n/* 192: */ }",
"public void clearAll() {\n\n\t\t// Removing the graphics from the layer\n\t\trouteLayer.removeAll();\n\t\t// hiddenSegmentsLayer.removeAll();\n\t\tmMapViewHelper.removeAllGraphics();\n\t\tmResults = null;\n\n\t}",
"public void clearOverlays();",
"public void removeLayer(@NotNull final SceneLayer layer) {\n layers.slowRemove(layer);\n }",
"public de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer remove(\n long layerId)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.i3mainz.flexgeo.portal.liferay.services.NoSuchOGCServiceLayerException;",
"public void removeLayer(int index){\n history.removeIndex(index);\n historyValues.removeIndex(index);\n }",
"public void removeTiles(Renderer r) {\n\n\t\t// Return if the room has not been rendered\n\t\tif (shadowMap == null) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Delete the shadow map\n\t\t// r.deleteMap(shadowMap);\n\n\t\t// Delete the tiles\n\t\tfor (int i = 0; i < tiles.length; i++) {\n\t\t\tfor (int j = 0; j < tiles[0].length; j++) {\n\n\t\t\t\tTile tile = tiles[i][j];\n\n\t\t\t\t// Delete model of the tile\n\t\t\t\tif (tile.getModel() != null) {\n\t\t\t\t\tr.deleteModel(tile.getModel().getName());\n\t\t\t\t}\n\n\t\t\t\t// If there are any items delete them too\n\t\t\t\tif (tile instanceof BasicFloor) {\n\n\t\t\t\t\tBasicFloor floor = (BasicFloor) tile;\n\n\t\t\t\t\tfor (Item item : floor.getItems())\n\t\t\t\t\t\tr.deleteModel(item.getModel().getName());\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void clearShapeMap();",
"@ApiOperation(\"Remove user layer from database.\")\n @DeleteMapping(value = \"/{userLayerId}\")\n public void removeUserLayer(@PathVariable(\"userLayerId\") int userLayerId) {\n userLayerService.removeUserLayer(getCurrentUsername(), userLayerId);\n }",
"public void clearAll()\n {\n textureMap.clear();\n componentMap.clear();\n }",
"@Override\n\tprotected final void removedLayerActions(ILayer layer) {\n\n\t\tsuper.removedLayerActions(layer);\n\n\t\tchangedLayerListActions();\n\t}",
"@Override\n public BoardLayerView removeLayer(int index) {\n return this.layers.remove(index);\n }",
"public void allLayers()\n\t{\n\t\tint totalLayers = this.psd.getLayersCount();\n\t\t\n\t\tLayer layer;\n\t\t\n\t\tfor (int i = totalLayers - 1; i >= 0; i--) {\n\t\t\tlayer = this.psd.getLayer(i);\n\t\t\t\n\t\t\tif (!layer.isVisible() || (layer.getType() == LayerType.NORMAL && layer.getWidth() == 0)) {\n\t\t\t\tthis.layersToRemove.add(layer);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tlayer.adjustPositionAndSizeInformation();\n\t\t\tthis.layerId++;\n\t\t\t\n\t\t\tif (LayerType.NORMAL == layer.getType()) {\n\t\t\t\t\n\t\t\t\tlayer.setUniqueLayerId(this.layerId);\n\t\t\t\tlayer.setGroupLayerId(0);\n\t\t\t\tlayer.setDepth(0);\n\t\t\t\t\n\t\t\t\tthis.layers.add(layer);\n\t\t\t\t\n\t\t\t} else if (LayerType.OPEN_FOLDER == layer.getType() || LayerType.CLOSED_FOLDER == layer.getType()) {\n\t\t\t\t\n\t\t\t\tlayer.setUniqueLayerId(this.layerId);\n\t\t\t\tlayer.setGroupLayerId(0);\n\t\t\t\tlayer.setDepth(0);\n\t\t\t\t\n\t\t\t\tthis.layers.add(layer);\n\t\t\t\t\n\t\t\t\tif (layer.getLayersCount() > 0) {\n\t\t\t\t\tthis.subLayers(layer, this.layerId, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void removeByG_lN(long groupId, java.lang.String layerName)\n throws com.liferay.portal.kernel.exception.SystemException;",
"protected void doDeleteBoth() {\r\n\t\tif (renderer.surface != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.basemap, renderer.selectedRectangle, false);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, renderer.selectedRectangle, true);\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}",
"public void deselectAll()\n {\n map.deselectAll();\n mapComponent.repaint();\n mapper.resetMenus();\n }",
"public Layer removeLayer( String name ) {\n Layer layer = (Layer)this.layers.remove( name );\n list.remove( layer );\n return layer;\n }",
"public void deleteMap(String s){\n GridMap target=null;\n for(GridMap gm:mapsList){\n if(gm.getMapName().equals(s))\n target=gm;\n }\n removeMaps(target);\n }",
"void removeComponents()\n {\n JPanel panel = Simulator.getInstance().getPanel(1);\n JLayeredPane jl = (JLayeredPane)panel.getComponent(0);\n Component[] comps = jl.getComponentsInLayer(JLayeredPane.PALETTE_LAYER.intValue());\n int size = comps.length;\n int i=0;\n while(i<size)\n {\n jl.remove(comps[i]);\n i++;\n } \n }",
"public void destroy() {\n\t\tfor (GroupPaddle groupPaddle : paddles) {\n\t\t\tPhysicsWorld.getPhysicsWorld().destroy(groupPaddle);\n\t\t}\n\t}",
"private void addLayers(ArrayList<Layer> layersToAdd) {\n ArrayList<Layer> layers = new ArrayList<Layer>(layerManager.getLayers());\n layers.addAll(layersToAdd);\n layerManager.setLayers(layers);\n // close right drawer\n if (mLayerMenu != null) {\n if (mDrawerLayout.isDrawerOpen(mLayerMenu)) {\n mDrawerLayout.closeDrawer(mLayerMenu);\n }\n }\n }",
"public void removeMaps(GridMap map){\n mapsList.remove(map);\n //Observer pattern\n setChanged();\n notifyObservers(this);\n }",
"public void removeAllOverlayObj()\n/* 91: */ {\n/* 92:146 */ this.mapPanel.removeAllOverlayObj();\n/* 93: */ }",
"public void removeFeatures(Extent ex) {\n //TODO: remove the features\n }",
"public void setLayers( Layer[] layers ) {\n this.layers.clear();\n this.list.clear();\n\n if ( layers != null ) {\n for ( int i = 0; i < layers.length; i++ ) {\n this.layers.put( layers[i].getName(), layers[i] );\n list.add( layers[i] );\n }\n }\n }",
"public void removeTiles(ArrayList<Tile> tiles) {\r\n for (Tile tile : tiles) {\r\n frame.remove(tile);\r\n }\r\n }",
"public void clearFeatures() {\n localFeatureVector.clear();\n }",
"void clearFeatures();",
"@Override\n public void cleanup(GL2 gl)\n {\n for(int i = 0; i < 6; i++)\n {\n Integer t_id = (Integer)textureIdMap[i].remove(gl);\n if(t_id != null)\n {\n int tex_id_tmp[] = { t_id.intValue() };\n gl.glDeleteTextures(1, tex_id_tmp, 0);\n }\n }\n }",
"public void removeProjectEntries(String serviceName);",
"public void deleteTexturesAndDisplayLists(GL gl)\n {\n if(textureTiles == null) return;\n textureTiles.deleteTextures(gl);\n textureTiles.deleteDisplayLists(gl);\n textureChanged = true;\n }",
"public void clearMap() {\n this.mSimpleTargetIndexMap.clear();\n this.mSimpleTargetGroupChannelMap.clear();\n this.mChannelImageNumMap.clear();\n this.mChannelImageViewMap.clear();\n this.mChannelBitmapMap.clear();\n }",
"private void deleteSelectedWaypoints() {\r\n\t ArrayList<String> waypointsToRemove = new ArrayList<String>();\r\n\t int size = _selectedList.size();\r\n\t for (int i = _selectedList.size() - 1; i >= 0; --i) {\r\n boolean selected = _selectedList.get(i);\r\n if (selected) {\r\n waypointsToRemove.add(UltraTeleportWaypoint.getWaypoints().get(i).getWaypointName());\r\n }\r\n }\r\n\t UltraTeleportWaypoint.removeWaypoints(waypointsToRemove);\r\n\t UltraTeleportWaypoint.notufyHasChanges();\r\n\t}",
"public void removeFeatures(Feature[] features) {\n //TODO: remove the features\n }",
"protected void doDeleteBuilding() {\r\n\t\tif (renderer.surface != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, renderer.selectedRectangle, true);\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}",
"public void removeDefaultLayerIfUnused() {\n Long defaultRootMarkupId = documentDTO.textGraph.getLayerRootMap().get(DEFAULT_LAYER);\n if (defaultRootMarkupId != null) {\n boolean defaultLayerIsUnused =\n documentDTO.textGraph.getOutgoingEdges(defaultRootMarkupId).stream()\n .noneMatch(this::isInDefaultLayer);\n if (defaultLayerIsUnused) {\n documentDTO.textGraph.getLayerRootMap().remove(DEFAULT_LAYER);\n TAGMarkup markup = store.getMarkup(defaultRootMarkupId);\n markup.getLayers().remove(DEFAULT_LAYER);\n store.persist(markup.getDTO());\n update();\n }\n }\n }",
"void deleteEntitiesOf(Map<Location, SurfaceEntity> map, Rectangle rect, boolean checkBuildings) {\r\n\t\t// find buildings falling into the selection box\r\n\t\tif (rect != null) {\r\n\t\t\tBuilding bld = null;\r\n\t\t\tfor (int a = rect.x; a < rect.x + rect.width; a++) {\r\n\t\t\t\tfor (int b = rect.y; b > rect.y - rect.height; b--) {\r\n\t\t\t\t\tSurfaceEntity se = map.get(Location.of(a, b));\r\n\t\t\t\t\tif (se != null) {\r\n\t\t\t\t\t\tint x = a - se.virtualColumn;\r\n\t\t\t\t\t\tint y = b + se.virtualRow;\r\n\t\t\t\t\t\tfor (int x0 = x; x0 < x + se.tile.width; x0++) {\r\n\t\t\t\t\t\t\tfor (int y0 = y; y0 > y - se.tile.height; y0--) {\r\n\t\t\t\t\t\t\t\tmap.remove(Location.of(x0, y0));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (checkBuildings) {\r\n\t\t\t\t\t\tfor (int i = renderer.surface.buildings.size() - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tbld = renderer.surface.buildings.get(i);\r\n\t\t\t\t\t\t\tif (bld.containsLocation(a, b)) {\r\n\t\t\t\t\t\t\t\trenderer.surface.buildings.remove(i);\r\n\t\t\t\t\t\t\t\tif (bld == currentBuilding) {\r\n\t\t\t\t\t\t\t\t\trenderer.buildingBox = null;\r\n\t\t\t\t\t\t\t\t\tcurrentBuilding = null;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int i = renderer.surface.features.size() - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tSurfaceFeature sf = renderer.surface.features.get(i);\r\n\t\t\t\t\t\t\tif (sf.containsLocation(a, b)) {\r\n\t\t\t\t\t\t\t\trenderer.surface.features.remove(i);\r\n\t\t\t\t\t\t\t\tif (sf.equals(currentBaseTile)) {\r\n\t\t\t\t\t\t\t\t\tcurrentBaseTile = null;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (checkBuildings && bld != null) {\r\n\t\t\t\tplaceRoads(bld.techId);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void deleteTable(String tableId) throws IOException {\n LOG.info(\"Finding layers belonging to table.\");\n ParentsListResponse tableParents = engine.tables().parents().list(tableId).execute();\n LOG.info(\"Layers retrieved.\");\n\n // Collect the layer IDs to ensure we can safely delete maps.\n Set<String> allLayerIds = new HashSet<String>();\n for (Parent tableParent : tableParents.getParents()) {\n allLayerIds.add(tableParent.getId());\n }\n\n // We need to delete layers before we can delete the table.\n deleteLayers(allLayerIds);\n\n LOG.info(\"Deleting table.\");\n engine.tables().delete(tableId).execute();\n LOG.info(\"Table deleted.\");\n\n }",
"public void deleteExperimentColors();",
"public void freeGeometries(){\n\t\tfinal int size = this.geometries.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tfinal int key = this.geometries.keyAt(index);\n\t\t\tthis.geometries.get(key).free();\n\t\t\tthis.geometries.delete(key);\n\t\t}\n\t}",
"public void clearAllAppMapCaches(){\n\t\tappmaps.clear();\n\t}",
"private void removeAllQueryBoundsFromGeometryRegistry()\r\n {\r\n myToolbox.getGeometryRegistry().removeGeometriesForSource(this);\r\n }",
"public void destroyOpenGL(Drawable[] drawables) {\n GL20.glDisableVertexAttribArray(0);\n\n for (Drawable drawable : drawables) {\n // Delete the VBO\n GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);\n GL15.glDeleteBuffers(drawable.getVertexBufferObjectId());\n\n GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, 0);\n GL15.glDeleteBuffers(drawable.getVertexIndexBufferObjectId());\n\n // Delete the VAO\n GL30.glBindVertexArray(0);\n GL30.glDeleteVertexArrays(drawable.getOpenGLVaoId());\n }\n\n Display.destroy();\n }",
"public void removeAgent(String layer, Agent a)\n/* 175: */ {\n/* 176:247 */ this.mapPanel.removeAgent(layer, a);\n/* 177: */ }",
"public void clearMarkers() {\n googleMap.clear();\n markers.clear();\n }",
"public void eraseOnClick(View view){\n mMap.clear();//clears the map\r\n points = new ArrayList<LatLng>();//resets the markers holder\r\n }",
"@Override\r\n\tpublic int deleteProject(Map<String, Object> map) throws Exception {\n\t\treturn 0;\r\n\t}",
"static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }",
"public void removeAllGroups() {\n Set groupset = grouptabs.keySet();\n Iterator groupsit = groupset.iterator();\n String groupname;\n \n /* Remove all panels from the JTabbedPane */\n while(groupsit.hasNext()) {\n groupname = (String)groupsit.next();\n // while((groupname = (String)groupsit.next()).equals(null) == false) {\n tbMain.remove((JPanel)grouptabs.get(groupname));\n }\n \n /* Now clear the HashMap */\n grouptabs.clear();\n \n }",
"void deleteFeature(Integer id);",
"public void removed(IExtensionPoint[] extensionPoints) {\r\n\r\n\t\t// Do nothing\r\n\t}",
"public void clear()\n {\n getMap().clear();\n }",
"public void removeMarkers() throws CoreException {\r\n if (resource == null) {\r\n return;\r\n }\r\n IMarker[] tMarkers = null;\r\n int depth = 2;\r\n tMarkers = resource.findMarkers(LPEXTask.ID, true, depth);\r\n for (int i = tMarkers.length - 1; i >= 0; i--) {\r\n tMarkers[i].delete();\r\n }\r\n }",
"private void removeMappings() {\n\t\tfor (final VisualMappingFunction<?, ?> vm : validMappings)\n\t\t\tstyle.removeVisualMappingFunction(vm.getVisualProperty());\n\t}",
"@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/networks\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionNetwork(\n @QueryMap DeleteCollectionNetwork queryParameters);",
"@Override\n public void setLayerArrayList(ArrayList<BoardLayerView> layers) {\n this.layers = layers;\n }",
"public void\tclear() {\n\t\tmap.clear();\n\t}",
"public void delContextNodes();",
"public static void deleteTempMapset() {\r\n if ((getGrassMapsetFolder() != null) && (getGrassMapsetFolder().length() > 2)) {\r\n String tmpFolder;\r\n tmpFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));\r\n if (new File(tmpFolder).exists()) {\r\n deleteDirectory(new File(tmpFolder));\r\n }\r\n }\r\n }",
"public void clear() {\n map.clear();\n }",
"void removeTiles(Map<Location, SurfaceEntity> map, int x, int y, int width, int height) {\r\n\t\tfor (int i = x; i < x + width; i++) {\r\n\t\t\tfor (int j = y; j > y - height; j--) {\r\n\t\t\t\tmap.remove(Location.of(x, y));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setConstrainedDeformationLayers (Vector layers)\n\t{\n\t\tmConstrainedDeformationLayers = layers;\n\t}",
"private void cleanUpTile(ArrayList<Move> moves)\n {\n for(Move m1 : moves)\n {\n gb.getTile(m1.getX(),m1.getY()).setStyle(null);\n gb.getTile(m1.getX(),m1.getY()).setOnMouseClicked(null);\n }\n gb.setTurn(gb.getTurn() + 1);\n }",
"public void removeOverlayObj(IOverlay a)\n/* 96: */ {\n/* 97:153 */ this.mapPanel.removeOverlayObj(a);\n/* 98: */ }",
"public void clear_type(String type) {\n\t\t/* Iterate through draw list */\n\t\tIterator<ArrayList<Drawable>> iter = this.drawlist.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tArrayList<Drawable> layer = iter.next();\n\t\t\t/* Iterate through the layer. */\n\t\t\tIterator<Drawable> jter = layer.iterator();\n\t\t\twhile(jter.hasNext()) {\n\t\t\t\tif(jter.next().getType().equals(type)) {\n\t\t\t\t\tjter.remove();\n\t\t\t\t}//fi\n\t\t\t}//elihw\n\t\t}//elihw\n\t}",
"public void removeMapObject(MapObject obj) {\n markers.remove(obj);\n if(internalNative != null) {\n internalNative.removeMapElement(obj.mapKey);\n } else {\n if(obj.lines != null) {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.removeLayer(obj.lines);\n } else {\n // TODO: Browser component\n }\n } else {\n points.removePoint(obj.point);\n }\n }\n }",
"@Test\n public void testDeselectAll() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n instance.createLayer();\n instance.getVxQueryCollection().setVisibilityOnAll(true);\n instance.getTxQueryCollection().setVisibilityOnAll(true);\n\n instance.deselectAll();\n assertEquals(instance.getVxQueryCollection().isVisibilityOnAll(), false);\n }",
"public void clear() { \r\n\t\tmap.clear();\r\n\t}",
"public void erasePolylines() {\n for (Polyline line : polylines) {\n line.remove(); ////removing each lines\n\n }\n polylines.clear(); ////clearing the polylines array\n }",
"void unsetRoadTerrain();",
"private void processLayerMap() {\r\n for (int l = 0; l < layers.size(); l++) {\r\n Layer layer = layers.get(l);\r\n this.layerNameToIDMap.put(layer.name, l);\r\n }\r\n }",
"public void clear() {\n map.clear();\n }",
"void removeCoordinateSystem(CoordinateSystem cs);",
"protected void removeMapLineAdapters() {\r\n while (!lineAdapters.isEmpty()) {\r\n MapLineAdapter mla = (MapLineAdapter) lineAdapters.remove(0);\r\n drawer.removeMapLineAdapter(mla);\r\n }\r\n }",
"public void delete(){\n if (shx!=null) shx.delete();\n if (shp!=null) shp.delete();\n if (dbf!=null) dbf.delete();\n if (prj!=null) prj.delete();\n }",
"public void clearMap() {\n\t\tfor (int i = 0; i < parkingsArray.size(); i++)\n\t\t\tparkingsArray.valueAt(i).removeMarker();\n\t\tparkingsArray.clear();\n\t\tmap.clear();\n\t}",
"public void clear() {\n\t\tmap.clear();\n\t}",
"public void destroy() {\n\t\tAL10.alDeleteSources(id);\n\t}",
"synchronized public void destroy() {\n \t\tsuper.destroy();\n \t\tp = null;\n \t\tp_layer = null;\n \t}",
"public void process()\n\t{\n\t\tthis.layers = new ArrayList<Layer>();\n\t\t\n\t\t/**\n\t\t * list of layers to remove\n\t\t */\n\t\tthis.layersToRemove = new ArrayList<Layer>();\n\t\t\n\t\t/**\n\t\t * find all layers we need to process in the document\n\t\t */\n\t\tthis.allLayers();\n\t\t\n\t\t/**\n\t\t * we'll remove all layers which are unused in psd\n\t\t */\n\t\tthis.removeUnusedLayers();\n\t\t\n//\t\tthis.discoverMaximumLayerDepth();\n\t\t\n\t\t/*this.showLayersInformation(this.layers);\n\t\tSystem.exit(0)*/;\n\t}",
"public void clear() {\r\n this.map.clear();\r\n }",
"public void removeFromWorld(World world);",
"public void clear(String name) {\n/* 95 */ this.texturesLinear.remove(name);\n/* 96 */ this.texturesNearest.remove(name);\n/* */ }",
"public void removeAllOnlyFromCanvas() {\n ArrayList<Integer> delList = new ArrayList<Integer>();\n \n for (CanvasWindow o : this) {\n delList.add(o.getID());\n }\n \n for (Integer i : delList) {\n removeObjectOnlyFromCanvas(i);\n }\n }",
"public void clear(){\n\t\tfor (LinkedList<Line> list : lineLists){\n\t\t\tfor (Line l : list){\n\t\t\t\tpane.getChildren().remove(l);\n\t\t\t}\n\t\t\tlist.clear();\n\t\t}\n\t\tfor (Line l : bezierCurve){\n\t\t\tpane.getChildren().remove(l);\n\t\t}\n\t\tbezierCurve.clear();\n\t\t\n\t\tlineLists.clear();\n\t\tlineLists.add(new LinkedList<Line>());\n\t}",
"protected void removeMapPointAdapters() {\r\n while (!pointAdapters.isEmpty()) {\r\n MapPointAdapter mpa = (MapPointAdapter) pointAdapters.remove(0);\r\n drawer.removeMapPointAdapter(mpa);\r\n }\r\n }",
"public void remove(){\n Api.worldRemover(getWorld().getWorldFolder());\n }",
"public static void clearWorld() {\r\n \tbabies.clear();\r\n \tpopulation.clear();\r\n }"
]
| [
"0.6915276",
"0.67563117",
"0.6558396",
"0.63119185",
"0.62180257",
"0.6154153",
"0.60104173",
"0.5757281",
"0.56696063",
"0.5669534",
"0.5592701",
"0.5584445",
"0.55190027",
"0.55076605",
"0.5461244",
"0.5460206",
"0.54523176",
"0.5436868",
"0.53618956",
"0.53544146",
"0.5317265",
"0.5304156",
"0.5274841",
"0.5268389",
"0.5267077",
"0.52295536",
"0.5226199",
"0.5222694",
"0.5218035",
"0.5215349",
"0.51888496",
"0.5173037",
"0.5159757",
"0.5155796",
"0.5141043",
"0.513663",
"0.51165056",
"0.5098078",
"0.5091371",
"0.50845414",
"0.50843906",
"0.5081271",
"0.5072424",
"0.50503254",
"0.5050135",
"0.5034816",
"0.5034152",
"0.5019137",
"0.49961072",
"0.49958044",
"0.49927124",
"0.49905545",
"0.49803194",
"0.49741042",
"0.49703646",
"0.49579695",
"0.49315727",
"0.49241504",
"0.48919085",
"0.4885996",
"0.4871965",
"0.48624235",
"0.4844984",
"0.48379382",
"0.4832442",
"0.48205736",
"0.4814372",
"0.48124203",
"0.47817233",
"0.47803822",
"0.47694185",
"0.47676772",
"0.47670484",
"0.4765698",
"0.47593516",
"0.47489932",
"0.47374028",
"0.47358572",
"0.4733266",
"0.4730412",
"0.47240925",
"0.47132665",
"0.4708209",
"0.46983537",
"0.46960193",
"0.46941173",
"0.46933362",
"0.46879995",
"0.46870053",
"0.4684218",
"0.46715143",
"0.46682137",
"0.46647346",
"0.46643043",
"0.4653138",
"0.46520212",
"0.46481448",
"0.46444732",
"0.46441805",
"0.46407026"
]
| 0.7224741 | 0 |
TODO(macd): Update this to edit the map, once available in the API. Safely deletes a map, as long as all layers contained are scheduled for deletion. | private void deleteMap(Set<String> layerIdsPendingDeletion, String mapId) throws IOException {
assertMapIsNotPublished(mapId);
LOG.info("Checking for other layers on this map (ID: " + mapId + ")");
Set<String> mapLayerIds = getLayerIdsFromMap(mapId);
// Determine if this map will still have layers once we perform our delete.
mapLayerIds.removeAll(layerIdsPendingDeletion);
if (mapLayerIds.size() == 0) {
// Map will not contain any more Layers when done, so delete it.
LOG.info("Deleting map.");
engine.maps().delete(mapId).execute();
LOG.info("Map deleted.");
} else {
// Map will contain Layers not scheduled for deletion, so we can't continue.
throw new IllegalStateException("Map " + mapId + " contains layers not scheduled for "
+ "deletion. You will need to remove them before we can delete this map.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteMap(String s){\n GridMap target=null;\n for(GridMap gm:mapsList){\n if(gm.getMapName().equals(s))\n target=gm;\n }\n removeMaps(target);\n }",
"public void removeMaps(GridMap map){\n mapsList.remove(map);\n //Observer pattern\n setChanged();\n notifyObservers(this);\n }",
"public void clear() {\n map.clear();\n }",
"public final void clear() { _map.clear(); }",
"public void clearMapLayers() {\n if(internalNative != null) {\n internalNative.removeAllMarkers();\n markers.clear();\n } else {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.removeAllLayers();\n points = null;\n } else {\n // TODO: Browser component \n }\n }\n }",
"@Override\r\n\tpublic int delete(HashMap<String, Object> map) {\n\t\treturn 0;\r\n\t}",
"public void clearMap() {\n if (mMap != null) {\n mMap.clear();\n }\n }",
"public void clear() {\n map.clear();\n }",
"public abstract void removeFromMap();",
"private void deleteLayers(Set<String> layerIds) throws IOException {\n for (String layerId : layerIds) {\n assertLayerIsNotPublished(layerId);\n\n LOG.info(\"Layer ID: \" + layerId + \", finding maps.\");\n ParentsListResponse layerParents = engine.layers().parents().list(layerId).execute();\n // Delete each layer. Note that these operations are not transactional,\n // so if a later operation fails, the earlier assets will still be deleted.\n for (Parent layerParent : layerParents.getParents()) {\n String mapId = layerParent.getId();\n deleteMap(layerIds, mapId);\n }\n\n LOG.info(\"Deleting layer.\");\n engine.layers().delete(layerId).execute();\n LOG.info(\"Layer deleted.\");\n }\n }",
"public void setMap(Map map, int layer, int i, int j) {\n assert map != null;\n //remove from previous map\n this.map.ifPresent((value)->value.removeTile(this));\n this.map = Optional.of(map);\n setPosition(layer, i, j);\n }",
"public void\tclear() {\n\t\tmap.clear();\n\t}",
"public Object remove(Map<Prop, Object> map) {\n return map.remove(this);\n }",
"public void removeMapObject(MapObject obj) {\n markers.remove(obj);\n if(internalNative != null) {\n internalNative.removeMapElement(obj.mapKey);\n } else {\n if(obj.lines != null) {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.removeLayer(obj.lines);\n } else {\n // TODO: Browser component\n }\n } else {\n points.removePoint(obj.point);\n }\n }\n }",
"@Test\n public void mapRemove() {\n check(MAPREM);\n query(MAPSIZE.args(MAPREM.args(MAPENTRY.args(1, 2), 1)), 0);\n }",
"public void removeAllOverlayObj(String layer)\n/* 185: */ {\n/* 186:261 */ this.mapPanel.removeAllOverlayObj(layer);\n/* 187: */ }",
"void removeTiles(Map<Location, SurfaceEntity> map, int x, int y, int width, int height) {\r\n\t\tfor (int i = x; i < x + width; i++) {\r\n\t\t\tfor (int j = y; j > y - height; j--) {\r\n\t\t\t\tmap.remove(Location.of(x, y));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void clear() {\r\n this.map.clear();\r\n }",
"@Override\r\n public void clear() {\r\n map.clear();\r\n }",
"public void clear() {\n\t\tmap.clear();\n\t}",
"public void shutdown() {\n map.shutdown();\n }",
"public void clear()\n {\n getMap().clear();\n }",
"void clearShapeMap();",
"public void clear() { \r\n\t\tmap.clear();\r\n\t}",
"@RequestMapping(value = \"/usermaps/delete/{id}\", method = RequestMethod.DELETE, produces = \"application/json; charset=utf-8\")\r\n public ResponseEntity<String> deleteUserMap(HttpServletRequest request,\r\n @PathVariable(\"id\") Integer id) throws Exception {\r\n return(deleteMapByAttribute(new UserMapData(env.getProperty(\"postgres.local.usermapsTable\")), \"id\", id + \"\")); \r\n }",
"public void removeAllOverlayObj()\n/* 91: */ {\n/* 92:146 */ this.mapPanel.removeAllOverlayObj();\n/* 93: */ }",
"@Override\r\n\tpublic int deleteProject(Map<String, Object> map) throws Exception {\n\t\treturn 0;\r\n\t}",
"public void clearMap() {\n this.mSimpleTargetIndexMap.clear();\n this.mSimpleTargetGroupChannelMap.clear();\n this.mChannelImageNumMap.clear();\n this.mChannelImageViewMap.clear();\n this.mChannelBitmapMap.clear();\n }",
"@Test\n public void testDeleteEntitiesWithCompositeMapReference() throws Exception {\n AtlasEntity.AtlasEntityWithExtInfo entityDefinition = createMapOwnerAndValueEntities();\n String mapOwnerGuid = entityDefinition.getEntity().getGuid();\n\n // Verify MapOwner.map attribute has expected value.\n AtlasEntity.AtlasEntityWithExtInfo mapOwnerInstance = entityStore.getById(mapOwnerGuid);\n Object object = mapOwnerInstance.getEntity().getAttribute(\"map\");\n Assert.assertNotNull(object);\n Assert.assertTrue(object instanceof Map);\n Map<String, AtlasObjectId> map = (Map<String, AtlasObjectId>)object;\n Assert.assertEquals(map.size(), 1);\n AtlasObjectId mapValueInstance = map.get(\"value1\");\n Assert.assertNotNull(mapValueInstance);\n String mapValueGuid = mapValueInstance.getGuid();\n String edgeLabel = AtlasGraphUtilsV1.getAttributeEdgeLabel(compositeMapOwnerType, \"map\");\n String mapEntryLabel = edgeLabel + \".\" + \"value1\";\n AtlasEdgeLabel atlasEdgeLabel = new AtlasEdgeLabel(mapEntryLabel);\n AtlasVertex mapOwnerVertex = GraphHelper.getInstance().getVertexForGUID(mapOwnerGuid);\n object = mapOwnerVertex.getProperty(atlasEdgeLabel.getQualifiedMapKey(), Object.class);\n Assert.assertNotNull(object);\n\n init();\n List<AtlasEntityHeader> deletedEntities = entityStore.deleteById(mapOwnerGuid).getDeletedEntities();\n Assert.assertEquals(deletedEntities.size(), 2);\n Assert.assertTrue(extractGuids(deletedEntities).contains(mapOwnerGuid));\n Assert.assertTrue(extractGuids(deletedEntities).contains(mapValueGuid));\n\n assertEntityDeleted(mapOwnerGuid);\n assertEntityDeleted(mapValueGuid);\n }",
"protected void doDeleteBoth() {\r\n\t\tif (renderer.surface != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.basemap, renderer.selectedRectangle, false);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, renderer.selectedRectangle, true);\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}",
"void clearLocalCache(final TCServerMap map);",
"@Override\n\tpublic int deleteById(HashMap<String, Object> hashmap) throws Exception {\n\t\treturn tGuideInfoCustomMapper.deleteById(hashmap);\n\t}",
"public void clearMap() {\n\t\tfor (int i = 0; i < parkingsArray.size(); i++)\n\t\t\tparkingsArray.valueAt(i).removeMarker();\n\t\tparkingsArray.clear();\n\t\tmap.clear();\n\t}",
"public void eraseOnClick(View view){\n mMap.clear();//clears the map\r\n points = new ArrayList<LatLng>();//resets the markers holder\r\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n\n mMap.onDestroy();\n }",
"public void remove(MapView mapView){\n\t\tmapView.getOverlays().remove(this);\n\t}",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000002);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"void updateMap(MapData map);",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000010);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000008);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000008);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000008);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public void removeOverlayObj(String layer, IOverlay a)\n/* 190: */ {\n/* 191:268 */ this.mapPanel.removeOverlayObj(layer, a);\n/* 192: */ }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000004);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000004);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000400);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n gMap.clear();\n }",
"@Override\n\tpublic void delete(Map<String, Object> arg0) {\n\t\t\n\t}",
"public void clearAppMapCache(String mapname){\n\t\tApplicationMap map = getAppMap(mapname);\n\t\tif (map instanceof ApplicationMap){\n\t\t\tmap.clearMap();\n\t\t}\n\t}",
"protected void doDeleteBuilding() {\r\n\t\tif (renderer.surface != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, renderer.selectedRectangle, true);\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}",
"public void removeAllAgents(String layer)\n/* 180: */ {\n/* 181:254 */ this.mapPanel.removeAllAgents(layer);\n/* 182: */ }",
"@Override\r\n\tpublic boolean deleteAddress(Map<String, String> address) {\n\t\treturn ado.deleteAddress(address);\r\n\t}",
"@Test\n public void testDelete() throws Exception {\n map.set(\"key-1\", \"value-1\", 10);\n \n Assert.assertEquals(map.get(\"key-1\"), \"value-1\");\n \n Assert.assertTrue(map.delete(\"key-1\", 0));\n \n Assert.assertNull(map.get(\"key-1\"));\n \n Assert.assertFalse(map.delete(\"no-set-key\", 0));\n }",
"@ZAttr(id=153)\n public Map<String,Object> removeGalLdapAttrMap(String zimbraGalLdapAttrMap, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"-\" + Provisioning.A_zimbraGalLdapAttrMap, zimbraGalLdapAttrMap);\n return attrs;\n }",
"@Override\r\n void removeStarMap(StarMapComponent starMap) {\n\r\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (mMapView != null) {\n\t\t\tmMapView.onDestroy();\n\t\t\tmMapView = null;\n\t\t}\n\t\tif (aMap != null) {\n\t\t\taMap.clear();\n\t\t\taMap = null;\n\t\t}\n\t}",
"public void clear()\n\t{\n\t\tthrow new UnsupportedOperationException(\"Read Only Map\");\n\t}",
"@Override\n\tpublic String delete(Map<String, Object> entityMap)\n\t\t\tthrows DataAccessException {\n\t\treturn null;\n\t}",
"public void clearAllAppMapCaches(){\n\t\tappmaps.clear();\n\t}",
"void deleteEntitiesOf(Map<Location, SurfaceEntity> map, Rectangle rect, boolean checkBuildings) {\r\n\t\t// find buildings falling into the selection box\r\n\t\tif (rect != null) {\r\n\t\t\tBuilding bld = null;\r\n\t\t\tfor (int a = rect.x; a < rect.x + rect.width; a++) {\r\n\t\t\t\tfor (int b = rect.y; b > rect.y - rect.height; b--) {\r\n\t\t\t\t\tSurfaceEntity se = map.get(Location.of(a, b));\r\n\t\t\t\t\tif (se != null) {\r\n\t\t\t\t\t\tint x = a - se.virtualColumn;\r\n\t\t\t\t\t\tint y = b + se.virtualRow;\r\n\t\t\t\t\t\tfor (int x0 = x; x0 < x + se.tile.width; x0++) {\r\n\t\t\t\t\t\t\tfor (int y0 = y; y0 > y - se.tile.height; y0--) {\r\n\t\t\t\t\t\t\t\tmap.remove(Location.of(x0, y0));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (checkBuildings) {\r\n\t\t\t\t\t\tfor (int i = renderer.surface.buildings.size() - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tbld = renderer.surface.buildings.get(i);\r\n\t\t\t\t\t\t\tif (bld.containsLocation(a, b)) {\r\n\t\t\t\t\t\t\t\trenderer.surface.buildings.remove(i);\r\n\t\t\t\t\t\t\t\tif (bld == currentBuilding) {\r\n\t\t\t\t\t\t\t\t\trenderer.buildingBox = null;\r\n\t\t\t\t\t\t\t\t\tcurrentBuilding = null;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int i = renderer.surface.features.size() - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tSurfaceFeature sf = renderer.surface.features.get(i);\r\n\t\t\t\t\t\t\tif (sf.containsLocation(a, b)) {\r\n\t\t\t\t\t\t\t\trenderer.surface.features.remove(i);\r\n\t\t\t\t\t\t\t\tif (sf.equals(currentBaseTile)) {\r\n\t\t\t\t\t\t\t\t\tcurrentBaseTile = null;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (checkBuildings && bld != null) {\r\n\t\t\t\tplaceRoads(bld.techId);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@After\n public void tearDown() {\n mapModel = null;\n }",
"@Override\r\n\tpublic void deleteLeftmenu(Map<String, Object> map) throws Exception {\n\t\tleftmenuDAO.deleteLeftmenu(map);\r\n\t}",
"public void saveMap(){\n dataBase.updateMap(level);\n }",
"public void removeOverlayObj(IOverlay a)\n/* 96: */ {\n/* 97:153 */ this.mapPanel.removeOverlayObj(a);\n/* 98: */ }",
"@Override\n\tpublic JSONArray delPinzxx(Map<String, Object> map) {\n\t\tint result = 0;\n\t\ttry{\n\t\t\tresult = pinzDao.delPinzxx(map);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tJSONArray jsonArray = new JSONArray();\n\t\tjsonArray.add(result);\n\t\treturn jsonArray;\n\t}",
"public void loadMap() {\n\t\tchests.clear();\r\n\t\t// Load the chests for the map\r\n\t\tchestsLoaded = false;\r\n\t\t// Load data asynchronously\r\n\t\tg.p.getServer().getScheduler().runTaskAsynchronously(g.p, new AsyncLoad());\r\n\t}",
"private <TRes> void removeResource( \n\t\tMap<String,TRes> mapUri, String uri)\n\t{\n\t\tmapUri.remove(uri);\n\t}",
"private void assertMapIsNotPublished(String mapId) throws IOException {\n Map map = engine.maps().get(mapId).execute();\n if (map.getVersions().contains(\"published\")) {\n throw new AssertionError(\"Map ID \" + mapId + \" is published, \"\n + \"please un-publish before deleting.\");\n }\n }",
"@Override\n\tpublic boolean clear() \n\t{\n\t\tthis.map.clear();\n\t\treturn true;\n\t}",
"public void deselectAll()\n {\n map.deselectAll();\n mapComponent.repaint();\n mapper.resetMenus();\n }",
"public void removeLayer(Editor layerEditor) {\n\n layers.remove(layerEditor);\n\n for (Map.Entry<Editor, HashMap<Editor, LayerPanel>> entry : layers.entrySet()) {\n\n LayerPanel layer = entry.getValue().get(layerEditor);\n entry.getKey().remove(layer);\n }\n }",
"public boolean deleteClntMapInfo (java.lang.String opr_cde, \n java.lang.String user_id, \n java.lang.String clnt_cde, \n java.lang.String clnt_agt_flg) throws com.mcip.orb.CoException {\n return this._delegate.deleteClntMapInfo(opr_cde, user_id, clnt_cde, clnt_agt_flg);\n }",
"public static void removeAvailable(int mapID) {\r\n\t\tmapAvailable.remove(mapAvailable.indexOf(mapID));\r\n\t}",
"public void removeAllChildMaps()\n {\n checkState();\n super.removeAllChildMaps();\n }",
"public void removeMarkerFromMap(Marker marker){\n marker.remove();\n removeMarkerFromPref(marker);\n }",
"public void remove(\n\t\t\tMapNode\tmapNode)\n\t\t{\n\t\t\tindices.remove(mapNode);\n\t\t}",
"public void removeMapAdvice(MapAdvice mapAdvice);",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n mMapView.onDestroy();\n }",
"private void deleteTable(String tableId) throws IOException {\n LOG.info(\"Finding layers belonging to table.\");\n ParentsListResponse tableParents = engine.tables().parents().list(tableId).execute();\n LOG.info(\"Layers retrieved.\");\n\n // Collect the layer IDs to ensure we can safely delete maps.\n Set<String> allLayerIds = new HashSet<String>();\n for (Parent tableParent : tableParents.getParents()) {\n allLayerIds.add(tableParent.getId());\n }\n\n // We need to delete layers before we can delete the table.\n deleteLayers(allLayerIds);\n\n LOG.info(\"Deleting table.\");\n engine.tables().delete(tableId).execute();\n LOG.info(\"Table deleted.\");\n\n }",
"@Override\n\tpublic void clear() {\n\t\tmap.clear();\n\t\tkeys.clear();\n\t}",
"@Override\n protected void onDestroy() {\n mapView.onDestroy();\n super.onDestroy();\n }",
"@Override\r\n\tpublic void perform() {\n\t\tview.removeMapMonster(toremove);\r\n\t}",
"private void close(){\n\t\tMain.enableWorldMap();\n\t\tdispose();\n\t}",
"public void indexMap(LWMap map) {\n vueComponentMap.clear();\n removeAll();\n indexAdd(map);\n }",
"@Override\n\tpublic String deleteMatStoreEmpSet(Map<String, Object> entityMap)\n\t\t\tthrows DataAccessException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic int deleteFeesByMap(Map<String, Object> condition) {\n\t\treturn delete(\"com.jiuyescm.bms.fees.out.dispatch.mapper.FeesPayDispatchMapper.deleteFeesByMap\", condition);\n\t}",
"public void removeAgentServiceLocationMapping(long id);",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng clickedPoint) {\n\n CircleOptions circleOptions = new CircleOptions()\n .center(clickedPoint)\n .zIndex(20)\n .radius(1)\n .fillColor(Color.CYAN)\n .strokeColor(Color.TRANSPARENT);\n\n switch (mCrowdStates)\n {\n case NO_POINTS_SELECTED:\n c1 = mMap.addCircle(circleOptions);\n mCrowdStates = crowdStates.ONE_POINT_SELECTED;\n buttonDelete.setEnabled(true);\n break;\n case ONE_POINT_SELECTED:\n c2 = mMap.addCircle(circleOptions);\n mCrowdStates = crowdStates.TWO_POINTS_SELECTED;\n\n PolygonOptions polygonOptions = new PolygonOptions()\n .add(\n c1.getCenter() //NW C1.latlng\n , new LatLng(c1.getCenter().latitude, c2.getCenter().longitude) //NE C1.lat C2.lon\n , c2.getCenter() //SE C2.latlon\n , new LatLng(c2.getCenter().latitude, c1.getCenter().longitude)) //SW C2.lat C1.lon\n .fillColor(Color.TRANSPARENT)\n .strokeColor(Color.RED);\n\n crowdPolygone = mMap.addPolygon(polygonOptions);\n textViewInfo.setText(\"Crowd Defined!\\n Save or Delete the Crowd\");\n buttonSave.setEnabled(true);\n buttonDrawPixels.setEnabled(true);\n break;\n case TWO_POINTS_SELECTED:\n\n break;\n }\n }\n });\n }",
"public void clear() {\r\n\t\tentryMap.clear();\r\n\t}",
"public static boolean delete(String name) {\n\t\ttry {\n\t\t\tdeleteDirectory(new File(\"save/\" + name));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\tSystem.out.println(\"[Info] Map \" + name + \" deleted\");\n\t\treturn true;\n\t}",
"@Override\n\tpublic void delete(Iterable<? extends Map<String, Object>> arg0) {\n\t\t\n\t}",
"public static void deleteTempMapset() {\r\n if ((getGrassMapsetFolder() != null) && (getGrassMapsetFolder().length() > 2)) {\r\n String tmpFolder;\r\n tmpFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));\r\n if (new File(tmpFolder).exists()) {\r\n deleteDirectory(new File(tmpFolder));\r\n }\r\n }\r\n }",
"@Override\r\n public void EditMap() throws Exception {\r\n printInvalidCommandMessage();\r\n }",
"@Override\n\tpublic void removeUser(String username, Map<String, User> map) {\n\t\tuserdata.open();\n\t\tuserdata.deleteUser(map.get(username));\n\t\tuserdata.close();\n\t}",
"@Override\r\n protected void onDestroy() {\n super.onDestroy();\r\n mapview.onDestroy();\r\n }"
]
| [
"0.6778915",
"0.6710368",
"0.6482955",
"0.64687425",
"0.6454725",
"0.64096844",
"0.6358477",
"0.6334626",
"0.6325016",
"0.6320187",
"0.6266329",
"0.62392485",
"0.62114006",
"0.6205917",
"0.6205576",
"0.6201601",
"0.61984986",
"0.61795086",
"0.6166555",
"0.6158844",
"0.6158719",
"0.61527544",
"0.61479723",
"0.611274",
"0.60340846",
"0.5986512",
"0.5974342",
"0.5954027",
"0.5889958",
"0.5838752",
"0.5825633",
"0.58218604",
"0.57815635",
"0.5768706",
"0.57554805",
"0.5747845",
"0.57272035",
"0.5717812",
"0.56998575",
"0.5696036",
"0.5696036",
"0.56949615",
"0.5680188",
"0.5680188",
"0.56783307",
"0.56783307",
"0.56783307",
"0.56748927",
"0.56748176",
"0.56748176",
"0.5671773",
"0.56341416",
"0.559957",
"0.5577347",
"0.5567635",
"0.5566696",
"0.5565716",
"0.5562291",
"0.55597705",
"0.5550134",
"0.5540705",
"0.5521193",
"0.5500029",
"0.5484307",
"0.5472888",
"0.5465535",
"0.54651207",
"0.5457765",
"0.5439397",
"0.54334164",
"0.53994465",
"0.5397173",
"0.5393491",
"0.53884375",
"0.5386133",
"0.5383754",
"0.5369056",
"0.53626204",
"0.53613186",
"0.5354089",
"0.53524935",
"0.53506196",
"0.53504604",
"0.5346886",
"0.5345943",
"0.5343761",
"0.5324079",
"0.53092045",
"0.52846515",
"0.5277798",
"0.52766263",
"0.5264174",
"0.5257165",
"0.5243051",
"0.52238137",
"0.52214175",
"0.5215516",
"0.52089715",
"0.5206695",
"0.520034"
]
| 0.7617725 | 0 |
Ensures that a layer is not published. Useful to test before deleting. | private void assertLayerIsNotPublished(String layerId) throws IOException {
boolean publishedVersionExists;
try {
engine.layers().get(layerId).setVersion("published").execute();
publishedVersionExists = true;
} catch (GoogleJsonResponseException ex) {
// The API failed to retrieve a published version.
publishedVersionExists = false;
}
if (publishedVersionExists) {
throw new AssertionError("Layer ID " + layerId + " is published, "
+ "please un-publish before deleting.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void assertMapIsNotPublished(String mapId) throws IOException {\n Map map = engine.maps().get(mapId).execute();\n if (map.getVersions().contains(\"published\")) {\n throw new AssertionError(\"Map ID \" + mapId + \" is published, \"\n + \"please un-publish before deleting.\");\n }\n }",
"private void layerMustExist(String layerName)\r\n\t\t\tthrows IllegalArgumentException {\r\n\t\tif (!this.layerVariables.containsKey(layerName))\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\tlayerName\r\n\t\t\t\t\t\t\t+ \" does not exist in the specified DomainKnowledge instance. \"\r\n\t\t\t\t\t\t\t+ \"Use addLayer to add a new layer.\");\r\n\t}",
"@Test\n public void testNotDeployedStateNotDeployedService() {\n cleanUp();\n\n State notDeployed = makeState(2L, \"State 2\");\n\n assertFalse(propertyService.isServiceDeployedInState(Service.MOBILE_ACADEMY, notDeployed));\n }",
"public boolean isLayerBlocked() {\r\n return this.viterNodeList.isEmpty();\r\n }",
"@Test\n public void testDeployedStateNotDeployedService() {\n cleanUp();\n\n State state = makeState(1L, \"State 1\");\n deployedServiceDataService.create(new DeployedService(state, Service.MOBILE_ACADEMY));\n\n assertFalse(propertyService.isServiceDeployedInState(Service.KILKARI, state));\n }",
"@Test\n public void testNotDeployedStateDeployedService() {\n cleanUp();\n\n State deployed = makeState(1L, \"State 1\");\n deployedServiceDataService.create(new DeployedService(deployed, Service.MOBILE_ACADEMY));\n\n State notDeployed = makeState(2L, \"State 2\");\n\n assertFalse(propertyService.isServiceDeployedInState(Service.MOBILE_ACADEMY, notDeployed));\n }",
"public void verifyNoPendingNotification() {\n\t\twait.waitForLoaderToDisappear();\n\t\tAssert.assertFalse(notificationPresent(), \"Assertion Failed: There are pending notifications on the side bar\");\n\t\tlogMessage(\"Assertion Passed: There are no pending notifications on the side bar\");\n\t}",
"private void assertRemoved()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttestController.getContentTypeDefinitionVOWithId(testDefinition.getId());\n\t\t\tfail(\"The ContentTypeDefinition was not deleted\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{ /* expected */ }\n\t}",
"boolean isIgnorable() { return false; }",
"protected static boolean canUnPublish(SlingHttpServletRequest request) throws RepositoryException {\n boolean canUnPublish = false;\n Session session = request.getResourceResolver().adaptTo(Session.class);\n UserManager userManager = AccessControlUtil.getUserManager(session);\n Iterator<Group> groupIterator = userManager.getAuthorizable(session.getUserID()).memberOf();\n while (groupIterator.hasNext()) {\n Authorizable group = groupIterator.next();\n if (group.isGroup() && PantheonConstants.PANTHEON_PUBLISHERS.equalsIgnoreCase(group.getID())) {\n canUnPublish = true;\n break;\n }\n }\n return canUnPublish;\n }",
"public boolean hasLayers() {\n\t\treturn false;\n\t}",
"@SuppressWarnings(\"SameReturnValue\")\n public boolean checkInvariant() {\n if (layerList.isEmpty()) {\n throw new IllegalStateException(\"no layer in \" + getName());\n }\n if (activeLayer == null) {\n throw new IllegalStateException(\"no active layer in \" + getName());\n }\n if (!layerList.contains(activeLayer)) {\n throw new IllegalStateException(\"active layer (\" + activeLayer.getName() + \") not in list (\" + layerList.toString() + \")\");\n }\n return true;\n }",
"private boolean noVacancy() {\r\n\t\t\treturn removed = false;\r\n\t\t}",
"public boolean hasLayer(OsmDataLayer layer) {\n\t\treturn false;\n\t}",
"@Test\n public void testIsValidonNotConnectedMap() {\n mapModel.removeLink(\"TerritoryD\", \"TerritoryC\");\n\n boolean expResult = false;\n boolean result = mapModel.isValid();\n assertEquals(expResult, result);\n }",
"@Test\n\tvoid cannotPurchase() {\n\t\ttestCrew.setMoney(0);\n\t\titemList.get(0).purchase(testCrew);\n\t\tassertEquals(testCrew.getMoney(), 0);\n\t\tassertTrue(testCrew.getMedicalItems().isEmpty());\n\t}",
"private void assertStreamItemViewNotFocusable() {\n assertNotNull(\"should have a stream item\", mView);\n assertFalse(\"should not be focusable\", mView.isFocusable());\n }",
"public Layer ensureLayer(String name) {\n if (hasLayer(name))\n return getLayer(name);\n return new Layer(this, name);\n }",
"public synchronized boolean hasDraftsFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mDraftsFolderName);\n }",
"@Test\n\tpublic void shouldNotCreateBoardCollection() {\n\t\tBDDMockito.given(mongoOperations.collectionExists(Board.class)).willReturn(true);\n\t\t\n\t\t// when service.configure() is invoked\n\t\tservice.configure();\n\t\t\n\t\t// then the board collection should be created\n\t\tMockito.verify(mongoOperations, Mockito.times(0)).createCollection(Board.class);\n\t}",
"@Test\n public void testDeleteLayer() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n instance.deleteLayer(2);\n assertEquals(instance.getVxQueryCollection().getHighestQueryIndex(), 3);\n\n }",
"public void addLayerNoGUI(Layer newLayer) {\n layerList.add(newLayer);\n }",
"@Test\n\tpublic void withInvalidCategory() {\n\t\tboolean delete = false;\n\t\ttry {\n\t\t\tdelete = FlowerManager.deleteFlower(\"christina\", \"rose\");\n\t\t} catch (ServiceException e) {\n\n\t\t\te.printStackTrace();\n\t\t\tassertFalse(delete);\n\t\t}\n\t}",
"public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }",
"public void notDestroyable()\n\t{\n\t\tdestroyable = false;\n\t}",
"@Override\n public boolean isValid() {\n return isAdded() && !isDetached();\n }",
"@Test\n\tpublic void testPublishQuestionWithNoCategory() {\n\t\texternalLogicStub.currentUserId = USER_LOC_3_UPDATE_1;\n\t\t\n\t\tQnaQuestion question = questionLogic.getQuestionById(tdp.question1_location3.getId());\n\t\tquestion.setCategory(null);\n\t\tquestionLogic.saveQuestion(question, LOCATION3_ID);\n\t\tAssert.assertFalse(question.isPublished());\n\t\tAssert.assertNull(question.getCategory());\n\n\t\ttry {\n\t\t\tquestionLogic.publishQuestion(question.getId(), LOCATION3_ID);\n\t\t\tAssert.fail(\"Should have thrown QnaConfigurationException\");\n\t\t} catch (QnaConfigurationException qne) {\n\t\t\tAssert.assertNotNull(qne);\n\t\t}\n\t}",
"private void checkNoStatus(IgniteEx n, String cacheName) throws Exception {\n assertNull(statuses(n).get(cacheName));\n assertNull(metaStorageOperation(n, metaStorage -> metaStorage.read(KEY_PREFIX + cacheName)));\n assertTrue(indexBuildStatusStorage(n).rebuildCompleted(cacheName));\n }",
"@Test\n public void collectionTaskInTheWorkScopeOfCommittedWPDisabled() throws Exception {\n\n // Given a work package with Collection Required boolean set to TRUE\n final TaskKey lWorkPackage = createWorkPackage();\n\n schedule( lWorkPackage, false );\n\n SchedStaskTable lStaskTable = InjectorContainer.get().getInstance( SchedStaskDao.class )\n .findByPrimaryKey( lWorkPackage );\n\n // Then Collection Required param of work package set to FALSE\n assertFalse( lStaskTable.isCollectionRequiredBool() );\n }",
"boolean isLayerPublished(Class<? extends LayerInterface> layerClass, String implName);",
"protected void handleMissingTile(OsmTile t, int layer) {\n\t\ttryAutoDownload();\n\t}",
"public void unsetWasNotGiven()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WASNOTGIVEN$4, 0);\n }\n }",
"private void assertStreamItemViewHasNoTag() {\n Object tag = mView.getTag();\n assertNull(\"should not have a tag\", tag);\n }",
"private boolean isPublishAsDownOnStartup(CloudDescriptor cloudDesc) {\n Replica replica =\n zkStateReader\n .getClusterState()\n .getCollection(cloudDesc.getCollectionName())\n .getSlice(cloudDesc.getShardId())\n .getReplica(cloudDesc.getCoreNodeName());\n return !replica.getNodeName().equals(getNodeName());\n }",
"public boolean isDeployed(){\n return !places.isEmpty();\n }",
"protected abstract void checkRemoved();",
"public void removeDefaultLayerIfUnused() {\n Long defaultRootMarkupId = documentDTO.textGraph.getLayerRootMap().get(DEFAULT_LAYER);\n if (defaultRootMarkupId != null) {\n boolean defaultLayerIsUnused =\n documentDTO.textGraph.getOutgoingEdges(defaultRootMarkupId).stream()\n .noneMatch(this::isInDefaultLayer);\n if (defaultLayerIsUnused) {\n documentDTO.textGraph.getLayerRootMap().remove(DEFAULT_LAYER);\n TAGMarkup markup = store.getMarkup(defaultRootMarkupId);\n markup.getLayers().remove(DEFAULT_LAYER);\n store.persist(markup.getDTO());\n update();\n }\n }\n }",
"public boolean isNotPresent() {\n checkNotUnknown();\n return !isMaybePresent();\n }",
"public static MozuUrl discardDraftsUrl()\r\n\t{\r\n\t\tUrlFormatter formatter = new UrlFormatter(\"/api/commerce/catalog/admin/publishing/discarddrafts\");\r\n\t\treturn new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;\r\n\t}",
"public void assertNotInState(T forbidden) {\n synchronized (this) {\n if (state == forbidden) {\n throw new IllegalStateException(\"Should not be in state \" + forbidden + \".\");\n }\n }\n }",
"@Transactional(onUnits = {})\n public void assertNoEntityHasBeenPersisted() {\n checkState(!storedEntities.isEmpty(), \"no entities to check\");\n for (TestEntity storedEntity : storedEntities) {\n assertNull(\"At least one entity which should NOT have been persisted was found in the DB. \" + tasks,\n emProvider.get()\n .find(TestEntity.class, storedEntity.getId()));\n }\n }",
"@Test\n public void testRequireOnFalseConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, false);\n\n // If internal call was not SUCCESS then redirect gets a REVERT as well.\n assertTrue(result.transactionStatus.isReverted());\n }",
"@Override\n public boolean isOrphanRemoval(ManagedType<?> ownerType, String elementCollectionPath, String attributeName) {\n return false;\n }",
"public void isDeceased(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }",
"public boolean isActiveLayerVisible() {\n\t\treturn false;\n\t}",
"private void checkIfDestroyed() throws ResourceException {\n if (destroyed) {\n throw new IllegalStateException(\n resource.getString(\"DESTROYED_CONNECTION\"));\n }\n }",
"@DISPID(1611006052) //= 0x60060064. The runtime will prefer the VTID if present\n @VTID(128)\n void linkedExternalReferencesOnlyOnPublication(\n boolean oOnlyForPublishedElements);",
"@Test\n public void testDeselectAll() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n instance.createLayer();\n instance.getVxQueryCollection().setVisibilityOnAll(true);\n instance.getTxQueryCollection().setVisibilityOnAll(true);\n\n instance.deselectAll();\n assertEquals(instance.getVxQueryCollection().isVisibilityOnAll(), false);\n }",
"private void foundNonExistent() {\n\t\tstate = BridgeState.NON_EXISTENT;\n\t}",
"boolean ignoreExternal();",
"public boolean isIgnorable()\n {\n return m_ignore;\n }",
"public boolean isNotPersisted() {\n return notPersisted;\n }",
"private void assertStreamItemViewHasNoOnClickListener() {\n assertFalse(\"listener should have not been invoked yet\", mListener.clicked);\n mView.performClick();\n assertFalse(\"listener should have not been invoked\", mListener.clicked);\n }",
"public void testUndock() {\n try {\n container.undock(null);\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }",
"public static boolean isExcluded(RenderLayer layer) {\n\t\treturn layer.getDrawMode() != DrawMode.QUADS || EXCLUSIONS.contains(layer);\n\t}",
"public void reportNothingToUndoYet() {\r\n Assert.isTrue(isReceiving());\r\n setNothingToUndoReported(true);\r\n }",
"private static void checkNotAlreadyBuilt(ImageModule image,\n\t\t\tString cloudServiceName) throws ValidationException {\n\t\tif (image.getCloudImageIdentifier(cloudServiceName) != null) {\n\t\t\tthrow new ValidationException(\n\t\t\t\t\t\"This image was already built for cloud: \"\n\t\t\t\t\t\t\t+ cloudServiceName);\n\t\t}\n\t}",
"public boolean isEmpty() {\n return vertexLayer.isEmpty();\n }",
"public boolean isExternal()\n {\n return false;\n }",
"@Override\r\n\tpublic boolean checkBudget() {\n\t\treturn false;\r\n\t}",
"public boolean _non_existent() {\n return false;\n }",
"protected boolean shouldPublish(AbstractBuild<?, ?> build) {\n return isFailureOrRecovery(build);\n }",
"@Test\n public void shouldCreateEmptyContractWithoutPreconditions() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertTrue(\"The empty contract has unknown preconditions!\", contract.preconditions().length == 0);\n Assert.assertTrue(\"The empty contract has unknown postconditions!\", contract.postconditions().length == 0);\n Assert.assertEquals(\"The created contract has the wrong annotation type!\", contract.annotationType(),\n Contract.class);\n }",
"public boolean isImageNotPresent() {\n if (addingItem) {\n if (picturePath == null) {\n if (makeImageMandatory) {\n return true;\n //true creates toast\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n }",
"void unpublish() {\n pendingOps.decrementAndGet();\n }",
"public void verifyContractNotExistByName(int chainId, int groupId, String name, String path) {\n TbContract contract = tbContractMapper.getContract(chainId, groupId, name, path);\n if (Objects.nonNull(contract)) {\n log.warn(\"contract is exist. groupId:{} name:{} path:{}\", groupId, name, path);\n throw new BaseException(ConstantCode.CONTRACT_EXISTS);\n }\n }",
"public boolean hasTopic() {\r\n return false;\r\n }",
"protected void layerWasSelected (int layer)\n {\n _removeLayerAction.setEnabled(layer != 0);\n fireStateChanged();\n }",
"@Test\n @IgnoreWhen(hasCapabilities = Capabilities.COLLECTIONS, clusterTypes = ClusterType.MOCKED)\n void failsIfCollectionsNotSupported() {\n assertThrows(FeatureNotAvailableException.class, () -> collections.getAllScopes());\n assertThrows(FeatureNotAvailableException.class, () -> collections.createScope(\"foo\"));\n assertThrows(FeatureNotAvailableException.class, () -> collections.dropScope(\"foo\"));\n assertThrows(\n FeatureNotAvailableException.class,\n () -> collections.dropCollection(CollectionSpec.create(\"foo\", \"bar\"))\n );\n assertThrows(\n FeatureNotAvailableException.class,\n () -> collections.createCollection(CollectionSpec.create(\"foo\", \"bar\"))\n );\n }",
"public boolean isDropped(){\r\n\t\treturn getDirectHolder() == World.world;\r\n\t}",
"public boolean shouldRemove() {\r\n\t\treturn death;\r\n\t}",
"@Override\n public boolean neverAttach() {\n return true;\n }",
"@Test\n public void testChangeLayerVisibility() {\n LayersViewController instance = LayersViewController.getDefault().init(null);\n instance.createLayer();\n int index1 = 2;\n Query query1 = new Query(GraphElementType.VERTEX, \"Type == 'Event'\");\n instance.getVxQueryCollection().getQuery(index1).setQuery(query1);\n instance.getTxQueryCollection().getQuery(index1).setQuery(null);\n\n instance.changeLayerVisibility(index1, true);\n assertTrue(instance.getVxQueryCollection().getQuery(index1).isVisible());\n\n instance.createLayer();\n int index2 = 3;\n Query query2 = new Query(GraphElementType.TRANSACTION, \"Type == 'Network'\");\n instance.getTxQueryCollection().getQuery(index2).setQuery(query2);\n instance.getVxQueryCollection().getQuery(index2).setQuery(null);\n\n instance.changeLayerVisibility(index2, true);\n assertTrue(instance.getTxQueryCollection().getQuery(index2).isVisible());\n }",
"@Test\n\tpublic void testNotRestricted() throws Exception {\n\t\titemService.findById(1L);\n\t}",
"@Test\n public void orgApacheFelixEventadminIgnoreTopicTest() {\n // TODO: test orgApacheFelixEventadminIgnoreTopic\n }",
"@Override\r\n\tpublic boolean isPublished() {\r\n\t\treturn super.isPublished();\r\n\t}",
"default Optional<Boolean> isPubliclyReleasable() {\n return Optional.empty();\n }",
"boolean isFrozen();",
"boolean isFrozen();",
"public boolean checkVisibility() {\n LocalDateTime now = LocalDateTime.now();\n return (this.viewer != 0 && !now.isAfter(this.destructTime));\n }",
"public void testNotApply() {\n\t\tthis.recordReturn(this.one, this.one.canApply(), true);\n\t\tthis.recordReturn(this.two, this.two.canApply(), false);\n\t\tthis.replayMockObjects();\n\t\tassertFalse(\"Should not be able to apply if one change can not be applied\", this.aggregate.canApply());\n\t\tthis.verifyMockObjects();\n\t}",
"private void assertNoUnloppedLCVol2(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, lcVol2Shelfkey);\n\t}",
"@Override\r\n\tpublic void testPrivateWithNoViewPrivateScope() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testPrivateWithNoViewPrivateScope();\r\n\t\t}\r\n\t}",
"@Test\n public void markConversationUnhidden() {\n String participantName = \"participant1\";\n\n Conversation original = new Conversation();\n original.setId(1L);\n original.setHideConversation(true);\n original.setParticipant(participantName);\n original.setBlog(MAIN_BLOG_NAME);\n\n original = restController.createConversationForBlog(MAIN_BLOG_NAME, original);\n assertThat(original).isNotNull();\n\n Conversation newConvo = restController.unignoreConversationForBlog(MAIN_BLOG_NAME, participantName);\n assertThat(newConvo).isNotNull();\n assertThat(newConvo.getHideConversation()).isEqualTo(false);\n\n Conversation finalConvo = restController.getConversationForBlogByParticipant(MAIN_BLOG_NAME, participantName);\n assertThat(finalConvo).isNotNull();\n assertThat(finalConvo.getHideConversation()).isEqualTo(false);\n }",
"public boolean hasUnsavedParts() { return (bSave != null ? bSave.isEnabled() : false); }",
"@Test\n\tpublic void testRemovedWPtoWS() {\n\t\tWorkPackage wp = new WorkPackage(null);\n\t\tWorkSpace ws = new WorkSpace(null);\n\t\tws.addWP(wp);\n\t\tAssert.assertTrue(ws.removeWP(wp));\n\t\tAssert.assertTrue(ws.getWpList().size()==0);\n\t}",
"@Test\n @Transactional\n @Ignore\n public void testGetSupressedOutages() {\n Collection<OnmsOutage> outages = m_outageService.getSuppressedOutages();\n assertTrue(\"Collection should be emtpy \", outages.isEmpty());\n\n }",
"private void ensureScopeNotSet() {\n if (this.instance != null) {\n binder.addError(source, ErrorMessages.SINGLE_INSTANCE_AND_SCOPE);\n return;\n }\n\n if (this.scope != null) {\n binder.addError(source, ErrorMessages.SCOPE_ALREADY_SET);\n }\n }",
"@Test\n\tpublic void withInvalidType() {\n\t\t\n\t\tboolean delete = false;\n\t\ttry {\n\t\t\tdelete = FlowerManager.deleteFlower(\"natural\", \"rose\");\n\t\t} catch (ServiceException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tassertFalse(delete);\n\t}",
"public Boolean isDraftOwner(final Artifact artifact);",
"public void setNotPersisted(boolean value) {\n this.notPersisted = value;\n }",
"public interface RemoveNeeded {\n\t/** \n\t * This method is called once the drawable is not needed.\n\t * It should remove all auxiliary objects of this drawable. \n\t */\n\tpublic void remove();\n}",
"private void unpublish() {\n Log.i(TAG, \"Unpublishing.\");\n Nearby.Messages.unpublish(mGoogleApiClient, mPubMessage);\n }",
"@Override\n public void onRemoveLayer(GPLayerBean layerBean) {\n this.removeLayer(layerBean);\n }",
"@Override\r\n\tboolean hasUnsavedChanges();",
"public boolean isDrooping() {\n return false;\n }",
"public boolean hasLayer(String name) {\n if (layers == null)\n return false;\n return layers.containsKey(name);\n }",
"boolean isTransient();",
"@Test\n\tpublic void invalidRemovePlayer_1() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tassertFalse(gameState.removePlayer(-1));\n\t}"
]
| [
"0.6771634",
"0.6162653",
"0.5673808",
"0.56642246",
"0.56100357",
"0.5541741",
"0.5493747",
"0.54407537",
"0.5430546",
"0.54151535",
"0.5399739",
"0.5389119",
"0.5363707",
"0.53552073",
"0.5353461",
"0.534288",
"0.53194773",
"0.5304415",
"0.5244521",
"0.52300334",
"0.52091265",
"0.52048063",
"0.5181048",
"0.5177717",
"0.5161268",
"0.5125167",
"0.5117081",
"0.50782126",
"0.5077065",
"0.50770164",
"0.5060154",
"0.50338024",
"0.50326866",
"0.50276524",
"0.5021421",
"0.5015225",
"0.5009298",
"0.5005496",
"0.49954703",
"0.49762926",
"0.49756253",
"0.4954118",
"0.49512103",
"0.49237016",
"0.4916876",
"0.48983803",
"0.48981777",
"0.48935676",
"0.4893267",
"0.48893118",
"0.488454",
"0.4884348",
"0.48841444",
"0.48803988",
"0.48709664",
"0.48680294",
"0.4866916",
"0.48656005",
"0.4849374",
"0.4847041",
"0.4839313",
"0.48336005",
"0.48315954",
"0.482721",
"0.48204103",
"0.48191124",
"0.48063937",
"0.48035753",
"0.48005557",
"0.4797965",
"0.47966096",
"0.47961354",
"0.47883433",
"0.47772458",
"0.47724986",
"0.4772494",
"0.47646606",
"0.47586155",
"0.47438887",
"0.47438887",
"0.47371283",
"0.47359458",
"0.4735362",
"0.47337398",
"0.47326237",
"0.4732505",
"0.47309205",
"0.47301444",
"0.47251135",
"0.47250104",
"0.47231132",
"0.4719155",
"0.4715895",
"0.47138956",
"0.47112462",
"0.47021005",
"0.47009477",
"0.46943298",
"0.46930063",
"0.46923986"
]
| 0.81647074 | 0 |
Ensures that a map is not published. Useful to test before deleting. | private void assertMapIsNotPublished(String mapId) throws IOException {
Map map = engine.maps().get(mapId).execute();
if (map.getVersions().contains("published")) {
throw new AssertionError("Map ID " + mapId + " is published, "
+ "please un-publish before deleting.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void assertLayerIsNotPublished(String layerId) throws IOException {\n boolean publishedVersionExists;\n try {\n engine.layers().get(layerId).setVersion(\"published\").execute();\n publishedVersionExists = true;\n } catch (GoogleJsonResponseException ex) {\n // The API failed to retrieve a published version.\n publishedVersionExists = false;\n }\n\n if (publishedVersionExists) {\n throw new AssertionError(\"Layer ID \" + layerId + \" is published, \"\n + \"please un-publish before deleting.\");\n }\n }",
"public void verifyMap() {\r\n // TODO: implement test to ensure that map is the same as confirmed if\r\n // its values were converted into collections.\r\n }",
"@Override\n public boolean onLocalMapNotFound() {\n // non implementato\n return false;\n }",
"private void assertNoStaleDataExistInNearCache(IMap<Integer, Integer> map) {\n Map<Integer, Integer> fromNearCache = getAllEntries(map);\n\n // 2. clear Near Cache\n ((NearCachedMapProxyImpl) map).getNearCache().clear();\n\n // 3. get all values when Near Cache is empty, these requests\n // will go directly to underlying IMap because Near Cache is empty\n Map<Integer, Integer> fromIMap = getAllEntries(map);\n\n for (int i = 0; i < ENTRY_COUNT; i++) {\n assertEquals(fromIMap.get(i), fromNearCache.get(i));\n }\n }",
"private static boolean isIgnoredByMap(Block block) {\n return block.isPenetrable() && !block.isWater() && !block.getURI().toString().equals(\"engine:unloaded\");\n }",
"@Test\n public void testIsValidonNotConnectedMap() {\n mapModel.removeLink(\"TerritoryD\", \"TerritoryC\");\n\n boolean expResult = false;\n boolean result = mapModel.isValid();\n assertEquals(expResult, result);\n }",
"private boolean checkReady() {\n if (mMap == null) {\n Toast.makeText(this, \"Map not ready!\", Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }",
"public static java.util.Map unmodifiableMap(java.util.Map arg0)\n { return null; }",
"private void checkMutability()\n\t{\n\t\tif (immutable)\n\t\t{\n\t\t\tthrow new UnsupportedOperationException(\"Map is immutable\");\n\t\t}\n\t}",
"@Override\n public void cannotRetrieveRemoteMapDetails() {\n // non implementato\n }",
"@Override\n public boolean isEmpty() {\n return map.isEmpty();\n }",
"private static void mapCheck(){\n\t\tfor(int x = 0; x < Params.world_width; x = x + 1){\n\t\t\tfor(int y = 0; y < Params.world_height; y = y + 1){\n\t\t\t\tif(map[x][y] > 1){\n\t\t\t\t\t//System.out.println(\"Encounter Missing. Position: (\" + x + \",\" + y + \").\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Test\n\tvoid testVerticesAndEdgesIntanceVariableNotNull() {\n\t\tAssertions.assertNotNull(map);\n\n\t}",
"public void verifyNoPendingNotification() {\n\t\twait.waitForLoaderToDisappear();\n\t\tAssert.assertFalse(notificationPresent(), \"Assertion Failed: There are pending notifications on the side bar\");\n\t\tlogMessage(\"Assertion Passed: There are no pending notifications on the side bar\");\n\t}",
"public void setInstanceOfMapForTesting(){\n instanceOfMap = null;\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mMap.getUiSettings().setMapToolbarEnabled(false);\n }",
"@Test\n\tvoid testIsUnique() {\n\t\tMap<String, String> testMap = new HashMap<String, String>();\n\t\ttestMap.put(\"Marty\", \"Stepp\");\n\t\ttestMap.put(\"Stuart\", \"Reges\");\n\t\tassertTrue(isUnique(testMap));\n\t\ttestMap.clear();\n\t\t\n\t\t// Test of non-unique map using two meanings of the word \"Paris\"\n\t\ttestMap.put(\"City of Light\", \"Paris\");\n\t\ttestMap.put(\"Homeric adjudicator\", \"Paris\");\n\t\tassertFalse(isUnique(testMap));\n\t}",
"@Test\r\n\tpublic void testMapValidation() {\r\n\t\tAssert.assertEquals(true,mapdata.contains(worldmap.getContinents()));\r\n\t\t\n\t\tAssert.assertEquals(true,mapdata.contains(worldmap.getTerritories()));\r\n\t}",
"public boolean isDroppedOnMap() { return dropped; }",
"@Override\n public boolean noLastMapVersion() {\n // non implementato\n return false;\n }",
"public void testInverseClearIsEmpty()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkClearMap(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }",
"private static <K, V> boolean isMapEmpty(Map<K, V> aMap) {\n for (V v : aMap.values()) {\n if (v == \"\") {\n return true;\n }\n }\n return false;\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n map = googleMap;\n\n //disable the zoom option\n map.getUiSettings().setZoomGesturesEnabled(false);\n\n //disable the scroll gesture in the minimap\n map.getUiSettings().setScrollGesturesEnabled(false);\n\n //disable the google map button\n map.getUiSettings().setMapToolbarEnabled(false);\n\n Schedule s = ScheduleManager.GetInstance().getSchedule(pos);\n MapUtils.putMapMarkersGivenScheduledAppointmentsAndSetMapZoomToThose(map,s);\n MapUtils.drawScheduleOnMap(s,map);\n }",
"private void deleteMap(Set<String> layerIdsPendingDeletion, String mapId) throws IOException {\n assertMapIsNotPublished(mapId);\n\n LOG.info(\"Checking for other layers on this map (ID: \" + mapId + \")\");\n Set<String> mapLayerIds = getLayerIdsFromMap(mapId);\n\n // Determine if this map will still have layers once we perform our delete.\n mapLayerIds.removeAll(layerIdsPendingDeletion);\n if (mapLayerIds.size() == 0) {\n // Map will not contain any more Layers when done, so delete it.\n LOG.info(\"Deleting map.\");\n engine.maps().delete(mapId).execute();\n LOG.info(\"Map deleted.\");\n } else {\n // Map will contain Layers not scheduled for deletion, so we can't continue.\n throw new IllegalStateException(\"Map \" + mapId + \" contains layers not scheduled for \"\n + \"deletion. You will need to remove them before we can delete this map.\");\n }\n }",
"@Override\n\tpublic boolean isEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"public abstract void createEmptyMap(Game game, boolean[][] landMap);",
"public abstract void createEmptyMap(Game game, boolean[][] landMap);",
"@Override\r\n public void clear() {\r\n map.clear();\r\n }",
"@Test\n\tvoid testEdgesNotNull() {\n\t\tmap.put(\"Boston\", new LinkedHashSet<String>());\n\t\tAssertions.assertNotNull(map.get(\"Boston\"));\n\n\t}",
"public boolean isEmpty( Map<?, ?> map ){\n if( map == null || map.isEmpty() ){\n return true;\n }\n return false;\n }",
"private void checkReverseMap() throws ApplicationException {\n if (reverseMap == null) {\n reverseMap = Data.makeReverseMap(networkIds);\n }\n }",
"@Override\n public void onRemoteMapNotFound() {\n // non implementato\n }",
"public void clearMap() {\n if (mMap != null) {\n mMap.clear();\n }\n }",
"@Test\n void shouldNotReturnFailureWhenActualDoesNotContainGivenEntries() {\n Target t = new Target(new HashMap<String, String>() {{\n put(\"hello\", \"world\");\n put(\"foo\", \"bar\");\n }});\n\n DefaultValidator<Target> validator = new DefaultValidator<>(Target.class);\n validator.ruleForMap(Target::getMap).doesNotContain(array(entry(\"name\", \"sean\")));\n\n ValidationResult validationResult = validator.validate(t);\n\n assertTrue(validationResult.isValid());\n }",
"private void unpublish() {\n Log.i(TAG, \"Unpublishing.\");\n Nearby.Messages.unpublish(mGoogleApiClient, mPubMessage);\n }",
"@Override\r\n\tpublic boolean hasHiddenMiniMap() {\n\t\treturn false;\r\n\t}",
"public void removeAllChildMaps()\n {\n checkState();\n super.removeAllChildMaps();\n }",
"public Map() {\n\t\t//intially empty\n\t}",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n googleMap.getUiSettings().setMapToolbarEnabled(false);\n googleMap.getUiSettings().setZoomControlsEnabled(false);\n googleMap.getUiSettings().setCompassEnabled(false);\n googleMap.setPadding(0, 0, 0, ImageCreator.dpToPx(92));\n\n mapController = new GoogleMapController(\n googleMap,\n DependencyInjection.provideSettingsStorageService());\n mapController.addListener(this);\n presenter.onViewReady();\n Log.d(TAG, \"onMapReady: \");\n }",
"public void testNormalClearIsEmpty()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkClearMap(pmf,\r\n HashMap1.class,\r\n ContainerItem.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"private boolean noVacancy() {\r\n\t\t\treturn removed = false;\r\n\t\t}",
"public final void clear() { _map.clear(); }",
"public void testPreconditions() {\n assertNotNull(\"Maps Activity is null\", mapsActivity);\n }",
"@Test\n @DisplayName(\"identity map includes entry\")\n void includesTheEntry() {\n assertThat(identityMap.entryNotPresent(id), is(false));\n }",
"public boolean isEmpty() {\n return map.isEmpty();\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"@Override\n\tpublic boolean clear() \n\t{\n\t\tthis.map.clear();\n\t\treturn true;\n\t}",
"private void skipStaleEntries()\n {\n while (this.index < keys.size() && !HashBijectiveMap.this.containsKey(keys.get(this.index)))\n this.index++;\n }",
"@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@Test\n public void test1 ()\n {\n MyMap m = new MyMap();\n assertEquals(0, m.size());\n assertNull(m.get(\"a\"));\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@Test\n public void initializeTest()\n {\n assertEquals(0, map.size());\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public void clear() {\n map.clear();\n }",
"private void setUpMapIfNeeded() {\n if (map == null) {\n map = fragMap.getMap();\n if (map != null) {\n setUpMap();\n }\n }\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n LogUtils.e(TAG, \"onMapReady..\");\n map = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n map.getUiSettings().setMyLocationButtonEnabled(false);\n map.setMyLocationEnabled(true);\n\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"@Test\n public void ensure_transient_persistent_of_user() {\n gameMapRepository.save( map );\n\n // THEN\n // map persisted?\n assertDomain( map );\n }",
"public void clear()\n\t{\n\t\tthrow new UnsupportedOperationException(\"Read Only Map\");\n\t}",
"@Override\n\tpublic boolean isEmpty() \n\t{\n\t\treturn this.map.isEmpty();\n\t}",
"public void unsetWasNotGiven()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WASNOTGIVEN$4, 0);\n }\n }",
"boolean isLiveDataAndMapsOnly();",
"public static <K, V> Reference2ObjectMap<K, V> emptyMap() {\n/* 178 */ return EMPTY_MAP;\n/* */ }",
"boolean isIgnorable() { return false; }",
"@Override\n protected void onPause(){\n super.onPause();\n if(map != null){\n map.setMyLocationEnabled(false);\n }\n }",
"private void setUpMapIfNeeded() {\n \tif (mMap == null) {\r\n \t\t//Instanciamos el objeto mMap a partir del MapFragment definido bajo el Id \"map\"\r\n \t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t// Chequeamos si se ha obtenido correctamente una referencia al objeto GoogleMap\r\n \t\tif (mMap != null) {\r\n \t\t\t// El objeto GoogleMap ha sido referenciado correctamente\r\n \t\t\t//ahora podemos manipular sus propiedades\r\n \t\t\t//Seteamos el tipo de mapa\r\n \t\t\tmMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n \t\t\t//Activamos la capa o layer MyLocation\r\n \t\t\tmMap.setMyLocationEnabled(true);\r\n \t\t\t\r\n \t\t\tAgregarPuntos();\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }",
"@Override\n /***** Sets up the map if it is possible to do so *****/\n public boolean setUpMapIfNeeded() {\n super.setUpMapIfNeeded();\n if (mMap != null) {\n //Shows history popover on marker clicks\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n showPopup(getContentFromMarker(marker), marker.getTitle());\n return true;\n }\n });\n return true;\n } else {\n return false;\n }\n }",
"@Test\n\tpublic void testIllegalMapZeroCostsTest() {\n\t\ttry {\n\t\t\tmapFactory.initializeGameState(\"./src/Mapfiles/NightlyTests/IllegalMapZeroCostsTest\", 1, rng, gs);\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Expected IllegalArgumentException\");\n\t\t} catch (IllegalArgumentException e) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfail(\"Expected IllegalArgumentException\");\n\t}",
"public boolean containsWithoutState(int key) throws SharedUtil.MapMarkerInvalidStateException\r\n\t{\n\t\t\r\n\t\treturn keeplist.containsKey(key);\r\n\t}",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public MapAssertion<K, V> containsNone(final Map<K, V> expected) {\n checkActualIsNotNull();\n checkArgumentIsNotNull(expected, \"expected\");\n checkArgumentIsNotEmpty(expected.isEmpty(), \"expected\", true);\n Set<K> actualKeys = getActual().keySet();\n for (K key : expected.keySet()) {\n if (actualKeys.contains(key) && isValuesEqual(expected, key)) {\n throw getAssertionErrorBuilder().addMessage(Messages.Fail.Actual.CONTAINS_NONE).addActual().addExpected(expected).build();\n }\n }\n return this;\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasMapID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }"
]
| [
"0.65268487",
"0.6235109",
"0.62145305",
"0.6208795",
"0.5997454",
"0.5929514",
"0.56774485",
"0.5676425",
"0.56359947",
"0.5630246",
"0.5588613",
"0.55847484",
"0.5584047",
"0.55752486",
"0.5539853",
"0.5533336",
"0.5526341",
"0.546359",
"0.54588455",
"0.5443337",
"0.54337317",
"0.5430786",
"0.54284567",
"0.5403894",
"0.5352579",
"0.5350864",
"0.5350864",
"0.5339188",
"0.5336373",
"0.5325966",
"0.53060365",
"0.52978295",
"0.5275693",
"0.52654976",
"0.5264735",
"0.5258771",
"0.5255533",
"0.5250211",
"0.5247792",
"0.52405816",
"0.5231934",
"0.5231934",
"0.5231934",
"0.5231934",
"0.5231934",
"0.5231934",
"0.5231934",
"0.5231934",
"0.5231934",
"0.5231934",
"0.5231934",
"0.5231934",
"0.5231934",
"0.52288175",
"0.5211599",
"0.52089465",
"0.5207318",
"0.5204533",
"0.52006793",
"0.52006793",
"0.51945716",
"0.51943326",
"0.51842034",
"0.5183899",
"0.51772934",
"0.51755846",
"0.5175399",
"0.5175089",
"0.5175089",
"0.5158759",
"0.51579976",
"0.51579976",
"0.51574546",
"0.5155851",
"0.51517266",
"0.5151485",
"0.51435465",
"0.5143393",
"0.5143298",
"0.5142682",
"0.51380444",
"0.51379436",
"0.51321334",
"0.51292783",
"0.5127298",
"0.5127042",
"0.5125112",
"0.5117559",
"0.51170164",
"0.51163495",
"0.51115537",
"0.51093477",
"0.5107956",
"0.5106673",
"0.5098873",
"0.5098873",
"0.5098238",
"0.5096281",
"0.5096281",
"0.5096281"
]
| 0.8571599 | 0 |
Finds all layers attached to a map. | private Set<String> getLayerIdsFromMap(String mapId) throws IOException {
// Retrieve the map.
Map map = engine.maps().get(mapId).execute();
// Find the layers
Set<String> layerIds = new HashSet<String>();
List<MapItem> mapContents = map.getContents();
while (mapContents != null && mapContents.size() > 0) {
MapItem item = mapContents.remove(0);
if (item instanceof MapLayer) {
layerIds.add(((MapLayer) item).getId());
} else if (item instanceof MapFolder) {
mapContents.addAll(((MapFolder) item).getContents());
}
// MapKmlLinks do not have IDs
}
return layerIds;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Collection<Layer> getAllLayers() {\n return Collections.unmodifiableCollection(layers.values());\n }",
"public Collection<OsmDataLayer> getAllLayers() {\n\t\treturn null;\n\t}",
"public void allLayers()\n\t{\n\t\tint totalLayers = this.psd.getLayersCount();\n\t\t\n\t\tLayer layer;\n\t\t\n\t\tfor (int i = totalLayers - 1; i >= 0; i--) {\n\t\t\tlayer = this.psd.getLayer(i);\n\t\t\t\n\t\t\tif (!layer.isVisible() || (layer.getType() == LayerType.NORMAL && layer.getWidth() == 0)) {\n\t\t\t\tthis.layersToRemove.add(layer);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tlayer.adjustPositionAndSizeInformation();\n\t\t\tthis.layerId++;\n\t\t\t\n\t\t\tif (LayerType.NORMAL == layer.getType()) {\n\t\t\t\t\n\t\t\t\tlayer.setUniqueLayerId(this.layerId);\n\t\t\t\tlayer.setGroupLayerId(0);\n\t\t\t\tlayer.setDepth(0);\n\t\t\t\t\n\t\t\t\tthis.layers.add(layer);\n\t\t\t\t\n\t\t\t} else if (LayerType.OPEN_FOLDER == layer.getType() || LayerType.CLOSED_FOLDER == layer.getType()) {\n\t\t\t\t\n\t\t\t\tlayer.setUniqueLayerId(this.layerId);\n\t\t\t\tlayer.setGroupLayerId(0);\n\t\t\t\tlayer.setDepth(0);\n\t\t\t\t\n\t\t\t\tthis.layers.add(layer);\n\t\t\t\t\n\t\t\t\tif (layer.getLayersCount() > 0) {\n\t\t\t\t\tthis.subLayers(layer, this.layerId, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void processLayerMap() {\r\n for (int l = 0; l < layers.size(); l++) {\r\n Layer layer = layers.get(l);\r\n this.layerNameToIDMap.put(layer.name, l);\r\n }\r\n }",
"public static List<ILayer> getMapLayers(IMap map) {\n\n\t\tif (map == null) {\n\t\t\treturn Collections.emptyList();\n\t\t}\n\t\tList<ILayer> list = map.getMapLayers();\n\n\t\t// Does the filter of layers that can be resolved as feature store\n\t\tList<ILayer> sortedLayerList = new LinkedList<ILayer>();\n\t\tfor (ILayer layerToInsert : list) {\n\n\t\t\tif (canResolveFeautreStore(layerToInsert) && (layerToInsert.getName() != null)) {\n\n\t\t\t\t// inserts in the current layer in lexicographic order\n\t\t\t\tif( sortedLayerList.size() == 0 ){\n\t\t\t\t\tsortedLayerList.add(layerToInsert);\n\t\t\t\t} else {\n\t\t\t\t\tint insertPosition = -1;\n\t\t\t\t\tfor(int i= 0; i < sortedLayerList.size(); i++ ){\n\t\t\t\t\t\tString curName = sortedLayerList.get(i).getName();\n\t\t\t\t\t\tif(layerToInsert.getName().compareTo(curName) < 0 ){\n\t\t\t\t\t\t\tinsertPosition = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(insertPosition != -1){\n\t\t\t\t\t\tsortedLayerList.add(insertPosition, layerToInsert);\n\t\t\t\t\t} else{\n\t\t\t\t\t\tsortedLayerList.add( layerToInsert);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn sortedLayerList;\n\t}",
"Layer[] getLayers();",
"public void clearMapLayers() {\n if(internalNative != null) {\n internalNative.removeAllMarkers();\n markers.clear();\n } else {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.removeAllLayers();\n points = null;\n } else {\n // TODO: Browser component \n }\n }\n }",
"@Override\n public ListIterator<BoardLayerView> getLayers() {\n return this.layers.listIterator();\n }",
"public java.util.List<de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer> findAll()\n throws com.liferay.portal.kernel.exception.SystemException;",
"public Layer getAllAnnotations() {\n Layer result = new Layer(this);\n for (Layer layer : layers.values())\n for (Annotation ann : layer)\n result.add(ann);\n return result;\n }",
"@GET\r\n\t@Path(\"/items/{map-uid}/root-layers\")\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\t@ApiOperation(value = \"get root layers of map\")\r\n\tpublic PlainCollectionDTO<Layer, LayerFullDTO> getFirstLayers(@PathParam(\"map-uid\") String gismapUid) {\r\n\t\tList<Layer> layers = GISMapMgr.getInstance().getRootLayersByMapExtuid(gismapUid);\r\n\t\treturn PlainCollectionDTO.createAndLoad(layers, LayerFullDTO.class);\r\n\t}",
"public List<Integer> getVisibleLayers ()\n {\n List<Integer> visible = Lists.newArrayList();\n List<Boolean> visibility = getLayerVisibility();\n for (int layer = 0, nn = visibility.size(); layer < nn; layer++) {\n if (visibility.get(layer)) {\n visible.add(layer);\n }\n }\n return visible;\n }",
"public ArrayList<Layer> getLayers() {\r\n return this.layers;\r\n }",
"public Layer.Layers getLayer();",
"public ArrayList<Layer> getImageLayers() {\n\t\tArrayList<Layer> layers = new ArrayList<Layer>();\n\t\t\n\t\tLayer layer;\n\t\t\n\t\tfor (int i = 0; i < this.layers.size(); i++) {\n\t\t\tlayer = this.layers.get(i);\n\t\t\t\n\t\t\tif (\n\t\t\t\t\t(\n\t\t\t\t\t\tlayer.getType() == LayerType.OPEN_FOLDER ||\n\t\t\t\t\t\tlayer.getType() == LayerType.CLOSED_FOLDER\n\t\t\t\t\t) \n\t\t\t\t\t\n\t\t\t\t\t||\n\t\t\t\t\t\n\t\t\t\t\tlayer.isTextLayer() ||\n\t\t\t\t\t\n\t\t\t\t\t(\n\t\t\t\t\t\tlayer.getWidth() == 1 ||\n\t\t\t\t\t\tlayer.getHeight() == 1\n\t\t\t\t\t)\n\t\t\t\t\t\n\t\t\t\t\t||\n\t\t\t\t\t\n\t\t\t\t\tlayer.isShapeLayer()\n\t\t\t\t\t\n\t\t\t\t\t||\n\t\t\t\t\t\n\t\t\t\t\tlayer.isImageSingleColored()\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tlayers.add(layer);\n\t\t}\n\t\t\n\t\treturn layers;\n\t}",
"@Override\n public Iterator<BoardLayerView> iterator() {\n return this.layers.iterator();\n }",
"@Override\n\tpublic List<Edge> getAllMapEdges() {\n\n\t\tList<Edge> res = new ArrayList<Edge>();\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tString getAllEdges = \"SELECT node_from, node_to, distance FROM routefinder.maprelations\";\n\t\t\tresultSet = null;\n\t\t\tpstmt = conn.prepareStatement(getAllEdges);\n\t\t\tresultSet = pstmt.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tEdge edge = new Edge();\n\t\t\t\tedge.setNode1(Database.getNodeFromId(resultSet.getInt(\"node_from\")));\n\t\t\t\tedge.setNode2(Database.getNodeFromId(resultSet.getInt(\"node_to\")));\n\t\t\t\tedge.setDist(resultSet.getDouble(\"distance\"));\n\t\t\t\tres.add(edge);\n\t\t\t}\n\t\t\treturn res;\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tJdbcConnect.resultClose(resultSet, pstmt);\n\t\t}\n\n\t\treturn null;\n\t}",
"@Override\n public int getTotalLayers() {\n return this.layers.size();\n }",
"public void loadMapsModule(){\n Element rootElement = FileOperator.fileReader(MAPS_FILE_PATH);\n if(rootElement!=null){\n Iterator i = rootElement.elementIterator();\n while (i.hasNext()) {\n Element element = (Element) i.next();\n GridMap map =new GridMap();\n map.decode(element);\n mapsList.add(map);\n }\n }\n }",
"public static void clearLayers(){\n\t\tfor(int i=0;i<ChangeLayer.Layers.length;i++){\n\t\t\tChangeLayer.Layers[i].clear();\n\t\t\t}\n\t}",
"public HashMap<Integer,ArrayList<Layer>> getLayersInGroupsAtDepth(int queryLayerDepth) {\n\t\tHashMap<Integer, ArrayList<Layer>> layerInGroups = new HashMap<Integer, ArrayList<Layer>>();\n\t\t\n\t\tif (this.layers.size() > 0) {\n\t\t\t\n\t\t\tint layerDepth, groupId;\n\t\t\tLayer layer;\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < this.layers.size(); i++) {\n\t\t\t\tlayer = this.layers.get(i);\n\t\t\t\t\n\t\t\t\tgroupId = layer.getGroupLayerId();\n\t\t\t\tlayerDepth = layer.getDepth();\n\t\t\t\t\n\t\t\t\tif (layerDepth == queryLayerDepth) {\n\t\t\t\t\tif (!layerInGroups.containsKey(groupId)) {\n\t\t\t\t\t\tlayerInGroups.put(groupId, new ArrayList<Layer>());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlayerInGroups.get(groupId).add(layer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*System.out.println(\"Layer/Group Depth:\" + queryLayerDepth);\n\t\tSystem.out.println(layerInGroups);\n\t\tSystem.out.println(String.format(String.format(\"%%%ds\", layerInGroups.toString().length()), \" \").replace(\" \",\"-\"));*/\n\t\t\n\t\treturn layerInGroups;\n\t}",
"public Layer[] getLayers() {\n Layer[] cl = new Layer[list.size()];\n return (Layer[])list.toArray( cl );\n }",
"public Layer[] getLayers() {\n\t\tLayer[] copy = new Layer[layers.length];\n\t\tSystem.arraycopy(layers, 0, copy, 0, copy.length);\n\t\treturn copy;\n\t}",
"public String getAllLayersAsList() {\n\t\treturn null;\n\t}",
"@Override\n public ArrayList<BoardLayerView> getLayerArrayList() {\n return this.layers;\n }",
"public List<LayerType> findAllLayerTypes() {\r\n\t\t// sparql\r\n\t\tString sparql = \"SELECT ?layerType WHERE {?layerType rdfs:subClassOf onto:ModelLayer.}\";\r\n\t\t// test\r\n\t\tString jsonString = findJsonResult(sparql);\r\n\t\tSystem.out.println(\"findAllLayerTypes:\" + jsonString);\r\n\t\t// result\r\n\t\tJSONObject json;\r\n\t\ttry {\r\n\t\t\tjson = new JSONObject(jsonString);\r\n\t\t\tJSONArray jsonArray = json.getJSONObject(\"results\").getJSONArray(\"bindings\");\r\n\t\t\tList<LayerType> list = new ArrayList<LayerType>();\r\n\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\tLayerType layerType = new LayerType();\r\n\t\t\t\tif (jsonObject.has(\"layerType\")) {\r\n\t\t\t\t\tlayerType.setLayerTypeName(jsonObject.getJSONObject(\"layerType\").getString(\"value\").split(\"#\")[1]);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(layerType);\r\n\t\t\t}\r\n\t\t\treturn list;\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\treturn null;\r\n\t}",
"public ArrayList<GridMap> getMapsList() {\n return mapsList;\n }",
"public int getLayerCount() {\n\t\treturn layers.length;\n\t}",
"public static WFJFilterMap[] findFilterMaps() {\n return filterMaps.asArray();\n }",
"@Override\n public void addAllLayers(Collection<BoardLayerView> layers) {\n this.layers.addAll(layers);\n }",
"@DataClass.Generated.Member\n public @NonNull Set<VmsLayer> getLayers() {\n return mLayers;\n }",
"public void addDefaultLayers()\n\t{\n\t\t/**\n\t\t\t// Default OSM layers\n\t\t\tOSM mapnikOSM = OSM.Mapnik(\"Mapnik\");\n\t\t\tOSM cycleOSM = OSM.CycleMap(\"CycleMap\");\n\t\t\tmapnikOSM.setIsBaseLayer(true);\n\t\t\tcycleOSM.setIsBaseLayer(true);\n\t\t\tthis.openLayersMap.getMap().addLayer(mapnikOSM);\n\t\t this.openLayersMap.getMap().addLayer(cycleOSM);\n\t\t*/\n\t\t\n\t\t/**\n\t\t // Google Maps Tiles\n\t\t\t// Also in Blipnip.html insert: <script src=\"http://maps.google.com/maps/api/js?v=3&sensor=false\"></script>\n\t\t\t// or <script src=\"http://maps.google.com/maps/api/js?&sensor=false\"></script>\n\t\t\t// Keep in mind: http://gis.stackexchange.com/questions/51992/how-to-obtain-to-max-zoom-levels-for-google-layer-using-open-layers\n\t\t\t// and http://gis.stackexchange.com/questions/5964/how-to-apply-custom-google-map-style-in-openlayers\n\t\t\tGoogleV3Options gNormalOptions = new GoogleV3Options();\n\t\t\tgNormalOptions.setIsBaseLayer(true);\n\t\t\tgNormalOptions.setSmoothDragPan(false);\n\t\t\tgNormalOptions.setNumZoomLevels(17);\n\t\t\tgNormalOptions.setType(GoogleV3MapType.G_NORMAL_MAP);\n\t\t\tGoogleV3 gNormal = new GoogleV3(\"Google Normal\", gNormalOptions);\n\t this.openLayersMap.getMap().addLayer(gNormal);\n */\n\t\t\n\t\t/** \n\t\t // MapQuest - MapQuest-OSM Tiles - These are also free - Very good free alternative\n\t XYZOptions mapQuestOption = new XYZOptions();\n\t mapQuestOption.setIsBaseLayer(true);\n\t mapQuestOption.setNumZoomLevels(17);\n\t mapQuestOption.setSphericalMercator(true);\n\t String[] tiles = new String[4];\n\t tiles[0] = \"http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[1] = \"http://otile2.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[2] = \"http://otile3.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[3] = \"http://otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t XYZ mapQuest = new XYZ(\"mapQuest\",tiles, mapQuestOption);\n\t this.openLayersMap.getMap().addLayer(mapQuest);\n */\n\t\t\n\t\t/**\n // Openlayers, OpenStreetMaps blank and white - Free but do not zoom close enough\n\t XYZOptions bwOSMOption = new XYZOptions();\n\t bwOSMOption.setIsBaseLayer(true);\n\t bwOSMOption.setSphericalMercator(true);\n\t bwOSMOption.setNumZoomLevels(15);\n\t String[] bwOSMtiles = new String[2];\n\t bwOSMtiles[0] = \"http://a.www.toolserver.org/tiles/bw-mapnik/${z}/${x}/${y}.png\"; \n\t bwOSMtiles[1] = \"http://b.www.toolserver.org/tiles/bw-mapnik/${z}/${x}/${y}.png\";\n\t XYZ bwOSM = new XYZ(\"bwOSM\",bwOSMtiles, bwOSMOption);\n\t this.openLayersMap.getMap().addLayer(bwOSM); \n */\n\t\t\n\t\t/**\n\t\t\t// Unfortunately their policy has changed and will start charging from May 1st\n // CloudMade Tiles - Very good paid alternative, free 500,000 tile loads\n\t\t\t//String osmAtrribution = \"© 2014 <a href=\\\"http://openstreetmap.org\\\">OpenStreetMap</a> contributors\";\n\t\t\t//String cloudMadeAttribution = \"Map data \" + osmAtrribution + \", © 2014 <a href=\\\"http://cloudmade.com\\\">CloudMade</a>\";\n\t XYZOptions cloudMadeOption = new XYZOptions();\n\t cloudMadeOption.setIsBaseLayer(true);\n\t cloudMadeOption.setSphericalMercator(true);\n\t cloudMadeOption.setNumZoomLevels(19);\n\t cloudMadeOption.setTransitionEffect(TransitionEffect.RESIZE);\n\t //cloudMadeOption.setAttribution(cloudMadeAttribution);\n\t String[] cloudMadetiles = new String[3];\n\t cloudMadetiles[0] = \"http://a.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; //TODO - 256 for desktops, 64 for mobiles\n\t cloudMadetiles[1] = \"http://b.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; \n\t cloudMadetiles[2] = \"http://c.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; \n\t XYZ cloudMade = new XYZ(\"cloudMade\",cloudMadetiles, cloudMadeOption);\n\t this.openLayersMap.getMap().addLayer(cloudMade); \n\t */\n\t\t\n\t // MapBox is free for 3000 map loads - paid for more. Switching to this due to CloudMade's upcoming change of policy.\n\t\t\t// Nice and fairly cheap alternative. TileMill seems to be an awesome tool for complete map re-styling which\n\t\t\t// is a huge +. \n\t XYZOptions mapBoxOption = new XYZOptions();\n\t mapBoxOption.setIsBaseLayer(true);\n\t mapBoxOption.setSphericalMercator(true);\n\t mapBoxOption.setNumZoomLevels(19);\n\t mapBoxOption.setTransitionEffect(TransitionEffect.RESIZE);\n\t //mapBoxOption.setAttribution(cloudMadeAttribution);\n\t String[] mapBoxtiles = new String[3];\n\t mapBoxtiles[0] = \"http://a.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t mapBoxtiles[1] = \"http://b.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t mapBoxtiles[2] = \"http://c.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t XYZ mapBox = new XYZ(\"mapBox\",mapBoxtiles, mapBoxOption);\n\t this.openLayersMap.getMap().addLayer(mapBox); \n\t \n\t \n\t}",
"public boolean hasLayers() {\n\t\treturn false;\n\t}",
"public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public List<String> getLayerIds() {\n\t\treturn layerIds;\n\t}",
"public PLayer getMapLayer() {\n return mapLayer;\n }",
"public static ILayer findLayerByNode(IMap map, Node gisNode) {\r\n try {\r\n for (ILayer layer : map.getMapLayers()) {\r\n IGeoResource resource = layer.findGeoResource(Node.class);\r\n if (resource != null && resource.resolve(Node.class, null).equals(gisNode)) {\r\n return layer;\r\n }\r\n }\r\n return null;\r\n } catch (IOException e) {\r\n // TODO Handle IOException\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }",
"public List<List<Integer>> layerByLayer(TreeNode root) {\n List<List<Integer>> result = new ArrayList<List<Integer>>();\n if(root == null){\n return result;\n }\n\n Queue<TreeNode> queue = new LinkedList<TreeNode>();\n queue.offer(root);\n\n while(!queue.isEmpty()){\n List<Integer> curLayer = new ArrayList<Integer>();\n\n int size = queue.size();\n for(int i = 0; i < size; i++){\n TreeNode node = queue.poll();\n curLayer.add(node.key);\n if(node.left != null){\n queue.offer(node.left);\n }\n if(node.right != null){\n queue.offer(node.right);\n }\n }\n result.add(curLayer);\n }\n return result;\n }",
"public List<BaseLayer> getBaseLayers(String userId, String siteId);",
"private void renderToDepthmap() {\n\t\tGL11.glColorMask(false, false, false, false);\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT\n\t\t\t\t| GL11.GL_STENCIL_BUFFER_BIT);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(passThruContext);\n\t\t}\n\n\t\tdepthBuffer.copyPixels();\n\t}",
"public\t\tboolean\t\tgetIterateThroughAllLayers()\n\t\t{\n\t\treturn(iterateThroughAllLayers);\n\t\t}",
"public List<DesignLayerNode> getLayerDeclarationNodes()\n {\n return info.getRootNode().layerDeclarationNodes;\n }",
"public Map<String, Object> getMapRaster(Map<String, Double> params) {\n Map<String, Object> results = new HashMap<>();\n double lrlon = params.get(\"lrlon\");\n double ullon = params.get(\"ullon\");\n double w = params.get(\"w\");\n double h = params.get(\"h\");\n double ullat = params.get(\"ullat\");\n double lrlat = params.get(\"lrlat\");\n int depth = computeDepth(lrlon, ullon, w);\n boolean query_success = true;\n if (lrlat >= ullat || lrlon <= ullon || lrlat >= ROOT_ULLAT || lrlon <= ROOT_ULLON || ullat <= ROOT_LRLAT ||ullon >= ROOT_LRLON) {\n query_success = false;\n }\n int numImg = (int) Math.pow(2, depth);\n double wPerImg = W / Math.pow(2.0, depth);\n double hPerImg = H / Math.pow(2.0, depth);\n int xSt = (int) Math.floor(Math.abs(ullon - ROOT_ULLON) / wPerImg);\n int ySt = (int) Math.floor(Math.abs(ullat - ROOT_ULLAT) / hPerImg);\n int xEn = (int) Math.floor(Math.abs(lrlon - ROOT_ULLON) / wPerImg);\n int yEn = (int) Math.floor(Math.abs(lrlat - ROOT_ULLAT) / hPerImg);\n String[][] render_grid = new String[yEn - ySt + 1][xEn - xSt + 1];\n double raster_ul_lon = ROOT_ULLON + xSt * wPerImg;\n double raster_ul_lat = ROOT_ULLAT - ySt * hPerImg;\n double raster_lr_lon = ROOT_ULLON + (xEn + 1) * wPerImg;\n double raster_lr_lat = ROOT_ULLAT - (yEn + 1) * hPerImg;\n if (ullon < ROOT_ULLON) {\n xSt = 0;\n raster_ul_lon = ROOT_ULLON;\n }\n if (ullat > ROOT_ULLAT) {\n ySt = 0;\n raster_ul_lat = ROOT_ULLAT;\n }\n if (lrlon > ROOT_LRLON) {\n xEn = numImg - 1;\n raster_lr_lon = ROOT_LRLON;\n }\n if (lrlat < ROOT_LRLAT) {\n yEn = numImg - 1;\n raster_lr_lat = ROOT_LRLAT;\n }\n for (int i = 0; i < xEn - xSt + 1; ++i) {\n for (int j = 0; j < yEn - ySt + 1; ++j) {\n int x = i + xSt;\n int y = j + ySt;\n render_grid[j][i] = \"d\" + depth + \"_x\" + x + \"_y\" + y + \".png\";\n }\n }\n results.put(\"render_grid\", render_grid);\n results.put(\"raster_ul_lon\", raster_ul_lon);\n results.put(\"raster_ul_lat\", raster_ul_lat);\n results.put(\"raster_lr_lon\", raster_lr_lon);\n results.put(\"raster_lr_lat\", raster_lr_lat);\n results.put(\"depth\", depth);\n results.put(\"query_success\", query_success);\n return results;\n }",
"public ReadOnlyIterator<ContextNode> getAllLeafContextNodes();",
"public Node[] getChildren() {\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\treturn nextLayer;\n\t}",
"private void deleteLayers(Set<String> layerIds) throws IOException {\n for (String layerId : layerIds) {\n assertLayerIsNotPublished(layerId);\n\n LOG.info(\"Layer ID: \" + layerId + \", finding maps.\");\n ParentsListResponse layerParents = engine.layers().parents().list(layerId).execute();\n // Delete each layer. Note that these operations are not transactional,\n // so if a later operation fails, the earlier assets will still be deleted.\n for (Parent layerParent : layerParents.getParents()) {\n String mapId = layerParent.getId();\n deleteMap(layerIds, mapId);\n }\n\n LOG.info(\"Deleting layer.\");\n engine.layers().delete(layerId).execute();\n LOG.info(\"Layer deleted.\");\n }\n }",
"public List<List<Integer>> layerByLayer(TreeNode root) {\n List<List<Integer>> res = new ArrayList<>();\n if(root == null) {\n return res;\n }\n \n Queue<TreeNode> queue = new ArrayDeque<>();\n queue.offer(root);\n int size = 0;\n while(!queue.isEmpty()) {\n size = queue.size();\n List<Integer> list = new ArrayList<>();\n while(size > 0) {\n TreeNode node = queue.poll();\n list.add(node.key);\n if(node.left != null) {\n queue.offer(node.left);\n }\n if(node.right != null) {\n queue.offer(node.right);\n }\n size--;\n }\n res.add(list);\n }\n \n return res;\n}",
"private void getData(){\n mapFStreets = new ArrayList<>();\n mapFAreas = new ArrayList<>();\n mapIcons = new ArrayList<>();\n coastLines = new ArrayList<>();\n //Get a rectangle of the part of the map shown on screen\n bounds.updateBounds(getVisibleRect());\n Rectangle2D windowBounds = bounds.getBounds();\n sorted = zoomLevel >= 5;\n\n coastLines = (Collection<MapFeature>) (Collection<?>) model.getVisibleCoastLines(windowBounds);\n\n Collection < MapData > bigRoads = model.getVisibleBigRoads(windowBounds, sorted);\n mapFStreets = (Collection<MapFeature>)(Collection<?>) bigRoads;\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n else if (zoomLevel > 4)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n else if (zoomLevel > 7)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n else if(zoomLevel > 7)\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n else if(zoomLevel > 7) {\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n }\n\n if (drawAttributeManager.isTransport() && zoomLevel > 14)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n else if(zoomLevel > 10)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n\n if(zoomLevel > 14)\n mapIcons = (Collection<MapIcon>) (Collection<?>) model.getVisibleIcons(windowBounds);\n\n if (!drawAttributeManager.isTransport())\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n else {\n if (zoomLevel > 3)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n }\n mapFAreas.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleBikLakes(windowBounds, sorted));\n\n }",
"public abstract void initLayers();",
"@Override\n public void fitBoundsToLayers() {\n int width = 0;\n int height = 0;\n\n Rectangle layerBounds = new Rectangle();\n\n for (int i = 0; i < this.layers.size(); i++) {\n this.getLayer(i).getBounds(layerBounds);\n\n if (width < layerBounds.width) {\n width = layerBounds.width;\n }\n\n if (height < layerBounds.height) {\n height = layerBounds.height;\n }\n }\n\n this.bounds.width = width;\n this.bounds.height = height;\n }",
"private void setMapSlopes(){\n\t\tMapObjects mapSlopes = map.getLayers().get(\"SLOPES\").getObjects();\n\t\tfor (int ii = 0; ii < mapSlopes.getCount(); ++ii){\n\t\t\tRectangleMapObject mapSlope = (RectangleMapObject) mapSlopes.get(ii);\n\t\t\tslopes.add(new Rectangle(mapSlope.getRectangle()));\n\t\t}\n\t}",
"@Override\n FeatureMapLayer getLayer();",
"private void setUpDepthFillLayers(@NonNull Style loadedMapStyle) {\n FillLayer depthPolygonFillLayer = new FillLayer(\"DEPTH_POLYGON_FILL_LAYER_ID\", GEOJSON_SOURCE_ID);\n depthPolygonFillLayer.withProperties(\n fillColor(interpolate(linear(),\n get(\"depth\"),\n stop(5, rgb(16, 158, 210)),\n stop(10, rgb(37, 116, 145)),\n stop(15, rgb(69, 102, 124)),\n stop(30, rgb(31, 52, 67)))),\n fillOpacity(.7f));\n // Only display Polygon Features in this layer\n depthPolygonFillLayer.setFilter(eq(geometryType(), literal(\"Polygon\")));\n loadedMapStyle.addLayer(depthPolygonFillLayer);\n }",
"@Override\n\tpublic List<Map<String, Object>> findMapList(Map<String, Object> mapdata) {\n\t\treturn ermYjzbDao.findMapList(mapdata);\n\t}",
"public Map<String, Object> getMapRaster(Map<String, Double> params) {\n //System.out.println(params);\n Map<String, Object> results = new HashMap<>();\n //System.out.println(\"Since you haven't implemented getMapRaster, nothing is displayed in \"\n // + \"your browser.\");\n double lrLon = params.get(\"lrlon\");\n double ulLon = params.get(\"ullon\");\n double w = params.get(\"w\");\n double h = params.get(\"h\");\n double lrLat = params.get(\"lrlat\");\n double ulLat = params.get(\"ullat\");\n if (lrLon <= ROOT_ULLON || ulLon >= ROOT_LRLON || lrLat >= ROOT_ULLAT\n || ulLat <= ROOT_LRLAT || lrLon <= ulLon || lrLat >= ulLat) {\n querySuccess = false;\n return null;\n }\n\n double lonDpp = (lrLon - ulLon) / w;\n int dep = (int) Math.ceil(Math.log(ROOT_LON_DPP / lonDpp) / Math.log(2.0));\n depth = Math.min(dep, MAX_DEPTH);\n int num = (int) Math.pow(2, depth);\n\n //System.out.println(\"lonDpp=\" + lonDpp + \" dep=\" + dep + \" depth=\" + depth);\n int xnUl = getXnYp(ROOT_ULLON, ulLon, ROOT_WIDTH, num, 1);\n int ypUl = getXnYp(ulLat, ROOT_ULLAT, ROOT_HEIGHT, num, 1);\n int xnLr = getXnYp(lrLon, ROOT_LRLON, ROOT_WIDTH, num, 0);\n int ypLr = getXnYp(ROOT_LRLAT, lrLat, ROOT_HEIGHT, num, 0);\n //System.out.println(\"xnUl:\" + xnUl + \" ypUl:\" + ypUl\n // + \" xnLr:\" + xnLr + \" ypLr:\" + ypLr);\n\n rasterUlLon = ROOT_ULLON + xnUl * ROOT_WIDTH / num;\n rasterUlLat = ROOT_ULLAT - ypUl * ROOT_HEIGHT / num;\n rasterLrLon = ROOT_LRLON - (num - xnLr - 1) * ROOT_WIDTH / num;\n rasterLrLat = ROOT_LRLAT + (num - ypLr - 1) * ROOT_HEIGHT / num;\n int nCols = xnLr - xnUl + 1;\n int nRows = ypLr - ypUl + 1;\n //System.out.println(\"numColumns:\" + nCols + \" numRows:\" + nRows);\n\n renderGrid = new String[nRows][nCols];\n\n for (int row = ypUl; row <= ypLr; row += 1) {\n int j = row - ypUl;\n for (int col = xnUl; col <= xnLr; col += 1) {\n int i = col - xnUl;\n renderGrid[j][i] = \"d\" + depth + \"_x\" + col + \"_y\" + row + \".png\";\n }\n }\n querySuccess = true;\n\n results.put(\"raster_ul_lon\", rasterUlLon);\n results.put(\"raster_ul_lat\", rasterUlLat);\n results.put(\"raster_lr_lon\", rasterLrLon);\n results.put(\"raster_lr_lat\", rasterLrLat);\n results.put(\"depth\", depth);\n results.put(\"render_grid\", renderGrid);\n results.put(\"query_success\", querySuccess);\n\n return results;\n }",
"public static Layer[] getSelectedLayers(PlugInContext context, int num) {\r\n return LayerTools.getSelectedLayers(context, num);\r\n }",
"@Override\n\tpublic Collection<Eleve> findAll() {\n\t\treturn map.values();\n\t}",
"@Override\n\tpublic List<Floor> findList(Map<String, Object> queryMap) {\n\t\treturn floorDao.findList(queryMap);\n\t}",
"public ArrayList<PoolMap> get_P_maps(){\n\n\t\treturn poolMaps;\n\t}",
"public void showAllLandmarks(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n for(int i = 0; i<landmarkList.size(); i++){\n if(landmarkList.get(i).data.type == \"Landmark\")\n drawLandmarks(landmarkList.get(i));\n }\n }",
"public List<List<Integer>> layerByLayer (TreeNode root){\n List<List<Integer>> result = new ArrayList<List<Integer>>();\n // create queue for BFS\n LinkedList<TreeNode> queue = new LinkedList<>();\n queue.offer(root);\n while(!queue.isEmpty()){\n // create layer's list\n List<Integer> currLayer = new ArrayList<>();\n int size = queue.size();\n // current layer's size is queue size\n // loop current layer's element and add them\n // to layer list.\n for(int i =0; i<size;i++){\n TreeNode curr = queue.poll();\n currLayer.add(curr.key);\n // meanwhile, put their children into queue\n // for next round.\n if(curr.left!=null) queue.offer(curr.left);\n if(curr.right!=null) queue.offer(curr.right);\n }\n result.add(currLayer); }\n return result;\n }",
"public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }",
"private void addLayers() throws InitializeLayerException {\n this.targetParcelsLayer = new CadastreChangeTargetCadastreObjectLayer();\n this.getMap().addLayer(targetParcelsLayer);\n }",
"public void drawMap(ObservableList<Node> root, int scale) {\n\t\tfor (int x=0; x<dimensions; x++) {\n\t\t\tfor (int y=0; y<dimensions; y++) {\n\t\t\t\tRectangle rect = new Rectangle(x*scale, y*scale, scale, scale);\n\t\t\t\trect.setStroke(Color.BLACK);\n\t\t\t\trect.setFill(Color.LIGHTSKYBLUE);\n\t\t\t\troot.add(rect);\n\t\t\t\toceanGrid[x][y] = 0; //empty square\n\t\t\t}\n\t\t}\n\t}",
"@DataClass.Generated.Member\n public @NonNull Set<VmsAssociatedLayer> getAssociatedLayers() {\n return mAssociatedLayers;\n }",
"@Override\n public void notifyMapObservers() {\n for(MapObserver mapObserver : mapObservers){\n // needs all the renderInformation to calculate fogOfWar\n System.out.println(\"player map: \" +playerMap);\n mapObserver.update(this.playerNumber, playerMap.returnRenderInformation(), entities.returnUnitRenderInformation(), entities.returnStructureRenderInformation());\n entities.setMapObserver(mapObserver);\n }\n }",
"public int getTotalMaps() {\r\n\t\treturn total_maps;\r\n\t}",
"public ArrayList<Block> getMap(){\r\n\t\treturn new ArrayList<Block>(this.blockMap);\r\n\t}",
"public ArrayList<Map> getMapsArrayContainsThisPlaceOfInterest()\r\n\t{\r\n\t\treturn this._mapsArrayContainsThisPlaceOfInterest;\r\n\t}",
"public HashMap<String, InputStream> getOverlayFiles() {\n\t\treturn getFilesByPath(OVERLAYS_PATH);\n\t}",
"@Override\r\n\tpublic Iterator<GIS_layer> iterator() {\n\t\treturn set.iterator();\r\n\t}",
"public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }",
"private void addComponentsToLayers() {\n JLayeredPane layer = getLayeredPane();\n layer.add(canvas, new Integer(1));\n layer.add(searchArea, new Integer(2));\n layer.add(searchButton, new Integer(2));\n layer.add(zoomInButton, new Integer(2));\n layer.add(zoomOutButton, new Integer(2));\n layer.add(fullscreenButton, new Integer(2));\n layer.add(showRoutePanelButton, new Integer(2));\n layer.add(routePanel, new Integer(2));\n layer.add(optionsButton, new Integer(2));\n layer.add(mapTypeButton, new Integer(2));\n layer.add(mapTypePanel, new Integer(2));\n layer.add(resultPane, new Integer(3));\n layer.add(resultStartPane, new Integer(3));\n layer.add(resultEndPane, new Integer(3));\n layer.add(iconPanel, new Integer(3));\n layer.add(optionsPanel, new Integer(2));\n layer.add(directionPane, new Integer(2));\n layer.add(closeDirectionList, new Integer(2));\n layer.add(travelTimePanel, new Integer(3));\n\n }",
"protected void printAll() {\n\t\tSystem.out.println(\"Network maps\");\n\t\tSystem.out.println(\"\tAddresses\");\n\t\ttry {\n\t\t\tPreparedStatement pstmt = \n\t\t\t\t\tthis.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\t\t\tthis.agent.getDatabaseManager().selectAll);\n\t ResultSet rs = pstmt.executeQuery();\n\t // loop through the result set\n while (rs.next()) {\n \t System.out.printf(\"%s -> %s\\n\", rs.getString(\"username\"), rs.getString(\"address\"));\n }\n\t\t} catch (Exception e) {\n\t\t\tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to get all the address of the table users in the database\\n\"), e);\n\t\t}\n\t\tSystem.out.println(\"\tmapSockets\");\n\t\tfor (String u: this.mapSockets.keySet()) {\n\t\t\tSystem.out.printf(\"%s -> %s\\n\", u, this.mapSockets.get(u));\n\t\t}\n\t}",
"public List<Group> getFilteredGroups(Map<String, Object> map);",
"@Override\r\n\tpublic boolean addAll(Collection<? extends GIS_layer> c) {\n\t\treturn set.addAll(c);\r\n\t}",
"public void InitMap() {\n for (int i=0; i<m_mapSize; i++) {\n SetColour(i, null);\n }\n }",
"public List<String> getMapNames() {\r\n\t\treturn mapNames;\r\n\t}",
"public ArrayList<Tile> getAllTilesFromAllLayers(String tilesetName) {\r\n ArrayList<Tile> tiles = new ArrayList<Tile>();\r\n int tilesetID = this.tilesetNameToIDMap.get(tilesetName);\r\n for (int x = 0; x < this.getWidth(); x++) {\r\n for (int y = 0; y < this.getHeight(); y++) {\r\n for (int l = 0; l < this.getLayerCount(); l++) {\r\n Layer layer = this.layers.get(l);\r\n if (layer.data[x][y][0] == tilesetID) {\r\n Tile t = new Tile(x, y, layer.name, layer.data[x][y][2], tilesetName);\r\n tiles.add(t);\r\n }\r\n }\r\n }\r\n }\r\n return tiles;\r\n }",
"public void loadMap() {\n\t\tchests.clear();\r\n\t\t// Load the chests for the map\r\n\t\tchestsLoaded = false;\r\n\t\t// Load data asynchronously\r\n\t\tg.p.getServer().getScheduler().runTaskAsynchronously(g.p, new AsyncLoad());\r\n\t}",
"public static Map<Planet,ZImage> getLightImages()\n throws IOException\n {\n Map<Planet,ZImage> plImgMap = new HashMap<>();\n \n for( Planet planet: planetList )\n {\n System.out.print(\".\");\n BufferedImage bImage = ImageIO.read(new File(planet.getFileLight()));\n \n // Store image with some metadata\n ZImage zimage = new ZImage( bImage, Constants.SCALEDP, Constants.SCALEDP, Color.LIGHT_GRAY );\n plImgMap.put(planet, zimage);\n }\n \n return plImgMap;\n }",
"public List<Group> getGroupsByFilter(Map<String, Object> map);",
"public interface LayerContainer extends EventSource\n{\n\t/**\n\t * Returns a layer entity residing in this container.\n\t * If multiple layers with the same class are available,\n\t * the method returns one of them.\n\t * \n\t * @param layerClass Filter; {@code null} for default layer\n\t * @return Reference to layer or {@code null} is no layer for the filter exists\n\t */\n\tpublic Layer getLayer(Class<?> layerClass);\n\t\n\t/**\n\t * @param layerClass Filter; {@code null} for all layer entities\n\t * @return List of layers ({@code != null})\n\t */\n\tpublic Layer[] getLayers(Class<?> layerClass);\n\t\n\t/**\n\t * @return Number of registered layers\n\t */\n\tpublic int size();\n}",
"public int countPoolMaps(){\n\n\t\treturn poolMaps.size();\n\t}",
"@Override\n\tpublic Collection<IEdge<S>> getEdges()\n\t{\n\t\tfinal List<IEdge<S>> set = new ArrayList<>(map.size());\n\t\tfor (final Entry<S, Integer> entry : map.entrySet())\n\t\t{\n\t\t\tset.add(createEdge(entry.getKey(), entry.getValue()));\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(set);\n\t}",
"@Override public Set<Integer> allowedLayers() {\n Set<Integer> layers = new HashSet<>(first.allowedLayers());\n layers.retainAll(next.allowedLayers());\n return layers;\n }",
"public MapInfo getAllCovidCasesMapinfo() {\n GeoJsonGenerator generator = new GeoJsonGenerator();\n return generator.getAllMapInfo(getMapParamsOfMany(covidDataRepository.findAll()));\n }",
"@Override\n \tpublic int getSize() {\n \t\treturn layers.size();\n \t}",
"public Iterable<MapElement> elements() {\n return new MapIterator() {\n\n @Override\n public MapElement next() {\n return findNext(true);\n }\n \n };\n }",
"@Override\n public Map<String,Map<String,Object>> getLocatedLocations() {\n Map<String,Map<String,Object>> result = new LinkedHashMap<String,Map<String,Object>>();\n Map<Location, Integer> counts = new EntityLocationUtils(mgmt()).countLeafEntitiesByLocatedLocations();\n for (Map.Entry<Location,Integer> count: counts.entrySet()) {\n Location l = count.getKey();\n Map<String,Object> m = MutableMap.<String,Object>of(\n \"id\", l.getId(),\n \"name\", l.getDisplayName(),\n \"leafEntityCount\", count.getValue(),\n \"latitude\", l.getConfig(LocationConfigKeys.LATITUDE),\n \"longitude\", l.getConfig(LocationConfigKeys.LONGITUDE)\n );\n result.put(l.getId(), m);\n }\n return result;\n }",
"private void drawMap(HashMap<String, TrailObj> trailCollection,\n\t\t\tGoogleMap mMap2) {\n\n\t\tfor (TrailObj trail : trailCollection.values()) {\n\t\t\tfor (PlacemarkObj p : trail.getPlacemarks()) {\n\t\t\t\tPolylineOptions rectOptions = new PolylineOptions();\n\t\t\t\tfor (LatLng g : p.getCoordinates()) {\n\t\t\t\t\trectOptions.add(g);\n\t\t\t\t}\n\t\t\t\tPolyline polyline = mMap2.addPolyline(rectOptions);\n\t\t\t\tpolyline.setColor(Color.RED);\n\t\t\t\tpolyline.setWidth(5);\n\t\t\t\tpolyline.setVisible(true);\n\t\t\t}\n\t\t}\n\t}",
"public void removeAllOverlayObj(String layer)\n/* 185: */ {\n/* 186:261 */ this.mapPanel.removeAllOverlayObj(layer);\n/* 187: */ }",
"public static void printAvailableMaps() {\n \tFile folder = new File(\"./examples/\");\n \tFile[] listOfFiles = folder.listFiles();\n \tSystem.out.println(\"Available maps (choose one and start game with command 'game map_name' ) : \");\n\n \t for (int i = 0; i < listOfFiles.length; i++) {\n \t if (listOfFiles[i].isFile()) {\n \t System.out.println(\"\\t\"+listOfFiles[i].getName());\n \t } \n \t }\n }",
"public Map<String, Object> getOverlayMap(String name) {\n Sheet sheet = sheetsByName.get(name);\n if (sheet != null) {\n return sheet.getMap();\n } else {\n return null;\n }\n }",
"private void createLights(TiledMap map)\r\n\t{\r\n\t\tlightLayer = map.getLayers().get(\"Lights\").getObjects();\r\n\r\n\t\tfor (int count = 0; count < lightLayer.getCount(); count++)\r\n\t\t{\r\n\t\t\tRectangleMapObject obj = (RectangleMapObject) lightLayer.get(count);\r\n\r\n\t\t\tnew PointLight(lightHandler, 10, Color.WHITE, 30,\r\n\t\t\t\t\tobj.getRectangle().x / Constants.BOX_SCALE,\r\n\t\t\t\t\tobj.getRectangle().y / Constants.BOX_SCALE);\r\n\t\t}\r\n\t}",
"private void loadAreas() {\r\n\t\tareas = map.getAreas();\r\n\t\tfor (Area area : areas) {\r\n\t\t\tfor (AreaOrMonster monster : area.getChildren()) {\r\n\t\t\t\tmonster.getImageView().setX(monster.getX() * scalingFactor);\r\n\t\t\t\tmonster.getImageView().setY(monster.getY() * scalingFactor);\r\n\t\t\t\troot.getChildren().add(monster.getImageView());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static void showMap() {\n\t\tSet<Point> pointSet = map.keySet();\n\t\tfor (Point p : pointSet) {\n\t\t\tSystem.out.println(map.get(p));\n\t\t}\n\t}",
"public void printMap() {\n\t\tmap.printMap();\n\t}",
"public void cacheResult(\n java.util.List<de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer> ogcServiceLayers);",
"public void afficherPoints(){\n for(Point point : pointArrayList){\n getMapPane().getChildren().add(point.getImageView());\n visualObjects.add(point);\n }\n }"
]
| [
"0.6673765",
"0.66044223",
"0.6244039",
"0.61825246",
"0.6168798",
"0.58996373",
"0.56961",
"0.5623348",
"0.55498046",
"0.55444294",
"0.5508627",
"0.54830384",
"0.5457498",
"0.5337927",
"0.53037924",
"0.5251624",
"0.52512",
"0.5248288",
"0.52265495",
"0.52260715",
"0.5217558",
"0.52166665",
"0.51782125",
"0.51755935",
"0.5170408",
"0.51527345",
"0.5133995",
"0.5105604",
"0.50978905",
"0.50951374",
"0.50845236",
"0.50718063",
"0.5054213",
"0.5048236",
"0.5031113",
"0.5016846",
"0.499252",
"0.49802554",
"0.49698648",
"0.49597692",
"0.49083182",
"0.48825264",
"0.48476058",
"0.4844417",
"0.4841636",
"0.48360783",
"0.48232672",
"0.48180774",
"0.48084432",
"0.47958267",
"0.47708696",
"0.47626156",
"0.47616094",
"0.47613898",
"0.47540304",
"0.4737618",
"0.47351176",
"0.473194",
"0.47319272",
"0.47176763",
"0.47090894",
"0.47024286",
"0.46989346",
"0.46948856",
"0.46847478",
"0.4681921",
"0.46773046",
"0.4673834",
"0.46637392",
"0.4659698",
"0.46577385",
"0.46545133",
"0.46527687",
"0.4650186",
"0.46470812",
"0.46465212",
"0.46414483",
"0.4641296",
"0.4638772",
"0.46370345",
"0.46243653",
"0.46101278",
"0.46097296",
"0.46050522",
"0.46043873",
"0.45990002",
"0.45915225",
"0.458264",
"0.4582394",
"0.4581769",
"0.45803714",
"0.4575535",
"0.45681265",
"0.45678005",
"0.45628625",
"0.45407775",
"0.45395422",
"0.45367023",
"0.4536574",
"0.4535271"
]
| 0.6508755 | 2 |
builds AttributeBooleanType without checking for non null required values | public AttributeBooleanType buildUnchecked() {
return new AttributeBooleanTypeImpl();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"public Boolean getBooleanAttribute();",
"static Nda<Boolean> of( boolean... value ) { return Tensor.of( Boolean.class, Shape.of( value.length ), value ); }",
"BooleanExpression createBooleanExpression();",
"BooleanExpression createBooleanExpression();",
"public BooleanPhenotype() {\n dataValues = new ArrayList<Boolean>();\n }",
"BoolConstant createBoolConstant();",
"@Override\n\t\tpublic BooleanType toBooleanType() {\n\t\t\treturn new BooleanType(false);\n\t\t}",
"@Override\n\t\tpublic BooleanType toBooleanType() {\n\t\t\treturn new BooleanType(false);\n\t\t}",
"@Test\n public void testIsBooleanType()\n { \n assertThat(m_SUT.isBooleanType(), is(false));\n \n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.BOOLEAN);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.isBooleanType(), is(true));\n }",
"public BooleanType(final Boolean val) {\n\t\tthis.b = val;\n\t}",
"public TrueValue (){\n }",
"BooleanType(String name, String value,boolean mutable) {\n\t\tsuper(name,Constants.BOOLEAN, mutable);\n\t\tif(value != null)\n\t\t\tthis.value = parseValue(value);\n\t\t\n\t}",
"@Test\n public void booleanInvalidType() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.BOOLEAN, new TextNode(\"true\"));\n assertNull(retVal);\n }",
"static Nda<Boolean> of( Shape shape, boolean... values ) { return Tensor.ofAny( Boolean.class, shape, values ); }",
"org.apache.xmlbeans.XmlBoolean xgetRequired();",
"public Boolean() {\n\t\tsuper(false);\n\t}",
"<C> BooleanLiteralExp<C> createBooleanLiteralExp();",
"public void setRequired(boolean required);",
"public BooleanType(final boolean val) {\n\t\tthis.b = new Boolean(val);\n\t}",
"@Override\n public BinaryType andBool(BoolType BoolType) {\n return TypeFactory.getBinaryType(BoolType.getValue() ? this.getValue() : \"0000000000000000\");\n }",
"SchemaBuilder withFeature(String name, Boolean value);",
"void setRequired(boolean required);",
"@Test\n\tpublic void test_TCM__boolean_getBooleanValue() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"true\");\n\t\ttry {\n\t\t\tassertTrue(\"incorrect boolean true value\", attribute.getBooleanValue());\n\n attribute.setValue(\"false\");\n\t\t\tassertTrue(\"incorrect boolean false value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"TRUE\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"FALSE\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"On\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"Yes\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"1\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"OfF\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"0\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"No\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\tfail(\"couldn't convert boolean value\");\n\t\t}\n\n\t\ttry {\n attribute.setValue(\"foo\");\n\t\t\tassertTrue(\"incorrectly returned boolean from non boolean value\", attribute.getBooleanValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\t// good\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Expected DataConversionException, but got \" + e.getClass().getName());\n\t\t}\n\n\n\t}",
"BooleanLiteralExp createBooleanLiteralExp();",
"public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}",
"@Test\n public void testReflectionBoolean() {\n Boolean b;\n b = Boolean.TRUE;\n assertEquals(this.toBaseString(b) + \"[value=true]\", ToStringBuilder.reflectionToString(b));\n b = Boolean.FALSE;\n assertEquals(this.toBaseString(b) + \"[value=false]\", ToStringBuilder.reflectionToString(b));\n }",
"boolean boolField(String name, boolean isDefined, boolean value)\n throws NullField, InvalidFieldValue;",
"BoolOperation createBoolOperation();",
"boolean getRequired();",
"boolean getRequired();",
"boolean getRequired();",
"public BooleanParameter(String name, String key, String desc, boolean visible, boolean enabled, boolean required, Object defaultValue) {\n super(name,key,desc,visible,enabled,required,defaultValue);\n \n if ( defaultValue instanceof String ) {\n defaultValue = new Boolean( \"TRUE\".equals(defaultValue));\n }\n }",
"public Builder clearBoolValue() {\n if (typeCase_ == 2) {\n typeCase_ = 0;\n type_ = null;\n onChanged();\n }\n return this;\n }",
"public PropertyBoolean(String uid, String value) {\n super(uid, value);\n setFixedValues(new HashSet<Boolean>(Arrays.asList(Boolean.TRUE, Boolean.FALSE)));\n }",
"public static Value makeBool(Bool b) {\n if (b.isMaybeAnyBool())\n return theBoolAny;\n else if (b.isMaybeTrueButNotFalse())\n return theBoolTrue;\n else if (b.isMaybeFalseButNotTrue())\n return theBoolFalse;\n else\n return theNone;\n }",
"public void setRequired(boolean value) {\r\n this.required = value;\r\n }",
"boolean isSetRequired();",
"public Builder setRequired(boolean value) {\n\n required_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }",
"@Test\r\n public void testBooleanFlagAndNoValue() throws Exception {\r\n PluginTestCase<I>[] inputs = getTestData().getFlagCases();\r\n for (PluginTestCase<I> testCase : inputs) {\r\n System.out.println(testCase.toString());\r\n BooleanWithNoArgument model = getPopulatedModel(testCase.input, BooleanWithNoArgument.class);\r\n assertThat(model.boolFlag, is(true));\r\n }\r\n\r\n }",
"public BooleanMetadata(String key) {\n\n this(key, null);\n }",
"public Builder setBoolValue(boolean value) {\n typeCase_ = 2;\n type_ = value;\n onChanged();\n return this;\n }",
"public static Value makeAnyBool() {\n return theBoolAny;\n }",
"Argument<T> optional(boolean optional);",
"public Builder clearBoolValue() {\n bitField0_ = (bitField0_ & ~0x00000040);\n boolValue_ = false;\n onChanged();\n return this;\n }",
"public Value restrictToBool() {\n checkNotPolymorphicOrUnknown();\n if (isMaybeAnyBool())\n return theBoolAny;\n else if (isMaybeTrueButNotFalse())\n return theBoolTrue;\n else if (isMaybeFalseButNotTrue())\n return theBoolFalse;\n else\n return theNone;\n }",
"public boolean hasDynamicAttributes();",
"@JsSupport( {JsVersion.MOZILLA_ONE_DOT_ONE, \r\n\t\tJsVersion.JSCRIPT_TWO_DOT_ZERO})\r\npublic interface Boolean extends Object {\r\n\t\r\n\t@Constructor void Boolean();\r\n\t\r\n\t@Constructor void Boolean(boolean value);\r\n\t\r\n\t@Constructor void Boolean(Number value);\r\n\t\r\n\t@Constructor void Boolean(String value);\r\n\t\r\n\t@Function boolean valueOf();\r\n\t\r\n}",
"public boolean isRequiresTaxCertificate() \n{\nObject oo = get_Value(COLUMNNAME_RequiresTaxCertificate);\nif (oo != null) \n{\n if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();\n return \"Y\".equals(oo);\n}\nreturn false;\n}",
"public BooleanMetadata(String key, Object value) {\n\n this(key, value, false);\n }",
"private CheckBoolean() {\n\t}",
"public void testSetOnlyStoresAllowableTypes() {\n MetaDataFactory f = MetaDataFactory.getDefaultInstance();\n MutableBooleanValue allowableObject = (MutableBooleanValue) f.getValueFactory()\n .createBooleanValue().createMutable();\n allowableObject.setValue(Boolean.TRUE);\n\n NumberValue unallowableObject = (NumberValue) f.getValueFactory()\n .createNumberValue();\n\n TypedSet typedSet = new TypedSet(new HashSet(), BooleanValue.class);\n\n try {\n typedSet.add(allowableObject);\n } catch (IllegalArgumentException e) {\n fail(\"Adding a \" + allowableObject.getClass() + \" should be permitted.\");\n }\n\n // check that the mutable list will not allow a forbiden type\n try {\n typedSet.add(unallowableObject);\n fail(\"Adding any thing other than a \" + allowableObject.getClass() +\n \" should throw an IllegalArgumentException.\");\n } catch (IllegalArgumentException e) {\n // expected.\n }\n }",
"public DBBoolean() {\n\t}",
"boolean isAttribute();",
"public BooleanValue(boolean bool) {\r\n this.val = bool;\r\n }",
"boolean hasAttributes();",
"boolean hasAttributes();",
"public Value restrictToFalsy() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n if (isMaybeStr(\"\"))\n r.str = \"\";\n else\n r.str = null;\n r.flags &= ~STR;\n if (r.num != null && Math.abs(r.num) != 0.0)\n r.num = null;\n r.object_labels = r.getters = r.setters = null;\n r.flags &= ~(BOOL_TRUE | STR_PREFIX | (NUM & ~(NUM_ZERO | NUM_NAN)));\n r.excluded_strings = r.included_strings = null;\n return canonicalize(r);\n }",
"boolean supportsNotNullable();",
"public static Value makeBool(boolean b) {\n if (b)\n return theBoolTrue;\n else\n return theBoolFalse;\n }",
"String booleanAttributeToGetter(String arg0);",
"public Builder setCampaignTypeIdNull(boolean value) {\n \n campaignTypeIdNull_ = value;\n onChanged();\n return this;\n }",
"public Builder isMandatory(boolean mandatory) {\n this.mandatory = mandatory;\n return this;\n }",
"public boolean isRequired();",
"abstract public boolean getAsBoolean();",
"Builder addIsFamilyFriendly(Boolean value);",
"protected BooleanValue(Boolean bv) {\n boolValue = bv;\n }",
"boolean hasHasRestraintType();",
"public Boolean asBoolean();",
"public BooleanValue(boolean value) {\r\n\t\tthis.value = value;\r\n\t}",
"public BooleanValue(boolean value) {\r\n\t\tthis.value = value;\r\n\t}",
"@Override\n void generateFalseData() {\n \n }",
"public void setRequired(boolean required) {\n this.required = required;\n }",
"void setNullable(boolean nullable);",
"Conditional createConditional();",
"boolean hasCriterionType();",
"boolean hasOptionalValue();",
"private void encodeBooleanDataType(Encoder encoder, DataType type) throws IOException {\n\t\tencoder.openElement(ELEM_TYPE);\n\t\tencodeNameIdAttributes(encoder, type);\n\t\tencoder.writeString(ATTRIB_METATYPE, \"bool\");\n\t\tencoder.writeSignedInteger(ATTRIB_SIZE, type.getLength());\n\t\tencoder.closeElement(ELEM_TYPE);\n\t}",
"@ZenCodeType.Caster\n @ZenCodeType.Method\n default boolean asBool() {\n \n return notSupportedCast(BasicTypeID.BOOL);\n }",
"protected abstract boolean populateAttributes();",
"public boolean isRequired()\n {\n if(_attrDef.isIndexed() && _isSingleIndexedCriterion())\n {\n return true;\n }\n \n return _attrDef.isMandatory();\n }",
"public PropertySpecBuilder<T> required(boolean required)\n {\n Preconditions.checkArgument(this.required == null, \"required flag already set\");\n this.required = required;\n\n return this;\n }",
"boolean isRequired();",
"boolean isRequired();",
"boolean isRequired();",
"@Override\n public BinaryType orBool(BoolType BoolType) {\n return TypeFactory.getBinaryType(BoolType.getValue() ? \"1111111111111111\" : this.getValue());\n }",
"abstract protected boolean hasCompatValueFlags();",
"boolean booleanOf();",
"boolean hasBoolValue();",
"boolean getBoolValue();",
"boolean getBoolValue();",
"void visitBooleanValue(BooleanValue value);",
"@Column(name = \"BOOLEAN_VALUE\", length = 20)\n/* 35 */ public String getBooleanValue() { return this.booleanValue; }",
"@Override\n public HangarMessages addConstraintsTypeBooleanMessage(String property) {\n assertPropertyNotNull(property);\n add(property, new UserMessage(CONSTRAINTS_TypeBoolean_MESSAGE));\n return this;\n }",
"boolean isUniqueAttribute();",
"public BooleanType(final String flatData) throws InvalidFlatDataException {\n\t\tTypeUtils.check(this, flatData);\n\t\tthis.b = new Boolean(flatData.substring(flatData.indexOf(':') + 1));\n\t}",
"public Value restrictToStrBoolNum() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.object_labels = r.getters = r.setters = null;\n r.flags &= STR | BOOL | NUM;\n return canonicalize(r);\n }"
]
| [
"0.6627946",
"0.6627946",
"0.6627946",
"0.6627946",
"0.64543056",
"0.6266034",
"0.6091543",
"0.6091543",
"0.6072251",
"0.60056996",
"0.59657764",
"0.59657764",
"0.59609765",
"0.5921413",
"0.5907314",
"0.5898321",
"0.58689255",
"0.5861516",
"0.5860361",
"0.5855712",
"0.5845338",
"0.581335",
"0.5757084",
"0.57557976",
"0.5748749",
"0.567135",
"0.5661671",
"0.56573075",
"0.56551695",
"0.5647392",
"0.56178284",
"0.5603679",
"0.56015474",
"0.56015474",
"0.56015474",
"0.5590384",
"0.5587284",
"0.5585189",
"0.55837923",
"0.55583006",
"0.5552248",
"0.5551368",
"0.55453986",
"0.5520378",
"0.5516385",
"0.5504085",
"0.54875237",
"0.5484931",
"0.5477261",
"0.5469516",
"0.5467122",
"0.54620713",
"0.544693",
"0.54406524",
"0.54346275",
"0.5431055",
"0.54256576",
"0.54226637",
"0.5411809",
"0.5411809",
"0.53751767",
"0.5354391",
"0.53367704",
"0.53343326",
"0.5321075",
"0.530376",
"0.5302429",
"0.5297449",
"0.52922434",
"0.5273962",
"0.52716255",
"0.52625936",
"0.52578515",
"0.52578515",
"0.5256381",
"0.52495694",
"0.52494246",
"0.524689",
"0.52413976",
"0.52375805",
"0.52354527",
"0.5225421",
"0.5205557",
"0.51923555",
"0.51765114",
"0.517095",
"0.517095",
"0.517095",
"0.5165773",
"0.51615685",
"0.5157184",
"0.5153418",
"0.5145539",
"0.5145539",
"0.5143889",
"0.51435184",
"0.51420945",
"0.51402485",
"0.51380336",
"0.512657"
]
| 0.75021833 | 0 |
TODO Autogenerated method stub | @Override
public ParaMap index(ParaMap inMap) throws Exception {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
The size of a distribution in bytes, as specified by . The size in bytes can be approximated when the precise size is not known. When the size of the distribution is not known field must be set to 0 (this default value is not defined by DCAT standard). | @Value.Default
public int getByteSize() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getSize() {\n\t\treturn dist.length;\n\t}",
"double getSize();",
"@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}",
"@Override\n\tpublic double getSize() {\n\t\treturn Math.sqrt(getMySize())/2;\n\t}",
"Integer diskSizeGB();",
"public int getSize() {\n\n\treturn getSectors().size() * getUnitSize(); // 254 byte sectors\n }",
"@Override\n public long sizeInBytes() {\n return STATIC_SIZE + (2 * normalizedValue.length());\n }",
"public int getDistribution() {\n return distribution;\n }",
"public int getSizeBytes() {\n if (getDataType() == DataType.SEQUENCE)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRING)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRUCTURE)\n return size * members.getStructureSize();\n // else if (this.isVariableLength())\n // return 0; // do not know\n else\n return size * getDataType().getSize();\n }",
"@Override\n public long estimateSize() {\n return Long.MAX_VALUE;\n }",
"public void setDistribution(int distribution) {\n this.distribution = distribution;\n }",
"Long diskSizeBytes();",
"public int getDesiredSize()\n\t{\n\t\treturn desiredSize;\n\t}",
"public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}",
"public int getUnitSize() {\n\t\n\treturn 254; // A d64 block is 254 bytes (256 - pointer to the next sector).\n }",
"public long getSize();",
"@ApiModelProperty(required = true, value = \"Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\\\"local\\\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\\\"not available\\\")\")\n\n public Long getSize() {\n return size;\n }",
"public double getSize()\n\t{\n\t\treturn size;\n\t}",
"public double getSize() {\n return size_;\n }",
"public double getSize() \n {\n return size;\n }",
"@ApiModelProperty(example = \"3615\", value = \"Numeric value in bytes\")\n /**\n * Numeric value in bytes\n *\n * @return size Integer\n */\n public Integer getSize() {\n return size;\n }",
"@Override\n public int estimateSize() {\n return 8 + 8 + 1 + 32 + 64;\n }",
"long getSize();",
"public long getSize()\n {\n return getLong(\"Size\");\n }",
"public int getTotalSize();",
"public double getSize() {\n return size_;\n }",
"@Override\n public long estimateSize() { return Long.MAX_VALUE; }",
"public int getSize(){\n //To be written by student\n return localSize;\n }",
"public int getSize() \n { \n return numberOfEntries;\n }",
"double getOrderSize();",
"public Number getSizeP() {\n return (Number)getAttributeInternal(SIZEP);\n }",
"public double getMaxDensity(){\n\t\treturn 1;\n\t}",
"public double getFeederSize()\r\n\t{\r\n\t\treturn size;\r\n\t}",
"public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }",
"public int getLocalSize();",
"public static byte getSize() {\n return SIZE;\n }",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"public int getSize();",
"public int getSize();",
"public int getSize();",
"public int getSize();",
"public int getSize();",
"public int getSize();",
"public int getSize();",
"public int getSize();",
"public int getSize();",
"public int getSize();",
"public int getApproximateSize() {\r\n return approximateSize;\r\n }",
"public abstract long getSize();",
"public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }",
"public int getDefaultPartitionSize();",
"public synchronized long getEstimatedSizeInBytes(Random r) {\n\n\t\tlong estimatedSize = 0;\n\t\tif (getNAvailableElements() < Consts.N_ELEMENTS_TO_SAMPLE) {\n\t\t\t// Count them all\n\t\t\tfor (int i = 0; i < bufferSize; ++i) {\n\t\t\t\tObject el = buffer[i];\n\t\t\t\tif (el instanceof WritableContainer) {\n\t\t\t\t\testimatedSize += ((WritableContainer<?>) el)\n\t\t\t\t\t\t\t.getTotalCapacity();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn estimatedSize;\n\t\t} else {\n\t\t\tfor (int i = 0; i < Consts.N_ELEMENTS_TO_SAMPLE; ++i) {\n\t\t\t\tObject el = buffer[r.nextInt(bufferSize)];\n\t\t\t\tif (el instanceof WritableContainer) {\n\t\t\t\t\testimatedSize += ((WritableContainer<?>) el)\n\t\t\t\t\t\t\t.getTotalCapacity();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn estimatedSize / Consts.N_ELEMENTS_TO_SAMPLE * bufferSize;\n\t\t}\n\t}",
"public long getEntrySize() {\n return size;\n }",
"public static int totalSize_entries_id() {\n return (176 / 8);\n }",
"int getLocalSize();",
"public int calculateSize( int numSamples )\n {\n return numSamples * 2;\n }",
"public long getSize() {\n return size.get();\n }",
"int getSize ();",
"public long getSize() {\n return size;\n }",
"public int getSize() {\n\t\tif (type == Attribute.Type.Int) {\r\n\t\t\treturn INT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Char) {\r\n\t\t\treturn CHAR_SIZE * length;\r\n\t\t} else if (type == Attribute.Type.Long) {\r\n\t\t\treturn LONG_SIZE;\r\n\t\t} else if (type == Attribute.Type.Float) {\r\n\t\t\treturn FLOAT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Double) {\r\n\t\t\treturn DOUBLE_SIZE;\r\n\t\t} else if (type == Attribute.Type.DateTime){\r\n\t\t\treturn LONG_SIZE;\r\n\t\t}\r\n\t\t\r\n\t\treturn size;\r\n\t}",
"@Assessor\n public long estimateSize() {\n \treturn getSizeByMembers() \n .values().stream()\n .mapToLong(this::getFutureValue)\n .sum();\n }",
"public final long getSize() { return size; }",
"int fixedSize();",
"public static int getRandomSize() {\n return RandomNumberGenerator.getRandomInt(200, 100000);\n }",
"public static int totalSize_entries_receiveEst() {\n return (176 / 8);\n }",
"public long estimateSize() {\n/* 1338 */ return this.est;\n/* */ }",
"public int getSize() {\n\t\treturn 0;\r\n\t}",
"int getTotalSize();",
"public int GetSize() \n\t{\n\t\treturn numEntries; //dummy return so file would compile\n\t}",
"long getOccupiedSize();",
"@Override\n public int getSize() {\n return 64;\n }",
"public Long sizeInKB() {\n return this.sizeInKB;\n }",
"public int get_size() {\r\n return this.dimension * 2 * sizeof_float + 4 * sizeof_float + sizeof_dimension + sizeof_int;\r\n }",
"public long getSize() {\r\n\t\treturn size;\r\n\t}",
"public double getFeatureSize() {\n\t\t\treturn featureDensity.length;\n\t\t}",
"public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }",
"@Override\n\tpublic int getSize() {\n\t\treturn numberOfEntries;\n\t}",
"@Element \n public String getSize() {\n return size;\n }",
"String getAuthorsCentralGraphSize();",
"@TargetAttributeType(\n\t\tname = SIZE_ATTRIBUTE_NAME,\n\t\tfixed = true,\n\t\thidden = true)\n\tpublic default long getSize() {\n\t\treturn getTypedAttributeNowByName(SIZE_ATTRIBUTE_NAME, Long.class, 0L);\n\t}",
"@javax.annotation.Nullable\n @ApiModelProperty(example = \"100.0\", value = \"The size of the image in GB\")\n\n public BigDecimal getSize() {\n return size;\n }",
"public long getSize() {\n\t\treturn size;\n\t}",
"public long estimateSize() {\n/* 1668 */ return this.est;\n/* */ }",
"public static int size_quality() {\n return (16 / 8);\n }",
"public long getSize() {\n return size;\n }",
"public long getSize() {\n return size;\n }",
"public long getSize() {\n return size;\n }",
"public long getSize() {\n return size;\n }"
]
| [
"0.65246695",
"0.63789",
"0.63527125",
"0.62927645",
"0.621244",
"0.6212014",
"0.61433893",
"0.6132207",
"0.6110499",
"0.60710627",
"0.60556793",
"0.6045138",
"0.60445017",
"0.60349303",
"0.6017181",
"0.5998029",
"0.59719896",
"0.59713644",
"0.5967137",
"0.5958052",
"0.5951618",
"0.5949294",
"0.5932929",
"0.5932421",
"0.59150463",
"0.59148735",
"0.59136546",
"0.59041506",
"0.58964986",
"0.5886733",
"0.5874002",
"0.5870049",
"0.5861642",
"0.585918",
"0.5847517",
"0.5842115",
"0.583772",
"0.583772",
"0.583772",
"0.583772",
"0.583772",
"0.583772",
"0.583772",
"0.583772",
"0.583772",
"0.583772",
"0.583772",
"0.583772",
"0.583772",
"0.5832569",
"0.5832569",
"0.5832569",
"0.5832569",
"0.5832569",
"0.5832569",
"0.5832569",
"0.5832569",
"0.5832569",
"0.5832569",
"0.5823073",
"0.5802598",
"0.57966167",
"0.57930243",
"0.5790111",
"0.578956",
"0.5789429",
"0.57889086",
"0.578697",
"0.57854974",
"0.5773252",
"0.57731354",
"0.57725596",
"0.57716626",
"0.5768236",
"0.575177",
"0.57517284",
"0.57471836",
"0.5737009",
"0.57346666",
"0.5733222",
"0.57321274",
"0.5728897",
"0.5725833",
"0.57208955",
"0.5720361",
"0.5719545",
"0.5715463",
"0.5713068",
"0.57036567",
"0.5697661",
"0.5697158",
"0.56966776",
"0.56915975",
"0.5691095",
"0.56888145",
"0.56852883",
"0.568104",
"0.568104",
"0.568104",
"0.568104"
]
| 0.63901454 | 1 |
Freetext account of the distribution, as specified in <a href=" | @Value.Default
public Dict getDescription() {
return Dict.of();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getAccount();",
"public void linkAccount() {}",
"public String viewAccount() {\n ConversationContext<Account> ctx = AccountController.newEditContext(getPart().getAccount());\n ctx.setLabelWithKey(\"part_account\");\n getCurrentConversation().setNextContextSubReadOnly(ctx);\n return ctx.view();\n }",
"public String getAccountEntry() {\n return this.username + Utility.createLine(' ', MAX_USERNAME_LENGTH -\n this.username.length()) + \" \" + this.type + \" \"\n + String.format(\"%09.2f\", this.balance);\n }",
"public String getAccount() {\r\n\t\treturn account;\r\n\t}",
"public String getAccount(){\n\t\treturn account;\n\t}",
"public String getAccount() {\r\n return account;\r\n }",
"@Override\n\tpublic String getTelFeeAccount() {\n\t\tTelFee_Account = Util.getMaiYuanConfig(\"TelFee_Account\");\n\t\treturn TelFee_Account;\n\t}",
"public String getAccount() {\n\t\treturn getUsername() + \":\" + getPassword() + \"@\" + getUsername();\n\t}",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"java.lang.String getAccountNumber();",
"private String getAuthorLink(Status status, TweetPrinter printer) {\n \t\tString url = \"http://twitter.com/\" + status.getUser().getScreenName();\n \t\treturn printer.getLink(status.getUser().getName(), url);\n \t}",
"String getTradingAccount();",
"public interface Account extends LrsObject {\n /**\n * The canonical home page for the system the account is on. This is based on FOAF's accountServiceHomePage.\n */\n InternationalizedResourceLocator getHomePage();\n\n /**\n * The unique id or name used to log in to this account. This is based on FOAF's accountName.\n */\n String getName();\n}",
"String getAccountDescription();",
"String getAccountDescription();",
"private static void displayAccount(Account account) {\n\t\tSystem.out.println(account.toString());\n\t\tSystem.out.println();\n\t}",
"boolean hasAccountLink();",
"public java.lang.String getAccountNumberString()\r\n\t{\r\n\t\t\r\n\t}",
"public void displayAccountInfo(DropboxAPI.Account account) {\n \tif (account != null) {\n \t\tString info = \"Name: \" + account.displayName + \"\\n\" +\n \t\t\t\"E-mail: \" + account.email + \"\\n\" + \n \t\t\t\"User ID: \" + account.uid + \"\\n\" +\n \t\t\t\"Quota: \" + account.quotaQuota;\n \t\tmText.setText(info);\n \t}\n }",
"public String getAuthor() {\n\t\treturn auth;\n\t}",
"public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n account_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getCurrentUserAccount();",
"public static String getUserAccount(String account){\n return \"select ui_account from user_information where ui_account = '\"+account+\"'\";\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public java.lang.String getAccount() {\n java.lang.Object ref = account_;\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 account_ = s;\n return s;\n }\n }",
"public void setAccount(String account) {\r\n\t\tthis.account = account;\r\n\t}",
"private static String authorLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, NAME_STR, NAME);\n }",
"public String getAccountNo();",
"public java.lang.String getAccount() {\n java.lang.Object ref = account_;\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 if (bs.isValidUtf8()) {\n account_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccount() {\n java.lang.Object ref = account_;\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 account_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"long getAccountLinkId();",
"public String getCreditsAsText()\n {\n return TextUtils.creditStyle( credits );\n }",
"public void printAccountInfo(){\n System.out.printf(\"%5d %-20s %8.2f\\n\",accountNum,customerName,balance);\n }",
"public WebElement getAccountsLink() {\n\t\treturn driver.findElement(By.xpath(\"//*[@class=\\\"accounts-link\\\"]/a\"));\n\t}",
"public String getAffiliation() {\n\t\tfinal String submitterAffiliation = getSubmitterAffiliation();\n\t\tif (submitterAffiliation != null)\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB + \"submitter_affiliation\" + TAB + submitterAffiliation;\n\t\treturn null;\n\t}",
"public String link() {\n return DevRant.BASE_URL + DevRant.RANT_URL + '/' + getId();\n }",
"public String getBreadcrumpMyAccountText()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n String accountBreadcrupmText = getElementText(pageFactory.breadcrumpMyaccount);\r\n return accountBreadcrupmText;\r\n }",
"public String loanTerm_AftrLogin() {\n\t\treturn helper.getText(loanTerm);\n\t}",
"@Override\n public String getDescription() {\n return \"Account information\";\n }",
"private static void lookupAccount(String email) {\n\t\t\n\t}",
"public void ClickAccount() {\n if (lnkAccount.isDisplayed()) {\n lnkAccount.click();\n }\n else{System.out.println(\"Account link is not displayed\");}\n }",
"public abstract String linkText();",
"public String getTextAccountNameIcon()\n\t{\n\t\treturn elementUtils.getElementText(wbAccountNameIcon); //return wbAccountNameIcon.getText()\n\t}",
"public String showReceipt(Account account);",
"String getAccountID();",
"String getAccountID();",
"public static String getAccountStatusPage ()\n {\n return BASE + \"status.wm?initUsername=\" + URL.encodeComponent(CShell.creds.accountName);\n }",
"public String getWeixingaccount() {\n return weixingaccount;\n }",
"@GET\n\t@Path(\"/getAll\")\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic String getPlainTextAccount() {\n\t\tString res = \"\";\n\t\tVector<Account> vs = MyAccountDAO.getAllAccounts();\n\t\tif (vs != null) {\n\t\t\tfor (int i = 0; i < vs.size(); i++) {\n\t\t\t\tres += vs.elementAt(i) + \"\\n\";\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tres = \"VUOTO!\";\n\t\t}\n\t\treturn res;\n\t}",
"java.lang.String getSignatureText();",
"java.lang.String getLoginAccount();",
"java.lang.String getLoginAccount();",
"public String getAccountNameCustom() {\n\t\tSystem.out.println(keypad.SelectAccountNameCustom.getText());\n\t\treturn keypad.SelectAccountNameCustom.getText();\n\t}",
"@Override\r\n\tpublic void showAccount() {\n\t\t\r\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn \"viewAccount.do\";\n\t}",
"public String getConsentPDF();",
"public String getAccountNameNav() {\n\t\treturn keypad.AccountNameNavDrawer.getText();\n\t}",
"java.lang.String getUserDN();",
"public String getAuthor() {\n\t\treturn \"Prasoon, Vikas, Shantanu\";\n\t}",
"void xsetAccountNumber(org.apache.xmlbeans.XmlString accountNumber);",
"public String getAccountNr() {\r\n\t\treturn accountNr;\r\n\t}",
"private Text href() {\n\t\tText href = text();\r\n\r\n\t\tif (syntaxError)\r\n\t\t\treturn null;\r\n\r\n\t\treturn href;\r\n\t}",
"public String getLabHeadAffiliation() {\n\t\tfinal String submitterAffiliation = getSubmitterAffiliation();\n\t\tif (submitterAffiliation != null)\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB + \"lab_head_affiliation\" + TAB + submitterAffiliation;\n\t\treturn null;\n\t}",
"public String getAuthority () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public String getFamilyName() throws PDFNetException {\n/* 550 */ return GetFamilyName(this.a);\n/* */ }",
"public String getDownloadLink() {\r\n\t\tString site = MySoup.getSite();\r\n\t\tString authKey = MySoup.getAuthKey();\r\n\t\tString passKey = MySoup.getPassKey();\r\n\t\tString downloadLink = site + \"torrents.php?action=download&id=\" + id + \"&authkey=\" + authKey + \"&torrent_pass=\" + passKey;\r\n\t\treturn downloadLink;\r\n\t}",
"public String getOrganizationText() {\n return organizationText;\n }",
"public String getAccountNumber() {\n return accountNumber;\n }",
"public String getAccountNumber() {\n return accountNumber;\n }",
"public String getAccountNumber() {\n return accountNumber;\n }",
"public MonetaryAccountReference getAlias() {\n return this.alias;\n }",
"public String getAccountInfo(){\n NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();\n return \"Account No : \" + accountNo +\n \"\\nName : \" + name +\n \"\\nBalance : \" + currencyFormat.format(balance);\n }",
"java.lang.String getServiceAccount();",
"public String getAccountNumber() {\n\t\treturn accountNumber;\n\t}",
"public String getAccountNumber() {\n\t\treturn accountNumber;\n\t}",
"@Override\r\n\tprotected String getConfiguredTitle() {\n\t\treturn TEXTS.get(\"Account\");\r\n\t}",
"public void openAccount(Account a) {}",
"public String getAccountOwner() {\n return accountOwner;\n }",
"public static String getBiblioUser() {\n\t\treturn \"user\";\n\t}",
"public java.lang.String getAccount_number() {\n return account_number;\n }",
"public java.lang.String getAccountNumber() {\r\n return accountNumber;\r\n }",
"public String getAccountNumber() {\n\t\tthis.setAccountNumber(this.account);\n\t\treturn this.account;\n\t}",
"private void setAccountNumber() // setare numar de cont\n {\n int random = ThreadLocalRandom.current().nextInt(1, 100 + 1);\n accountNumber = ID + \"\" + random + SSN.substring(0,2);\n System.out.println(\"Your account number is: \" + accountNumber);\n }",
"public com.google.protobuf.ByteString\n getAccountBytes() {\n java.lang.Object ref = account_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n account_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static void main(String[] args){\n\t\tfinishAcc(\"[email protected]\");\n\t}",
"public static String getAccountNumber() {\n\t\treturn accountNumber;\n\t}",
"String getUserMail();",
"public Account() {\r\n\t\tthis(\"[email protected]\", \"Account\");\r\n\t}"
]
| [
"0.5723771",
"0.5609941",
"0.5586396",
"0.54929924",
"0.546973",
"0.54352987",
"0.54251766",
"0.5370237",
"0.5354281",
"0.53248",
"0.53248",
"0.53248",
"0.53248",
"0.53248",
"0.53248",
"0.53248",
"0.53248",
"0.53248",
"0.53248",
"0.5270314",
"0.52509564",
"0.5244533",
"0.51726794",
"0.5148273",
"0.5148273",
"0.5140348",
"0.51002",
"0.5100003",
"0.5093843",
"0.50837386",
"0.50621617",
"0.5062098",
"0.50490135",
"0.50363487",
"0.50363487",
"0.50363487",
"0.50363487",
"0.50199",
"0.5017712",
"0.50167334",
"0.5001584",
"0.4998798",
"0.49978414",
"0.49866018",
"0.4977329",
"0.4966629",
"0.4966284",
"0.49614686",
"0.49448332",
"0.49397558",
"0.49375808",
"0.49209797",
"0.49189743",
"0.49165314",
"0.4900301",
"0.48966837",
"0.48774156",
"0.48684987",
"0.48684987",
"0.48376483",
"0.48364457",
"0.4836158",
"0.48295337",
"0.48143435",
"0.48143435",
"0.4807938",
"0.4805939",
"0.47892678",
"0.47771242",
"0.47722775",
"0.47716177",
"0.47472703",
"0.4744694",
"0.4743913",
"0.4738657",
"0.473008",
"0.47298938",
"0.47284314",
"0.47192279",
"0.47173727",
"0.4713223",
"0.4713223",
"0.4713223",
"0.47104883",
"0.47085735",
"0.4706414",
"0.47058755",
"0.47058755",
"0.47045758",
"0.46985403",
"0.4697038",
"0.46910855",
"0.46584156",
"0.46568814",
"0.46566045",
"0.46549177",
"0.46546966",
"0.4648388",
"0.46474123",
"0.4645967",
"0.4631175"
]
| 0.0 | -1 |
A link to the license document under which the distribution is made available. The license should be a legal document giving official permission to do something with the resource, as specified in | @Value.Default
public String getLicense() {
return "";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLicense();",
"License createLicense();",
"public String getLicense() {\n\t\treturn license;\n\t}",
"public String getLicenseUrl() {\n\t\treturn licenseUrl;\n\t}",
"@Override\n\tpublic java.lang.String getLicense() {\n\t\treturn _scienceApp.getLicense();\n\t}",
"String getLicense_java_lang_String_();",
"Builder addLicense(URL value);",
"@Override\n\tpublic final void checkLicense() {\n\t}",
"private void findLicenseUrl(Element element) {\n // only look in Anchor elements\n if (!\"a\".equalsIgnoreCase(element.getTagName()))\n return;\n\n // require an href\n String href = element.getAttribute(\"href\");\n if (href == null)\n return;\n\n try {\n URL url = new URL(base, href); // resolve the url\n\n // check that it's a CC license URL\n if (\"http\".equalsIgnoreCase(url.getProtocol())\n && \"creativecommons.org\".equalsIgnoreCase(url.getHost())\n && url.getPath() != null && url.getPath().startsWith(\"/licenses/\")\n && url.getPath().length() > \"/licenses/\".length()) {\n\n // check rel=\"license\"\n String rel = element.getAttribute(\"rel\");\n if (rel != null && \"license\".equals(rel) && this.relLicense == null) {\n this.relLicense = url; // found rel license\n } else if (this.anchorLicense == null) {\n this.anchorLicense = url; // found anchor license\n }\n }\n } catch (MalformedURLException e) { // ignore malformed urls\n }\n }",
"public T generateLicense();",
"public String getCompanyLicenseUrl()\n/* */ {\n/* 125 */ return this.companyLicenseUrl;\n/* */ }",
"public Long getLicence() {\r\n return licence;\r\n }",
"String getLicensePlate();",
"public void onShowLicences();",
"public static String getRandomLicense() {\n String license = \"Copyright 2014 \";\n String owner = names[RandomNumberGenerator.getRandomInt(0, names.length - 1)];\n license = license + owner;\n return license.trim();\n }",
"License getLicense() throws TimeoutException, InterruptedException;",
"public void setLicense(String license) {\n\t\tthis.license = license;\n\t}",
"public String getCopyright();",
"public String getCopyright();",
"License update(License license);",
"Builder addLicense(CreativeWork value);",
"public void setLicence(Long licence) {\r\n this.licence = licence;\r\n }",
"protected boolean checkLicense() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"public String getLicenseId() {\n\t\treturn licenseId;\n\t}",
"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}",
"public String getLicenseNumber() {\n\t\treturn licenseNumber;\n\t}",
"static String copyright() {\n\t\treturn com.ibm.is.sappack.gen.tools.jobgenerator.abapProgramUploadWizard.Copyright.IBM_COPYRIGHT_SHORT;\n\t}",
"public static void addLicensee( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, LICENSEE, value);\r\n\t}",
"public java.lang.String getLicenseNumber() {\n return licenseNumber;\n }",
"public String getMetnoLicense() {\n\t\treturn this.metnoLicense;\n\t}",
"public void setLicenseUrl(String licenseUrl) {\n\t\tthis.licenseUrl = licenseUrl;\n\t}",
"public void setLicenseNumber( int license ) {\n\n licenseNumber = license;\n }",
"public int getLicenseNumber() {\n\n return licenseNumber;\n }",
"public static void addLicensee(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Contact value) {\r\n\t\tBase.add(model, instanceResource, LICENSEE, value);\r\n\t}",
"public String getLicenseModel() {\n return this.licenseModel;\n }",
"public String getLicenseModel() {\n return this.licenseModel;\n }",
"String getLicenseKey() {\n return null;\n }",
"public void validateLicense()\n{\n\n getMACAddress(); //debug mks -- just displays for testing\n\n File license = new File(licenseFilename);\n\n //if the license file does not exist then, request renewal code\n // the program will be aborted if proper renewal code is not supplied\n if (!license.exists()) {requestLicenseRenewal(true);}\n\n //if the license file is invalid or the date has expired, request renewal\n //code the program will be aborted if proper renewal code is not supplied\n if (!validateLicenseFile()) {requestLicenseRenewal(true);}\n\n}",
"public void addLicensee( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), LICENSEE, value);\r\n\t}",
"public static final String getCopyright() { return copyright; }",
"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 }",
"Builder addLicense(String value);",
"public String getCopyright() {\n return copyright;\n }",
"private String readLicenseFromRawResource(int resourceid) {\n String license = \"\";\n BufferedReader in = new BufferedReader(new InputStreamReader(getResources().openRawResource(resourceid)));\n StringBuilder sb = new StringBuilder();\n try {\n while (true) {\n String line = in.readLine();\n if (line == null) {\n return sb.toString();\n }\n if (TextUtils.isEmpty(line)) {\n sb.append(\"\\n\\n\");\n } else {\n sb.append(line);\n sb.append(\" \");\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n return license;\n }\n }",
"public void setCopyrightInformationURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), COPYRIGHTINFORMATIONURL, value);\r\n\t}",
"public void addCopyrightInformationURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), COPYRIGHTINFORMATIONURL, value);\r\n\t}",
"public String getNetworkCultureLicenseUrl()\n/* */ {\n/* 161 */ return this.networkCultureLicenseUrl;\n/* */ }",
"private boolean generateAttributionFile(AttributionDocument attributionDocument, FileWriter w) throws IOException {\n\n boolean first = true;\n\n List<AttributionDependency> deps = attributionDocument.getDependencies();\n Set<String> licensesUsed = new HashSet<>();\n\n for (AttributionDependency d : deps) {\n HashSet<String> intersection = new HashSet<>(moduleList);\n intersection.retainAll(d.getConsumers());\n if (moduleList.isEmpty() || !intersection.isEmpty()) {\n if (first) {\n appendResourceToFile(\"NOTICE_HEADER.txt\", w);\n first = false;\n }\n w.write(HEADER_80 + \"\\n\");\n w.write(d.getName() + \" \" + d.getVersion() + \" \" + d.getLicensor() + \"\\n\");\n String lic = d.getLicenseName();\n if (lic != null && !lic.isEmpty()) {\n w.write(lic + \"\\n\");\n }\n w.write(\"Used by: \" + d.getConsumers() + \"\\n\");\n w.write(HEADER_80 + \"\\n\");\n w.write(d.getAttribution());\n w.write(\"\\n\");\n detectLicenses(licensesUsed, d.getAttribution());\n }\n }\n\n // If we haven't written anything, then let the caller know\n if (first) {\n return false;\n }\n\n // Write full text of licenses used (that were squashed out of report) to the\n // end of the file.\n first = true;\n for (String s : licensesUsed) {\n if (first) {\n appendResourceToFile(\"LICENSE_HEADER.txt\", w);\n first = false;\n }\n w.write(s + \"\\n\");\n // Get license text for AttributionDocument\n AttributionLicense license = getLicense(attributionDocument, s);\n if (license != null) {\n w.write(license.getText());\n } else {\n w.write(\"No license text found for \" + s);\n }\n w.write(HEADER_80 + \"\\n\");\n }\n return true;\n }",
"public License getLicenseByFileName(final String licenseFileName, final boolean checkDataIntegrity)\n\t\t\tthrows LicenseException {\n\t\treturn null;\n\t}",
"public final String getLicensePlate() {\n return licensePlate;\n }",
"public String getSupEntLicence() {\n return supEntLicence;\n }",
"public List<LicenseAttribution> getAttribution() {\r\n return attribution;\r\n }",
"public static void run() throws Exception {\r\n File licenseFile = new File(Constants.LicenseFilePath);\r\n if (licenseFile.exists()) {\r\n FileInputStream stream = new FileInputStream(licenseFile);\r\n License license = new License();\r\n license.setLicense(stream);\r\n stream.close();\r\n\r\n System.out.println(\"License set successfully.\");\r\n } else {\r\n System.out.println(\"\\nWe do not ship any license with this example. \" +\r\n \"\\nVisit the GroupDocs site to obtain either a temporary or permanent license. \" +\r\n \"\\nLearn more about licensing at https://purchase.groupdocs.com/faqs/licensing. \" +\r\n \"\\nLear how to request temporary license at https://purchase.groupdocs.com/temporary-license.\");\r\n }\r\n }",
"public String getSupEntPlicense() {\n return supEntPlicense;\n }",
"public void loadLicenseAgreement(final Layer model, final Boolean showDownload) {\t\t\r\n \t\t// get Dataset to get its EULA id\r\n \t\tif(model != null) {\r\n \t\t\tnodeService.getNodeJSON(NodeType.DATASET, model.getParentId(), new AsyncCallback<String>() {\r\n \t\t\t\t@Override\r\n \t\t\t\tpublic void onSuccess(String datasetJson) {\r\n \t\t\t\t\tDataset dataset = null;\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tdataset = nodeModelCreator.createDataset(datasetJson);\r\n \t\t\t\t\t} catch (RestServiceException ex) {\r\n \t\t\t\t\t\tDisplayUtils.handleServiceException(ex, placeChanger, authenticationController.getLoggedInUser());\r\n \t\t\t\t\t\tonFailure(null);\t\t\t\t\t\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif(dataset != null) {\r\n \t\t\t\t\t\t// Dataset found, get EULA id if exists\r\n \t\t\t\t\t\tfinal String eulaId = dataset.getEulaId();\r\n \t\t\t\t\t\tif(eulaId == null) {\r\n \t\t\t\t\t\t\t// No EULA id means that this has open downloads\r\n \t\t\t\t\t\t\tview.requireLicenseAcceptance(false);\r\n \t\t\t\t\t\t\tlicenseAgreement = null;\r\n \t\t\t\t\t\t\tview.setLicenseAgreement(licenseAgreement);\t\t\t\t\t\t\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t// EULA required\r\n \t\t\t\t\t\t\t// now query to see if user has accepted the agreement\r\n \t\t\t\t\t\t\tUserData currentUser = authenticationController.getLoggedInUser();\r\n \t\t\t\t\t\t\tif(currentUser == null && showDownload) {\r\n \t\t\t\t\t\t\t\tview.showInfo(DisplayConstants.ERROR_TITLE_LOGIN_REQUIRED, DisplayConstants.ERROR_LOGIN_REQUIRED);\r\n \t\t\t\t\t\t\t\tif(placeChanger != null) {\r\n \t\t\t\t\t\t\t\t\tplaceChanger.goTo(new LoginPlace(DisplayUtils.DEFAULT_PLACE_TOKEN));\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\treturn;\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// Check to see if the license has already been accepted\r\n \t\t\t\t\t\t\tlicenseService.hasAccepted(currentUser.getEmail(), eulaId, model.getParentId(), new AsyncCallback<Boolean>() {\r\n \t\t\t\t\t\t\t\t@Override\r\n \t\t\t\t\t\t\t\tpublic void onSuccess(final Boolean hasAccepted) {\r\n \t\t\t\t\t\t\t\t\thasAcceptedLicenseAgreement = hasAccepted;\r\n \t\t\t\t\t\t\t\t\tview.requireLicenseAcceptance(!hasAccepted);\r\n \t\r\n \t\t\t\t\t\t\t\t\t// load license agreement (needed for viewing even if hasAccepted)\r\n \t\t\t\t\t\t\t\t\tnodeService.getNodeJSON(NodeType.EULA, eulaId, new AsyncCallback<String>() {\r\n \t\t\t\t\t\t\t\t\t\t@Override\r\n \t\t\t\t\t\t\t\t\t\tpublic void onSuccess(String eulaJson) {\r\n \t\t\t\t\t\t\t\t\t\t\tEULA eula = null;\r\n \t\t\t\t\t\t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\t\t\t\t\t\teula = nodeModelCreator.createEULA(eulaJson);\r\n \t\t\t\t\t\t\t\t\t\t\t} catch (RestServiceException ex) {\r\n \t\t\t\t\t\t\t\t\t\t\t\tDisplayUtils.handleServiceException(ex, placeChanger, authenticationController.getLoggedInUser());\r\n \t\t\t\t\t\t\t\t\t\t\t\tonFailure(null);\t\t\t\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n \t\t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t\t\tif(eula != null) {\r\n \t\t\t\t\t\t\t\t\t\t\t\t// set licence agreement text\r\n \t\t\t\t\t\t\t\t\t\t\t\tlicenseAgreement = new LicenseAgreement();\t\t\t\t\r\n \t\t\t\t\t\t\t\t\t\t\t\tlicenseAgreement.setLicenseHtml(eula.getAgreement());\r\n \t\t\t\t\t\t\t\t\t\t\t\tlicenseAgreement.setEulaId(eulaId);\r\n \t\t\t\t\t\t\t\t\t\t\t\tview.setLicenseAgreement(licenseAgreement);\r\n \t\t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\t\tshowDownloadLoadFailure();\r\n \t\t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\t\t\t@Override\r\n \t\t\t\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n \t\t\t\t\t\t\t\t\t\t\tshowDownloadLoadFailure();\r\n \t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\t\t});\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@Override\r\n \t\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n \t\t\t\t\t\t\t\t\tshowDownloadLoadFailure();\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t});\t\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tshowDownloadLoadFailure();\r\n \t\t\t\t\t}\r\n \t\t\t\t} \r\n \t\r\n \t\t\t\t@Override\r\n \t\t\t\tpublic void onFailure(Throwable caught) {\r\n \t\t\t\t\tshowDownloadLoadFailure();\r\n \t\t\t\t}\r\n \t\t\t});\r\n \t\t}\r\n \t}",
"public String getBusinessLicensePath() {\n return businessLicensePath;\n }",
"private static void copyrightChoicesIntoContext(SessionState state, Context context)\n\t{\n\t\tboolean usingCreativeCommons = state.getAttribute(STATE_USING_CREATIVE_COMMONS) != null && state.getAttribute(STATE_USING_CREATIVE_COMMONS).equals(Boolean.TRUE.toString());\t\t\n\t\t\n\t\tif(usingCreativeCommons)\n\t\t{\n\t\t\t\n\t\t\tString ccOwnershipLabel = \"Who created this resource?\";\n\t\t\tList ccOwnershipList = new Vector();\n\t\t\tccOwnershipList.add(\"-- Select --\");\n\t\t\tccOwnershipList.add(\"I created this resource\");\n\t\t\tccOwnershipList.add(\"Someone else created this resource\");\n\t\t\t\n\t\t\tString ccMyGrantLabel = \"Terms of use\";\n\t\t\tList ccMyGrantOptions = new Vector();\n\t\t\tccMyGrantOptions.add(\"-- Select --\");\n\t\t\tccMyGrantOptions.add(\"Use my copyright\");\n\t\t\tccMyGrantOptions.add(\"Use Creative Commons License\");\n\t\t\tccMyGrantOptions.add(\"Use Public Domain Dedication\");\n\t\t\t\n\t\t\tString ccCommercialLabel = \"Allow commercial use?\";\n\t\t\tList ccCommercialList = new Vector();\n\t\t\tccCommercialList.add(\"Yes\");\n\t\t\tccCommercialList.add(\"No\");\n\t\t\t\n\t\t\tString ccModificationLabel = \"Allow Modifications?\";\n\t\t\tList ccModificationList = new Vector();\n\t\t\tccModificationList.add(\"Yes\");\n\t\t\tccModificationList.add(\"Yes, share alike\");\n\t\t\tccModificationList.add(\"No\");\n\t\t\t\n\t\t\tString ccOtherGrantLabel = \"Terms of use\";\n\t\t\tList ccOtherGrantList = new Vector();\n\t\t\tccOtherGrantList.add(\"Subject to fair-use exception\");\n\t\t\tccOtherGrantList.add(\"Public domain (created before copyright law applied)\");\n\t\t\tccOtherGrantList.add(\"Public domain (copyright has expired)\");\n\t\t\tccOtherGrantList.add(\"Public domain (government document not subject to copyright)\");\n\t\t\t\n\t\t\tString ccRightsYear = \"Year\";\n\t\t\tString ccRightsOwner = \"Copyright owner\";\n\t\t\t\n\t\t\tString ccAcknowledgeLabel = \"Require users to acknowledge author's rights before access?\";\n\t\t\tList ccAcknowledgeList = new Vector();\n\t\t\tccAcknowledgeList.add(\"Yes\");\n\t\t\tccAcknowledgeList.add(\"No\");\n\t\t\t\n\t\t\tString ccInfoUrl = \"\";\n\t\t\t\n\t\t\tint year = TimeService.newTime().breakdownLocal().getYear();\n\t\t\tString username = UserDirectoryService.getCurrentUser().getDisplayName(); \n\n\t\t\tcontext.put(\"usingCreativeCommons\", Boolean.TRUE);\n\t\t\tcontext.put(\"ccOwnershipLabel\", ccOwnershipLabel);\n\t\t\tcontext.put(\"ccOwnershipList\", ccOwnershipList);\n\t\t\tcontext.put(\"ccMyGrantLabel\", ccMyGrantLabel);\n\t\t\tcontext.put(\"ccMyGrantOptions\", ccMyGrantOptions);\n\t\t\tcontext.put(\"ccCommercialLabel\", ccCommercialLabel);\n\t\t\tcontext.put(\"ccCommercialList\", ccCommercialList);\n\t\t\tcontext.put(\"ccModificationLabel\", ccModificationLabel);\n\t\t\tcontext.put(\"ccModificationList\", ccModificationList);\n\t\t\tcontext.put(\"ccOtherGrantLabel\", ccOtherGrantLabel);\n\t\t\tcontext.put(\"ccOtherGrantList\", ccOtherGrantList);\n\t\t\tcontext.put(\"ccRightsYear\", ccRightsYear);\n\t\t\tcontext.put(\"ccRightsOwner\", ccRightsOwner);\n\t\t\tcontext.put(\"ccAcknowledgeLabel\", ccAcknowledgeLabel);\n\t\t\tcontext.put(\"ccAcknowledgeList\", ccAcknowledgeList);\n\t\t\tcontext.put(\"ccInfoUrl\", ccInfoUrl);\n\t\t\tcontext.put(\"ccThisYear\", Integer.toString(year));\n\t\t\tcontext.put(\"ccThisUser\", username);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//copyright\n\t\t\tif (state.getAttribute(COPYRIGHT_FAIRUSE_URL) != null)\n\t\t\t{\n\t\t\t\tcontext.put(\"fairuseurl\", state.getAttribute(COPYRIGHT_FAIRUSE_URL));\n\t\t\t}\n\t\t\tif (state.getAttribute(NEW_COPYRIGHT_INPUT) != null)\n\t\t\t{\n\t\t\t\tcontext.put(\"newcopyrightinput\", state.getAttribute(NEW_COPYRIGHT_INPUT));\n\t\t\t}\n\t\n\t\t\tif (state.getAttribute(COPYRIGHT_TYPES) != null)\n\t\t\t{\n\t\t\t\tList copyrightTypes = (List) state.getAttribute(COPYRIGHT_TYPES);\n\t\t\t\tcontext.put(\"copyrightTypes\", copyrightTypes);\n\t\t\t\tcontext.put(\"copyrightTypesSize\", new Integer(copyrightTypes.size() - 1));\n\t\t\t\tcontext.put(\"USE_THIS_COPYRIGHT\", copyrightTypes.get(copyrightTypes.size() - 1));\n\t\t\t}\n\t\t}\n\t\t\n\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\tif(preventPublicDisplay == null)\n\t\t{\n\t\t\tpreventPublicDisplay = Boolean.FALSE;\n\t\t\tstate.setAttribute(STATE_PREVENT_PUBLIC_DISPLAY, preventPublicDisplay);\n\t\t}\n\t\tcontext.put(\"preventPublicDisplay\", preventPublicDisplay);\n\t\t\n\t}",
"@Override\n\tpublic void setLicense(java.lang.String license) {\n\t\t_scienceApp.setLicense(license);\n\t}",
"@Override\r\n\tpublic String getBind_driving_license_ind() {\n\t\treturn super.getBind_driving_license_ind();\r\n\t}",
"public static void setLicensee( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, LICENSEE, value);\r\n\t}",
"public String getLicensePlate() {\n return licensePlate;\n }",
"public String getFinanceLicenseUrl()\n/* */ {\n/* 143 */ return this.financeLicenseUrl;\n/* */ }",
"public License read() throws IOException {\n return read(IOFormat.BINARY);\n }",
"public void addLicensee(Contact value) {\r\n\t\tBase.add(this.model, this.getResource(), LICENSEE, value);\r\n\t}",
"public void setLicenseModel(String licenseModel) {\n this.licenseModel = licenseModel;\n }",
"public void setLicenseModel(String licenseModel) {\n this.licenseModel = licenseModel;\n }",
"public static void setLicensee(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Contact value) {\r\n\t\tBase.set(model, instanceResource, LICENSEE, value);\r\n\t}",
"public String getCopyrightForm() {\n return (String)getAttributeInternal(COPYRIGHTFORM);\n }",
"public String getPublicCopyrightFlag() {\n return (String)getAttributeInternal(PUBLICCOPYRIGHTFLAG);\n }",
"public String getLicensePlate() {\n\t\treturn licensePlate;\n\t}",
"java.lang.String[] getLicenseWindows() throws java.io.IOException;",
"@Override\r\n\tpublic String getBind_vehicle_license_ind() {\n\t\treturn super.getBind_vehicle_license_ind();\r\n\t}",
"public String getOverseasCopyrightFlag() {\n return (String)getAttributeInternal(OVERSEASCOPYRIGHTFLAG);\n }",
"Builder addLicense(CreativeWork.Builder value);",
"public void setLicensee(Contact value) {\r\n\t\tBase.set(this.model, this.getResource(), LICENSEE, value);\r\n\t}",
"public String link() {\n return DevRant.BASE_URL + DevRant.RANT_URL + '/' + getId();\n }",
"public void setLicensee( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), LICENSEE, value);\r\n\t}",
"private void assignBuildingLicense(Player owner, BuildingPermit buildingLicense) {\n\t\towner.addBuildingPermit(buildingLicense);\n\t}",
"public String getCopyrightYear()\r\n\t{\r\n\t\treturn COPYRIGHT_YEAR;\r\n\t}",
"public DataResourceBuilder _standardLicense_(URI _standardLicense_) {\n this.dataResourceImpl.setStandardLicense(_standardLicense_);\n return this;\n }",
"@Override\n public String getDescription() {\n return \"Asset issuance\";\n }",
"public String getCopyrightOwner() {\n return (String)getAttributeInternal(COPYRIGHTOWNER);\n }",
"public static void main(String[] args) throws Exception\n\t{\n License license = new License();\n // Load license in FileStream\n InputStream myStream = new FileInputStream(\"D:\\\\Aspose.Total.Java.lic\");\n // Set license\n license.setLicense(myStream);\n System.out.println(\"License set successfully.\");\n // ExEnd:LoadLicenseFromStream\n\t}",
"@java.lang.Override\n public google.maps.fleetengine.v1.LicensePlate getLicensePlate() {\n return licensePlate_ == null ? google.maps.fleetengine.v1.LicensePlate.getDefaultInstance() : licensePlate_;\n }",
"protected void writeCopyright(Writer writer) throws IOException {\n writer.write(\"Copyright, \" + year + \", salesforce.com\");\n }",
"Builder addCopyrightHolder(Organization value);",
"@Override\n public String getContributorURI()\n {\n return null;\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tdialogLicense();\r\n\t\t\t}",
"public static void addCopyrightInformationURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, COPYRIGHTINFORMATIONURL, value);\r\n\t}",
"public String getExclusiveCopyrightFlag() {\n return (String)getAttributeInternal(EXCLUSIVECOPYRIGHTFLAG);\n }",
"String legalTerms();",
"public java.util.Date getValidityDateOfLicense() {\n return validityDateOfLicense;\n }",
"public void generateEnquireLink();",
"public void addCopyrightInformationURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), COPYRIGHTINFORMATIONURL, value);\r\n\t}",
"private void addTermsOfLoanAgreement() throws DocumentException {\n paragraph = new Paragraph(CommonString.getTermsOfAgreement(isSwedish), SECTION_TITLE_FONT);\n\n addEmptyLine(paragraph, 1);\n paragraph.add(new Paragraph(CommonString.getLoanPolicy(isSwedish), TEXT_FONT));\n paragraph.add(new Paragraph(CommonString.getPrimaryBorrowerAgreement(isSwedish), TEXT_FONT));\n addEmptyLine(paragraph, 1);\n\n document.add(paragraph);\n adminDocument.add(paragraph);\n }",
"public org.LexGrid.commonTypes.Text getCopyright() {\n return copyright;\n }",
"public Number getCopyrightId() {\n return (Number)getAttributeInternal(COPYRIGHTID);\n }",
"public String marriageLicenseSearchResult() {\n MarriageRegister marriageRegister = marriageRegistrationService.getByIdUKey(marriageIdUKey, user);\n if (marriageRegister != null && marriageRegister.getState() == MarriageRegister.State.LICENSE_PRINTED\n && marriageRegister.getLifeCycleInfo().isActiveRecord()) {\n idUKey = marriageRegister.getIdUKey();\n } else {\n addActionError(getText(\"error.marriageregister.norecords\"));\n return ERROR;\n }\n mode = AppConstants.REGISTER;\n return SUCCESS;\n }",
"public void setPublicCopyrightFlag(String value) {\n setAttributeInternal(PUBLICCOPYRIGHTFLAG, value);\n }",
"public static String compose(RDFLicense lic1, RDFLicense lic2) {\r\n \r\n \r\n String compatible = \"\";\r\n String reason = \"\";\r\n String source = \"\";\r\n String resulting =\"\";\r\n\r\n reason =\"A computation has been made on the basis of the main permissions, prohibitions. The result has been computed automatically and no warranty exists on its reliability. Please check the legal text.\";\r\n source=\"computed\";\r\n \r\n List<String> per1 = RDFLicenseCheck.getPermissions(lic1);\r\n List<String> pro1 = RDFLicenseCheck.getProhibitions(lic1);\r\n List<String> dut1 = RDFLicenseCheck.getDuties(lic1);\r\n List<String> per2 = RDFLicenseCheck.getPermissions(lic2);\r\n List<String> pro2 = RDFLicenseCheck.getProhibitions(lic2);\r\n List<String> dut2 = RDFLicenseCheck.getDuties(lic2);\r\n \r\n\r\n /*System.out.print(\"Per1: \");\r\n for(String p : per1)\r\n System.out.print(p+\" \");\r\n System.out.print(\"\\nPro1: \");\r\n for(String p : pro1)\r\n System.out.print(p+\" \");\r\n System.out.print(\"\\nPer2: \");\r\n for(String p : per2)\r\n System.out.print(p+\" \");\r\n System.out.print(\"\\nPro2: \");\r\n for(String p : pro2)\r\n System.out.print(p+\" \");\r\n System.out.print(\"\\n\");*/\r\n \r\n \r\n \r\n if (lic1.getURI().equals(lic2.getURI()))\r\n {\r\n compatible=\"compatible\";\r\n reason = \"The licenses are the same.\";\r\n }\r\n\r\n List<String> per3 = ListUtils.intersection(per1, per2);\r\n List<String> pro3 = ListUtils.union(pro1, pro2);\r\n List<String> dut3 = ListUtils.union(dut1, dut2);\r\n \r\n List<String> em1=ListUtils.intersection(pro3, per3);\r\n if (!em1.isEmpty() )\r\n {\r\n compatible = \"not compatible\";\r\n }\r\n else\r\n {\r\n compatible =\"compatible\";\r\n }\r\n \r\n RDFLicense lic3 = RDFLicenseFactory.createLicense(per3, dut3, pro3);\r\n\r\n resulting = lic3.toTTL();\r\n// System.out.println(lic3.toTTL());\r\n \r\n \r\n String json =\"\";\r\n try {\r\n JSONObject obj = new JSONObject();\r\n obj.put(\"compatible\", compatible);\r\n obj.put(\"reason\", reason);\r\n obj.put(\"source\", source);\r\n obj.put(\"resulting\", resulting);\r\n json = obj.toString();\r\n } catch (Exception e) {\r\n json = \"error\";\r\n }\r\n return json;\r\n }"
]
| [
"0.7220536",
"0.7072264",
"0.6810458",
"0.6699057",
"0.6648126",
"0.6493004",
"0.63243985",
"0.6285075",
"0.6282077",
"0.627862",
"0.6224889",
"0.6214649",
"0.61808187",
"0.61544293",
"0.61532784",
"0.61455035",
"0.60991395",
"0.60973006",
"0.60973006",
"0.602146",
"0.59975845",
"0.5991246",
"0.5980448",
"0.5970994",
"0.59216005",
"0.5916176",
"0.59006256",
"0.58213043",
"0.5794557",
"0.579238",
"0.576877",
"0.5765276",
"0.57365894",
"0.57336605",
"0.5709746",
"0.5709746",
"0.56945616",
"0.5688357",
"0.5668905",
"0.56603926",
"0.5645513",
"0.56384635",
"0.55704993",
"0.55701524",
"0.5555213",
"0.5553069",
"0.55457884",
"0.55271375",
"0.55209625",
"0.5515201",
"0.5506038",
"0.55059946",
"0.54908603",
"0.54880315",
"0.5481352",
"0.5473499",
"0.54732865",
"0.54568154",
"0.54430807",
"0.5433809",
"0.5428198",
"0.5424951",
"0.5399997",
"0.5398609",
"0.53917336",
"0.53917336",
"0.5385778",
"0.53679276",
"0.53649646",
"0.5340638",
"0.5333759",
"0.5326644",
"0.5307478",
"0.53006387",
"0.52984107",
"0.5295582",
"0.52794886",
"0.52671075",
"0.52632284",
"0.5259379",
"0.5258992",
"0.5233728",
"0.5232039",
"0.522986",
"0.5227729",
"0.5226601",
"0.522114",
"0.5219296",
"0.52140963",
"0.5206862",
"0.52049685",
"0.52019095",
"0.5197362",
"0.51924706",
"0.51776063",
"0.5143591",
"0.514162",
"0.51404107",
"0.5131344",
"0.5130053"
]
| 0.6122124 | 16 |
The media type of the distribution as defined by , for example, "text/csv". This property SHOULD be used when the media type of the distribution is defined in IANA, otherwise . | @Value.Default
public String getMediaType() {
return "";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"MimeType mediaType();",
"MediaType getMediaType();",
"public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }",
"public String getMediaType() {\r\n return mediaType;\r\n }",
"public java.lang.String getMediaType()\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_default_attribute_value(MEDIATYPE$18);\n }\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"String getContentType();",
"String getContentType();",
"String getContentType();",
"public String getMimeType() {\n return mimeType;\n }",
"public String getMimeType() {\n return mimeType;\n }",
"String getMimeType();",
"public String getMediaType() {\n\t\treturn mediaType;\n\t}",
"public String getMimeType();",
"public String getMimeType() {\r\n return mimeType;\r\n }",
"java.lang.String getMimeType();",
"java.lang.String getMimeType();",
"public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }",
"public String getContentType();",
"public String getContentType();",
"public String getMimeType() {\n return mimeType;\n }",
"default String getContentType() {\n return \"application/octet-stream\";\n }",
"public String getMediaType() throws SdpParseException {\n\t\treturn getMedia();\n\t}",
"public String getMediaType() {\n\t\t\treturn mediaType;\n\t\t}",
"@NotNull\n String getMimeType();",
"public String getExportMimeType(){\n return \"text/plain\";\n }",
"public String getMimeType() {\n return mimeType;\n }",
"protected abstract MediaType getSupportedMediaType();",
"int getContentTypeValue();",
"String getPreferredMediaType( Document testRunArgs ) {\r\n String mediaTypeFromTestRunArg = parseMediaTypeFromTestRunArgs( testRunArgs );\r\n if ( mediaTypeFromTestRunArg != null && SUPPORTED_MEDIA_TYPES.contains( mediaTypeFromTestRunArg ) )\r\n return mediaTypeFromTestRunArg;\r\n return \"application/xml\";\r\n }",
"public void setMime_type(String value)\r\n {\r\n getSemanticObject().setProperty(data_mime_type, value);\r\n }",
"public String getMimeType() {\n return null;\n }",
"public String getMimeType() {\n return null;\n }",
"public interface VCloudDirectorMediaType {\n public final static String NS = \"http://www.vmware.com/vcloud/v1.5\";\n\n public final static String SESSION_XML = \"application/vnd.vmware.vcloud.session+xml\";\n\n public final static String ORGLIST_XML = \"application/vnd.vmware.vcloud.orgList+xml\";\n \n public final static String METADATA_XML = \"application/vnd.vmware.vcloud.metadata+xml\";\n \n public static final String METADATAENTRY_XML = \"TODO\"; // TODO\n \n public final static String ORG_XML = \"application/vnd.vmware.vcloud.org+xml\";\n\n public static final String ORG_NETWORK_XML = \"application/vnd.vmware.vcloud.orgNetwork+xml\";\n\n}",
"public String getMimeType ()\n {\n final String METHOD_NAME = \"getMimeType\";\n this.logDebug(METHOD_NAME + \"1/2: Started\");\n\n String mimeType = null;\n try\n {\n\tint contentType = this.document.getContentType();\n\tif ( contentType >= 0 ) mimeType = MediaType.nameFor[contentType];\n }\n catch (Exception exception)\n {\n\tthis.logWarn(METHOD_NAME + \"Failed to retrieve mime type\", exception);\n }\n\n this.logDebug(METHOD_NAME + \" 2/2: Done. mimeType = \" + mimeType);\n return mimeType;\n }",
"gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type getType();",
"public static String getMediaType(Request request) {\n\t\tList<Preference<MediaType>> acceptedMediaTypes = request.getClientInfo().getAcceptedMediaTypes();\n\t\tfor (Preference<MediaType> preference : acceptedMediaTypes) {\n\t\t\tMediaType mediaType = preference.getMetadata();\n\t\t\tString mediaTypeName = mediaType.getName().trim();\n\t\t\tmediaTypeName=mediaTypeName.replaceAll(\"\\\\s\", \"\");\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_JSONVERBOSE.getName())){\n\t\t\t\treturn \".json\";\n\t\t\t}\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_ATOM.getName())){\n\t\t\t\treturn \".xml\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@XmlElement(name = \"distributionFormat\")\n private Collection<Format> getDistributionFormat() {\n return FilterByVersion.CURRENT_METADATA.accept() ? getDistributionFormats() : null;\n }",
"public String getLBR_MDFeDocType();",
"public String getMimeType() {\n\t\treturn mimeType;\n\t}",
"public String getMimeType() {\n\t\treturn mimeType;\n\t}",
"public String getMimeType() {\n\t\treturn mimeType;\n\t}",
"MediaType createMediaType();",
"public interface HttpMimeType {\n\n\t// Image\n \n public static final String APNG_IMAGE = \"image/apng\";\n \n public static final String BMP_IMAGE = \"image/bmp\";\n\n\tpublic static final String GIF_IMAGE = \"image/gif\";\n\t\n\tpublic static final String ICO_IMAGE = \"image/ico\";\n\n\tpublic static final String JPEG_IMAGE = \"image/jpeg\";\n\n\tpublic static final String JPG_IMAGE = \"image/jpg\";\n\n public static final String PNG_IMAGE = \"image/png\";\n\n\tpublic static final String SVG_IMAGE = \"image/svg+xml\";\n\n\tpublic static final String TIFF_IMAGE = \"image/tiff\";\n\t\n\tpublic static final String WEBP_IMAGE = \"image/webp\";\n\n\t// text formats\n\n\tpublic static final String TEXT_PLAIN = \"text/plain\";\n\n\tpublic static final String CSV = \"text/csv\";\n\n\tpublic static final String CSS = \"text/css\";\n\n\tpublic static final String HTML = \"text/html\";\n\n\tpublic static final String JAVASCRIPT = \"text/javascript\";\n\n\tpublic static final String RTF = \"text/rtf\";\n\n\tpublic static final String XML = \"text/xml\";\n\n\t// document formats\n\n\tpublic static final String JSON = \"application/json\";\n\n\tpublic static final String ATOM = \"application/atom+xml\";\n\n\tpublic static final String PDF = \"application/pdf\";\n\n\tpublic static final String POSTSCRIPT = \"application/postscript\";\n\n\tpublic static final String XLS = \"application/vnd.ms-excel\";\n\n\tpublic static final String XLSX = \"application/vnd.ms-excel\";\n\n\tpublic static final String PPT = \"application/vnd.ms-powerpoint\";\n\n\tpublic static final String PPTX = \"application/vnd.ms-powerpoint\";\n\n\tpublic static final String XPS = \"application/vnd.ms-xpsdocument\";\n\n\t// binary\n\n\tpublic static final String BINARY = \"application/octet-stream\";\n\n\t// music ones\n\n\tpublic static final String MP4_AUDIO = \"audio/mp4\";\n\n\tpublic static final String MP3_AUDIO = \"audio/mpeg\";\n\n\tpublic static final String OGG_VORBIS_AUDIO = \"audio/ogg\";\n\n\tpublic static final String OPUS_AUDIO = \"audio/opus\";\n\n\tpublic static final String VORBIS_AUDIO = \"audio/vorbis\";\n\n\tpublic static final String WEBM_AUDIO = \"audio/webm\";\n\n\t// video\n\n\tpublic static final String MPEG_VIDEO = \"video/mpeg\";\n\n\tpublic static final String MP4_VIDEO = \"video/mp4\";\n\n\tpublic static final String OGG_THEORA_VIDEO = \"video/ogg\";\n\n\tpublic static final String QUICKTIME_VIDEO = \"video/quicktime\";\n\n\tpublic static final String WEBM_VIDEO = \"video/webm\";\n\n\t// feeds\n\n\tpublic static final String RDF = \"application/rdf+xml\";\n\n\tpublic static final String RSS = \"application/rss+xml\";\n\n}",
"@ApiModelProperty(\n example = \"image/jpeg\",\n value = \"MimeType of the file (image/png, image/jpeg, application/pdf, etc..)\")\n /**\n * MimeType of the file (image/png, image/jpeg, application/pdf, etc..)\n *\n * @return mimeType String\n */\n public String getMimeType() {\n return mimeType;\n }",
"@DISPID(1093) //= 0x445. The runtime will prefer the VTID if present\n @VTID(14)\n java.lang.String media();",
"public String getContentType() {\n return this.contentType;\n }",
"public String getContentType() {\n return getProperty(Property.CONTENT_TYPE);\n }",
"public final String getAcceptContentType() {\n return properties.get(ACCEPT_CONTENT_TYPE_PROPERTY);\n }",
"public String getContentType() {\n\t\tString ct = header.getContentType();\n\t\treturn Strings.substringBefore(ct, ';');\n\t}",
"public CharSequence getContentType() {\n return contentType;\n }",
"public String mimeType() {\n return this.mimeType;\n }",
"public String getDocumentType();",
"@Override\r\n\tpublic String getContentType() {\r\n\t\treturn attachmentType;\r\n\t}",
"public void setMediaType(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), MEDIATYPE, value);\r\n\t}",
"public org.apache.xmlbeans.XmlString xgetMediaType()\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_default_attribute_value(MEDIATYPE$18);\n }\n return target;\n }\n }",
"public String getContentType() {\n return contentType;\n }",
"public String getContenttype() {\n return contenttype;\n }",
"public String getContenttype() {\n return contenttype;\n }",
"@Override\n public String getContentType() {\n return null;\n }",
"public MediaType getType() {\n return type;\n }",
"@Override\n public int getContentType() {\n return 0;\n }",
"@Override\n\tpublic String getContentType()\n\t{\n\t\treturn contentType;\n\t}",
"public Integer getOptContentType() { return(content_type); }",
"public static String getContentType(HttpResponse argOriginResponse) {\r\n\t\tString mime = null;\r\n\t\tHeader header = argOriginResponse\r\n\t\t\t\t.getFirstHeader(HttpConstants.CONTENT_TYPE);\r\n\t\tif (header != null) {\r\n\t\t\tmime = header.getValue();\r\n\t\t\tint semiColonIndex = mime.indexOf(HttpConstants.SEMI_COLON);\r\n\t\t\tif (semiColonIndex != -1) {\r\n\t\t\t\tmime = mime.substring(0, semiColonIndex);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn mime;\r\n\t}",
"String getFileMimeType();",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Specify the CSS media type. Defaults to \\\"print\\\" but you may want to use \\\"screen\\\" for web styles.\")\n @JsonProperty(JSON_PROPERTY_MEDIA)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getMedia() {\n return media;\n }",
"protected String getContentType()\n {\n if (fullAttachmentFilename == null)\n {\n return null;\n }\n String ext = FilenameUtils.getExtension(fullAttachmentFilename);\n if (ext == null)\n {\n return null;\n }\n if (ext.equalsIgnoreCase(\"pdf\"))\n {\n return \"application/pdf\";\n } else if (ext.equalsIgnoreCase(\"zip\"))\n {\n return \"application/zip\";\n } else if (ext.equalsIgnoreCase(\"jpg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"jpeg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"html\"))\n {\n return \"text/html\";\n\n } else if (ext.equalsIgnoreCase(\"png\"))\n {\n return \"image/png\";\n\n } else if (ext.equalsIgnoreCase(\"gif\"))\n {\n return \"image/gif\";\n\n }\n log.warn(\"Content type not found for file extension: \" + ext);\n return null;\n }",
"@Override\n\t\tpublic String getContentType() {\n\t\t\treturn null;\n\t\t}",
"@Override\n public String getMimeType() {\n return \"text/text\"; //$NON-NLS-1$\n }",
"String getAssetTypeRestriction();",
"public String getType()\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\treturn typeElement == null ? null : typeElement.getTextContent();\n\t\t}",
"public String getMimeType() {\n return this.mimeType;\n }",
"public String getFiletype() {\n return filetype;\n }",
"public String getContentType() {\n return getHeader(\"Content-Type\");\n }",
"@Override\n public String getType(Uri uri) {\n // Return a string that identifies the MIME type\n // for a Content Provider URI\n switch (uriMatcher.match(uri)) {\n case ALLROWS: \n return \"vnd.android.cursor.dir/vnd.paad.elemental\";\n case SINGLE_ROW: \n return \"vnd.android.cursor.item/vnd.paad.elemental\";\n case SEARCH : \n return SearchManager.SUGGEST_MIME_TYPE;\n default: \n throw new IllegalArgumentException(\"Unsupported URI: \" + uri);\n }\n }",
"public String getContentType() {\n return this.contentType;\n }",
"public String getContentType() {\n return this.contentType;\n }",
"public String getContentType() {\n return this.contentType;\n }",
"public String getPartString() { return \"Type\"; }",
"public String getMimeType() {\r\n\t\treturn this.mimeType;\r\n\t}",
"public MimeType mimetype() {\r\n return getContent().mimetype();\r\n }",
"public Set<MediaType> getSupportedMediaTypes();",
"@Override\n\tpublic String getContentType(String filename) {\n\t\treturn null;\n\t}",
"public static String contentToFileExtension(String mediatype, String subtype) {\r\n\t\tif (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_IMAGE)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_GIF)) {\r\n\t\t\t\treturn \"gif\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_JPEG)) {\r\n\t\t\t\treturn \"jpg\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_PNG)) {\r\n\t\t\t\treturn \"png\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_TIFF)) {\r\n\t\t\t\treturn \"tiff\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_ICON)) {\r\n\t\t\t\treturn \"ico\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_SVG)) {\r\n\t\t\t\treturn \"svg\";\r\n\t\t\t}\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_TEXT)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_CSS)) {\r\n\t\t\t\treturn \"css\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_HTML)) {\r\n\t\t\t\treturn \"html\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_JAVASCRIPT)) {\r\n\t\t\t\treturn \"js\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_PLAIN)) {\r\n\t\t\t\treturn \"txt\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_RICHTEXT)) {\r\n\t\t\t\treturn \"rtf\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_SOAPXML)) {\r\n\t\t\t\treturn \"xml\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_CSV)) {\r\n\t\t\t\treturn \"csv\";\r\n\t\t\t}\r\n\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_APPLICATION)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MSEXCEL)) {\r\n\t\t\t\treturn \"xls\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MSWORD)) {\r\n\t\t\t\treturn \"doc\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_RAR)) {\r\n\t\t\t\treturn \"rar\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_PDF)) {\r\n\t\t\t\treturn \"pdf\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_SHOCKWAVEFLASH)) {\r\n\t\t\t\treturn \"swf\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_WINDOWSEXECUTEABLE)) {\r\n\t\t\t\treturn \"exe\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_ZIP)) {\r\n\t\t\t\treturn \"zip\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_POSTSCRIPT)) {\r\n\t\t\t\treturn \"ps\";\r\n\t\t\t}\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_VIDEO)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_WINDOWSMEDIA)) {\r\n\t\t\t\treturn \"wmv\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_AVI)) {\r\n\t\t\t\treturn \"avi\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MP4)) {\r\n\t\t\t\treturn \"mp4\";\r\n\t\t\t}\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_AUDIO)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MPEG3) || StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MPEG)) {\r\n\t\t\t\treturn \"mp3\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_WINDOWSAUDIO)) {\r\n\t\t\t\treturn \"wma\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MP4)) {\r\n\t\t\t\treturn \"mp4\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"@ApiModelProperty(required = true, value = \"The mime type of the file/folder. If unknown, it defaults to application/binary.\")\n public String getMimeType() {\n return mimeType;\n }",
"public String getContentType() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {\n\t\treturn new String[] {\n\t\t\tIDocument.DEFAULT_CONTENT_TYPE \n\t\t};\t\t\n\t}",
"public abstract String[] getSupportedMediaTypes();",
"@Override\n\tpublic String getContentType() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getContentType() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getContentType() {\n\t\treturn null;\n\t}",
"@Override\r\n public String getCustomContentType() {\r\n return DirectUtils.getFileMIMEType(new File(this.imagePath));\r\n }",
"public String getContentType() {\n return contentType;\n }",
"public String getContentType() {\n return contentType;\n }",
"public String getContentType() {\n return contentType;\n }",
"public String getContentType() {\n return contentType;\n }",
"public String getContentType() {\n return contentType;\n }",
"protected String getContentType(Resource resource, @SuppressWarnings(\"unused\") SlingHttpServletRequest request) {\n String mimeType = JcrBinary.getMimeType(resource);\n if (StringUtils.isEmpty(mimeType)) {\n mimeType = ContentType.OCTET_STREAM;\n }\n return mimeType;\n }",
"@Override\n\tpublic String getContentType() {\n\t\treturn CONTENT_TYPE;\n\t}",
"public String getFILE_TYPE() {\r\n return FILE_TYPE;\r\n }"
]
| [
"0.68576413",
"0.68370575",
"0.6738027",
"0.66570055",
"0.6506895",
"0.64701146",
"0.64701146",
"0.64701146",
"0.6455694",
"0.6455694",
"0.64320236",
"0.6422341",
"0.6387451",
"0.6360997",
"0.6339174",
"0.6339174",
"0.6337218",
"0.6335128",
"0.6335128",
"0.6320471",
"0.6306133",
"0.6299972",
"0.62590516",
"0.625641",
"0.6231108",
"0.62281704",
"0.6218607",
"0.6211637",
"0.62068766",
"0.620295",
"0.6198898",
"0.6198898",
"0.6174566",
"0.6174378",
"0.616068",
"0.61600924",
"0.6152853",
"0.6142651",
"0.6140205",
"0.6140205",
"0.6140205",
"0.612795",
"0.6126932",
"0.6077532",
"0.6008073",
"0.6005952",
"0.59974796",
"0.5983962",
"0.5981793",
"0.5976993",
"0.5963622",
"0.5960876",
"0.5954901",
"0.5953484",
"0.5948179",
"0.5928738",
"0.5928582",
"0.5928582",
"0.5903822",
"0.58833414",
"0.58720493",
"0.5869262",
"0.58688897",
"0.584871",
"0.5844461",
"0.5839221",
"0.5827093",
"0.58171546",
"0.581565",
"0.5814167",
"0.58053565",
"0.580414",
"0.5802189",
"0.58006155",
"0.5794338",
"0.57930166",
"0.57930166",
"0.57930166",
"0.5792106",
"0.5789571",
"0.57701796",
"0.5766047",
"0.5757024",
"0.57530946",
"0.57462513",
"0.5737262",
"0.5735461",
"0.57258224",
"0.5721463",
"0.5721463",
"0.5721463",
"0.57181495",
"0.57082057",
"0.57082057",
"0.57082057",
"0.57082057",
"0.57082057",
"0.57003415",
"0.5683963",
"0.56817514"
]
| 0.69340587 | 0 |
A human readable name given to the distribution, i.e. "CSV Distribution of Apple Production". Specified by | @Value.Default
public Dict getTitle() {
return Dict.of();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String deviceName() {\n\t\t String manufacturer = Build.MANUFACTURER;\n\t\t String model = Build.MODEL;\n\t\t if (model.startsWith(manufacturer)) {\n\t\t return capitalize(model);\n\t\t } else {\n\t\t return capitalize(manufacturer) + \" \" + model;\n\t\t }\n\t\t}",
"String publisherDisplayName();",
"@Override\r\n\tpublic String getFileName() {\n\t\treturn \"PFF_MONITOREOMENSUAL.csv\";\r\n\t}",
"public static String getDeviceName() {\n\t\t\tString manufacturer = Build.MANUFACTURER;\n\t\t\tString model = Build.MODEL;\n\t\t\tif (model.startsWith(manufacturer)) {\n\t\t\t\treturn capitalize(model);\n\t\t\t}\n\t\t\treturn capitalize(manufacturer) + \" \" + model;\n\t\t}",
"public String getName ( ) {\r\n\t\treturn \"MSX Infrared Astrometric Catalog\";\r\n\t}",
"java.lang.String getDeskName();",
"public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n } else {\n return capitalize(manufacturer) + \" \" + model;\n }\n }",
"public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n } else {\n return capitalize(manufacturer) + \" \" + model;\n }\n }",
"public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n }\n return capitalize(manufacturer) + \" \" + model;\n }",
"private String getFileName()\r\n {\r\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd__HH_mm\");\r\n \r\n String ret = new String();\r\n ret += preferences.getPreference(UserPreferences.SAVE_LOCATION_PROP);\r\n ret += format.format(new Date());\r\n \r\n String notationStr = notation.getText().trim();\r\n if (!notationStr.isEmpty()) \r\n {\r\n ret += \"__\" + notationStr.replaceAll(\" \\t/\\\\:\", \"_\");\r\n }\r\n \r\n ret += \".csv\";\r\n \r\n return ret;\r\n }",
"public String getNiceName()\n {\n String name = getBuildFile().getName();\n\n return Utility.replaceBadChars(name);\n }",
"public String getName() {\r\n return \"Boyer/Moore-Suche in Strings\";\r\n }",
"public String toString() {\r\n \t\treturn \"\\\"\" + _name + \"\\\" by \" + _creator;\r\n \t}",
"private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}",
"public String getName ( ) {\r\n\t\treturn \"TASS Mark IV Patches Catalog\";\r\n\t}",
"String getDisplay_name();",
"public String getDisplayName() {\n\t\t\tlogger.debug(\"### DescriptorImpl::getDisplayName\");\n\t\t\treturn \"Determine Semantic Version for project\";\n\t\t}",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"@Override\n public String getDescriptiveName() {\n \treturn \"Stochastic Depression Analysis\";\n }",
"@Override\n public String getName() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"9f48d6b7-640e-4370-9625-0cdc9bbeef0b\");\n return name == null ? super.getName() : name;\n }",
"public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }",
"public String getDisplayFileName() {\r\n return fileName + \" (\" + FileItem.getDisplayFileSize(fileSize) + \")\";\r\n }",
"String getSupName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"String displayName();",
"String displayName();",
"String getLocalDistTitle() {\n\t\treturn this.titleForLocalDist;\n\t}",
"String organizationName();",
"public String getAccountDescriptiveName() {\r\n return accountDescriptiveName;\r\n }",
"protected String getName(){\n return \"Chinmay Garg\";\n //TODO return roll number obtained from the app's shared preference\n }",
"String getDepotname();",
"public String getSystemName();",
"public String getDisplayName() {\n\t\t\treturn \"Deploy Carbon App (CAR) to WSO2 Server or ESB\"; \n\t\t}",
"private String descFormat() {\n File f = cfg.getReadFromFile();\n if (f != null) {\n return f.getPath();\n }\n return StringUtils.defaultString(cfg.getName(), \"(unnamed)\");\n }",
"public String getNameProd() {\n\t\treturn nameProd;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn product.getName();\n\t}",
"public String getProdDetailsName(){\n String prodName = productDetailsName.toString();\n return prodName;\n }",
"String getDistributionID();",
"protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }",
"public String getCustomerDescriptiveName() {\r\n return customerDescriptiveName;\r\n }",
"public String toString() {\r\n return getTitle() + \" - \" + getYear() + \" - \" + getThumbnailPath() + \" - \" + getNumCopies()\r\n + \" - \" + manufacturer + \" - \" + model + \" - \" + operatingSystem;\r\n }",
"public static String name(){\n return \"10.Schneiderman.Lorenzo\"; \n }",
"String getPlatformName();",
"@Override\r\n public String toString() {\r\n String prettyName = this.name();\r\n prettyName = prettyName.toLowerCase();\r\n prettyName = Utils.capitalizeFirstLetter(prettyName);\r\n \r\n return prettyName;\r\n }",
"public String getName(){\n\t\treturn Name; // Return the product's name\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s\", getName());\n\t}",
"private static String authorLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, NAME_STR, NAME);\n }",
"public String getName() {\n return stid.trim() + std2.trim();\n }",
"@Override\n public String toString() {\n String name = this.name().substring(0,1);\n if (this.name().length() > 1) {\n for (int i = 1; i < this.name().length(); i++) {\n String charAt = this.name().substring(i, i + 1);\n if (charAt.equals(\"_\"))\n charAt = \" \";\n name += charAt.toLowerCase();\n }\n }\n return name;\n }",
"public void showNAME() {\r\n\t\tSystem.out.println(getName().toUpperCase());\r\n\t}",
"@Override\n public String toString() {\n\n String line = \"Manufacturer : \" + MANUFACTURER + \"\\n\" +\n \"Serial Number : \" + serialNumber + \"\\n\" +\n \"Date : \" + getManufactureDate() + \"\\n\" +\n \"Name : \" + name;\n //I use line because I felt it was easier to code with\n return line;\n\n }",
"public String toString() { return tech.getTechName(); }",
"String getOutputName();",
"public static String getFileName()\r\n\t{\r\n\t\tString name = \"d3_\";\r\n\t\tjava.util.Date tNow = new java.util.Date();\r\n\r\n\t\tjava.text.SimpleDateFormat df = new java.text.SimpleDateFormat(\"mm_ss\");\r\n\r\n\t\tname = name + \"_\" + df.format(tNow) + \".wmf\";\r\n\r\n\t\treturn name;\r\n\t}",
"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}",
"String getPreferredName();",
"private String beautiplyFileNameGenerator() {\r\n\t\t// /randomvalue between 0 to 9\r\n\t\tString name = \"beautiply\" + new Random().nextInt(9) + \".png\";\r\n\r\n\t\treturn name;\r\n\t}",
"private static String buildFileName(int exportMode, String currentTimestamp)\n {\n String fileNamePrefix;\n\n if(exportMode != -1)\n {\n fileNamePrefix = ExportModeHandler.getFilePrefix(exportMode);\n }\n else\n {\n fileNamePrefix = \"RAW_\";\n }\n\n return fileNamePrefix + Utilities.getDeviceName() + \"_\" + currentTimestamp + \".txt\";\n }",
"String getCatalogName();",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _scienceApp.getName();\n\t}",
"@Override\r\n\tpublic String getName() {\n\t\treturn \"C:/path/to/file/rdfSpecimen_2013-06-28.xml\";\r\n\t}",
"public String getMeasurementsFilename() throws Exception {\n\n\t// Check to make sure the directory exist. Create it if it doesn't.\n\tFile fDir = new File(sUSAGE_FILE_DIR);\n\tif (!fDir.exists()) {\n\t fDir.mkdirs();\n\t}\n\n\treturn sUSAGE_FILE + \"-\" + cqUtil.getDate(cqUtil.sUSAGE_FILE_SUFFIX);\n }",
"public String defaultName()\n {\n return \"Rx Version Build Number Product Condition\";\n }",
"public static String osName() {\r\n Object _osname=null;\r\n \r\n try {\r\n _osname=System.getProperty(\"os.name\");\r\n }\r\n catch (Exception ex) {\r\n _osname=null;\r\n ex.printStackTrace();\r\n }\r\n \r\n String _name=\"\";\r\n if (_osname!=null) _name=_osname.toString();\r\n \r\n return _name;\r\n }",
"public String getName() {\n\t return this.device.getName() + \".\" + this.getType() + \".\"\n\t + this.getId();\n\t}",
"public String toString(){\n\t\tString abbrv = this.name().substring(0,1);\t\t\n\t\treturn abbrv;\n\t}",
"@ Override\n public final String toString() {\n return getName ( ) ;\n }",
"public abstract String getUsageName();",
"protected String makeTitle(long trainingCount, long evalCount, String suffix, int numberOfFields) {\n return String.format(\"%s features, %s Training, %s Evaluation, Export id %s\", numberOfFields, trainingCount,\n evalCount, suffix);\n }",
"public String getName() {\n return dtedDir + \"/\" + filename;\n }",
"public String getDescriptiveServiceName() {\n if (serviceAbbreviation != null) {\n return serviceAbbreviation;\n }\n return serviceFullName;\n }",
"String getShortName();",
"public String getName() {\n return \"CLI Export\";\n }",
"public String getDisplayName() {\n return \"Rhapsody Build\";\n }",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
]
| [
"0.64441967",
"0.6160469",
"0.6087766",
"0.60385877",
"0.6037669",
"0.60060054",
"0.60017556",
"0.60017556",
"0.5962882",
"0.5923758",
"0.589185",
"0.58898896",
"0.5859578",
"0.58581716",
"0.5857602",
"0.58449477",
"0.57810926",
"0.57752794",
"0.57752794",
"0.57752794",
"0.57752794",
"0.57752794",
"0.57752794",
"0.5773432",
"0.5771423",
"0.5771274",
"0.5771203",
"0.5769718",
"0.5767944",
"0.5767944",
"0.5767944",
"0.5767944",
"0.5767944",
"0.5767944",
"0.5760073",
"0.5760073",
"0.5754941",
"0.5746873",
"0.574371",
"0.57315725",
"0.57132214",
"0.57032365",
"0.5703132",
"0.57016826",
"0.57003856",
"0.56966364",
"0.56695414",
"0.5653797",
"0.56515384",
"0.56468934",
"0.56427413",
"0.56282365",
"0.5622076",
"0.5620043",
"0.561914",
"0.56042093",
"0.5603472",
"0.5602945",
"0.55929506",
"0.5579999",
"0.55706424",
"0.5566094",
"0.5562322",
"0.55583787",
"0.5548701",
"0.5541681",
"0.5536927",
"0.55320233",
"0.5531362",
"0.55280274",
"0.55236036",
"0.5519207",
"0.55170685",
"0.5509876",
"0.55076915",
"0.55062145",
"0.5501849",
"0.5498843",
"0.5498748",
"0.54987377",
"0.5482448",
"0.54803944",
"0.54799336",
"0.54782724",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273",
"0.54757273"
]
| 0.0 | -1 |
Returns the uri of the distribution (which is not the uri of the file pointed to). | @Value.Default
public String getUri() {
return "";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"RaptureURI getBaseURI();",
"java.lang.String getResourceUri();",
"java.lang.String getArtifactUrl();",
"String getURI();",
"String getURI();",
"String getURI();",
"public String getPhysicalURI()\n {\n return physicalURI;\n }",
"public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }",
"@JsonIgnore\n\tpublic String getAbsoluteURI() {\n\t\treturn path.toUri().toString();\n\t}",
"public String uri() {\n return this.uri;\n }",
"@Property String getDocumentURI();",
"URI getUri();",
"public String packageFileUri() {\n return this.packageFileUri;\n }",
"public String getURI(int index) {\n/* 96 */ String ns = this.m_dh.getNamespaceOfNode(this.m_attrs.item(index));\n/* 97 */ if (null == ns)\n/* 98 */ ns = \"\"; \n/* 99 */ return ns;\n/* */ }",
"public byte[] uri() {\n return uri;\n }",
"String getUri( );",
"String getUri();",
"public static String getURI() {\n return uri;\n }",
"public String getUri();",
"public String getUri() {\r\n\t\treturn uri;\r\n\t}",
"@DSSource({DSSourceKind.FILE_INFORMATION})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.376 -0500\", hash_original_method = \"AC6673E983BE229DBE393CCBB4A72E75\", hash_generated_method = \"03FD0CE5F473571E708DB9317FA1B856\")\n \npublic String getURI (String prefix)\n {\n return currentContext.getURI(prefix);\n }",
"public URI getBaseURI() {\n Map<String, String> map = new LinkedHashMap<>();\n map.put(\"xml\", XML_NAMESPACE);\n return getLink(\"/*/@xml:base\", map);\n }",
"@Override\r\n\tpublic String getUri() {\n\t\treturn uri;\r\n\t}",
"public String getUri()\r\n {\r\n return uri;\r\n }",
"public static String getURI(){\n\t\treturn uri;\n\t}",
"@NotNull URI getURI();",
"java.lang.String getUri();",
"java.lang.String getUri();",
"public String getUri() {\n if (SourceDocumentInformation_Type.featOkTst\n && ((SourceDocumentInformation_Type) jcasType).casFeat_uri == null)\n this.jcasType.jcas.throwFeatMissing(\"uri\", \"org.apache.uima.examples.SourceDocumentInformation\");\n return jcasType.ll_cas.ll_getStringValue(addr,\n ((SourceDocumentInformation_Type) jcasType).casFeatCode_uri);\n }",
"private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }",
"@Override\r\n\t\tpublic String getBaseURI()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getUri() {\n\t\treturn uri;\n\t}",
"@Override\r\n public String getURI() {\r\n if (uriString == null) {\r\n uriString = createURI();\r\n }\r\n return uriString;\r\n }",
"public String getBaseURI(){\r\n\t\t \r\n\t\t String uri = properties.getProperty(\"baseuri\");\r\n\t\t if(uri != null) return uri;\r\n\t\t else throw new RuntimeException(\"baseuri not specified in the configuration.properties file.\");\r\n\t }",
"public String getUri() {\n return uri;\n }",
"public String getUri() {\n return uri;\n }",
"public String getBaseURI() {\n return node.get_BaseURI();\n }",
"String getBaseUri();",
"public File getDistributionDir() {\n return distDir;\n }",
"public String getUri() {\n\t\t\treturn uri;\n\t\t}",
"public String getSourceDownloadUrl();",
"public String getAliasURI() {\n return uri;\n }",
"java.lang.String getPackageImageURL();",
"String getBaseCDNPathForDocument(Document document);",
"URI uri();",
"public Optional<String> getUri() {\n return Optional.ofNullable(uri);\n }",
"public java.lang.String getUri() {\n return uri;\n }",
"private String getBaseUri() {\n\t\treturn null;\n\t}",
"@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSSource({DSSourceKind.FILE_INFORMATION})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.417 -0500\", hash_original_method = \"33F968ABABCEBD2BA0661937EB8377F0\", hash_generated_method = \"33F968ABABCEBD2BA0661937EB8377F0\")\n \nString getURI (String prefix)\n {\n if (\"\".equals(prefix)) {\n return defaultNS;\n } else if (prefixTable == null) {\n return null;\n } else {\n return (String)prefixTable.get(prefix);\n }\n }",
"String getURL(FsItem f);",
"@Override\r\n public URI getAbsolutePath() {\n return null;\r\n }",
"public String getUri() {\n\t\treturn Uri;\n\t}",
"public DsURI getURI() {\n if (m_nameAddress != null) {\n return (m_nameAddress.getURI());\n }\n return null;\n }",
"public URI getURI()\r\n/* 34: */ {\r\n/* 35:60 */ return this.uri;\r\n/* 36: */ }",
"public URI uri() {\n return uri;\n }",
"public String getURI() {\n/* 95 */ return this.uri;\n/* */ }",
"public URI getUri() {\r\n\t\treturn uri;\r\n\t}",
"public String getAbsPath();",
"public String getDefaultURI(boolean attr) {\n NamespaceDefinition ns = getDefaultNamespace(attr);\n if (ns == null) {\n return null;\n } else {\n return ns.getUri();\n }\n }",
"public URI getUri()\n {\n return uri;\n }",
"public URI getUri() {\n return this.uri;\n }",
"public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Uri getUri() {\r\n return uri;\r\n }",
"public String getPackageDownloadUrl();",
"public static String getURI() {\n return NS;\n }",
"public static String getURI() {\n\t\treturn NS;\n\t}",
"public String getBaseUri() {\n\t\treturn baseUri;\n\t}",
"public String getResourceUri() {\n return resourceUri;\n }",
"public String getCompanyDocumentUrl() {\n\t\tString address = getProperties().getProperty(\"company.document.url\").trim();\n\t\treturn address;\n\t}",
"abstract String getUri();",
"public URI uri() {\n\t\treturn uri;\n\t}",
"public abstract String getResUri();",
"public URI getUri() {\n\t\treturn uri;\n\t}",
"public static String getURI() {return NS;}",
"public static String getURI() {return NS;}",
"public static String getURI() {return NS;}",
"public static String getURI() {return NS;}",
"public static String getURI() {return NS;}",
"public static String getURI() {return NS;}",
"public static String getURI() {return NS;}",
"java.lang.String getManifestUrl();",
"public String getURI(int index) {\n return libsbmlJNI.XMLNamespaces_getURI__SWIG_0(swigCPtr, this, index);\n }",
"public final String getURI() {\n/* 314 */ return this.constructionElement.getAttributeNS(null, \"Algorithm\");\n/* */ }",
"private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}",
"public final String getCanonicalPath()\n {\n return FileUtilities.getCanonicalPath(getLocalFile());\n }",
"public String getCurrentURL () {\n synchronized (currentLock) {\n if (currentURL != null) {\n return currentURL;\n }\n }\n DataObject[] nodes = (DataObject[])resDataObject.allInstances().toArray(new DataObject[0]);\n // Lookup, as a side-effect, can call lookup listeners and do whatever it wants. Do not call under a lock.\n synchronized (currentLock) {\n if (currentURL == null) {\n currentURL = \"\";\n if (nodes.length != 1)\n return currentURL;\n \n DataObject dO = nodes[0];\n if (dO instanceof DataShadow)\n dO = ((DataShadow) dO).getOriginal ();\n \n try {\n currentURL = dO.getPrimaryFile ().getURL ().toString ();\n } catch (FileStateInvalidException ex) {\n //noop\n }\n }\n \n return currentURL;\n }\n }",
"public URL getURL() throws IOException {\r\n\t\tthrow new FileNotFoundException(getDescription() + \" cannot be resolved to URL\");\r\n\t}",
"String getIssueURI();",
"public String getSource() {\n\t\treturn this.uri.toString();\n\t}",
"public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}",
"public String sourceUri() {\n return this.sourceUri;\n }",
"public URL getDocumentBase() {\n/* 158 */ return this.stub.getDocumentBase();\n/* */ }",
"public URI getExplicitlyProvidedUri() {\n return wsRce.getUri();\n }",
"public String getSystemId() {\n return this.source.getURI();\n }",
"@Override\n\tpublic URL getBaseURL() {\n\t\tURL url = null;\n\t\tString buri = getBaseURI();\n\t\tif (buri != null) {\n\t\t\ttry {\n\t\t\t\turl = new URL(buri);\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\ttry {\n\t\t\t\t\tString docuri = document.getDocumentURI();\n\t\t\t\t\tif (docuri != null) {\n\t\t\t\t\t\tURL context = new URL(docuri);\n\t\t\t\t\t\turl = new URL(context, buri);\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e1) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn url;\n\t}",
"public URI getAbsoluteLobFolder();",
"public URI getURI()\r\n/* 36: */ {\r\n/* 37:64 */ return this.httpRequest.getURI();\r\n/* 38: */ }",
"@AutoEscape\n\tpublic String getFileUrl();",
"String getSourceRepoUrl();",
"private static URI determineDocBaseURI(URI docURI, Document doc) {\n\n // Note: The first base element with a href attribute is considered\n // valid in HTML. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base.\n var baseElem = doc.selectFirst(\"base[href]\");\n return baseElem != null ? docURI.resolve(baseElem.attr(\"href\")) : docURI;\n }",
"public URL getURL()\n/* */ {\n/* 135 */ return ResourceUtils.getResourceAsURL(this, this);\n/* */ }"
]
| [
"0.64608353",
"0.64112306",
"0.64102936",
"0.6377843",
"0.6377843",
"0.6377843",
"0.6374008",
"0.6351775",
"0.6315209",
"0.6306926",
"0.62731445",
"0.6250894",
"0.6250291",
"0.62474126",
"0.6235847",
"0.62184983",
"0.62101233",
"0.6204931",
"0.6194973",
"0.6168377",
"0.61651605",
"0.6154841",
"0.6154065",
"0.6152176",
"0.6139013",
"0.61267036",
"0.6124419",
"0.6124419",
"0.6113842",
"0.6112173",
"0.61090535",
"0.6091875",
"0.60704017",
"0.60697937",
"0.6048637",
"0.6039711",
"0.60389435",
"0.60365164",
"0.60351634",
"0.6022632",
"0.602115",
"0.60125417",
"0.6012364",
"0.6010171",
"0.59685177",
"0.5964911",
"0.595565",
"0.59413445",
"0.59399396",
"0.5927029",
"0.5924583",
"0.59196967",
"0.59012765",
"0.5899625",
"0.589549",
"0.5890416",
"0.58856875",
"0.58826274",
"0.5877498",
"0.58723956",
"0.5864812",
"0.586328",
"0.58537453",
"0.58529824",
"0.58507514",
"0.5846118",
"0.58419293",
"0.5819913",
"0.5814923",
"0.5811756",
"0.5805153",
"0.58023745",
"0.5800424",
"0.5800424",
"0.5800424",
"0.5800424",
"0.5800424",
"0.5800424",
"0.5800424",
"0.5794899",
"0.5780138",
"0.57706136",
"0.57370627",
"0.5703278",
"0.56899476",
"0.5687767",
"0.5682004",
"0.56754327",
"0.56729424",
"0.56586343",
"0.5652119",
"0.5648647",
"0.56353766",
"0.56293046",
"0.5620987",
"0.56209683",
"0.5609435",
"0.5609365",
"0.56063837",
"0.56052244"
]
| 0.593126 | 49 |
Adds a User Order | UserOrder save(UserOrder order); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@PostMapping(\"/order/add\")\n String addOrder(@RequestBody OrderDto orderDto) {\n Order order = new Order();\n order.setAmount(orderDto.getAmount());\n\n\n Optional<User> user = userRepository.findById(orderDto.getUserId());\n if (user.isPresent()) {\n order.setUser(user.get());\n orderRepository.save(order);\n }\n return \"success\";\n }",
"String registerOrder(int userId, int quantity, int pricePerUnit, OrderType orderType);",
"Order addOrder(String orderId, Order order) throws OrderBookOrderException;",
"Order placeNewOrder(Order order, Project project, User user);",
"public void setUserOrder(User userOrder) {\n this.userOrder = userOrder;\n }",
"public void placeSingleTaskOrder(User user, SingleTaskOrder order);",
"public void addOrder(Order order) {\n orders.add(order);\n }",
"@POST\r\n\t@Produces({\"application/xml\" , \"application/json\"})\r\n\t@Path(\"/order\")\r\n\tpublic String addOrder(OrderRequest orderRequest) {\n\t\tOrderActivity ordActivity = new OrderActivity();\r\n\t\treturn ordActivity.addOrder(orderRequest.getOrderDate(),orderRequest.getTotalPrice(), orderRequest.getProductOrder(),orderRequest.getCustomerEmail());\r\n\t}",
"void add(Order o);",
"@Override\n\tpublic boolean addOrder(StageOrder stageOrder,\n\t\t\tUserInfoService userInfoService, UserInfo user,\n\t\t\tUserPointService userPointService, UserPoint userPoint) {\n\t\tstageOrderDao.add(stageOrder);\n\t\tuserPointService.save(userPoint);// 保存会员积分表\n\t\tuserInfoService.update(user);\n\t\treturn true;\n\t}",
"@Override\n public void addOrder(Order o) {\n orders.add(o);\n }",
"static void addOrder(orders orders) {\n }",
"@Override\n\tpublic void addOrder(Order order) {\n\t\t\n\t em.getTransaction().begin();\n\t\t\tem.persist(order);\n\t\t\tem.getTransaction().commit();\n\t\t\tem.close();\n\t\t\temf.close();\n\t \n\t}",
"public void add(Order o) {\r\n\t\tthis.orders.add(o);\r\n\t}",
"@RequestMapping(\"/createOrder\")\n public Order createOrder(@RequestParam(\"user_id\") int user_id){\n System.out.println(\"createOrder\");\n Order order = orderService.createOrder(user_id);\n\n return order;\n }",
"public void addUser(User user){\r\n users.add(user);\r\n }",
"@PostMapping\r\n\tpublic ResponseEntity< ResponseWrapper > createOrder( @RequestBody Order order, @RequestParam(\"uid\") Long userId )\r\n\t{\r\n\t\treturn orderService.createOrder( order, userId );\r\n\t}",
"public void addOrder(Order o) throws SQLException\r\n {\r\n String sqlQuery = \r\n \"INSERT INTO orders (custname, tablenumber, foodname, beveragename, served, billed) VALUES (\" +\r\n \"'\" + o.getCustomerName() + \"', \" + \r\n o.getTable() + \", \" + \r\n \"'\" + o.getFood() + \"', \" +\r\n \"'\" + o.getBeverage() + \"', \" + \r\n o.isServed() + \", \" +\r\n o.isBilled() + \")\";\r\n myStmt.executeUpdate(sqlQuery);\r\n }",
"public void addNewOrder(Order order) {\n\t\tnewOrders.add(order);\n\t}",
"public void add(User user) {\r\n this.UserList.add(user);\r\n }",
"public void addUser(Customer user) {}",
"public void addUser(User user) {\n\t\t\r\n\t}",
"Order addOrder(String orderNumber, Order order)\n throws FlooringMasteryPersistenceException;",
"public void AddOrder(Shoporder model) {\n\t\tmapper.AddOrder(model);\n\t}",
"public void addOrder(Order order) {\n\t\tPreparedStatement addSQL = null;\n\t\tSystem.out.println(\"Creating order..\");\n\t\ttry {\n\n\t\t\taddSQL = getConnection()\n\t\t\t\t\t.prepareStatement(\"INSERT INTO orders(code, name, quantity) values(?,?,?);\",\n\t\t\t\t\t\t\tStatement.RETURN_GENERATED_KEYS);\n\n\t\t\taddSQL.setInt(1, order.getCode());\n\t\t\taddSQL.setString(2, order.getName());\n\t\t\taddSQL.setInt(3, order.getQuantity());\n\n\t\t\tint rows = addSQL.executeUpdate();\n\n\t\t\tif (rows == 0) {\n\t\t\t\tSystem.out.println(\"Failed to insert order into database\");\n\t\t\t}\n\n\t\t\ttry (ResultSet generatedID = addSQL.getGeneratedKeys()) {\n\t\t\t\tif (generatedID.next()) {\n\t\t\t\t\torder.setID(generatedID.getInt(1));\n\t\t\t\t\tSystem.out.println(\"Order created with id: \" + order.getID());\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Failed to create order.\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (addSQL != null) {\n\t\t\t\ttry {\n\t\t\t\t\taddSQL.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void addOrder(Order order) {\r\n\t\torders.put(order.getOrderID(), order);\r\n\t}",
"public String createOrderForUser(String body, String systemUserAuthToken, String userId) {\n String path = deliveryCreateOrderForUserPath + userId + \"/orders\";\n\n return sendRequest(postResponseType, systemUserAuthToken, body, path, allResult, statusCode201);\n }",
"@Override\r\n\tpublic boolean addOrder(Order order) {\n\t\treturn orderDaoImpl.addOrder(order);\r\n\t}",
"@Override\n public void addOrder(Order order) throws PersistenceException{\n Order newOrder = orders.put(order.getOrderNumber(), order);\n write(order.getOrderDate());\n }",
"public Integer add(Order order) {\n\t\treturn orderDAO.add(order);\n\t}",
"public UserOrder() {\n }",
"public boolean addTicket(Ticket order)\n\t{\n\t\ttickets.push(order);\n\t\t\n\t\treturn true;\n\t\t\n\t}",
"@Override\r\n\tpublic void add(User1 user) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(user);\r\n\t}",
"static void addCustomerOrder() {\n\n Customer newCustomer = new Customer(); // create new customer\n\n Product orderedProduct; // initialise ordered product variable\n\n int quantity; // set quantity to zero\n\n String name = Validate.readString(ASK_CST_NAME); // Asks for name of the customer\n\n newCustomer.setName(name); // stores name of the customer\n\n String address = Validate.readString(ASK_CST_ADDRESS); // Asks for address of the customer\n\n newCustomer.setAddress(address); // stores address of the customer\n\n customerList.add(newCustomer); // add new customer to the customerList\n\n int orderProductID = -2; // initialize orderProductID\n\n while (orderProductID != -1) { // keep looping until user enters -1\n\n orderProductID = Validate.readInt(ASK_ORDER_PRODUCTID); // ask for product ID of product to be ordered\n\n if(orderProductID != -1) { // keep looping until user enters -1\n\n quantity = Validate.readInt(ASK_ORDER_QUANTITY); // ask for the quantity of the order\n\n orderedProduct = ProductDB.returnProduct(orderProductID); // Search product DB for product by product ID number, return and store as orderedProduct\n\n Order newOrder = new Order(); // create new order for customer\n\n newOrder.addOrder(orderedProduct, quantity); // add the new order details and quantity to the new order\n\n newCustomer.addOrder(newOrder); // add new order to customer\n\n System.out.println(\"You ordered \" + orderedProduct.getName() + \", and the quantity ordered is \" + quantity); // print order\n }\n }\n }",
"public void addOrder(Order newOrder) {\n\t\tif ( units.containsKey(newOrder.getPerson().hashCode()) && units.get(newOrder.getPerson().hashCode()).length > 0 ) {\n\t\t\tunits.put(newOrder.getPerson().hashCode(), addUnitsRecord(units.get(newOrder.getPerson().hashCode()), newOrder));\n\t\t} else {\n\t\t\tOrder[] eq = new Order[3];\n\t\t\tunits.put(newOrder.getPerson().hashCode(), addUnitsRecord(eq, newOrder));\n\t\t}\n\t}",
"public void addUser() {\n\t\tthis.users++;\n\t}",
"@Override\r\n\tpublic void addUser(User user) throws ToDoListDAOException{\r\n\t\tSession session = factory.openSession();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tsession.beginTransaction();\r\n\t\t\tsession.save(user);\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t}\r\n\t\tcatch (HibernateException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tif(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tif(session != null) \r\n\t\t\t{ \r\n\t\t\t\tsession.close(); \r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void addToOrder()\n {\n\n if ( donutTypeComboBox.getSelectionModel().isEmpty() || flavorComboBox.getSelectionModel().isEmpty() )\n {\n Popup.DisplayError(\"Must select donut type AND donut flavor.\");\n return;\n } else\n {\n int quantity = Integer.parseInt(quantityTextField.getText());\n if ( quantity == 0 )\n {\n Popup.DisplayError(\"Quantity must be greater than 0.\");\n return;\n } else\n {\n for ( int i = 0; i < quantity; i++ )\n {\n Donut donut = new Donut(donutTypeComboBox.getSelectionModel().getSelectedIndex(), flavorComboBox.getSelectionModel().getSelectedIndex());\n mainMenuController.getCurrentOrder().add(donut);\n }\n if ( quantity == 1 )\n {\n Popup.Display(\"Donuts\", \"Donut has been added to the current order.\");\n } else\n {\n Popup.Display(\"Donuts\", \"Donuts have been added to the current order.\");\n }\n\n\n donutTypeComboBox.getSelectionModel().clearSelection();\n flavorComboBox.getSelectionModel().clearSelection();\n quantityTextField.setText(\"0\");\n subtotalTextField.setText(\"$0.00\");\n }\n }\n\n\n }",
"@PostMapping(\"/add-order\")\n\tpublic ResponseEntity<Object> insertOrder(@RequestBody Order order) {\n\t\tLOGGER.info(\"add-Order URL is opened\");\n\t\tLOGGER.info(\"addOrder() is initiated\");\n\t\tOrderDTO orderDTO = null;\n\t\tResponseEntity<Object> orderResponse = null;\n\t\torderDTO = orderService.addOrder(order);\n\t\torderResponse = new ResponseEntity<>(orderDTO, HttpStatus.ACCEPTED);\n\t\tLOGGER.info(\"addOrder() has executed\");\n\t\treturn orderResponse;\n\t}",
"public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }",
"public void addUser(User user);",
"private void addOrderDB(){\n OrganiseOrder organiser = new OrganiseOrder();\n Order finalisedOrder = organiser.Organise(order);\n // Generate the order id\n String id = UUID.randomUUID().toString();\n // Set the name of the order to the generated id\n finalisedOrder.setName(id);\n\n // Get the firebase reference\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child(\"Orders\").child(id);\n\n // Update the order\n ref.setValue(finalisedOrder);\n }",
"ResponseMessage addUser(User user);",
"public void addOrders() {\n\t\torders.stream()\n\t\t\t.forEach(db::store);\n\t}",
"@RequestMapping(value = \"/portfolio\", method = RequestMethod.POST)\n\tpublic ResponseEntity<Order> addOrder(@RequestBody final Order order) {\n\t\tlogger.debug(\"Adding Order: \" + order);\n\t\t\n\t\t//TODO: can do a test to ensure userId == order.getUserId();\n\t\t\n\t\tOrder savedOrder = service.addOrder(order);\n\n\t\tlogger.debug(\"Order added: \" + savedOrder);\n\t\tif (savedOrder != null && savedOrder.getOrderId() != null) {\n\t\t\treturn new ResponseEntity<Order>(savedOrder, getNoCacheHeaders(), HttpStatus.CREATED);\n\t\t} else {\n\t\t\tlogger.warn(\"Order not saved: \" + order);\n\t\t\treturn new ResponseEntity<Order>(savedOrder, getNoCacheHeaders(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}",
"public void addUser(UserModel user);",
"void addUser(User user);",
"void addUser(User user);",
"@Override\r\n\tpublic void add(User user) {\n\r\n\t}",
"public static void addOrderedItem() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Adding ordered item************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\n\t\tItemManager itemManager = new ItemManager();\n\t\tList listOfItems = itemManager.onStartUp();\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tItem item = null;\n\t\tOrderedItem orderedItem = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (listOfItems.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no items!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to add the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tdo {\n\t\t\t\tfor (i = 0; i < listOfItems.size(); i++) {\n\t\t\t\t\titem = (Item) listOfItems.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \" + item.getId()\n\t\t\t\t\t\t\t+ \" | Name: \" + item.getName() + \" | Price: $\"\n\t\t\t\t\t\t\t+ item.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.print(\"Select an item to add into order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\titem = (Item) listOfItems.get(choice - 1);\n\n\t\t\t\t\torderedItem = new OrderedItem();\n\t\t\t\t\torderedItem.setItem(item);\n\t\t\t\t\torderedItem.setOrder(order);\n\t\t\t\t\torderedItem.setPrice(item.getPrice());\n\n\t\t\t\t\torder.addOrderedItem(orderedItem);\n\n\t\t\t\t\tcheck = orderedItemManager.createOrderedItem(orderedItem);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Item added into order successfully!\");\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out.println(\"Failed to add item into order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of adding items************\");\n\t}",
"public void addOrder(Long id, Long orderId) {\n\t\tReceipt receipt = receiptRepository.findOne(id);\n\t\tOrder order = orderRepository.findOne(orderId);\n\n\t\treceipt.setOrder(order);\n\n\t\treceiptRepository.save(receipt);\n\t}",
"@Override\n\tpublic boolean addOrder(OrderDO orderDO) {\n\t\treturn false;\n\t}",
"@ApiMethod(name = \"insertOrder\", httpMethod = ApiMethod.HttpMethod.PUT)\n public Order insertOrder(OrderPackage orderPackage) throws MOHException{\n\n Status status;\n EntityManager productManager = EMFProduct.get().createEntityManager();\n EntityManager userManager = EMFUser.get().createEntityManager();\n\n Order order= new Order(\"\");\n Identify identify = orderPackage.getIdentify();\n User user;\n\n EntityTransaction transaction = productManager.getTransaction();\n try {\n status = verifyIdentity(identify, userManager);\n if (status != Status.USER_ALREADY_EXISTS)\n throw new MOHException(status.getMessage(), status.getCode());\n identify = (Identify) status.getResponse();\n user = identify.getUser();\n\n\n List<Customer> customerList = orderPackage.getCustomerList();\n Set<User> users = new HashSet<>();\n List<CustomerOrder> customerOrderList = new ArrayList<>();\n\n order = orderPackage.getOrder();\n order.setCreation_date(new Date());\n\n //order.addOrderProduct(orderProductList);\n\n OrderStatus orderStatus = new OrderStatus(Constants.COrderStatus.PENDING_ORDER);\n orderStatus.setDate_order_status(new Date());\n orderStatus.setOrder_status(order);\n order.addOrderStatus(orderStatus);\n\n\n CustomerOrder customer = new CustomerOrder(Constants.CCustomerOrder.ACCEPTED_ORDER, Constants.CCustomerOrder.ADMIN_ROL);\n customer.setId_customer(orderPackage.getOwner().getId_customer());\n customer.setStatus_date(new Date());\n customerOrderList.add(customer);\n\n for (Customer c : customerList) {\n CustomerOrder customerOrder = new CustomerOrder(Constants.CCustomerOrder.PENDING_ORDER, Constants.CCustomerOrder.NORMAL_ROL);\n customerOrder.setStatus_date(new Date());\n customerOrder.setId_customer(c.getId_customer());\n customerOrderList.add(customerOrder);\n\n\n User user1 = userManager.find(User.class, c.getId_customer());\n logger.log(Level.INFO, \"Id \" + c.getId_customer() + \"was \" + (user1 == null ? \"null\" : \"success\"));\n if (user1 != null)\n users.add(user1);\n }\n\n order.addCustomerOrder(customerOrderList);\n\n transaction.begin();\n productManager.persist(order);\n productManager.flush();\n\n\n for (User u : users){\n if(u.getId_user()!=user.getId_user())\n for (RegistrationRecord r : u.getRecords()) {\n Formatter formatter = new Formatter();\n NotificationPackage notificationPackage = new NotificationPackage();\n HashMap<String, String> extras = new HashMap<>();\n extras.put(\"extra\", String.valueOf(order.getId_order()));\n notificationPackage.setExtras(extras);\n notificationPackage.setRegistrationRecord(r);\n try {\n String message = formatter.format(Constants.COrder.ORDER_INVITATION_MSG, user.getUser_name(),order.getOrder_name()).toString();\n new MessagingEndpoint().sendMessage(message, notificationPackage, Constants.CMessaging.ORDER_INVITATION_TOPIC);\n } catch (IOException e) {\n e.printStackTrace();\n logger.log(Level.WARNING, e.getMessage(), e.getCause());\n }\n\n }\n }\n\n transaction.commit();\n\n }\n finally {\n if(transaction.isActive())\n transaction.rollback();\n productManager.close();\n userManager.close();\n }\n\n logger.info(\"Calling insertOrder method\");\n return order;\n }",
"private void acceptOrder() {\n buttonAcceptOrder.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n order.setDriver(ParseUser.getCurrentUser());\n order.saveInBackground();\n Log.i(TAG, \"driver!!: \" + order.getDriver().getUsername());\n ParseUser.getCurrentUser().put(KEY_HAS_ORDER, true);\n ParseUser.getCurrentUser().saveInBackground();\n\n finish();\n }\n });\n }",
"public void add( Order item ) {\n\t\tsuper.internalAdd(item);\n\t}",
"public void addUser(User user) {\n\t\tSystem.out.println(\"adding user :\"+user.toString());\n\t\tuserList.add(user);\n\t}",
"@RequestMapping(\"/order/{cartId}\")\r\n public String createOrder(@PathVariable(\"cartId\") int cartId) {\r\n \tSystem.out.println(\"in order\");\r\n \tUserOrder userOrder = new UserOrder();\r\n Cart cart=cartService.getCartById(cartId);\r\n userOrder.setCart(cart);\r\n\r\n UsersDetail usersDetail = cart.getUsersDetail();\r\n userOrder.setUsersDetail(usersDetail);\r\n userOrder.setBillingAddress(usersDetail.getBillingAddress());\r\n //userOrder.setShippingAddress(usersDetail.getShippingAddress());\r\n\r\n orderService.addOrder(userOrder);\r\n\r\n return \"redirect:/checkout?cartId=\"+cartId;\r\n }",
"public IBusinessObject addToWorkforce(IIID useriid, int ordernum)\n throws OculusException;",
"@Test\n public void testAddOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Add Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }",
"@POST(\"orders/new_order/\")\n Call<ApiStatus> createNewOrderByUser(@Body Order myOrder);",
"public void addUserRequest(UserRequest request){\n userRequests.add(request);\n }",
"@Override\r\n\tpublic int addOrder(Order order, List<OrderItem> OrderItem, OrderShipping orderShipping) {\n\t\treturn odi.addOrder(order, OrderItem, orderShipping);\r\n\t}",
"TrackingOrderDetails trackingOrderDetails(String username, int order_id, String role);",
"public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}",
"Cart addToCart(String productCode, Long quantity, String userId);",
"public void AddUserDepot(String id, String label) {\r\n try {\r\n UserManager mydb = new UserManager(activity);\r\n mydb.open();\r\n mydb.AddUserWarehouse(id, label);\r\n mydb.close();\r\n }catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void add(final ItemOrder theOrder) {\r\n Objects.requireNonNull(theOrder, \"theOrder can't be null!\");\r\n myShoppingCart.put(theOrder.getItem(), theOrder.calculateOrderTotal());\r\n }",
"Integer addUser(ServiceUserEntity user);",
"@Override\n\tpublic int add(Forge_Order_Detail t) {\n\t\treturn 0;\n\t}",
"public void addToOrder(Food food){\n foods.add(food);\n price = price + food.getPrice();\n }",
"public void addNewItem(OrderItem newOrderItem){\n itemsInOrder.add(newOrderItem);\n }",
"Long addUserPosition(UserPosition userPosition);",
"@Override\n public Order create(Order order) {\n this.orders.add(order);\n save();\n return order;\n }",
"public void add(User user) {\n\t\tuserDao.add(user);\n\t}",
"@Override\r\n\tpublic void insertOrder(OrderVO vo) throws Exception {\n\t\tsqlSession.insert(namespaceOrder+\".createOrder\",vo);\r\n\t}",
"public void newUser(User user) {\n users.add(user);\n }",
"public long createTwitterUser(TwitterUser userToInsert, String table, int order) {\n // Establecemos los valores que se insertarán\n ContentValues values = new ContentValues();\n values.put(MyDBHelper.COLUMN_ID, userToInsert.getUserId());\n values.put(MyDBHelper.COLUMN_SCREENAME, userToInsert.getScreenName());\n values.put(MyDBHelper.COLUMN_NAME, userToInsert.getName());\n values.put(MyDBHelper.COLUMN_PROFILE_PIC_URL, userToInsert.getProfilePicURL());\n if (!table.equals(MyDBHelper.TABLE_UNFOLLOWERS))\n values.put(MyDBHelper.COLUMN_ORDER, order);\n\n // Insertamos la valoracion\n long insertId = database.insert(table, null, values);\n\n return insertId;\n }",
"void addService(Long orderId, Long serviceId);",
"public void addUser(User user) {\n\t\tuserList.addUser(user);\n\t}",
"public void addOrder(Order o) {\n medOrder.add(o);\n //System.out.println(\"in adding order\");\n for(OrderItem oi: o.getOrderItemList())\n {\n MedicineProduct p=oi.getProduct();\n //System.out.println(\"in for oop produscts \"+p);\n Medicine med = this.searchMedicine(p.getProdName());\n if(med!=null){\n int i = med.getAvailQuantity()+oi.getQuantity();\n med.setAvailQuantity(i);\n // System.out.println(\"in adding quntity \"+i);\n \n }\n }\n \n }",
"public IBusinessObject addToRole(IIID useriid, IIID roleiid, int ordernum)\n throws OculusException;",
"public void addUser(User user) {\n \t\tuser.setId(userCounterIdCounter);\n \t\tusers.add(user);\n \t\tuserCounterIdCounter++;\n \t}",
"public void saveOrder() {\n setVisibility();\n Order order = checkInputFromUser();\n if (order == null){return;}\n if(orderToLoad != null) DBSOperations.remove(connection,orderToLoad);\n DBSOperations.add(connection, order);\n }",
"public void addOrderItem(OrderItem item)\r\n\t{\r\n\t\torderItemList.add(item);\r\n\t}",
"public void addToOrder() {\n OrderLine orderLine = new OrderLine(order.lineNumber++, sandwhich, sandwhich.price());\n order.add(orderLine);\n ObservableList<Extra> selected = extraSelected.getItems();\n orderPrice.clear();\n String price = new DecimalFormat(\"#.##\").format(sandwhich.price());\n orderPrice.appendText(\"$\"+price);\n extraOptions.getItems().addAll(selected);\n extraSelected.getItems().removeAll(selected);\n pickSandwhich();\n\n\n\n }",
"public void addRow(UserTo userTo) {\n int indexObject = userToList.indexOf(userTo);\n UserTo newRow = new UserTo(-1l, \"\", \"\", \"\", true);\n UserDao dataDao = new UserDao();\n Long id = dataDao.create(newRow);\n if (id != null) {\n newRow.setId(id);\n userToList.add(indexObject + 1, newRow);\n }\n }",
"private void addOrder(String orderNumber, String barcodeNumber, String customNumber, String customerName, String orderDate) {\n\t\t_database = this.getWritableDatabase();\n\t \n\t ContentValues values = new ContentValues();\n\t \n\t values.put(ORDER_NUMBER, orderNumber); \n\t \n\t if(barcodeNumber.length()>0) {\n\t \tvalues.put(BARCODE_NUMBER, barcodeNumber); \n\t }\n\t \n\t values.put(CUSTOMER_NUMBER, customNumber); \n\t values.put(CUSTOMER_NAME, customerName); \n\t values.put(ORDER_DATE, orderDate); \n\t \n\t // Inserting Row\n\t _database.insertOrThrow(ORDER_RECORDS_TABLE, null, values);\n\t}",
"@Test\r\n\tpublic void testAddPurchaseOrder() {\r\n\t\tassertNotNull(\"Test if there is valid purchase order list to add to\", purchaseOrder);\r\n\r\n\t\tpurchaseOrder.add(o1);\r\n\t\tassertEquals(\"Test that if the purchase order list size is 1\", 1, purchaseOrder.size());\r\n\r\n\t\tpurchaseOrder.add(o2);\r\n\t\tassertEquals(\"Test that if purchase order size is 2\", 2, purchaseOrder.size());\r\n\t}",
"public void placeOrder(String custID) {\r\n //creates Order object based on current cart\r\n Order order = new Order(custID, getItems());\r\n //inserts new order into DB\r\n order.insertDB();\r\n }",
"public void addSalesOrder(SalesOrder order) {\n\t\tsalesOrders.add(order);\n\t}",
"public void Adduser(User u1) {\n\t\tUserDao ua=new UserDao();\n\t\tua.adduser(u1);\n\t\t\n\t}",
"@Override\n\t@Transactional\n\tpublic void addUsuario(Usuario user) {\n\t\tthis.usuarioDAO.save(user);\n\t}",
"void create(Order order);",
"public void addUser(TIdentifiable user) {\r\n\t // make sure that the user doesn't exists already\r\n\t if (userExists(user)) return;\r\n\t \r\n\t // check to see if we need to expand the array:\r\n\t if (m_current_users_count == m_current_max_users) expandTable(2, 1);\t \r\n\t m_users.addID(user);\r\n\t m_current_users_count++;\r\n }",
"public void addPendingOrder(Order order) {\n\t\tmOrders.add(order);\n\t}",
"public void addNewSystemUser()\n {\n\n DietTreatmentSystemUserBO newUser = new DietTreatmentSystemUserBO();\n // default user\n newUser.setSystemUser(SystemUserController.getInstance()\n .getCurrentUser());\n // default function\n newUser.setFunction(SystemUserFunctionBO.TREATING_ASSISTANT);\n\n _dietTreatment.addSystemUsers(newUser);\n }",
"public Order createOrder(WeeklyRecipe wr, User u, Date deliveryTime,\n\t\t\tint quantity) {\n\t\tem.getTransaction().begin();\n\t\tOrder order = new Order(false, null, false, deliveryTime, false,\n\t\t\t\tquantity, 0, wr, u);\n\t\tem.persist(order);\n\t\tem.getTransaction().commit();\n\t\treturn order;\n\t}",
"public void addUser(User user) {\n\t\tuserDao.addUser(user);\r\n\r\n\t}",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public void addUser(User u){\n\r\n userRef.child(u.getUuid()).setValue(u);\r\n\r\n DatabaseReference zipUserReference;\r\n DatabaseReference zipNotifTokenReference;\r\n List<String> zipList = u.getZipCodes();\r\n\r\n for (String zipCode : zipList) {\r\n zipUserReference = baseRef.child(zipCode).child(ZIPCODE_USERID_REFERENCE_LIST);\r\n // Add uuid to zipcode user list\r\n zipUserReference.child(u.getUuid()).setValue(u.getUuid());\r\n\r\n // Add notifToken to list\r\n zipNotifTokenReference = baseRef.child(zipCode).child(ZIPCODE_NOTIFICATION_TOKENS_LIST);\r\n zipNotifTokenReference.child(u.getNotificationToken()).setValue(u.getNotificationToken());\r\n\r\n }\r\n }"
]
| [
"0.74339485",
"0.70026475",
"0.6966285",
"0.69537115",
"0.6927141",
"0.68670607",
"0.68424666",
"0.67302185",
"0.66944885",
"0.6669888",
"0.66613257",
"0.66363704",
"0.6628031",
"0.6545106",
"0.6449414",
"0.6440787",
"0.64267707",
"0.6418479",
"0.6412402",
"0.63984144",
"0.63918096",
"0.63916993",
"0.6385483",
"0.63629085",
"0.63317466",
"0.6331393",
"0.6304691",
"0.6283248",
"0.6277383",
"0.627351",
"0.6268116",
"0.62402904",
"0.6234649",
"0.6226857",
"0.622546",
"0.62158877",
"0.621521",
"0.62092847",
"0.62079895",
"0.6201708",
"0.61998147",
"0.6175656",
"0.616882",
"0.61652815",
"0.61610913",
"0.61558944",
"0.6154021",
"0.6154021",
"0.6130983",
"0.61236936",
"0.61236805",
"0.61153543",
"0.60978144",
"0.6087926",
"0.6086468",
"0.6084166",
"0.6078107",
"0.6070915",
"0.60675865",
"0.6066415",
"0.60194296",
"0.60176736",
"0.6015948",
"0.6013137",
"0.5988947",
"0.5983665",
"0.59704626",
"0.5962911",
"0.59567803",
"0.5955575",
"0.5954214",
"0.59372926",
"0.5931922",
"0.5925663",
"0.59232974",
"0.59224755",
"0.59207433",
"0.5920236",
"0.59197503",
"0.59111243",
"0.5904984",
"0.58942235",
"0.5882496",
"0.58795536",
"0.5862942",
"0.58607054",
"0.5851453",
"0.58472145",
"0.58401555",
"0.58382654",
"0.5829257",
"0.58289814",
"0.5823208",
"0.57976615",
"0.5789777",
"0.57858247",
"0.5779007",
"0.5776668",
"0.5776185",
"0.5764414"
]
| 0.6550198 | 13 |
Finds user orders by user id | List<UserOrder> findUserOrdersByUserId(Long userId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Order> getAllUsersOrdersById(long userId);",
"List<Order> findByUser(User user);",
"List<Order> getUserOrderList(int userId) throws ServiceException;",
"Optional<Order> findByUserId(long userId);",
"@Override\n public Collection<Order> getOrdersByUserId(String id) {\n Collection<Order> orders = getAll();\n return orders.stream()\n .filter(x -> x.getCustomerId().equals(id))\n .collect(Collectors.toList());\n }",
"@Override\n public List<Order> findOrdersByUser(User user) {\n return orderRepository.findByCustomerUsernameOrderByCreatedDesc(user.getUsername()).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }",
"List<Order> getByUser(User user);",
"@RequestMapping(\"/getUserOrder\")\n public List<Order> getUserOrder(@RequestParam(\"user_id\") int user_id){\n return orderService.getOrdersByUser(user_id);\n }",
"@Override\n public JsonMsg findUserAllOrders(Integer page, Integer pageSize, Integer userId) {\n List<OrderVo> orders = orderMapper.findUserAllOrderByPage(userId, page - 1, pageSize);\n JsonMsg jsonMsg = JsonMsg.makeSuccess(\"成功\", orders);\n return jsonMsg;\n }",
"@GetMapping(\"/{userId}/orders/{orderId}\")\n public OrderDto findOrder(@PathVariable @Positive Long userId,\n @PathVariable @Positive Long orderId) {\n return orderService.findByUserId(userId, orderId);\n }",
"public List<Orders> findAccepted2(int userID);",
"public static List<Order> getUserOrdersByUserId(long userId){\n\t\t// getting orders by userId\n\t\treturn dao.getUserOrdersByUserId(userId);\n\t}",
"@GetMapping(\"/{userId}/orders\")\n\tpublic List<Order> getAllOrders(@PathVariable Long userId) throws UserNotFoundException {\n\t\tOptional<User> userOptional = userRepository.findById(userId);\n\t\tif (!userOptional.isPresent()) {\n\t\t\tthrow new UserNotFoundException(\"User not found\");\n\t\t}\n\t\treturn userOptional.get().getOrders();\n\n\t}",
"List<Order> selectAll(int userid);",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Orderi> findByMember(Integer userId) {\n\t\treturn (List<Orderi>)getHibernateTemplate()\n\t\t.find(\"from Orderi as o where o.auctionUser.id = ? order by o.createtime desc \",userId);\n\t}",
"public List<Shoporder> GetOrderByUser(String userId) {\n\t\treturn mapper.GetOrderByUser(userId);\n\t}",
"public Orders getOrderByUser(Integer userid) {\n\t\tOrdersExample example=new OrdersExample();\n\t\texample.createCriteria().andUseridEqualTo(userid);\n\t\t\n\t\treturn ordersMapper.selectByExample(example).get(0);\n\t}",
"protected OrdersEntity findOrders_ByIdUsers_andStatusIsPending() {\n log.info(\"OrdersBean : findOrders_ByIdUsers_andStatusIsPending!\");\n return ordersServices.findByIdUsersAndStatusIsPending(usersBean.getUsersEntity().getId());\n }",
"@Override\r\n\tpublic List<UserOrderInfo> getUserOrderInfo(int userId) {\n\t\treturn odi.getUserOrderInfo(userId);\r\n\t}",
"@CrossOrigin(origins = \"*\")\n @GetMapping(\"/orders/user/{userid}\")\n public ResponseEntity<List<Order>> getAllOrdersByUserId(@PathVariable(\"userid\") UUID userId) {\n List<Order> orders = ordersRepository.findAllByUserId(userId);\n return ResponseEntity.ok(orders);\n }",
"@Override\n\tpublic RechargeOrder getByOrderIDAndUid(String orderId, Long userId) {\n\t\treturn null;\n\t}",
"OrderDetailBean getSearchOrderById(long orderIdi,String userLogin,int paymenttype) throws SQLException, Exception, RemoteException;",
"public Orderdetail findOrderdetail(int userorderid) {\n\t\tString sql = \"select * from orderdetail where userorderid = ?\";\n\n\t\tResultSet rs = dbManager.execQuery(sql, userorderid);\n\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\tif (rs.next()) { // 有数据\n\t\t\t\t\tOrderdetail orderdetail = new Orderdetail();\n\t\t\t\t\t\n\t\t\t\t\torderdetail.setUserorderid(rs.getInt(1));\n\t\t\t\t\torderdetail.setGreensid(rs.getInt(2));\n\t\t\t\t\torderdetail.setOrderid(rs.getInt(3));\n\t\t\t\t\torderdetail.setCount(rs.getInt(4));\n\t\t\t\t\t\n\t\t\t\t\treturn orderdetail;\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\n\t\t\t\t// 关闭数据库连接\n\t\t\t\tdbManager.closeConnection();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static List<Order> personalOrders(int userID) throws LegoHouseException {\n try {\n Connection con = Connector.connection();\n String SQL = \"SELECT * FROM orders WHERE userID=?\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setInt(1, userID);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n List<Order> personalOrders = new ArrayList();\n do {\n int ordernumber = rs.getInt(1);\n int height = rs.getInt(3);\n int width = rs.getInt(4);\n int length = rs.getInt(5);\n String status = rs.getString(6);\n Order order = new Order(ordernumber, height, length, width, status);\n personalOrders.add(order);\n }\n while (rs.next());\n return personalOrders;\n }\n else {\n throw new LegoHouseException(\"You dont have any orders\", \"customerpage\");\n }\n }\n catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException ex) {\n throw new LegoHouseException(ex.getMessage(), \"index\");\n }\n }",
"@Query(nativeQuery = true, value =\"select * from order_details where user_id = :userId\" )\r\n\tList<OrderDetails> getOrderDetailsByUserId(@Param(\"userId\") Integer id);",
"public java.util.List<Todo> findByUserId(long userId);",
"@Override\n\tpublic String findOrderById(Long userId) {\n\t\treturn \"版本2 provider userId= \"+userId;\n\t}",
"@Override\r\n\tpublic List<OrderRecordHisVo> findHisByUserId(UserNoParam user) {\n\t\tList<OrderRecordHisVo> orderHisList=(List<OrderRecordHisVo>) mapper.getOrderHisRecord(user);\r\n\t\t\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn orderHisList;\r\n\t}",
"public static Result getOrderListByUser(String userId, int limit){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n List<Orders> orderList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat=conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.1\"));\n if(userId!=null){\n preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.7\"));\n preStat.setString(1, userId);\n preStat.setInt(2, limit);\n }else{\n preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.5\"));\n preStat.setInt(1, limit);\n }\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n orderList = new ArrayList<>();\n do{\n Orders order = ORMHandler.resultSetToOrder(resultSet);\n User user = ORMHandler.resultSetToUser(resultSet);\n order.setUser(user);\n \n orderList.add(order);\n }while(resultSet.next());\n \n return Result.SUCCESS.setContent(orderList);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }",
"public Order getOrderById(long orderId);",
"private boolean userHasOrder(LogicFacade logic, User user) throws LegoCustomException {\r\n ArrayList<HouseOrder> orders = logic.getAllOrdersByUser(user.getId());\r\n boolean hasOrder = false;\r\n for (HouseOrder houseOrder : orders) {\r\n hasOrder = (houseOrder.getUserID() == user.getId());\r\n }\r\n return hasOrder;\r\n }",
"public List<Orderdetail> findOrderdetailListByUser(int currentPage, int pageSize, int userid) {\n\t\tString sql = \"SELECT tttt.couriername,tttt.greensname,restaurant.restname,tttt.orderstatus,tttt.userorderid from restaurant JOIN\"\n\t\t\t\t+\" (SELECT ttt.couriername,greens.greensname,greens.restid,ttt.orderstatus,ttt.userorderid from greens JOIN\"\n\t\t\t\t+\" (SELECT tt.couriername,tt.greensid,tt.orderstatus,tt.userorderid FROM ordersummary JOIN\" \n\t\t\t\t+\" (select t.couriername,orderdetail.greensid,orderdetail.orderid,orderdetail.orderstatus,orderdetail.userorderid from orderdetail JOIN\"\n\t\t\t\t+\" (select courier.couriername,courierrest.userorderid\" \n\t\t\t\t+\" from courierrest JOIN courier\" \n\t\t\t\t+\" on courier.courierid = courierrest.courierid) as t\"\n\t\t\t\t+\" on orderdetail.userorderid = t.userorderid and orderdetail.orderstatus in (1,2,3)) as tt\"\n\t\t\t\t+\" on ordersummary.orderid = tt.orderid and userid = ?) as ttt\"\n\t\t\t\t+\" on greens.greensid = ttt.greensid) as tttt\"\n\t\t\t\t+\" on restaurant.restid = tttt.restid limit ?,?\";\n\t\t\n\t\tResultSet rs = dbManager.execQuery(sql, userid, (currentPage - 1) * pageSize, pageSize);\n\n\t\tList<Orderdetail> list = new ArrayList<Orderdetail>();\n\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tOrderdetail orderdetail = new Orderdetail();\n\t\t\t\tCourier courier = new Courier();\n\t\t\t\tGreens greens = new Greens();\n\t\t\t\tRestaurant rest = new Restaurant();\n\t\t\t\t\n\t\t\t\tcourier.setCouriername(rs.getString(1));\n\t\t\t\trest.setCourier(courier);\n\t\t\t\t\n\t\t\t\tgreens.setGreensname(rs.getString(2));\n\t\t\t\trest.setRestname(rs.getString(3));\n\t\t\t\t\n\t\t\t\tgreens.setRest(rest);\n\t\t\t\t\n\t\t\t\torderdetail.setOrderstatus(rs.getInt(4));\n\t\t\t\torderdetail.setGreens(greens);\n\t\t\t\t\n\t\t\t\torderdetail.setUserorderid(rs.getInt(5));\n\t\t\t\t\n\t\t\t\tlist.add(orderdetail);\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tdbManager.closeConnection();\n\t\t}\n\n\t\treturn null;\n\t}",
"List<ItemUser> findByUserId(Long userId);",
"public Long findIdUserByOwnRequest(Long id) throws DBException {\n\t\tLong result = (long) 0;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = DBManager.getInstance().getConnection();\n\t\t\tpstmt = con.prepareStatement(SQL_FIND_USER_ID_BY_OWN_ORDER);\n\t\t\tpstmt.setLong(1, id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tresult = rs.getLong(\"id_user\");\n\t\t\t}\n\t\t\tcon.commit();\n\t\t} catch (SQLException ex) {\n\t\t\tDBManager.getInstance().rollback(con);\n\t\t\tLOG.error(Messages.ERR_CANNOT_FIND_USER_ORDER, ex);\n\t\t\tthrow new DBException(Messages.ERR_CANNOT_FIND_USER_ORDER, ex);\n\t\t} finally {\n\t\t\tDBManager.getInstance().close(con, pstmt, rs);\n\t\t}\n\n\t\treturn result;\n\t}",
"@Query(value=\"select distinct order_id from cart where user_username=? and in_cart=false\",nativeQuery = true)\n\tpublic List<Long> findUniqueOrderId(User user);",
"public List<Orderdetail> findFinishedOrderListByUser(int currentPage, int pageSize, int userid) {\n\t\tString sql = \"SELECT tttt.couriername,tttt.greensname,restaurant.restname,tttt.orderstatus,tttt.userorderid from restaurant JOIN\"\n\t\t\t\t+\" (SELECT ttt.couriername,greens.greensname,greens.restid,ttt.orderstatus,ttt.userorderid from greens JOIN\"\n\t\t\t\t+\" (SELECT tt.couriername,tt.greensid,tt.orderstatus,tt.userorderid FROM ordersummary JOIN\" \n\t\t\t\t+\" (select t.couriername,orderdetail.greensid,orderdetail.orderid,orderdetail.orderstatus,orderdetail.userorderid from orderdetail JOIN\"\n\t\t\t\t+\" (select courier.couriername,courierrest.userorderid\" \n\t\t\t\t+\" from courierrest JOIN courier\" \n\t\t\t\t+\" on courier.courierid = courierrest.courierid) as t\"\n\t\t\t\t+\" on orderdetail.userorderid = t.userorderid and orderdetail.orderstatus = 4) as tt\"\n\t\t\t\t+\" on ordersummary.orderid = tt.orderid and userid = ?) as ttt\"\n\t\t\t\t+\" on greens.greensid = ttt.greensid) as tttt\"\n\t\t\t\t+\" on restaurant.restid = tttt.restid limit ?,?\";\n\t\t\n\t\tResultSet rs = dbManager.execQuery(sql, userid, (currentPage - 1) * pageSize, pageSize);\n\n\t\tList<Orderdetail> list = new ArrayList<Orderdetail>();\n\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tOrderdetail orderdetail = new Orderdetail();\n\t\t\t\tCourier courier = new Courier();\n\t\t\t\tGreens greens = new Greens();\n\t\t\t\tRestaurant rest = new Restaurant();\n\t\t\t\t\n\t\t\t\tcourier.setCouriername(rs.getString(1));\n\t\t\t\trest.setCourier(courier);\n\t\t\t\t\n\t\t\t\tgreens.setGreensname(rs.getString(2));\n\t\t\t\trest.setRestname(rs.getString(3));\n\t\t\t\t\n\t\t\t\tgreens.setRest(rest);\n\t\t\t\t\n\t\t\t\torderdetail.setOrderstatus(rs.getInt(4));\n\t\t\t\torderdetail.setGreens(greens);\n\t\t\t\t\n\t\t\t\torderdetail.setUserorderid(rs.getInt(5));\n\t\t\t\t\n\t\t\t\tlist.add(orderdetail);\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tdbManager.closeConnection();\n\t\t}\n\n\t\treturn null;\n\t}",
"Order requireById(Long orderId);",
"@Override\r\n\tpublic User searchUser(Integer id) {\n\t\treturn userReposotory.getById(id);\r\n\t}",
"public Long findIdUserByRequest(int id) throws DBException {\n\t\tLong result = (long) 0;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = DBManager.getInstance().getConnection();\n\t\t\tpstmt = con.prepareStatement(SQL_FIND_USER_ID_BY_ORDER);\n\t\t\tpstmt.setInt(1, id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tresult = rs.getLong(\"id_user\");\n\t\t\t}\n\t\t\tcon.commit();\n\t\t} catch (SQLException ex) {\n\t\t\tDBManager.getInstance().rollback(con);\n\t\t\tLOG.error(Messages.ERR_CANNOT_FIND_USER_ORDER, ex);\n\t\t\tthrow new DBException(Messages.ERR_CANNOT_FIND_USER_ORDER, ex);\n\t\t} finally {\n\t\t\tDBManager.getInstance().close(con, pstmt, rs);\n\t\t}\n\t\treturn result;\n\t}",
"Order getOrder(int id) throws ServiceException;",
"List<Todo> findByUser(String user);",
"public List<UsersRobots> findByUserId(int idUser){\n return (List<UsersRobots>) entityManager.createQuery(\"SELECT ur FROM UsersRobots ur where ur.idUser = :idUser\").setParameter(\"idUser\",idUser).getResultList();\n }",
"Order getByID(String id);",
"OrderDTO findBy(String id);",
"ClOrderInfo selectByPrimaryKey(String orderId);",
"public static ru.terralink.mvideo.sap.Orders find(long id)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.find()\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n Object[] keys = new Object[]{id};\n return (ru.terralink.mvideo.sap.Orders)(DELEGATE.findEntityWithKeys(keys));\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }",
"@Override\r\n\tpublic Orderitem queryByUidAndPid(Orderitem oi) {\n\t\treturn orderitemDao.queryByUidAndPid(oi);\r\n\t}",
"public void findAllMyOrders() {\n log.info(\"OrdersBean : findAllMyOrders\");\n FacesContext context = FacesContext.getCurrentInstance();\n\n ordersEntities = ordersServices.findAllByIdUsersAndStatusIsValidateOrCanceled(usersBean.getUsersEntity().getId());\n if (ordersEntities.isEmpty()) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.modalContractsOrder.listOrderEmpty\"), null));\n } else {\n deadlineLeasing();\n }\n }",
"@GetMapping(\"/{userId}/orders\")\n public CollectionModel<OrderDto> findOrders(@PathVariable @Positive Long userId,\n @RequestParam(required = false) @Positive Integer size,\n @RequestParam(required = false) @Positive Integer page) {\n PageDto pageDto = pageDtoBuilder.build(size, page);\n List<OrderDto> orderDtoList = orderService.findAllByUserId(userId, pageDto);\n Link selfLink = linkTo(methodOn(UserController.class)\n .findOrders(userId, pageDto.getSize(), pageDto.getPage()))\n .withSelfRel();\n Link findOrderLink = linkTo(methodOn(UserController.class)\n .findOrder(userId, null))\n .withRel(ApiConstant.FIND_ORDER);\n return CollectionModel.of(orderDtoList, selfLink, findOrderLink);\n }",
"public List<UserLog> findUserLogByUserId(String username,long UserId) {\n \n\t LOGGER.info(\"Found \" + username + \" results.\");\n\t CriteriaBuilder cb = em.getCriteriaBuilder();\n\n // the actual search query that returns one page of results\n CriteriaQuery<UserLog> searchQuery = cb.createQuery(UserLog.class);\n Root<UserLog> searchRoot = searchQuery.from(UserLog.class);\n searchQuery.select(searchRoot);\n searchQuery.where(getUserLogWhereCondition(cb, UserId, searchRoot));\n\n List<Order> orderList = new ArrayList<Order>();\n orderList.add(cb.desc(searchRoot.get(\"log_time\")));\n searchQuery.orderBy(orderList);\n\n TypedQuery<UserLog> filterQuery = em.createQuery(searchQuery);\n LOGGER.info(\"Found \" + UserId + \" results.\");\n return filterQuery.getResultList();\n }",
"public java.util.List<Todo> findByUserId(\n\t\tlong userId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Todo>\n\t\t\torderByComparator,\n\t\tboolean useFinderCache);",
"@Override\n\tpublic RechargeOrder getByUid(Long userId) {\n\t\treturn null;\n\t}",
"Orderall selectByPrimaryKey(String orderid);",
"public List<OrderDetail> getOrderDetailByOrder(Long orderId);",
"@Override\r\n\tpublic List<Shop_Order> findShopOrderByDriverId(Shop_Driver driver) {\n\t\treturn shopuserDao.findShopOrderByDriverId(driver);\r\n\t}",
"@Override\n\tpublic UserOrderDetail selectById(Serializable id) {\n\t\treturn null;\n\t}",
"boolean checkForUnfinishedOrders (int userId) throws ServiceException;",
"Order find(Long id);",
"public List<Order> findOrder(int orderId) {\n\t\tList<Order> orders=new ArrayList<Order>();\n\t\tQuery query=em.createQuery(\"from Order where order_Id=:orderId\"+\" and block_id is null\");\n\t\tquery.setParameter(\"orderId\",orderId);\n\t\t//System.out.println(query);\n\t\torders=query.getResultList();\n\t\t//System.out.println(orders.get(0));\n\n\t\treturn orders;\n\n\t}",
"static orders getOrder(String uid) {\n return null;\n }",
"public List<Order> findOrdersByUser(int userId,int startRow, int rowsPerPage)throws ApplicationEXContainer.ApplicationCanNotChangeException{\n List<Order> orders;\n try(Connection connection = MySQLDAOFactory.getConnection();\n AutoRollback autoRollback = new AutoRollback(connection)){\n orders =orderDao.findOrdersByUser(connection,userId,startRow,rowsPerPage);\n autoRollback.commit();\n } catch (SQLException | NamingException | DBException throwables) {\n LOGGER.error(throwables.getMessage());\n throw new ApplicationEXContainer.ApplicationCanNotChangeException(throwables.getMessage(),throwables);\n }\n return orders;\n }",
"@GetMapping(\"/{id}\")\n public UserDto find(@PathVariable @Positive Long id) {\n UserDto userDto = userService.findById(id);\n userDto.add(linkTo(methodOn(UserController.class)\n .find(id))\n .withSelfRel());\n userDto.add(linkTo(methodOn(UserController.class)\n .findOrders(id, null, null))\n .withRel(ApiConstant.FIND_ORDERS));\n userDto.add(linkTo(methodOn(UserController.class)\n .findOrder(id, null))\n .withRel(ApiConstant.FIND_ORDER));\n return userDto;\n }",
"@Nullable\n public ArrayList<Order> doRetrieveByUsername(@NotNull String username) {\n try {\n Connection cn = ConPool.getConnection();\n PreparedStatement st;\n User u = ud.doRetrieveByUsername(username);\n Order o = null;\n Operator op = null;\n ArrayList<Order> orders = new ArrayList<>();\n if (u != null) {\n st = cn.prepareStatement(\"SELECT * FROM `order` O WHERE O.user=?;\");\n st.setString(1, username);\n ResultSet rs = st.executeQuery();\n while (rs.next()) {\n o = new Order();\n o.setUser(u);\n o.setId(rs.getInt(2));\n o.setTotPrice(rs.getDouble(3));\n o.setNumberOfItems(rs.getInt(4));\n o.setData(rs.getString(5));\n if (rs.getString(6) != null) {\n op = opd.doRetrieveByUsername(rs.getString(6));\n } else {\n op = null;\n }\n o.setOperator(op);\n st = cn.prepareStatement(\"SELECT * FROM digitalpurchasing D WHERE D.order=?;\");\n st.setInt(1, o.getId());\n ResultSet rs2 = st.executeQuery();\n DigitalProduct dp = null;\n while (rs2.next()) {\n dp = dpd.doRetrieveById(rs2.getInt(1));\n o.addProduct(dp, rs2.getInt(3));\n }\n st = cn.prepareStatement(\"SELECT * FROM physicalpurchasing P WHERE P.order=?;\");\n st.setInt(1, o.getId());\n rs2 = st.executeQuery();\n PhysicalProduct pp = null;\n while (rs2.next()) {\n pp = ppd.doRetrieveById(rs2.getInt(1));\n o.addProduct(pp, rs2.getInt(3));\n }\n orders.add(o);\n }\n st.close();\n cn.close();\n }\n return orders;\n } catch (SQLException e) {\n return null;\n }\n }",
"@Override\n\tpublic void filterNurseOrder(Integer userId, List<PatientOrder> patientOrder) {\n\n\t}",
"public Order findOne(Integer id) {\r\n\t\tlog.info(\"Request to finde Order : \" + id);\r\n\t\treturn orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();\r\n\t}",
"@GetMapping(\"/getAnUserOrders/{emailId}\") \n\tpublic ResponseEntity<List<Order>> getAnUserOrders(@PathVariable String emailId) throws ResourceNotFoundException\n\t{\n\t\tlogger.trace(\"Requested to get all the orders of a user\");\n\t\tList<Order> orders=service.getAnUserOrders(emailId);\n\t\tlogger.trace(\"Completed request to get all the orders of a user\");\n\t\treturn ResponseEntity.ok(orders);\n\t}",
"public List<ReportBaseImpl> getOpenOrders(SimpleUser user)\r\n throws PersistenceException;",
"@Transactional(readOnly = true)\n public List<RoworderDTO> findBySOrderId(Long id) {\n\n Object[] plop=roworderRepository.findAll().stream()\n .map(roworderMapper::toDto).toArray();\n ArrayList<RoworderDTO> sorders= new ArrayList<RoworderDTO>();\n log.debug(\"findBySOrderId id : {}\",id);\n log.debug(\"findBySOrderId plop.length : {}\",plop.length);\n for (int i=0;i< plop.length;i++){\n log.debug(\"findBySOrderId plop[i].id : {}\",plop.length);\n log.debug(\"findBySOrderId plop[i].orderid : {}\",((RoworderDTO)plop[i]).getSorderId());\n log.debug(\"findBySOrderId plop[i].tostring : {}\",((RoworderDTO)plop[i]).toString());\n log.debug(\"findBySOrderId if : {}\",id.equals(((RoworderDTO)plop[i]).getSorderId()));\n if(id.equals(((RoworderDTO)plop[i]).getSorderId())){\n log.debug(\"plop : {}\",(RoworderDTO) plop[i]);\n sorders.add((RoworderDTO) plop[i]);\n }\n }\n return sorders;\n }",
"List<LineItem> listLineItemByOrderId(Integer orderId);",
"@Transactional(readOnly = true)\n public List<Ticket> findByUser_Id(Long id) {\n log.debug(\"Request to findByUser_Id : {}\", id);\n List<Ticket> tickets = ticketRepository.findByUser_Id(id);\n return tickets;\n }",
"User findUser(String userId);",
"@GetMapping(path = \"/orders\")\n Iterable<ShopOrder> getOrdersByUser(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);",
"public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }",
"List<OrderDTO> findAll(String customerId);",
"public List<FollowItem> queryFollowsByUserId(Integer userId)\r\n {\r\n String sql=\"select * from Follows where userid =\"+ userId + \";\";\r\n return query(sql);\r\n }",
"Order findById(Long id);",
"public JSONObject fetchOrder(long orderId) throws Exception;",
"List<Order> findClientOrders(long clientId) throws DaoProjectException;",
"@Override\n\tpublic WxOrder queryOrderById(Integer id) {\n\t\treturn orderMapper.queryOrderById(id);\n\t}",
"public User findById ( int id) {\n\t\t return users.stream().filter( user -> user.getId().equals(id)).findAny().orElse(null);\n\t}",
"public List<OrderItems> getAllOrderItemsByOrderId(int orderId){\n\t\tSystem.out.println(\"service\");\n\t\tList<OrderItems> orderItemsRecords = orderItemsRepo.getAllOrderItemsByOrderId(orderId);\n\t\tList<OrderItems> orderItems= new ArrayList();\n\t\tfor(OrderItems items: orderItemsRecords) \n\t\t\tif(items.getOrders().getOrderId() == orderId)\n\t\t\t\torderItems.add(items);\t\t\n\t\tSystem.out.println(orderItems);\n\t\treturn orderItems;\t\n\t}",
"@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }",
"public OrderList findOrders(){\n sql=\"SELECT * FROM Order\";\n Order order;\n try{\n ResultSet resultSet = db.SelectDB(sql);\n \n while(resultSet.next()){\n order = new Order();\n order.setOrderID(resultSet.getString(\"OrderID\"));\n order.setCustomerID(resultSet.getString(\"CustomerID\"));\n order.setStatus(resultSet.getString(\"Status\"));\n ordersList.addItem(order);\n }\n }\n catch(SQLException e){\n System.out.println(\"Crash finding all orders\" + e);\n }\n return ordersList;\n }",
"@Repository\npublic interface FreeOrderRepository extends JpaRepository<FreeOrder,Long> {\n\n\n FreeOrder findById(int id);\n\n Page<FreeOrder> findAll(Pageable pageable);\n\n List<FreeOrder> findByUserid(int userid, Sort sort);\n}",
"@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }",
"List<Money> findByUserId(String userId);",
"public List<PurchaseOrderLine> findByOrderId(String orderId);",
"UcOrderGuestInfo selectByPrimaryKey(Long id);",
"public java.util.List<Todo> findByUserId(long userId, int start, int end);",
"public java.util.List<Todo> findByUserId(\n\t\tlong userId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Todo>\n\t\t\torderByComparator);",
"@Override\r\n\tpublic List<Post> searchInfByUserId(User user) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.infSearchByUserId(user);\r\n\t\t\r\n\t}",
"public PageInfo<List<OrderitemPojo>> getOrderByUserid(Integer userid,\n\t\t\tint page, int row) {\n\t PageHelper.startPage(page, row);\n\t\tOrdersExample example=new OrdersExample();\n\t\texample.createCriteria().andUseridEqualTo(userid);\n\t\texample.setOrderByClause(\"oid desc\");\n\t\tList<Orders> orderList=ordersMapper.selectByExample(example);\n\t\t\n\t\tPageInfo<Orders> pageInfo1=new PageInfo<Orders>(orderList);\n\t\t\n\t\t\n\t\tList<List<OrderitemPojo>> list=new ArrayList<List<OrderitemPojo>>();\n\t\tfor(Orders orders:pageInfo1.getList()){\n\t\t\tList<OrderitemPojo> orderitemList=orderitemMapper.selectOrderitemPojoByOid(orders.getOid());\n\t\t\tfor(OrderitemPojo orderitem:orderitemList){\n\t\t\t\tString image=orderitem.getImage();\n\t\t\t\tString[] split=image.split(\",\");\n\t\t\t\torderitem.setImage(\"/pic/\"+split[0]);\n\t\t\t\torderitem.setOrdertime(orders.getOrdertime());\n\t\t\t\torderitem.setTotal(orders.getTotal());\n\t\t\t\tString status=orders.getStatus();\n\t\t\t\tif(status==null) status=\"无\";\n\t\t\t\torderitem.setStatus(status);\n\t\t\t\tInteger state=orders.getState();\n\t\t\t\tString c=\"\";\n\t\t\t\tif(state==0){\n\t\t\t\t\tc=\"未付款\";\n\t\t\t\t}else if(state==1){\n\t\t\t\t\tc=\"已付款(未发货)\";\n\t\t\t\t}else if(state==2){\n\t\t\t\t\tc=\"已发货\";\n\t\t\t\t}else if(state==3){\n\t\t\t\t\tc=\"已收货\";\n\t\t\t\t}else if(state==4){\n\t\t\t\t\tc=\"交易成功)\";\n\t\t\t\t}\n\t\t\t\torderitem.setState(c);\t\n\t\t\t}\n\t\t\tlist.add(orderitemList);\t\n\t\t}\n\t\tPageInfo<List<OrderitemPojo>> pageInfo=new PageInfo<List<OrderitemPojo>>(list);\n\t\tpageInfo.setPages(pageInfo1.getPages());\n\t\tpageInfo.setTotal(pageInfo1.getTotal());\n\t\tpageInfo.setHasNextPage(pageInfo1.isHasNextPage());\n\t\tpageInfo.setHasPreviousPage(pageInfo1.isHasPreviousPage());\t\n\t\treturn pageInfo;\n\t\t\n\t}",
"@Override\n\tpublic List<Cart> findCartByUserId(int userId) throws SQLException{\n\t\t\n\t\treturn cartDao.findCartByUserId(userId);\n\t}",
"public List<Todo> getTodosByUserId(Long userId) {\n return todoRepository.findByCreatedById(userId);\n }",
"TrackingOrderDetails trackingOrderDetails(String username, int order_id, String role);",
"@Override\r\n\tpublic List<User> query(int userId) {\n\t\treturn null;\r\n\t}",
"public java.util.List<Todo> filterFindByUserIdGroupId(\n\t\tlong userId, long groupId);",
"public abstract List<CustomerOrder> findAll(Iterable<Long> ids);",
"public User getUser(Long id) throws ToDoListException;",
"public UserEntity findByPrimaryKey(String userId) throws FinderException;"
]
| [
"0.7846011",
"0.7539741",
"0.73152757",
"0.7304883",
"0.7203445",
"0.7162734",
"0.7135677",
"0.6934781",
"0.6887741",
"0.68503165",
"0.6846815",
"0.67238855",
"0.6721065",
"0.6664613",
"0.6656471",
"0.6523551",
"0.6503872",
"0.6470719",
"0.64479375",
"0.6447323",
"0.643208",
"0.6394089",
"0.6340929",
"0.6234196",
"0.6230391",
"0.6229724",
"0.62179315",
"0.61957884",
"0.6165746",
"0.6164837",
"0.6158578",
"0.6130202",
"0.6104513",
"0.6053688",
"0.60307634",
"0.60110587",
"0.5930917",
"0.593022",
"0.5912716",
"0.59073555",
"0.59035575",
"0.5868474",
"0.5859047",
"0.5852212",
"0.5851752",
"0.5850535",
"0.5829445",
"0.577449",
"0.5773367",
"0.57416844",
"0.57341003",
"0.57284325",
"0.5713406",
"0.5705065",
"0.57040346",
"0.57035816",
"0.5687409",
"0.56753176",
"0.56711805",
"0.5661001",
"0.5633536",
"0.5621772",
"0.5616698",
"0.56114304",
"0.561045",
"0.5604803",
"0.560388",
"0.5595371",
"0.5590532",
"0.5559445",
"0.5558786",
"0.5546678",
"0.55465573",
"0.5541821",
"0.552451",
"0.5523986",
"0.55228955",
"0.5519972",
"0.5517259",
"0.5515414",
"0.55088294",
"0.5508243",
"0.5501216",
"0.54973197",
"0.5490742",
"0.54844767",
"0.54792625",
"0.547801",
"0.5473039",
"0.5468113",
"0.5446435",
"0.5444486",
"0.5439965",
"0.54346615",
"0.5432253",
"0.54299283",
"0.54243714",
"0.5422155",
"0.5420539",
"0.54171836"
]
| 0.8224163 | 0 |
TODO Autogenerated method stub | @Override
public int updateUser(Users user) {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int deleteUser(Users user) {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Product> selectAllProduct() {
return productMapper.selectAllProduct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Adds the main nuxeo document artifact. | public void addMainArtefact(NuxeoDocArtefact nuxeoDocArtifact) {
this.mainArtefact = nuxeoDocArtifact;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MinedMainDocument parseMainArtifact() {\n\t\ttry {\n\t\t\tInputStream is = this.getNuxeoInstance().getDocumentInputStream(mainArtefact.getId());\n\t\t\t\n\t\t\tString title = this.getNuxeoInstance().getLastDocTitle();\n\t\t\tif(title==null) title = \"Main Document\";\n\t\t\t\n\t\t\tDocxParser docx = new DocxParser(is);\n\t\t\tdocx.parseDocxAndChapters();\n\t\t\tMinedMainDocument mainDoc = new MinedMainDocument(title, docx.getFullText());\n\t\t\tmainDoc.addChapters(docx.getChapterHeadlines(), docx.getChapterTexts());\n\t\t\tis.close();\n\t\t\treturn mainDoc;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public void add(PhotonDoc doc);",
"public void addOutDocument(com.hps.july.persistence.Document arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().addOutDocument(arg0);\n }",
"public void addInDocument(com.hps.july.persistence.Document arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().addInDocument(arg0);\n }",
"public static NuxeoDocArtefact createMainArtefact(String mainDocId) {\n\t\treturn new NuxeoDocArtefact(mainDocId);\n\t}",
"public void secondaryAddOutDocument(com.hps.july.persistence.Document arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().secondaryAddOutDocument(arg0);\n }",
"public void secondaryAddInDocument(com.hps.july.persistence.Document arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().secondaryAddInDocument(arg0);\n }",
"public static void main(String args[]) {\n\t\tNuxeoClient client = new NuxeoClient.Builder().url(\"http://localhost:8080/parliament\")\n\t\t// NuxeoClient client = new NuxeoClient.Builder().url(\"http://tourismministry.phoenixsolutions.com.np:8888/parliament\")\n\t\t\t\t.authentication(\"Administrator\", \"Administrator\").schemas(\"*\") // fetch all document schemas\n\t\t\t\t.connect();\n\t\tRepository repository = client.repository();\n\n//Menu\n\t//create\n\t\tDocument file = Document.createWithName(\"One\", \"Band\");\n\t\tDocument menu = Document.createWithName(\"menu\", \"Folder\");\n\t\t// menu.setPropertyValue(\"band:abbr\", \"ELF\");\n\t\trepository.createDocumentByPath(\"/\", menu);\n\t\tDocument report = Document.createWithName(\"report-list\", \"Report-List\");\n\t\trepository.createDocumentByPath(\"/menu\", report);\n\t\tDocument event = Document.createWithName(\"event-list\", \"Event-List\");\n\t\trepository.createDocumentByPath(\"/menu\", event);\n\t\tDocument meeting = Document.createWithName(\"meeting-list\", \"Meeting-List\");\n\t\trepository.createDocumentByPath(\"/menu\", meeting);\n\t\tDocument ics = Document.createWithName(\"integrated-central-status-list\", \"Integrated-Central-Status-List\");\n\t\trepository.createDocumentByPath(\"/menu\", ics);\n\n\n\t\tUserManager userManager = client.userManager();\n\n\t\tcreateUsers(userManager,\"operator\",\"Operator\",\"operator\");\n\t\tcreateUsers(userManager,\"secretary\",\"Secretary\",\"secretary\");\n\t\tcreateUsers(userManager,\"depsecretary\",\"DepSecretary\",\"depsecretary\");\n\t\tcreateUsers(userManager,\"education\",\"Education\",\"education\");\n\t\tcreateUsers(userManager,\"health\",\"Health\",\"health\");\n\t\tcreateUsers(userManager,\"tourism\",\"Tourism\",\"tourism\");\n\n\t\tString[] memberUsersSecretariat = {\"operator\",\"secretary\",\"depsecretary\"};\n\t\tString[] memberUsersBeruju = {\"education\",\"health\",\"tourism\"};\n\t\tcreateGroup(userManager,\"secretariat\",\"Secretariat\",memberUsersSecretariat);\n\t\tcreateGroup(userManager,\"beruju\",\"Beruju\",memberUsersBeruju);\n\t\n//fetching\n\n\t\t// Document myfile = repository.fetchDocumentByPath(\"/default-domain/workspaces/Bikings/Liferay/One\");\n\t\t// String title = myfile.getPropertyValue(\"band:band_name\"); // equals to folder\n\t\t// System.out.println(title);\n\n\n// file upload\n\n\t\t// Document domain = client.repository().fetchDocumentByPath(\"/default-domain\");\n\n\t\t// Let's first retrieve batch upload manager to handle our batch:\n\t\t// BatchUploadManager batchUploadManager = client.batchUploadManager();\n\n\t\t// // // getting local file\n\t\t// ClassLoader classLoader = new NuxeoConnect().getClass().getClassLoader();\n\t\t// File file = new File(classLoader.getResource(\"dipesh.jpg\").getFile());\n\n\t\t// // // create a new batch\n\t\t// BatchUpload batchUpload = batchUploadManager.createBatch();\n\t\t// Blob fileBlob = new FileBlob(file);\n\t\t// batchUpload = batchUpload.upload(\"0\", fileBlob);\n\n\t\t// // // attach the blob\n\t\t\n\t\t// Document doc = client.repository().fetchDocumentByPath(\"/default-domain/workspaces/Phoenix/DipeshCollection/dipeshFile\");\n\t\t// doc.setPropertyValue(\"file:content\", batchUpload.getBatchBlob());\n\t\t// doc = doc.updateDocument();\n\t\t// // get\n\t\t// Map pic = doc.getPropertyValue(\"file:content\");\n\t\t// System.out.print(pic);\n\t}",
"public void addReceivedInternalDocument(AddReceivedInternalDocumentCommand aCommand);",
"public void addPDFDocument(emxPDFDocument_mxJPO document)\r\n {\r\n /*\r\n * Author : DJ\r\n * Date : 02/04/2003\r\n * Notes :\r\n * History :\r\n */\r\n super.add(document);\r\n }",
"public void addArtifact(ArtifactModel artifact);",
"private void uploadLocalDocument(){\t\t\n\t\tif(getFileChooser(JFileChooser.FILES_ONLY).showOpenDialog(this)==JFileChooser.APPROVE_OPTION){\n\t\t\tNode node = null;\n\t\t\ttry {\n\t\t\t\tnode = alfrescoDocumentClient.addFileFromParent(getTreeSelectedAlfrescoKey(), getFileChooser().getSelectedFile());\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\t\n\t\t\t//Node node = alfrescoManager.addFileFromParent(getTreeSelectedAlfrescoKey(), getFileChooser().getSelectedFile());\t\t\n\t\t\tif(node!=null){\n\t\t\t\tgetDynamicTreePanel().getChildFiles(getTreeSelectedDefaultMutableNode());\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"El documento se ha subido correctamente.\");\n\t\t\t}\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Error al subir el documento.\");\n\t\t}\n\t\t//el boton solo esta activo si un directorio esta seleccionado en el arbol directorios\n\t\t//se abre un filechooser y se elije un documento\n\t\t//solo se sube a alfresco, no se asocia automaticamente\n\t\t//se enviara la instancia de File() con el fichero seleccionado\n\t\t//se crea el fichero en alfresco, se recupera el nodo y se añade a la tabla actual (se hace de nuevo la peticion a getChildFiles())\n\t}",
"public ModDocument() {\r\n\t\tsuper();\r\n\t}",
"private Doc addDoc(String title, String text) {\n\t\tDoc doc = objectFactory.createDoc();\n\t\tdoc.setTitle(title);\n\t\tdoc.setLang(ParserConstants.english.toString());\n\t\tdoc.getContent().add(text);\n\t\treturn doc;\n\t}",
"protected void assembleDocument() {\n\n // Create the missive\n this.createMissive();\n }",
"public void newDocument();",
"static public void main(final String[] args) throws IOException {\n\t\tPath coverFilePath = Paths.get(args[1]);\n\n\t\tlong coverReference = addDocument(coverFilePath, \"image/jpeg\");\n\t\tSystem.out.println(coverReference);\n//\t\tlong recordingReference = addDocument(recordingFilePath, \"music/mp3\");\n//\t\tSystem.out.println(recordingReference);\n//\t\tlong albumIdentity = addAlbum(coverReference);\n//\t\tSystem.out.println(albumIdentity);\n\t\t//long trackIdentity = addTrack(recordingReference, 65, 20); \n//\t\tSystem.out.println(trackIdentity);\n\t\t\n\t}",
"public Document addDocument(Document arg0) throws ContestManagementException {\r\n return null;\r\n }",
"public void newFileCreated(OpenDefinitionsDocument doc) { }",
"public void newFileCreated(OpenDefinitionsDocument doc) { }",
"public void addArtifact(String artName) {\r\n \t\tartifacts.add(artName);\r\n \t\tRationaleUpdateEvent l_updateEvent = m_eventGenerator.MakeUpdated();\r\n \t\tl_updateEvent.setTag(\"artifacts\");\r\n \t\tm_eventGenerator.Broadcast(l_updateEvent);\r\n \t}",
"public boolean addDocument(File srcFile) {\n File destFile = new File(Main.mainObj.projectObj.projectPath + \"/\" + srcFile.getName());\r\n try {\r\n FileUtils.copyFile(srcFile, destFile);\r\n Main.mainObj.projectObj.textFiles.add(new Document(this.projectPath, srcFile.getName()));\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File Not found exception when initializing project\\n\" + ex);\r\n } catch (IOException exept) {\r\n System.out.println(\"IO Exception when initializing a previousl created project\\n\" + exept);\r\n }\r\n return true;\r\n\r\n }",
"public RequestedDocument addRequestedDocument(AddRequestedDocumentCommand aCommand);",
"public void setMainDocument(String body, String type, Date date, String title) {\n mainDocument = new DocumentItem(body, type, DocumentItemType.DOCUMENT);\n setMainDocumentInfo(date, title);\n }",
"public void addDocumenttoSolr(final SolrInputDocument document, Email email)\r\n\t\t\tthrows FileNotFoundException, IOException, SAXException, TikaException, SolrServerException {\n\t\tSystem.out.println(email.toString());\r\n/*\t\tdocument.setField(LocalConstants.documentFrom, email.getFrom());\r\n\t\tdocument.setField(LocalConstants.documentTo, email.getTo());\r\n\t\tdocument.setField(LocalConstants.documentBody, email.getBody());\r\n*/\r\n\t\tdocument.setField(\"from\", email.getFrom());\r\n\t\tdocument.setField(\"to\", email.getTo());\r\n\t\tdocument.setField(\"body\", email.getBody());\r\n\t//document.setField(\"title\", \"972-2-5A619-12A-X\");\r\n\t\t// 2. Adds the document\r\n\t\tdocs.add(document);\r\n\t\t//client.add(document);\r\n\t\t\r\n\t\t\r\n\r\n\t\t// 3. Makes index changes visible\r\n\t\t//client.commit();\r\n\t}",
"@Override\n public InferredOWLOntologyID appendArtifact(final InferredOWLOntologyID ontologyIRI,\n final InputStream partialInputStream, final RDFFormat format) throws PoddClientException\n {\n return null;\n }",
"@Override\n\tpublic void startDocument() {\n\t\t\n\t}",
"@Override\n public InferredOWLOntologyID publishArtifact(final InferredOWLOntologyID ontologyIRI) throws PoddClientException\n {\n return null;\n }",
"@Override\r\n\tpublic void exportDocumentView(String absPath, OutputStream out,\r\n\t\t\tboolean skipBinary, boolean noRecurse) throws IOException,\r\n\t\t\tPathNotFoundException, RepositoryException {\n\t\t\r\n\t}",
"public void addDoc (DocFile newFile) {\n\n // Check if the file extension is valid\n if (!isValid(newFile) ) {\n return;\n }\n\n // Create the new document, add in DocID fields and UploaderID fields\n org.apache.lucene.document.Document newDocument = new Document();\n\n Field docIDField = new StringField(Constants.INDEX_KEY_ID, newFile.getId(), Store.YES);\n Field docPathField = new StringField(Constants.INDEX_KEY_PATH, newFile.getPath(), Store.YES);\n Field userIDField = new StringField(Constants.INDEX_KEY_OWNER, newFile.getOwner(), Store.YES);\n Field filenameField = new TextField(Constants.INDEX_KEY_FILENAME, newFile.getFilename(), Store.YES);\n Field isPublicField = new TextField(Constants.INDEX_KEY_STATUS, newFile.isPublic().toString(), Store.YES);\n Field titleField = new TextField(Constants.INDEX_KEY_TITLE, newFile.getTitle(), Store.YES);\n Field typeField = new TextField(Constants.INDEX_KEY_TYPE, newFile.getFileType(), Store.YES);\n Field permissionField = new TextField(Constants.INDEX_KEY_PERMISSION, Integer.toString(newFile.getPermission()), Store.YES);\n Field courseField = new TextField(Constants.INDEX_KEY_COURSE, newFile.getCourseCode(), Store.YES);\n \n \n newDocument.add(docIDField);\n newDocument.add(docPathField);\n newDocument.add(userIDField);\n newDocument.add(filenameField);\n newDocument.add(isPublicField);\n newDocument.add(titleField);\n newDocument.add(typeField);\n newDocument.add(permissionField);\n newDocument.add(courseField);\n \n //Call Content Generator to add in the ContentField\n ContentGenerator.generateContent(newDocument, newFile);\n\n // Add the Document to the Index\n try {\n writer.addDocument(newDocument);\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"Digital_Artifact createDigital_Artifact();",
"default void buildMainGenerateAPIDocumentation() {\n if (!bach().project().settings().tools().enabled(\"javadoc\")) return;\n say(\"Generate API documentation\");\n var api = bach().folders().workspace(\"documentation\", \"api\");\n bach().run(buildMainJavadoc(api)).requireSuccessful();\n bach().run(buildMainJavadocJar(api)).requireSuccessful();\n }",
"public boolean addReceivedExternalDocument(AddReceivedExternalDocumentsCommand aCommand);",
"public void addDocument(IDocument document) {\n if (indexedFile == null) {\n indexedFile= index.addDocument(document);\n } else {\n throw new IllegalStateException(); } }",
"void process(Document document, Repository repository) throws Exception;",
"public abstract Iterable<String> addDocument(TextDocument doc) throws IOException;",
"Active_Digital_Artifact createActive_Digital_Artifact();",
"@Override\r\n public String createSubDocument(File file, List<FirstElement> partElement) {\n return null;\r\n }",
"@Override\n public DocumentServiceEntry createDocument(String title, String contents) throws DocumentServiceException {\n DocsService svc = getDocsService();\n DocumentEntry newDocument = new DocumentEntry();\n newDocument.setTitle(new PlainTextConstruct(title));\n DocumentEntry entry;\n try {\n MediaByteArraySource source = new MediaByteArraySource(contents.getBytes(\"UTF8\"), \"text/plain\");\n newDocument.setMediaSource(source);\n entry = svc.insert(new URL(DOCS_SCOPE + \"default/private/full\"), newDocument);\n } catch (Exception e) {\n e.printStackTrace();\n throw new DocumentServiceException(e.getMessage());\n }\n return getDocumentReference(entry);\n }",
"public interface DocumentRenderer\n{\n /** Plexus lookup role. */\n String ROLE = DocumentRenderer.class.getName();\n\n /**\n * Render a document from a set of files, depending on a rendering context.\n *\n * @param files the path name Strings (relative to a common base directory)\n * of files to include in the document generation.\n * @param outputDirectory the output directory where the document should be generated.\n * @param documentModel the document model, containing all the metadata, etc.\n * If the model contains a TOC, only the files found in this TOC are rendered,\n * otherwise all files from the Collection of files will be processed.\n * If the model is null, render all files individually.\n * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if any.\n * @throws java.io.IOException if any.\n */\n void render( Collection<String> files, File outputDirectory, DocumentModel documentModel )\n throws DocumentRendererException, IOException;\n\n /**\n * Render a document from the files found in a source directory, depending on a rendering context.\n *\n * @param baseDirectory the directory containing the source files.\n * This should follow the standard Maven convention, ie containing all the site modules.\n * @param outputDirectory the output directory where the document should be generated.\n * @param documentModel the document model, containing all the metadata, etc.\n * If the model contains a TOC, only the files found in this TOC are rendered,\n * otherwise all files found under baseDirectory will be processed.\n * If the model is null, render all files from baseDirectory individually.\n * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if any\n * @throws java.io.IOException if any\n// * @deprecated since 1.1.2, use {@link #render(File, File, DocumentModel, DocumentRendererContext)}\n */\n void render( File baseDirectory, File outputDirectory, DocumentModel documentModel )\n throws DocumentRendererException, IOException;\n\n// /**\n// * Render a document from the files found in a source directory, depending on a rendering context.\n// *\n// * @param baseDirectory the directory containing the source files.\n// * This should follow the standard Maven convention, ie containing all the site modules.\n// * @param outputDirectory the output directory where the document should be generated.\n// * @param documentModel the document model, containing all the metadata, etc.\n// * If the model contains a TOC, only the files found in this TOC are rendered,\n// * otherwise all files found under baseDirectory will be processed.\n// * If the model is null, render all files from baseDirectory individually.\n// * @param context the rendering context when processing files.\n// * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if any\n// * @throws java.io.IOException if any\n// * @since 1.1.2\n// */\n// void render( File baseDirectory, File outputDirectory, DocumentModel documentModel,\n// DocumentRendererContext context )\n// throws DocumentRendererException, IOException;\n\n /**\n * Read a document model from a file.\n *\n * @param documentDescriptor a document descriptor file that contains the document model.\n * @return the document model, containing all the metadata, etc.\n * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if any\n * @throws java.io.IOException if any\n */\n DocumentModel readDocumentModel( File documentDescriptor )\n throws DocumentRendererException, IOException;\n\n /**\n * Get the output extension associated with this DocumentRenderer.\n *\n * @return the ouput extension.\n */\n String getOutputExtension();\n}",
"public void goToAddPartScene(ActionEvent event) throws IOException {\n Parent addPartParent = FXMLLoader.load(getClass().getResource(\"AddPart.fxml\"));\n Scene addPartScene = new Scene(addPartParent);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n\n window.setScene(addPartScene);\n window.show();\n }",
"public ExternalDocumentEntry() {\n\t\tsuper(CDAFactory.eINSTANCE.createExternalDocument());\n\t\tthis.getMdht().getTemplateIds()\n\t\t\t\t.add(DatatypesFactory.eINSTANCE.createII(\"2.16.840.1.113883.10.20.1.36\"));\n\t\tthis.getMdht().setClassCode(ActClassDocument.DOC);\n\t\tthis.getMdht().setMoodCode(ActMood.EVN);\n\n\t}",
"@RequestMapping(value = \"/add-document\", method = RequestMethod.POST)\n public String addOwnership(@Valid @ModelAttribute Document document, ModelMap modelMap){\n documentService.addDocument(document);\n List<Document> documents= documentService.retrieveAllDocuments(document.getEntity().getId());\n modelMap.addAttribute(\"documents\", documents);\n modelMap.addAttribute(\"entityId\", document.getEntity().getId());\n return \"documents\";\n }",
"private void downloadAlfrescoDocument(){\n\t\t//el boton solo esta activo si un fichero esta seleccionado en la tabla de ficheros\n\t\t//Se abre un filechooser y se elije un directorio\n\t\t//Se enviara la direccion y el nodo con el content alfresco y se generara un File a partir de ellos (si no hay una opcion mejor con alfresco api)\n\t\t//se descarga el documento en el directorio elegido\n\n\t\tif(getFileChooser(JFileChooser.DIRECTORIES_ONLY).showOpenDialog(this)==JFileChooser.APPROVE_OPTION){\n\t\t\tAlfrescoNode node = (AlfrescoNode) getDynamicTreePanel().getDragTable().getValueAt(getDynamicTreePanel().getDragTable().getSelectedRow(),0);\n\t\t\t//if(alfrescoManager.downloadFile(new AlfrescoKey(node.getUuid(), AlfrescoKey.KEY_UUID), getFileChooser().getSelectedFile().getAbsolutePath()))\n\t\t\ttry {\n\t\t\t\talfrescoDocumentClient.downloadFile(new AlfrescoKey(node.getUuid(), AlfrescoKey.KEY_UUID), getFileChooser().getSelectedFile().getAbsolutePath(), node.getName());\n\t\t\t\tJOptionPane.showMessageDialog(this, \"El documento se ha descargado correctamente.\");\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Error al descargar el documento.\");\n\t\t\t}\n\t\t}\n\t}",
"@Test\r\n\tpublic void indexOneLater() throws Exception {\n\t\tSolrInputDocument sd = new SolrInputDocument();\r\n\t\tsd.addField(\"id\", \"addone\");\r\n\t\tsd.addField(\"channelid\", \"9999\");\r\n\t\tsd.addField(\"topictree\", \"tptree\");\r\n\t\tsd.addField(\"topicid\", \"tpid\");\r\n\t\tsd.addField(\"dkeys\", \"测试\");\r\n\t\tsd.addField(\"title\", \"junit 标题\");\r\n\t\tsd.addField(\"ptime\", new Date());\r\n\t\tsd.addField(\"url\", \"/junit/test/com\");\r\n//\t\t\tSystem.out.println(doc);\r\n//\t\tbuffer.add(sd);\r\n\t\tdocIndexer.addDocumentAndCommitLater(sd, 1);\r\n\t}",
"public void goToAddProductScene(ActionEvent event) throws IOException {\n Parent addProductParent = FXMLLoader.load(getClass().getResource(\"AddProduct.fxml\"));\n Scene addProductScene = new Scene(addProductParent);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n\n window.setScene(addProductScene);\n window.show();\n }",
"DocBook createDocBook();",
"@Override\r\n\tpublic void exportDocumentView(String absPath,\r\n\t\t\tContentHandler contentHandler, boolean skipBinary, boolean noRecurse)\r\n\t\t\tthrows PathNotFoundException, SAXException, RepositoryException {\n\t\t\r\n\t}",
"@Override\n public DocumentModel createDocument(CoreSession session, Blob content, DocumentModel mainDoc, DocumentModel folder)\n throws IOException {\n\n return createDocument(session, content, mainDoc, folder, false);\n }",
"public void generarDoc(){\n generarDocP();\n }",
"public Document addDocument(Document document) throws ContestManagementException {\r\n return null;\r\n }",
"@Override\n public String getServletInfo() {\n return \"Adds document\";\n }",
"void documentAdded(SingleDocumentModel model);",
"public void startDocument()\r\n\t{\r\n\t marc_out.add(\"=LDR 00000nam\\\\\\\\22000007a\\\\4500\") ;\r\n\t marc_out.add(\"=001 etd_\" + pid);\r\n\t marc_out.add(\"=003 MiAaPQ\");\r\n\t marc_out.add(\"=006 m\\\\\\\\\\\\\\\\fo\\\\\\\\d\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\r\n\t marc_out.add(\"=007 cr\\\\mnu\\\\\\\\\\\\aacaa\");\r\n\t marc_out.add(\"=040 \\\\\\\\$aMiAaPQ$beng$cDGW$dDGW\");\r\n\t marc_out.add(\"=049 \\\\\\\\$aDGWW\");\r\n\t marc_out.add(\"=504 \\\\\\\\$aIncludes bibliographical references.\");\r\n\t marc_out.add(\"=538 \\\\\\\\$aMode of access: Internet\");\r\n marc_out.add(\"=996 \\\\\\\\$aNew title added ; 20\" + running_date);\r\n marc_out.add(\"=998 \\\\\\\\$cgwjshieh ; UMI-ETDxml conv ; 20\" + running_date);\r\n\t marc_out.add(\"=852 8\\\\$bgwg ed$hGW: Electronic Dissertation\");\r\n\t marc_out.add(\"=856 40$uhttp://etd.gelman.gwu.edu/\" + pid + \".html$zClick here to access.\");\r\n\r\n }",
"private void addMetaData() {\r\n\t\tdocument.open();\r\n\t\tdocument.addTitle(\"My first PDF\");\r\n\t\tdocument.addSubject(\"Using iText\");\r\n\t\tdocument.addKeywords(\"Java, PDF, iText\");\r\n\t\tdocument.addAuthor(\"Lars Vogel\");\r\n\t\tdocument.addCreator(\"Lars Vogel\");\r\n\t\tdocument.close();\r\n\t}",
"stockFilePT102.StockFileDocument.StockFile addNewStockFile();",
"private int addDoc(IndexWriter w, String url, File file) throws IOException, IllegalArgumentException {\n\t\t\n\t\t//TODO: needs to be able to parse HTML pages here\n\t\t//File parsing\n\t\torg.jsoup.nodes.Document html = Jsoup.parse(String.join(\"\",Files.readAllLines(file.toPath())));\n\t\t\n\t\t//If we cant parse the html\n\t\tif(html == null)\n\t\t\treturn -1;\n\t\t\n\t\t\n\t\tif(PRINT_CONTENT_STRING)\n\t\t\tSystem.out.println(\"***This is the body***\\n\" + String.join(\"\",Files.readAllLines(file.toPath())));\n\t\t\n\t\tif(PRINT_CONTENT_BODY)\n\t\t\tSystem.out.println(\"***This is the body***\\n\" + html.body());\n\t\t\n\t\tString content = null;\n\t\tElement body = html.body();\n\t\t\n\t\t//Get the rest of the text in the body\n\t\tif(body != null)\n\t\t\tcontent = body.text();\n\t\t\n\t\tif(PRINT_CONTENT_TEXT)\n\t\t\tSystem.out.println(\"***This is the BODY text***\\n\" + content);\n\n\t\tString title = null;\n\t\tElement head = html.head();\n\t\tif(head != null)\n\t\t\ttitle = head.text();\n\t\t\n\t\tif(PRINT_CONTENT_TEXT)\n\t\t\tSystem.out.println(\"***This is the TITLE***\\n\" + title);\n\t\t\t\t\n\t\t//Document Creation\n\t\tDocument doc = new Document();\n\t\tField field = null;\n\t\tFieldType type = new FieldType();\n\t\ttype.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);\n\t\ttype.setStored(true); \n\t\ttype.setStoreTermVectors(true);\n\t\ttype.setTokenized(true);\n\t\t\n\t\t//If there is text in the head, it is probably a title\n\t\tif(title != null && !title.isEmpty()){\n\t\t\tfield = new Field(\"title\", title, type);\n\t\t\tfield.setBoost(15); //Set weight for the field when query matches to string in field here\n\t\t\tdoc.add(field);\n\t\t}\n\t\t\n\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\tSystem.out.println(\"This is title: \" + title);\n\n\t\t//Grab the important text tags\n\t\tElements importantTags = body.select(\"b, strong, em\");\n\n\t\tif(importantTags != null && !importantTags.isEmpty())\n\t\t{\n\t\t\tfield = new Field(\"important\", importantTags.html(), type);\n\t\t\t\n\t\t\t//Setting the bold tag boost\n\t\t\tfield.setBoost(1); \n\t\t\tdoc.add(field);\n\t\t\t\n\t\t\t//We remove any content in these tags so there is no duplicate counting\n\t\t\timportantTags.remove();\n\t\t}\n\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\tSystem.out.println(\"This is Bolding: \" + importantTags.text());\n\n\t\t\n\t\t//Grab all heading tags\n\t\tElements headingTags = body.select(\"h1, h2, h3, h4, h5, h6\");\n\n\t\tfor(int headingNum = 0; headingNum < 6; headingNum++)\n\t\t{\n\t\t\t//Attempt to index all the heading tags\n\t\t\tElements hTags = headingTags.select(\"h\" + (headingNum + 1));\n\t\t\tif(hTags != null && !hTags.isEmpty())\n\t\t\t{\n\t\t\t\tfield = new Field(\"heading\" + headingNum, hTags.html(), type);\n\t\t\t\t\n\t\t\t\t//Setting the heading tag boost\n\t\t\t\tfield.setBoost(5); \n\t\t\t\tdoc.add(field);\n\t\t\t\t\n\t\t\t\t//We remove any content in these tags so there is no duplicate counting\n\t\t\t\thTags.remove();\n\t\t\t}\n\t\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\t\tSystem.out.println(\"This is heading: \" + headingNum + \" - \" + hTags.text());\n\n\t\t}\n\t\t\n\t\t//Need to parse the remaining content after all the important tags have been deleted \n\t\tif(content != null && !content.isEmpty()){\n\t\t\tfield = new Field(\"content\", content, type);\n\t\t\t\n\t\t\t//Setting the default boost\n\t\t\tfield.setBoost(1); \n\t\t\tdoc.add(field);\n\t\t}\n\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\tSystem.out.println(\"This is content: \" + content);\n\n\t\t//Need to make sure we have content before attempting to add a link to a document\n\t\tif(doc.getFields().size() > 0)\n\t\t{\n\t\t\t//fileID field should not be used for finding terms within document, only for uniquely identifying this doc amongst others in index\n\t\t\ttype = new FieldType();\n\t\t\ttype.setStored(true);\n\t\t\ttype.setTokenized(false);\n\t\t\ttype.setStoreTermVectors(false);\n\t\t\tdoc.add(new Field(\"url\", url, type));\n\t\t\t\n\t\t\tw.addDocument(doc);\n\t\t\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\treturn -1;\n\t}",
"public abstract WalkerDocument newDocument(DocumentTag adapter, IOptions options);",
"private void addMetaData(Document document) {\n document.addTitle(\"Tasks export\");\n document.addSubject(\"From Ergon\");\n document.addKeywords(\"Java, PDF\");\n document.addAuthor(\"Ergon\");\n }",
"public ResultMessage add(SaleDocumentPO po) throws RemoteException {\n\t\tsaleDocumentPOs.add(po);\r\n\t\toutput();\r\n\t//\tshow();\r\n\t\treturn ResultMessage.SUCCESS;\r\n\t}",
"public void startDocument ()\n\t\t{\n\t\t\t//System.out.println(\"Start document\");\n\t\t}",
"@Override\n public void run() throws SmartServiceException {\n UserProfile author = us.getUser(smartServiceCtx.getUsername());\n String username = author.getUsername();\n\n // Create a filename based on the user's name and MadLib title.\n String userFullName = author.getFirstName() + \" \" + author.getLastName();\n String docName = username + \" \" + madlib.getTitle();\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"Creating new document in folder %d with name %s and ext %s\", saveIn, docName,\n DOC_EXTENSION));\n }\n // Instantiate a new Document object with the necessary metadata\n Document newDoc = new Document(saveIn, docName, DOC_EXTENSION);\n try {\n // Creates a new document in the Appian engine. At this point the document is empty.\n // Content.UNIQUE_NONE specifies that we don't need to worry about document name uniqueness\n ContentOutputStream madlibOS = cs.upload(newDoc, Content.UNIQUE_NONE);\n\n // Save the id of the new document as our smartservice output\n madlibDoc = madlibOS.getContentId();\n\n // Write the madlib text and some footer information to the new document file on disk\n PrintWriter pw = new PrintWriter(madlibOS);\n pw.println(AppianMadLibUtil.createMadLibText(madlib));\n pw.println(\"By \" + userFullName);\n pw.println(\"Created \" + new Date());\n pw.close();\n\n } catch (PrivilegeException e) {\n LOG.error(\n String.format(\"User %s did not have permission to write to folder [id=%d]\", username, saveIn), e);\n throw createException(e, \"error.exception.permission\", smartServiceCtx.getUsername(), saveIn);\n } catch (Exception e) {\n LOG.error(\n String.format(\"Unexpected error creating new doc in folder [id=%d] as user %s\", saveIn, username), e);\n throw createException(e, \"error.exception.unknown\", smartServiceCtx.getUsername(), saveIn);\n }\n }",
"protected static void addDocument(CloseableHttpClient httpclient, String type, String document) throws Exception {\n HttpPost httpPut = new HttpPost(urlBuilder.getIndexRoot() + \"/\" + type);\n StringEntity inputData = new StringEntity(document);\n inputData.setContentType(CONTENTTYPE_JSON);\n httpPut.addHeader(HEADER_ACCEPT, CONTENTTYPE_JSON);\n httpPut.addHeader(HEADER_CONTENTTYPE, CONTENTTYPE_JSON);\n httpPut.setEntity(inputData);\n CloseableHttpResponse dataResponse = httpclient.execute(httpPut);\n if (dataResponse.getStatusLine().getStatusCode() != EL_REST_RESPONSE_CREATED) {\n System.out.println(\"Error response body:\");\n System.out.println(responseAsString(dataResponse));\n }\n Assert.assertEquals(dataResponse.getStatusLine().getStatusCode(), EL_REST_RESPONSE_CREATED);\n }",
"private SingleDocumentModel addNewDocument(Path path, String content) {\n\t\tSingleDocumentModel document = new DefaultSingleDocumentModel(path, content);\n\t\tmodels.add(document);\n\t\tnotifyNewDocument(document);\n\t\tnotifyDocumentChanged(current, document);\n\t\tdocument.addSingleDocumentListener(new SingleDocumentListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void documentModifyStatusUpdated(SingleDocumentModel model) {\n\t\t\t\tchangeIcon(model);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void documentFilePathUpdated(SingleDocumentModel model) {\n\t\t\t\tchangeTitle(model);\n\t\t\t\tchangeToolTip(model);\n\t\t\t}\n\t\t});\n\t\taddNewTab(document);\n\t\treturn document;\n\t}",
"public void add(Document document) {\n document.setIsAllocated();\n documents.add(document);\n }",
"@Test\n public void addDeploymentArtifactInCompositionScreenTestApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n ResourceGeneralPage.getLeftMenu().moveToCompositionScreen();\n\n ArtifactInfo artifact = new ArtifactInfo(filePath, \"Heat-File.yaml\", \"kuku\", \"artifact3\", \"OTHER\");\n CompositionPage.showDeploymentArtifactTab();\n CompositionPage.clickAddArtifactButton();\n ArtifactUIUtils.fillAndAddNewArtifactParameters(artifact, CompositionPage.artifactPopup());\n\n List<WebElement> actualArtifactList = GeneralUIUtils.getWebElementsListBy(By.className(\"i-sdc-designer-sidebar-section-content-item-artifact\"));\n AssertJUnit.assertEquals(1, actualArtifactList.size());\n }",
"public Document addDocument(Document doc) {\n\t\tthis.documents.put(doc.getIdentifier(),doc);\n\t\treturn doc;\n\t}",
"public void addDocument(Document doc) {\n\t\tif(doc != null)\n\t\t\tmyDocument.add(doc);\n\t}",
"@Test\n public void application_with_document_api() throws IOException {\n String services =\n \"<container version='1.0'>\" +\n \" <http><server port=\\\"\" + findRandomOpenPortOnAllLocalInterfaces() + \"\\\" id=\\\"foobar\\\"/></http>\" +\n \" <document-api/>\" +\n \"</container>\";\n try (Application application = Application.fromServicesXml(services, Networking.enable)) {\n }\n }",
"protected void createNewDocumentNote(NoteData newNote) {\n /**\n * get data from the server about tags\n */\n String url = globalVariable.getConfigurationData().getServerURL()\n + globalVariable.getConfigurationData().getApplicationInfixURL()\n + globalVariable.getConfigurationData().getRestDocumentAddNotesURL();\n Log.i(LOG_TAG, \"REST - create new doc notes - call: \" + url);\n\n String postBody = RESTUtils.getJSON(newNote);\n\n AppCompatActivity activity = (AppCompatActivity)getActivity();\n RESTUtils.executePOSTNoteCreationRequest(url, postBody, null, \"\", globalVariable, DocumentTaggingActivity.PROPERTY_BAG_KEY, activity);\n\n // mDataArray = TagItemDataHelper.getAlphabetData();\n }",
"private void setCorpus(){\n URL u = Converter.getURL(docName);\n FeatureMap params = Factory.newFeatureMap();\n params.put(\"sourceUrl\", u);\n params.put(\"markupAware\", true);\n params.put(\"preserveOriginalContent\", false);\n params.put(\"collectRepositioningInfo\", false);\n params.put(\"encoding\",\"windows-1252\");\n Print.prln(\"Creating doc for \" + u);\n Document doc = null;\n try {\n corpus = Factory.newCorpus(\"\");\n doc = (Document)\n Factory.createResource(\"gate.corpora.DocumentImpl\", params);\n } catch (ResourceInstantiationException ex) {\n ex.printStackTrace();\n }\n corpus.add(doc);\n annieController.setCorpus(corpus);\n params.clear();\n }",
"public void doNew() {\n\n if (!canChangeDocuments()) {\n return;\n }\n \n setDocument(fApplication.createNewDocument());\n }",
"void addFile(RebaseJavaFile jf)\n{\n if (file_nodes.contains(jf)) return;\n\n file_nodes.add(jf);\n jf.setRoot(this);\n}",
"public manageDoc() {\r\r\r\n\r\r\r\n }",
"public final void addUniverso() {\n GraphicsConfigTemplate3D gct3D = new GraphicsConfigTemplate3D();\n gct3D.setSceneAntialiasing(GraphicsConfigTemplate3D.REQUIRED);\n GraphicsConfiguration gc = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getBestConfiguration(gct3D);\n\n Canvas3D cv = new Canvas3D(gc);\n add(cv, \"Center\");\n // SimpleUniverse define los elementos basicos de una escena 3D \n // y lo asocia al plano 2D\n universo = new SimpleUniverse(cv);\n // Define la ubicación predeterminada de la vista\n // Mueve el centro (0,0,0) a una distancia de 2.\n universo.getViewingPlatform().setNominalViewingTransform();\n creaRamaContenido();\n }",
"@Override\n public DocumentServiceEntry getNewDocument() {\n UserService userService = UserServiceFactory.getUserService();\n DocumentServiceEntry doc = new DocumentServiceEntry();\n doc.setTitle(\"Untitled Document\");\n doc.setIdentifier(doc.getTitle().replaceAll(\"[^a-zA-Z0-9_\\\\-\\\\.]\", \"\"));\n doc.setAuthor(userService.getCurrentUser().getEmail());\n doc.setEditor(userService.getCurrentUser().getNickname());\n return doc;\n }",
"public accionDocumentos() {\n \n }",
"private void addContentToLuceneDoc() {\n\t\t// Finish storing the document in the document store (parts of it may already have been\n\t\t// written because we write in chunks to save memory), retrieve the content id, and store\n\t\t// that in Lucene.\n\t\tint contentId = storeCapturedContent();\n\t\tcurrentLuceneDoc.add(new NumericField(ComplexFieldUtil.fieldName(\"contents\", \"cid\"),\n\t\t\t\tStore.YES, false).setIntValue(contentId));\n\n\t\t// Store the different properties of the complex contents field that were gathered in\n\t\t// lists while parsing.\n\t\tcontentsField.addToLuceneDoc(currentLuceneDoc);\n\t}",
"private void addREADMEListener() {\n\t\tview.addREADMEListener(new READMEListener());\n\t}",
"@Test\r\n\tpublic void addingAnImageRoot() throws IOException, DocumentException {\r\n\t\tDocument doc = new Document(PageSize.A4);\r\n\t\tPdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream(new File(\r\n\t\t\t\t\"./src/test/resources/examples/columbus3.pdf\")));\r\n\t\tdoc.open();\r\n\t\tHtmlPipelineContext htmlContext = new HtmlPipelineContext(null);\r\n\t\thtmlContext.setImageProvider(new AbstractImageProvider() {\r\n\r\n\t\t\tpublic String getImageRootPath() {\r\n\t\t\t\treturn \"http://www.gutenberg.org/dirs/1/8/0/6/18066/18066-h/\";\r\n\t\t\t}\r\n\t\t}).setTagFactory(Tags.getHtmlTagProcessorFactory());\r\n\t\tCSSResolver cssResolver = XMLWorkerHelper.getInstance().getDefaultCssResolver(true);\r\n\t\tPipeline<?> pipeline = new CssResolverPipeline(cssResolver, new HtmlPipeline(htmlContext,\r\n\t\t\t\tnew PdfWriterPipeline(doc, writer)));\r\n\t\tXMLWorker worker = new XMLWorker(pipeline, true);\r\n\t\tXMLParser p = new XMLParser(worker);\r\n\t\tp.parse(XMLWorkerHelperExample.class.getResourceAsStream(\"columbus.html\"));\r\n\t\tdoc.close();\r\n\t}",
"@FXML\n void viewNotes(ActionEvent event) {\n Parent root;\n try {\n //Loads library scene using library.fxml\n root = FXMLLoader.load(getClass().getResource(model.NOTES_VIEW_PATH));\n model.getNotesViewController().setPodcast(this.podcast);\n Stage stage = new Stage();\n stage.setTitle(this.podcast.getTitle()+\" notes\");\n stage.setScene(new Scene(root));\n stage.getIcons().add(new Image(getClass().getResourceAsStream(\"resources/musicnote.png\")));\n stage.setResizable(false);\n stage.showAndWait();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"@Test\n public void testDocuments() throws InterruptedException {\n Document document = new Document(\"newFolder\", \"Folder\");\n document.set(\"dc:title\", \"The new folder\");\n document.set(\"dc:description\", \"Folder created via the REST API\");\n document = nuxeoClient.repository().createDocumentByPath(\"/default-domain/workspaces/testWorkspace\", document);\n assertNotNull(document);\n assertEquals(\"document\", document.getEntityType());\n assertEquals(\"Folder\", document.getType());\n assertEquals(\"/default-domain/workspaces/testWorkspace/newFolder\", document.getPath());\n assertEquals(\"The new folder\", document.getTitle());\n assertEquals(\"The new folder\", document.get(\"dc:title\"));\n assertEquals(\"Folder created via the REST API\", document.get(\"dc:description\"));\n\n // Create a File document by parent id\n // TODO\n\n // Get a document by id\n // TODO\n\n // Get a document by path\n // TODO\n\n // Update a document\n // TODO\n\n // Delete a document\n // TODO\n }",
"public void buildDocument() {\n/* 310 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 312 */ syncAccessMethods();\n/* */ }",
"public void buildDocument() {\n/* 248 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 250 */ syncAccessMethods();\n/* */ }",
"@Override\n protected void addFields(PdfFile source, Document doc) throws IOException {\n doc.add(createField(SOURCE, downloadService + source.getId()));\n\n String extractedText = extractText(source);\n doc.add(createField(CONTENT, extractedText));\n }",
"public static void main(String[] args) throws IOException, DocumentException {\n }",
"public void buildDocument() {\n/* 220 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 222 */ syncAccessMethods();\n/* */ }",
"public abstract WalkerDocument newDocument(IOptions options);",
"public void testPostAssembleDocument() throws ApiException, java.io.IOException {\n String name = \"TestAllChartTypes.docx\";\n\n AssembleOptions saveOptions = new AssembleOptions();\n saveOptions.setTemplateFileInfo(new TemplateFileInfo().filePath(Paths.get(\"Temp/SdkTests/TestData/GroupDocs.Assembly\", name).toString()));\n saveOptions.setSaveFormat(\"pdf\");\n saveOptions.setReportData(new String(Files.readAllBytes(Paths.get(TestInitializer.LocalTestFolder, \"Teams.json\"))));\n \n UploadFileRequest uploadFileRequest = new UploadFileRequest(\n new File(TestInitializer.LocalTestFolder, name),\n Paths.get(\"Temp/SdkTests/TestData/GroupDocs.Assembly\", name).toString(),\n null);\n\n FilesUploadResult uploadFileResponse = TestInitializer.assemblyApi.uploadFile(uploadFileRequest);\n assertTrue(uploadFileResponse.getErrors().size() == 0);\n assertTrue(uploadFileResponse.getUploaded().size() == 1);\n \n AssembleDocumentRequest request = new AssembleDocumentRequest(saveOptions);\n File response = TestInitializer.assemblyApi.assembleDocument(request);\n assertTrue(response.length() > 0);\n }",
"VersionedDocument getParentDocument();",
"public void startDocument ()\n {\n\tSystem.out.println(\"Start document\");\n }",
"private DefaultNucleotideSequence convertDocument(AnnotatedPluginDocument document) throws DocumentOperationException {\n if(document.getDocument() instanceof DefaultNucleotideSequence) {\n return (DefaultNucleotideSequence)document.getDocument();\n } else if (document.getDocument() instanceof NucleotideSequenceDocument) {\n NucleotideSequenceDocument seqDoc = (NucleotideSequenceDocument)document.getDocument();\n String seqString = seqDoc.getSequenceString();\n List<SequenceAnnotation> annotations = seqDoc.getSequenceAnnotations();\n\n DefaultNucleotideSequence nucSeq = new DefaultNucleotideSequence(document.getName(), seqString);\n nucSeq.setAnnotations(annotations);\n nucSeq.setCircular(seqDoc.isCircular());\n return nucSeq;\n } else {\n return null; //This is only returned if the sequence is not a nucleotide sequence. This on the other hand should be tested way before this step.\n }\n }",
"public void addNodeToDoc(String nodeName) {\n\t\tdocument.getDocumentElement().appendChild(document.createElement(nodeName));\n\t}",
"public AddOOS() throws IOException {\n super();\n }",
"public NsdlRepositoryWriterPlugin() { }",
"public void addAuthorAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Author\", ViewNavigator.ADD_AUTHOR_SCENE);\n\t}",
"@Override\n public PdfTransform<PdfDocument> getDocumentTransform(ArchivalUnit au, OutputStream os) {\n return new BaseDocumentExtractingTransform(os) {\n @Override\n public void outputCreationDate() throws PdfException {\n // Intentionally made blank\n }\n };\n }",
"static void processDoc1(Document doc, int docno) throws IOException {\n\t\tString script = JetTest.config.getProperty(\"processDocument\");\n\t\t// if there is a name tagger, clear its cache\n\t\tif (JetTest.nameTagger != null) JetTest.nameTagger.newDocument();\n\t\tSpan all = new Span(0, doc.length());\n\t\tControl.applyScript (doc, all, script);\n\t}",
"public UpdateResponse add(SolrInputDocument doc) throws SolrServerException, IOException {\n return add(doc, -1);\n }",
"private String addDocument(String strName,\n String strClaimNumber,\n int iExposureID,\n int iClaimantID,\n InputStream content) {\n try {\n if (strName == null) {\n throw new IllegalArgumentException(\"Document name is null.\");\n }\n\n if (strClaimNumber == null) {\n throw new IllegalArgumentException(\"Claim Number is null.\");\n }\n\n String strId = String.valueOf(System.currentTimeMillis());\n int iSuffixMax = 40 - strId.length() - 5; // Reserve room for the .idx extension and underscore\n String strSuffix = strName.length() <= iSuffixMax ? strName : strName.substring(strName.length() - iSuffixMax);\n strId += '_' + strSuffix;\n\n File file = new File(getDocumentsDir() + File.separator + strId);\n if (FileUtil.isFile(file)) {\n throw new RuntimeException(getDocumentsDir() + File.separator + strId + \" already exists.\");\n }\n\n copyToFile(content, file);\n\n generateAndCopyIndexFile(strId, strClaimNumber, iExposureID, iClaimantID);\n\n return strId;\n } catch (Throwable t) {\n throw new RuntimeException(t);\n }\n }"
]
| [
"0.59533405",
"0.58850056",
"0.5754597",
"0.57196814",
"0.5704475",
"0.5596047",
"0.54440534",
"0.54434115",
"0.5407299",
"0.5347804",
"0.5291404",
"0.52334213",
"0.5215092",
"0.52117556",
"0.5194969",
"0.5161292",
"0.5152717",
"0.51456267",
"0.5133393",
"0.5133393",
"0.5079364",
"0.5074665",
"0.50351757",
"0.50232315",
"0.5019134",
"0.4973635",
"0.49685946",
"0.49548262",
"0.49379733",
"0.4928523",
"0.4925504",
"0.49009132",
"0.48998648",
"0.48903576",
"0.4853942",
"0.48446447",
"0.483641",
"0.4817683",
"0.48059624",
"0.48047468",
"0.47949883",
"0.47899127",
"0.4786495",
"0.4773526",
"0.47630614",
"0.475549",
"0.4753177",
"0.47484043",
"0.47461167",
"0.47455236",
"0.4744333",
"0.47410467",
"0.47294223",
"0.4722817",
"0.47129908",
"0.46997404",
"0.46960542",
"0.46763265",
"0.46734187",
"0.46722832",
"0.46624622",
"0.46591854",
"0.46556908",
"0.46554902",
"0.4633304",
"0.46217924",
"0.46144426",
"0.46129805",
"0.46105477",
"0.4605661",
"0.4602447",
"0.45851424",
"0.45850107",
"0.45841882",
"0.4581861",
"0.45790276",
"0.45708963",
"0.45679143",
"0.45653477",
"0.45598385",
"0.45595527",
"0.45583925",
"0.4557517",
"0.45383075",
"0.45360744",
"0.4533357",
"0.4523119",
"0.45198733",
"0.45185867",
"0.45108896",
"0.45093557",
"0.44927368",
"0.44924808",
"0.44782653",
"0.4474535",
"0.4470622",
"0.44524515",
"0.44490606",
"0.44449782",
"0.44395214"
]
| 0.7952319 | 0 |
Adds a "comparte artifact". | public void addArtefact(IArtefact artefact) {
this.artefacts.add(artefact);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addArtifact(ArtifactModel artifact);",
"@Override\n public int compare( ArtifactMetadata o1, ArtifactMetadata o2 )\n {\n int result =\n new DefaultArtifactVersion( o2.getVersion() ).compareTo( new DefaultArtifactVersion( o1.getVersion() ) );\n return result != 0 ? result : o1.getId().compareTo( o2.getId() );\n }",
"@Test\n public void addDeploymentArtifactAndVerifyInCompositionScreenApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n ResourceGeneralPage.getLeftMenu().moveToDeploymentArtifactScreen();\n\n ArtifactInfo deploymentArtifact = new ArtifactInfo(filePath, \"asc_heat 0 2.yaml\", \"kuku\", \"artifact1\", \"OTHER\");\n DeploymentArtifactPage.clickAddNewArtifact();\n ArtifactUIUtils.fillAndAddNewArtifactParameters(deploymentArtifact);\n AssertJUnit.assertTrue(DeploymentArtifactPage.checkElementsCountInTable(1));\n\n ResourceGeneralPage.getLeftMenu().moveToCompositionScreen();\n\n CompositionPage.showDeploymentArtifactTab();\n List<WebElement> deploymentArtifactsFromScreen = CompositionPage.getDeploymentArtifacts();\n AssertJUnit.assertTrue(1 == deploymentArtifactsFromScreen.size());\n\n String actualArtifactFileName = deploymentArtifactsFromScreen.get(0).getText();\n AssertJUnit.assertTrue(\"asc_heat-0-2.yaml\".equals(actualArtifactFileName));\n }",
"public void addDescriptor(IArtifactDescriptor toAdd) {\n \t\tartifactDescriptors.add(toAdd);\n \t\tsave();\n \t}",
"@Test\n public void addDeploymentArtifactInCompositionScreenTestApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n ResourceGeneralPage.getLeftMenu().moveToCompositionScreen();\n\n ArtifactInfo artifact = new ArtifactInfo(filePath, \"Heat-File.yaml\", \"kuku\", \"artifact3\", \"OTHER\");\n CompositionPage.showDeploymentArtifactTab();\n CompositionPage.clickAddArtifactButton();\n ArtifactUIUtils.fillAndAddNewArtifactParameters(artifact, CompositionPage.artifactPopup());\n\n List<WebElement> actualArtifactList = GeneralUIUtils.getWebElementsListBy(By.className(\"i-sdc-designer-sidebar-section-content-item-artifact\"));\n AssertJUnit.assertEquals(1, actualArtifactList.size());\n }",
"private void addComparison() {\n\t\tthis.comparisonCounter++;\n\t}",
"private void addModuleArtifact( Map dependencies, Artifact artifact )\n {\n String key = artifact.getDependencyConflictId();\n\n if ( !dependencies.containsKey( key ) )\n {\n dependencies.put( key, artifact );\n }\n }",
"public void addArtifact(String artName) {\r\n \t\tartifacts.add(artName);\r\n \t\tRationaleUpdateEvent l_updateEvent = m_eventGenerator.MakeUpdated();\r\n \t\tl_updateEvent.setTag(\"artifacts\");\r\n \t\tm_eventGenerator.Broadcast(l_updateEvent);\r\n \t}",
"Active_Digital_Artifact createActive_Digital_Artifact();",
"Digital_Artifact createDigital_Artifact();",
"public void addTeamMember(final Artifact artifact);",
"protected static boolean equals(Artifact a, Artifact b) {\n\t\treturn a == b || !(a == null || b == null) && StringUtils.equals(a.getGroupId(), b.getGroupId())\n\t\t\t\t&& StringUtils.equals(a.getArtifactId(), b.getArtifactId())\n\t\t\t\t&& StringUtils.equals(a.getVersion(), b.getVersion()) && StringUtils.equals(a.getType(), b.getType())\n\t\t\t\t&& StringUtils.equals(a.getClassifier(), b.getClassifier());\n\t}",
"public void testArtifactStatusReset() {\r\n\t\tTopology top = createTopology(\"testArtifactStatusReset\");\r\n\t\tUnit u1 = addUnit(top, \"u1\");\r\n\t\tFileArtifact a1 = CoreFactory.eINSTANCE.createFileArtifact();\r\n\t\ta1.setName(\"artifact0\");\r\n\t\ta1.getFileURIs().add(\"C:\\\\AUTOEXEC.BAT\");\r\n\t\tu1.getArtifacts().add(a1);\r\n\r\n\t\tUnit u2 = addUnit(top, \"u2\");\r\n\t\tFileArtifact a2 = CoreFactory.eINSTANCE.createFileArtifact();\r\n\t\ta2.setName(\"artifact0\");\r\n\t\ta2.getFileURIs().add(\"C:\\\\MSDOS.SYS\");\r\n\t\tu2.getArtifacts().add(a2);\r\n\r\n\t\t// No errors in topology\r\n\t\tvalidate(top);\r\n\t\tassertHasNoErrorStatus(top);\r\n\r\n\t\t// Add a constraint link to propagate the artifacts (not satisfied initailly)\r\n\t\tConstraintLink cLink = LinkFactory.createConstraintLink(u1, u2);\r\n\t\tAttributePropagationConstraint c = ConstraintFactory.eINSTANCE\r\n\t\t\t\t.createAttributePropagationConstraint();\r\n\t\tc.setName(\"c\");\r\n\t\tc.setSourceAttributeName(\"fileURIs\");\r\n\t\tc.setTargetAttributeName(\"fileURIs\");\r\n\t\tc.setSourceObjectURI(\"artifact0\");\r\n\t\tc.setTargetObjectURI(\"artifact0\");\r\n\t\tcLink.getConstraints().add(c);\r\n\t\t\r\n\t\tvalidate(top);\r\n\t\t// Assert that there is an error in the topology due to the propagation constraint\r\n\t\tassertHasErrorStatus(top);\r\n\r\n\t\t// Fix the URIs to be equal (satsify constraint)\r\n\t\ta2.getFileURIs().clear();\r\n\t\ta2.getFileURIs().add(a1.getFileURIs().get(0));\r\n\t\t\r\n\t\t// Check that the artifacts going into the same set are not merged\r\n\t\tSet<Artifact> set = new HashSet<Artifact>();\r\n\t\tassertTrue(a1 != a2);\r\n\t\tset.add(a1);\r\n\t\tset.add(a2);\r\n\t\tassertEquals(2, set.size());\r\n\r\n\t\t// Validate that there are no propagation errors\r\n\t\tvalidate(top);\r\n\t\tassertHasNoErrorStatus(top);\r\n\t}",
"public JsonObject getArtifact(String wrksName, String artName) throws CartagoException {\n var info = getArtInfo(wrksName, artName);\n\n var artifact = Json.createObjectBuilder()\n .add(\"artifact\", artName)\n .add(\"type\", info.getId().getArtifactType());\n\n\n // Get artifact's properties\n var properties = Json.createArrayBuilder();\n for (ArtifactObsProperty op : info.getObsProperties()) {\n var values = Json.createArrayBuilder();\n for (Object vl : op.getValues()) {\n values.add(\n Json.createValue(vl.toString())\n );\n }\n properties.add(\n Json.createObjectBuilder()\n .add(op.getName(), values)\n );\n }\n artifact.add(\"properties\", properties);\n\n // Get artifact's operations\n var operations = Json.createArrayBuilder();\n info.getOperations().forEach(y -> {\n operations.add(y.getOp().getName());\n });\n artifact.add(\"operations\", operations);\n\n // Get agents that are observing the artifact\n var observers = Json.createArrayBuilder();\n info.getObservers().forEach(y -> {\n // do not print agents_body observation\n if (!info.getId().getArtifactType().equals(AgentBodyArtifact.class.getName())) {\n observers.add(y.getAgentId().getAgentName());\n }\n });\n artifact.add(\"observers\", observers);\n\n // linked artifacts\n /* not used anymore\n var linkedArtifacts = Json.createArrayBuilder();\n info.getLinkedArtifacts().forEach(y -> {\n // linked artifact node already exists if it belongs to this workspace\n linkedArtifacts.add(y.getName());\n });\n artifact.add(\"linkedArtifacts\", linkedArtifacts);*/\n\n return artifact.build();\n }",
"@Test\n public void testDependencyEvolutionOnJavaComplete() {\n Depinder depinder = new Depinder(\"D:\\\\Dev\\\\licenta\\\\thisIsIt\\\\depinder\\\\src\\\\test\\\\resources\\\\testFingerprints.json\");\n\n DepinderConfiguration.getInstance().setProperty(DepinderConstants.ROOT_FOLDER, ROOT_FOLDER);\n depinder.analyzeProject(ROOT_FOLDER, \"master\", false);\n\n DependencyRegistry dependencyRegistry = depinder.getDependencyRegistry();\n\n String dependencyID = \"Java Util, External Libraries\";\n Dependency dependency = dependencyRegistry.getById(dependencyID)\n .orElseThrow(() -> new IllegalArgumentException(dependencyID));\n\n// Set<TechnologySnapshot> snapshots = dependencyEvolutionAnalyzer.dependencyValueForCommits(dependency);\n//\n// Path filePath = Paths.get(\"D:\\\\Dev\\\\licenta\\\\thisIsIt\\\\depinder\\\\src\\\\test\\\\resources\\\\test_results.json\");\n// try {\n// writeSnapshotsToFile(snapshots, filePath);\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n }",
"ArtifactResult result();",
"@Override\r\n public int compare(Effect o1, Effect o2) {\n return o1.unparseForPromise().compareTo(o2.unparseForPromise());\r\n }",
"void add(AbstractImplementationArtifact ia, AbstractNodeTemplate nodeTemplate, IPlanBuilderPrePhaseIAPlugin plugin) {\n\t\t\n\t\tfor (AbstractImplementationArtifact candidateIa : this.ias) {\n\t\t\tif (candidateIa.equals(ia)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthis.ias.add(ia);\n\t\tthis.infraNodes.add(nodeTemplate);\n\t\tthis.plugins.add(plugin);\n\t}",
"default void createArtifact(\n com.google.cloud.aiplatform.v1.CreateArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateArtifactMethod(), responseObserver);\n }",
"Passive_Digital_Artifact createPassive_Digital_Artifact();",
"public abstract NestedSet<Artifact> auxiliary();",
"@Test\r\n public void testCompareTo() {\r\n Articulo art = new Articulo();\r\n art.setCantidadVendidos(3);\r\n articuloPrueba.setCantidadVendidos(3);\r\n int expResult = 0;\r\n int result = art.compareTo(articuloPrueba);\r\n assertEquals(expResult, result);\r\n }",
"@Override\n public boolean add(T e) {\n if (elements.add(e)) {\n ordered.add(e);\n return true;\n } else {\n return false;\n }\n }",
"private static void addDependency(TopologyElement te,\n BOperatorInvocation bop, Object function) {\n te.topology().getDependencyResolver().addJarDependency(bop, function);\n }",
"public void AddArtifactInstance(ArtifactInstance Artifact, ProcessInstance Process)\r\n\t{\n\t\t\r\n\t\tProcess.addArtifactInstance(Artifact);\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"private void saveArtifact(ArtifactDto artifactDto) {\n //start off by removing the existing entry (if present)\n Artifact artifact = this.artifactRepository.findById(artifactDto.getId());\n if (artifact == null) {\n artifact = new Artifact();\n }\n\n artifact.setAbbreviation(artifactDto.getAbbreviation());\n artifact.setDetailedText(artifactDto.getDetailedText());\n artifact.setDocumentTitle(artifactDto.getDocumentTitle());\n artifact.setId(artifactDto.getId());\n artifact.setDocumentName(artifactDto.getDocumentName());\n\n artifact.setLovDocumentType(artifactDto.getDocumentType());\n\n LibraryLevel libraryEntry = this.libraryLevelRepository.findById(artifactDto.getLibraryId());\n\n if (libraryEntry != null) {\n artifact.setLibraryLevel(libraryEntry);\n }\n\n //delete the existing tags/comments\n for (Tag tag : artifact.getTags())\n {\n this.tagRepository.delete(tag.getId());\n }\n for (Annotation annotation : artifact.getAnnotations())\n {\n this.annotationRepository.delete(annotation.getId());\n }\n\n artifact.getTags().clear();\n artifact.getAnnotations().clear();\n\n //add all the incoming tags\n for (TagDto tagDto : artifactDto.getTagDtos()) {\n Lov tagLov = this.lovRepository.findById(tagDto.getLovDto().getId());\n\n Tag tag = new Tag();\n tag.setId(tagDto.getId());\n tag.setTagValue(tagDto.getTagValue());\n tag.setArtifact(artifact);\n tag.setLovTagType(tagLov);\n\n //note - if the tag already exists, it won't be added again\n artifact.addTag(tag);\n }\n\n //add all the incoming annotations\n for (AnnotationDto annotationDto : artifactDto.getAnnotationDtos()) {\n Annotation annotation = new Annotation();\n annotation.setId(annotationDto.getId());\n annotation.setAnnotationText(annotationDto.getAnnotationText());\n\n artifact.addAnnotation(annotation);\n }\n this.artifactRepository.save(artifact);\n\n }",
"public void add(String name) {\n File f = new File(name);\n if (!f.exists()) {\n Utils.message(\"File does not exist.\");\n throw new GitletException();\n }\n Blob blob = new Blob(f);\n untracked.remove(name);\n HashMap<String, Blob> files = head.getContents();\n if (files.containsKey(name)\n && files.get(name).getContent().equals(blob.getContent())) {\n return;\n } else if (!(files.containsKey(name) && files.get(name).equals(blob))) {\n stagingarea.put(blob.getName(), blob);\n File stagefile = Utils.join(staging, blob.getHash());\n Utils.writeObject(stagefile, blob);\n }\n\n }",
"@Test\n public void shouldNotAddDuplicateDependents() {\n String currentPipeline = \"p5\";\n ValueStreamMap graph = new ValueStreamMap(currentPipeline, null);\n Node p4 = graph.addUpstreamNode(new PipelineDependencyNode(\"p4\", \"p4\"), null, currentPipeline);\n graph.addUpstreamNode(new PipelineDependencyNode(\"p4\", \"p4\"), null, currentPipeline);\n\n assertThat(p4.getChildren().size(), is(1));\n VSMTestHelper.assertThatNodeHasChildren(graph, \"p4\", 0, \"p5\");\n }",
"public void createArtifact(\n com.google.cloud.aiplatform.v1.CreateArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateArtifactMethod(), getCallOptions()),\n request,\n responseObserver);\n }",
"public void add(final ArtifactFilter artifactFilter)\n {\n this.filters.add(artifactFilter);\n }",
"@Test\n public void shouldNotPopulateDuplicateNamesForAMaterial() {\n\n String P1 = \"P1\";\n String currentPipeline = \"P2\";\n ValueStreamMap graph = new ValueStreamMap(currentPipeline, null);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"git_fingerprint\", \"git\", \"git\"), new CaseInsensitiveString(\"git1\"), currentPipeline, new MaterialRevision(null));\n graph.addUpstreamNode(new PipelineDependencyNode(P1, P1), null, currentPipeline);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"git_fingerprint\", \"git\", \"git\"), new CaseInsensitiveString(\"git1\"), P1, new MaterialRevision(null));\n\n SCMDependencyNode node = (SCMDependencyNode) graph.findNode(\"git_fingerprint\");\n HashSet<String> materialNames = new HashSet<String>();\n materialNames.add(\"git1\");\n\n assertThat(node.getMaterialNames(), is(materialNames));\n }",
"@Override\r\n\tpublic void addSort() {\n\t\t\r\n\t}",
"Comparison createComparison();",
"Comparison createComparison();",
"@Test\n\tpublic void addTest() {\n\t\t\n\t\tFraction expected = new Fraction(120, 200);\n\t\tFraction actual = x.add(y);\n\t\t\n\t\tassertEquals(expected.getNumerator(), actual.getNumerator());\n\t\tassertEquals(expected.getDenominator(), actual.getDenominator());\n\t\tassertEquals(expected.toString(), actual.toString());\n\t\t\n\t}",
"public addProductPack_result(addProductPack_result other) {\n }",
"@Override\n\tpublic int compareTo(Articulo o) {\n\t\treturn numeroArticulo - o.numeroArticulo;\n\t}",
"@Test\r\n\t@Order(2)\r\n\tpublic void testAddArticulo() {\r\n\t\tArticulo articulo1 = new Articulo(\"Camiseta\", 15.5);\r\n\r\n\t\tcarritoCompraService.addArticulo(articulo1);\r\n\r\n\t\tassertEquals(1, carritoCompraService.getArticulos().size());\r\n\t}",
"public void addPatch(Geometry geom, double capa) throws IOException {\n if(addedElem != null) {\n throw new IllegalStateException(\"Graph already contains an added element\");\n }\n \n BasicGraphBuilder builder = new BasicGraphBuilder();\n // crée le noeud\n DefaultFeature patch = getProject().createPatch(geom, capa);\n Node node = builder.buildNode();\n node.setObject(patch);\n graph.getNodes().add(node);\n \n // puis crée les liens\n HashMap<DefaultFeature, Path> newLinks = getLinkset().calcNewLinks(patch);\n for(DefaultFeature d : newLinks.keySet()) {\n Path path = new Path(patch, d, newLinks.get(d).getCost(), newLinks.get(d).getDist()); \n if(getType() != PRUNED || getCost(path) <= getThreshold()) {\n Node nodeB = null;\n for(Node n : (Collection<Node>)getGraph().getNodes()) {\n if(((Feature)n.getObject()).getId().equals(d.getId())) {\n nodeB = n;\n break;\n }\n }\n if(nodeB == null) {\n throw new IllegalStateException(\"Graph does not contain the patch node : \" + d.getId());\n }\n Edge edge = builder.buildEdge(node, nodeB);\n edge.setObject(path);\n node.add(edge);\n nodeB.add(edge);\n graph.getEdges().add(edge);\n }\n }\n \n addedElem = node;\n \n components = null;\n compFeatures = null;\n }",
"@Test\n\tpublic void testAdd(){\n\t\t\n\t\tFraction testFrac1 = new Fraction();\n\t\t\n\t\tassertTrue(\"Didn't add correctly\",testFrac1.add(new Fraction(25,15)).toString().equals(new Fraction(40,15).toString()));\n\t}",
"public void addCompte(Compte x) {//je mets la methode dajout ici\n\t compte.add(x);\n\t }",
"@Test\n\tpublic void testValidAddSameArgumentTwice() throws IllegalAccessException, InvocationTargetException {\n\n\t\tString[] args = new String(\"add -repo dummyrepo -cmt dummycommit -br dummybranch -mvnv 0.0-DUMMY -mvnv 0.0-DOUBLE\").split(\" \");\n\t\tVersionManifest m = (VersionManifest)createManifestMethod.invoke(null, new Object[] { args });\n\n\t\t//Check if 0.0-DOUBLE was assigned\n\t\tassertThat(m.getMavenVersion(), not(equalTo(\"0.0-DUMMY\")));\n\t\tassertEquals(m.getMavenVersion(), \"0.0-DOUBLE\");\n\t}",
"public Object caseArtifact(Artifact object) {\n\t\treturn null;\n\t}",
"void addDependsOnMe(DependencyItem dependency);",
"public addProductInspect_result(addProductInspect_result other) {\n }",
"public void addArchive (Particle p) {\n\t\tArchive a = new Archive(p.getPosition(),p.getFitness(),this.countArchiveParticleId);\n\t\tthis.countArchiveParticleId++;\n\t\tif(this.archive.size()==this.archiveSize) {\n\t\t\tthis.removeArchive();\n\t\t}\n\t\tdouble[] pFitness = p.getFitness();\n\t\tdouble[] archiveFitness =new double[3];\n\t\tif(this.archive.size()==0) {\n\t\t\tthis.archive.add(a);\n\t\t}else {\n\t\t\tfor(int i =0; i<this.archive.size();i++) {\n\t\t\t\tarchiveFitness =this.archive.get(i).getFitness();\n\t\t\t\tif(pFitness[0]<=archiveFitness[0]) {\n\t\t\t\t\tthis.archive.add(i, a);\n\t\t\t\t\tSystem.out.print(\"addmiddle\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(i==this.archive.size()-1) {\n\t\t\t\t\tthis.archive.add(a);\n\t\t\t\t\tSystem.out.print(\"addEnd\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public org.biocatalogue.x2009.xml.rest.TagsParameters.Sort addNewSort()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.TagsParameters.Sort target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.TagsParameters.Sort)get_store().add_element_user(SORT$0);\r\n return target;\r\n }\r\n }",
"public abstract boolean add(Comparable element) throws IllegalArgumentException;",
"@Test\r\n public void testTransitive() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"[email protected]\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993390\", \"[email protected]\");\r\n EmployeeImpl emp3 = new EmployeeImpl(\"7993391\", \"[email protected]\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp3.compareTo(emp2) == 1);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp2.compareTo(emp1) == 1);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp3.compareTo(emp1) == 1);\r\n }",
"public void updateArtifact(ArtifactModel artifact);",
"@Override\n public int compareTo(Produs other) {\n return this.pret - other.pret;\n }",
"public void removeArtifact() {\r\n \t\tRationaleUpdateEvent l_updateEvent = m_eventGenerator.MakeUpdated();\r\n \t\tl_updateEvent.setTag(\"artifacts\");\r\n \t\tm_eventGenerator.Broadcast(l_updateEvent);\r\n \t}",
"@Override\n\t\tpublic void add(File explodedAar) {\n if (!isShared(explodedAar))\n files.addAll(getJars(explodedAar));\n\t\t}",
"public int compareTo(Bundle o) {\n throw new UnsupportedOperationException();\n }",
"private void saveDependency(String[] dependency, Database db, String projectName, String commitTag) {\n\n String groupId = dependency[0];\n String artifactId = dependency[1];\n String version = dependency[2];\n\n// if (!db.checkExistance(projectName, groupId, artifactId, version)) {\n db.insert(projectName, commitTag, groupId, artifactId, version);\n// }\n }",
"@Override\n public int compareTo(RevisionId o) {\n return isProduction() != o.isProduction() ? Boolean.compare(isProduction(), o.isProduction())\n : Long.compare(number, o.number);\n }",
"@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof ArtifactCon)) {\n return false;\n }\n return id != null && id.equals(((ArtifactCon) o).id);\n }",
"@Test\n\tpublic void testAddNota2(){\n\t\tej1.addNota(-2);\n\t\tassertTrue(ej1.getNotaMedia() == 0);\n\t}",
"public com.google.cloud.aiplatform.v1.Artifact createArtifact(\n com.google.cloud.aiplatform.v1.CreateArtifactRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateArtifactMethod(), getCallOptions(), request);\n }",
"void addSameAs(Object newSameAs);",
"@Override\n public InferredOWLOntologyID publishArtifact(final InferredOWLOntologyID ontologyIRI) throws PoddClientException\n {\n return null;\n }",
"@Override\n\tpublic int compareTo(Version o) {\n\t\treturn 0;\n\t}",
"@Override\n protected int compareToInner(ExtractedParameterValue o) {\n return 0;\n }",
"Artifact getArtifact(String version) throws ArtifactNotFoundException;",
"@Test\n public void testDiff() throws Exception {\n String newVersionJarPath = \"data/sample/jar/change4.jar\";\n String oldVersionJarPath = \"data/sample/jar/change3.jar\";\n String changePath = \"data/sample/changes_change4_change3.txt\";\n\n// RelationInfo relationInfoForChangedPart = new RelationInfo(newVersionCodePath, oldVersionCodePath, changePath, false);\n// RelationInfo relationInfoForChangedPart = new RelationInfo(newVersionJarPath, oldVersionJarPath, changePath, false);\n// CallRelationGraph callGraphForChangedPart = new CallRelationGraph(relationInfoForChangedPart);\n//\n// double thresholdForInitialRegion = 0.35;\n// RelationInfo oldRelationInfo = new RelationInfo(newVersionJarPath,false);\n// oldRelationInfo.setPruning(thresholdForInitialRegion);\n// RelationInfo newRelationInfo = new RelationInfo(oldVersionJarPath,false);\n// newRelationInfo.setPruning(thresholdForInitialRegion);\n//\n// CallRelationGraph oldCallGraph = new CallRelationGraph(oldRelationInfo);\n// CallRelationGraph newCallGraph = new CallRelationGraph(newRelationInfo);\n//\n// ChangedArtifacts changedArtifacts = new ChangedArtifacts();\n// changedArtifacts.parse(changePath);\n//\n// InitialRegionFetcher fetcher = new InitialRegionFetcher(changedArtifacts, newCallGraph, oldCallGraph);\n//\n// ExportInitialRegion exporter = new ExportInitialRegion(fetcher.getChangeRegion());\n\n }",
"@Test\n public void testArtifactCache() throws Exception {\n addPeers(ImmutableList.of(\"peer1\", \"peer2\"));\n // Get artifact from first peer\n File peer1ArtifactPath = cache.getArtifact(artifactId.toEntityId(), \"peer1\", remoteClient);\n // Get the artifact again. The same path was returned\n Assert.assertEquals(peer1ArtifactPath, cache.getArtifact(artifactId.toEntityId(), \"peer1\", remoteClient));\n\n // Get artifact from another peer. It should be cached in a different path\n File peer2ArtifactPath = cache.getArtifact(artifactId.toEntityId(), \"peer2\", remoteClient);\n Assert.assertNotEquals(peer1ArtifactPath, peer2ArtifactPath);\n\n // Delete and recreate the artifact to update the last modified date\n artifactRepository.deleteArtifact(artifactId);\n // This sleep is needed to delay the file copy so that the lastModified time on the file is different\n Thread.sleep(1000);\n artifactRepository.addArtifact(artifactId, appJarFile);\n // Artifact should be cached in a different path\n File newPeer1ArtifactPath = cache.getArtifact(artifactId.toEntityId(), \"peer1\", remoteClient);\n Assert.assertNotEquals(peer1ArtifactPath, newPeer1ArtifactPath);\n\n // Run the artifact cleaner\n ArtifactLocalizerCleaner cleaner = new ArtifactLocalizerCleaner(Paths.get(cacheDir).resolve(\"peers\"), 1);\n cleaner.run();\n // Older artifact should been deleted\n Assert.assertFalse(peer1ArtifactPath.exists());\n // Latest artifact should still be cached\n Assert.assertTrue(newPeer1ArtifactPath.exists());\n }",
"@Override\n public void onProjectNodeAdded(Project project, ProjectNode node) {\n if (node instanceof YoungAndroidAssetNode) {\n String assetName = node.getName();\n\n // Add it to the list if it isn't already there.\n // It could already be there if the user adds an asset that's already there, which is the way\n // to replace the asset.\n if (!choices.containsValue(assetName)) {\n choices.addItem(assetName);\n }\n\n // Check whether our asset was updated.\n String currentValue = property.getValue();\n if (assetName.equals(currentValue)) {\n // Our asset was updated.\n // Set the property value to blank and then back to the current value.\n // This will force the component to update itself (for example, it will refresh its image).\n property.setValue(\"\");\n property.setValue(currentValue);\n }\n }\n }",
"public interface ArtifactVisitor extends Visitor {\n default void visit(Artifacts artifacts){\n artifacts.accept(this);\n }\n\n default void visit(Artifact artifact){\n artifact.accept(this);\n }\n\n default void visit(Ids ids, Classes classes){\n ids.accept(this);\n classes.accept(this);\n }\n\n /**\n * This method is called when artifacts building phase was failed (failed on reading jar file).\n * @param ids groupId, artifactId, version.\n * @param e exception.\n */\n default void visitFailed(Ids ids, Exception e){\n }\n\n /**\n * This method is called when parsing of class file was failed (illegal class format).\n * \n * @param name class name.\n * @param e exception.\n */\n default void visitFailed(ClassName name, Exception e){\n }\n\n default void visit(Class target){\n target.accept(this);\n }\n}",
"private void addDependencyManagement( Model pomModel )\n {\n List<Artifact> projectArtifacts = new ArrayList<Artifact>( mavenProject.getArtifacts() );\n Collections.sort( projectArtifacts );\n\n Properties versionProperties = new Properties();\n DependencyManagement depMgmt = new DependencyManagement();\n for ( Artifact artifact : projectArtifacts )\n {\n if (isExcludedDependency(artifact)) {\n continue;\n }\n\n String versionPropertyName = VERSION_PROPERTY_PREFIX + artifact.getGroupId();\n if (versionProperties.getProperty(versionPropertyName) != null\n && !versionProperties.getProperty(versionPropertyName).equals(artifact.getVersion())) {\n versionPropertyName = VERSION_PROPERTY_PREFIX + artifact.getGroupId() + \".\" + artifact.getArtifactId();\n }\n versionProperties.setProperty(versionPropertyName, artifact.getVersion());\n\n Dependency dep = new Dependency();\n dep.setGroupId( artifact.getGroupId() );\n dep.setArtifactId( artifact.getArtifactId() );\n dep.setVersion( artifact.getVersion() );\n if ( !StringUtils.isEmpty( artifact.getClassifier() ))\n {\n dep.setClassifier( artifact.getClassifier() );\n }\n if ( !StringUtils.isEmpty( artifact.getType() ))\n {\n dep.setType( artifact.getType() );\n }\n if (exclusions != null) {\n applyExclusions(artifact, dep);\n }\n depMgmt.addDependency( dep );\n }\n pomModel.setDependencyManagement( depMgmt );\n if (addVersionProperties) {\n pomModel.getProperties().putAll(versionProperties);\n }\n getLog().debug( \"Added \" + projectArtifacts.size() + \" dependencies.\" );\n }",
"public int compareTo(HGNode anotherItem) {\r\n \t\tSystem.out.println(\"HGNode, compare functiuon should never be called\");\r\n \t\tSystem.exit(1);\r\n \t\treturn 0;\r\n \t\t/*\r\n \t\tif (this.estTotalLogP > anotherItem.estTotalLogP) {\r\n \t\t\treturn -1;\r\n \t\t} else if (this.estTotalLogP == anotherItem.estTotalLogP) {\r\n \t\t\treturn 0;\r\n \t\t} else {\r\n \t\t\treturn 1;\r\n \t\t}*/\r\n \t\t\r\n \t}",
"@SuppressWarnings(\"unchecked\")\n public void execute() {\n try {\n\n DefaultArtifact artifact = new DefaultArtifact(\n getProject().getGroupId(),\n getProject().getArtifactId(),\n artifactHandlerManager\n .getArtifactHandler(getProject().getPackaging())\n .getExtension(),\n \"[0,)\");\n\n getLog().debug(\"Artifact for lookup released version: \" + artifact);\n VersionRangeRequest request =\n new VersionRangeRequest(artifact, getProject().getRemoteProjectRepositories(), null);\n\n VersionRangeResult versionRangeResult = repoSystem.resolveVersionRange(repoSession, request);\n\n getLog().debug(\"Resolved versions: \" + versionRangeResult.getVersions());\n\n DefaultArtifactVersion releasedVersion = versionRangeResult.getVersions().stream()\n .filter(v -> !ArtifactUtils.isSnapshot(v.toString()))\n .map(v -> new DefaultArtifactVersion(v.toString()))\n .max(DefaultArtifactVersion::compareTo)\n .orElse(null);\n\n getLog().debug(\"Released version: \" + releasedVersion);\n\n if (releasedVersion != null) {\n // Use ArtifactVersion.toString(), the major, minor and incrementalVersion return all an int.\n String releasedVersionValue = releasedVersion.toString();\n\n // This would not always reflect the expected version.\n int dashIndex = releasedVersionValue.indexOf('-');\n if (dashIndex >= 0) {\n releasedVersionValue = releasedVersionValue.substring(0, dashIndex);\n }\n\n defineVersionProperty(\"version\", releasedVersionValue);\n defineVersionProperty(\"majorVersion\", releasedVersion.getMajorVersion());\n defineVersionProperty(\"minorVersion\", releasedVersion.getMinorVersion());\n defineVersionProperty(\"incrementalVersion\", releasedVersion.getIncrementalVersion());\n defineVersionProperty(\"buildNumber\", releasedVersion.getBuildNumber());\n defineVersionProperty(\"qualifier\", releasedVersion.getQualifier());\n } else {\n getLog().debug(\"No released version found.\");\n }\n\n } catch (VersionRangeResolutionException e) {\n if (getLog().isWarnEnabled()) {\n getLog().warn(\"Failed to retrieve artifacts metadata, cannot resolve the released version\");\n }\n }\n }",
"@Override\n public int compareTo(Fraction o) {\n if (this.getValue() > o.getValue()) {\n return 1;\n } else if (this.getValue() < o.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }",
"@Override\n public int compareTo(VersionPair o) {\n return this.elasticsearch.compareTo(o.elasticsearch);\n }",
"private org.apache.maven.artifact.Artifact findMatchingArtifact(MavenProject project, Artifact requestedArtifact) {\n String requestedRepositoryConflictId = getConflictId(requestedArtifact);\n\n org.apache.maven.artifact.Artifact mainArtifact = project.getArtifact();\n if (requestedRepositoryConflictId.equals(getConflictId(mainArtifact))) {\n return mainArtifact;\n }\n\n Collection<org.apache.maven.artifact.Artifact> attachedArtifacts = project.getAttachedArtifacts();\n if (attachedArtifacts != null && !attachedArtifacts.isEmpty()) {\n for (org.apache.maven.artifact.Artifact attachedArtifact : attachedArtifacts) {\n if (requestedRepositoryConflictId.equals(getConflictId(attachedArtifact))) {\n return attachedArtifact;\n }\n }\n }\n\n return null;\n }",
"@Override\npublic int compareTo(ImageForSort newImage) {\n\tif(this.distance==newImage.distance)\n\treturn 0;\n\telse if(this.getDistance()>newImage.getDistance()){\n\t\treturn 1;\n\t}else{\n\t\treturn -1;\n\t}\n}",
"public void testImportArtifactWithCredentialsOk() throws Exception {\n try {\n // Use a valid JAR file, without a Bundle-SymbolicName header.\n File temp = FileUtils.createEmptyBundle(\"org.apache.ace.test1\", new Version(1, 0, 0));\n temp.deleteOnExit();\n\n m_artifactRepository.importArtifact(temp.toURI().toURL(), true /* upload */);\n\n assertEquals(1, m_artifactRepository.get().size());\n assertTrue(m_artifactRepository.getResourceProcessors().isEmpty());\n\n // Create a JAR file which looks like a resource processor supplying bundle.\n temp = FileUtils.createEmptyBundle(\"org.apache.ace.test2\", new Version(1, 0, 0), \n BundleHelper.KEY_RESOURCE_PROCESSOR_PID, \"someProcessor\",\n BundleHelper.KEY_VERSION, \"1.0.0.processor\");\n\n m_artifactRepository.importArtifact(temp.toURI().toURL(), true);\n\n assertEquals(1, m_artifactRepository.get().size());\n assertEquals(1, m_artifactRepository.getResourceProcessors().size());\n }\n catch (Exception e) {\n printLog(m_logReader);\n throw e;\n }\n }",
"public void addComposer( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), COMPOSER, value);\r\n\t}",
"public void add(Fraction element)\r\n\t{\n\t\tif(n==a.length)\r\n\t\t{\r\n\t\t\t// khai bao 1 mang Rectangle b\r\n\t\t\tFraction b[]= new Fraction[a.length*2];\r\n\t\t\tfor(int i=0;i<n;i++)\r\n\t\t\t{\r\n\t\t\t\tb[i]=a[i];\r\n\t\t\t}\r\n\t\t\t//gan dia chi b qua a\r\n\t\t\ta=b;\r\n\t\t}\r\n\t\ta[n]=element;\r\n\t\tn++;\r\n\t}",
"@Override\n public int compareTo(Object aThat) {\n if (this == aThat) {\n return 0;\n }\n\n final TagEntry that = (TagEntry) aThat;\n\n if (this.revision != NOREV) {\n return ((Integer) this.revision).compareTo(that.revision);\n }\n assert this.date != null : \"date == null\";\n return this.date.compareTo(that.date);\n }",
"private File getArtifactFile(Artifact artifactQuery)\n\t\t\tthrows MojoExecutionException {\n\n\t\tArtifactRequest request = new ArtifactRequest(artifactQuery,\n\t\t\t\tprojectRepos, null);\n\t\tList<ArtifactRequest> arts = new ArrayList<ArtifactRequest>();\n\t\tarts.add(request);\n\t\ttry {\n\t\t\tArtifactResult a = repoSystem.resolveArtifact(repoSession, request);\n\t\t\treturn a.getArtifact().getFile();\n\t\t} catch (ArtifactResolutionException e) {\n\t\t\tthrow new MojoExecutionException(\n\t\t\t\t\t\"could not resolve artifact to compare with\", e);\n\t\t}\n\n\t}",
"@Test\n public void addUpdateDeleteInformationalArtifactApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n ResourceGeneralPage.getLeftMenu().moveToInformationalArtifactScreen();\n\n ArtifactInfo informationalArtifact = new ArtifactInfo(filePath, \"asc_heat 0 2.yaml\", \"kuku\", \"artifact1\", \"OTHER\");\n InformationalArtifactPage.clickAddNewArtifact();\n ArtifactUIUtils.fillAndAddNewArtifactParameters(informationalArtifact);\n\n AssertJUnit.assertTrue(\"artifact table does not contain artifacts uploaded\", InformationalArtifactPage.checkElementsCountInTable(1));\n\n String newDescription = \"new description\";\n InformationalArtifactPage.clickEditArtifact(informationalArtifact.getArtifactLabel());\n InformationalArtifactPage.artifactPopup().insertDescription(newDescription);\n InformationalArtifactPage.artifactPopup().clickDoneButton();\n String actualArtifactDescription = InformationalArtifactPage.getArtifactDescription(informationalArtifact.getArtifactLabel());\n AssertJUnit.assertTrue(\"artifact description is not updated\", newDescription.equals(actualArtifactDescription));\n\n InformationalArtifactPage.clickDeleteArtifact(informationalArtifact.getArtifactLabel());\n InformationalArtifactPage.clickOK();\n AssertJUnit.assertTrue(\"artifact \" + informationalArtifact.getArtifactLabel() + \"is not deleted\", InformationalArtifactPage.checkElementsCountInTable(0));\n }",
"public Object caseUma_Artifact(org.topcased.spem.uma.Artifact object) {\n\t\treturn null;\n\t}",
"@Test\n public void testAddMaterialOneMaterial() {\n String material = \"material\";\n planned.addMaterials(material);\n\n assertEquals(planned.getMaterials().size(), 1);\n\n assertTrue(planned.getMaterials().contains(material));\n\n }",
"@RequiresLock(\"SeaLock\")\r\n private void addDeponent(Drop deponent) {\r\n if (!f_valid || deponent == null) {\r\n return;\r\n }\r\n if (deponent == this) {\r\n return;\r\n }\r\n f_deponents.add(deponent);\r\n }",
"public String getArtifact() {\n return artifact;\n }",
"void AddToCargo(ore_excavation o) {\n int i;\n if (returned_ore.isEmpty()) {\n returned_ore.add(o);\n return;\n }\n for (i = 0; i < returned_ore.size(); i++) {\n ore_excavation o1 = returned_ore.get(i);\n /* Sort descending */\n if (o.ore_value > o1.ore_value) {\n returned_ore.add(i, o);\n return;\n }\n }\n returned_ore.add(o);\n }",
"@Test\n\tpublic void addNewOuterComponentTest()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tComponent expectedComponent = sbom.getMetadata().getComponent();\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly retained the original Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to retain the original Metadata Component:\\n\");\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error + sbomE.getStackTrace());\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error + e.getStackTrace());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}",
"@Test\r\n public void testAddAnalysis() {\r\n System.out.println(\"addAnalysis\");\r\n Analysis a = new Analysis(BigDecimal.ONE, BigDecimal.ONE, BigDecimal.ONE, null, 1, null, null, 1);\r\n assertEquals(0, w.analysies.size());\r\n w.addAnalysis(a);\r\n assertEquals(1, w.analysies.size());\r\n }",
"public org.python.Object __add__(org.python.Object other);",
"@Test\n public void addUpdateDeleteDeploymentArtifactToVfTestApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n ResourceGeneralPage.getLeftMenu().moveToDeploymentArtifactScreen();\n\n List<ArtifactInfo> deploymentArtifactList = new ArrayList<ArtifactInfo>();\n deploymentArtifactList.add(new ArtifactInfo(filePath, \"asc_heat 0 2.yaml\", \"kuku\", \"artifact1\", \"OTHER\"));\n deploymentArtifactList.add(new ArtifactInfo(filePath, \"sample-xml-alldata-1-1.xml\", \"cuku\", \"artifact2\", \"YANG_XML\"));\n for (ArtifactInfo deploymentArtifact : deploymentArtifactList) {\n DeploymentArtifactPage.clickAddNewArtifact();\n ArtifactUIUtils.fillAndAddNewArtifactParameters(deploymentArtifact);\n }\n AssertJUnit.assertTrue(\"artifact table does not contain artifacts uploaded\", DeploymentArtifactPage.checkElementsCountInTable(deploymentArtifactList.size()));\n\n String newDescription = \"new description\";\n DeploymentArtifactPage.clickEditArtifact(deploymentArtifactList.get(0).getArtifactLabel());\n DeploymentArtifactPage.artifactPopup().insertDescription(newDescription);\n DeploymentArtifactPage.artifactPopup().clickDoneButton();\n String actualArtifactDescription = DeploymentArtifactPage.getArtifactDescription(deploymentArtifactList.get(0).getArtifactLabel());\n AssertJUnit.assertTrue(\"artifact description is not updated\", newDescription.equals(actualArtifactDescription));\n\n DeploymentArtifactPage.clickDeleteArtifact(deploymentArtifactList.get(0).getArtifactLabel());\n DeploymentArtifactPage.clickOK();\n AssertJUnit.assertTrue(\"artifact \" + deploymentArtifactList.get(0).getArtifactLabel() + \"is not deleted\", DeploymentArtifactPage.checkElementsCountInTable(deploymentArtifactList.size() - 1));\n\n AssertJUnit.assertTrue(\"artifact \" + deploymentArtifactList.get(1).getArtifactLabel() + \"is not displayed\", DeploymentArtifactPage.clickOnArtifactDescription(deploymentArtifactList.get(1).getArtifactLabel()).isDisplayed());\n }",
"@Override\n public int compareTo(MensagemEleicao o) {\n int i = relogio.compareTo(o.relogio);\n if(i==0){ //se a comparação do relogio for igual\n if(id<o.getId()){ //usa o id maior como criterio de decisão;\n return -1;\n }\n return 1;\n }\n return i;\n }",
"@Test\n public void shouldPopulateSCMDependencyNodeWithMaterialRevisions() {\n\n String P1 = \"P1\";\n String P2 = \"P2\";\n String currentPipeline = \"P3\";\n ValueStreamMap graph = new ValueStreamMap(currentPipeline, null);\n MaterialRevision revision1 = new MaterialRevision(MaterialsMother.gitMaterial(\"test/repo1\"), oneModifiedFile(\"revision1\"));\n MaterialRevision revision2 = new MaterialRevision(MaterialsMother.gitMaterial(\"test/repo2\"), oneModifiedFile(\"revision2\"));\n\n graph.addUpstreamNode(new PipelineDependencyNode(P1, P1), null, currentPipeline);\n graph.addUpstreamNode(new PipelineDependencyNode(P2, P2), null, currentPipeline);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"git_fingerprint\", \"git\", \"git\"), new CaseInsensitiveString(\"git1\"), P1, revision1);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"git_fingerprint\", \"git\", \"git\"), new CaseInsensitiveString(\"git1\"), P2, revision2);\n\n SCMDependencyNode node = (SCMDependencyNode) graph.findNode(\"git_fingerprint\");\n\n assertThat(node.getMaterialRevisions().size(), is(2));\n assertTrue(node.getMaterialRevisions().contains(revision1));\n assertTrue(node.getMaterialRevisions().contains(revision2));\n }",
"@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}",
"void addProduces(Computer newProduces);",
"public static void addRealtor(String[] attribs) { \n double commission = Double.parseDouble(attribs[6]);\n Realtor realtor = new Realtor(attribs[2], attribs[3], attribs[4],\n attribs[5], commission); \n String added = realtorLogImpl.add(realtor) ? \"added\" : \"not added\";\n System.out.println(\"Realtor \" + added); \n }",
"private boolean comps(int a, int b){\n\t\tthis.comparisons.add(new Integer[]{a, b});\n\t\treturn true;\n\t}",
"@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}",
"public static void add(Gitlet currCommit, String[] args) {\n if (args.length != 2) {\n System.out.println(\"Specify which file to add.\");\n return;\n }\n FileManip fileToAdd = new FileManip(args[1]);\n FileManip prevFile = new FileManip(\".gitlet/\"\n + currCommit.tree.getCommit() + \"/\" + args[1]);\n if (!fileToAdd.exists()) {\n System.out.println(\"File does not exist.\");\n } else if (!prevFile.exists()) {\n currCommit.status.addToStatus(args[1]);\n addSerializeFile(currCommit);\n } else if (fileToAdd.isSame(prevFile.getPath())) {\n System.out.println(\"File has not been modified since the last commit.\");\n } else {\n currCommit.status.addToStatus(args[1]);\n addSerializeFile(currCommit);\n }\n }",
"@Override\n\t\t\tpublic int compare(Articulo o1, Articulo o2) {\n\t\t\t\tString desc1 = o1.getDescripcion();\n\t\t\t\tString desc2 = o2.getDescripcion();\n\t\t\t\t\n\t\t\t\treturn desc1.compareTo(desc2);\n\t\t\t}",
"@Test\n public void fileAddedViaChangeListShouldBeAddedToHg() throws Exception {\n final VirtualFile vf = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n myChangeListManager.ensureUpToDate();\n myChangeListManager.addUnversionedFilesToVcs(vf);\n verifyStatus(added(AFILE));\n myChangeListManager.checkFilesAreInList(true, vf);\n }",
"public NestedSet<Artifact> auxiliary() {\n return auxiliary;\n }"
]
| [
"0.6114298",
"0.58016354",
"0.53444886",
"0.53287977",
"0.53109384",
"0.52506864",
"0.52195656",
"0.5211165",
"0.5184806",
"0.5170683",
"0.5085673",
"0.50107163",
"0.49281994",
"0.490501",
"0.490361",
"0.4898127",
"0.4880427",
"0.4855387",
"0.48413074",
"0.48368767",
"0.47886443",
"0.4779171",
"0.47564843",
"0.47430536",
"0.47327006",
"0.4712872",
"0.47040293",
"0.46971628",
"0.46949983",
"0.46944144",
"0.46859264",
"0.46742186",
"0.46659485",
"0.46659485",
"0.46614257",
"0.46601406",
"0.46581465",
"0.46523318",
"0.46092987",
"0.4609121",
"0.46037337",
"0.4582498",
"0.4578336",
"0.45683953",
"0.45665675",
"0.45651516",
"0.45547047",
"0.4552258",
"0.45453086",
"0.45424885",
"0.45204324",
"0.45193994",
"0.45136806",
"0.45107362",
"0.4504785",
"0.45005915",
"0.44916433",
"0.44915563",
"0.44812334",
"0.44802198",
"0.44513783",
"0.4451115",
"0.44487172",
"0.44437745",
"0.44401902",
"0.44344875",
"0.44306093",
"0.44277766",
"0.4426332",
"0.44084096",
"0.44068086",
"0.44024938",
"0.43861392",
"0.43858704",
"0.43858454",
"0.4383553",
"0.43779436",
"0.43777305",
"0.4365653",
"0.43646327",
"0.43618086",
"0.43588522",
"0.435718",
"0.43543598",
"0.43508208",
"0.43499795",
"0.4347891",
"0.4337854",
"0.4330713",
"0.43293545",
"0.43234447",
"0.43194225",
"0.43149203",
"0.43098158",
"0.43089858",
"0.43076295",
"0.4301243",
"0.42926258",
"0.42877775",
"0.42869294",
"0.42835963"
]
| 0.0 | -1 |
Adds a list of "compare artifacts". Clears the list before adding. | public void addArtefacts(List<IArtefact> artifacts) {
this.artefacts.clear();
this.artefacts.addAll(artifacts);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void addProductsToCompareListTest() {\n YandexMarketHomePage homePage = new YandexMarketHomePage(driver);\n homePage.open();\n\n // 2. Select category of products\n homePage.selectCategory(\"Электроника\");\n\n // 3. Select subcategory of products\n new YandexMarketCategoryPage(driver).selectCatalogItemPage(\"Смартфоны\");\n\n // 4. Add products to compare list\n YandexMarketCatalogItemPage catalogItemPage = new YandexMarketCatalogItemPage(driver);\n String product1 = catalogItemPage.addProductToCompare(1);\n String product2 = catalogItemPage.addProductToCompare(2);\n\n List<String> expectedProductTitleList = new ArrayList<>();\n expectedProductTitleList.add(product1);\n expectedProductTitleList.add(product2);\n\n // 5. Click compare button\n catalogItemPage.clickCompareButton();\n\n // 6. Check that only added product names displayed on the page\n List<String> actualProductTitleList = new YandexMarketCompareProductPage(driver)\n .getProductNames();\n\n assertThat(actualProductTitleList)\n .as(\"Incorrect products was added to compare\")\n .containsExactlyInAnyOrderElementsOf(expectedProductTitleList);\n }",
"public void testArtifactStatusReset() {\r\n\t\tTopology top = createTopology(\"testArtifactStatusReset\");\r\n\t\tUnit u1 = addUnit(top, \"u1\");\r\n\t\tFileArtifact a1 = CoreFactory.eINSTANCE.createFileArtifact();\r\n\t\ta1.setName(\"artifact0\");\r\n\t\ta1.getFileURIs().add(\"C:\\\\AUTOEXEC.BAT\");\r\n\t\tu1.getArtifacts().add(a1);\r\n\r\n\t\tUnit u2 = addUnit(top, \"u2\");\r\n\t\tFileArtifact a2 = CoreFactory.eINSTANCE.createFileArtifact();\r\n\t\ta2.setName(\"artifact0\");\r\n\t\ta2.getFileURIs().add(\"C:\\\\MSDOS.SYS\");\r\n\t\tu2.getArtifacts().add(a2);\r\n\r\n\t\t// No errors in topology\r\n\t\tvalidate(top);\r\n\t\tassertHasNoErrorStatus(top);\r\n\r\n\t\t// Add a constraint link to propagate the artifacts (not satisfied initailly)\r\n\t\tConstraintLink cLink = LinkFactory.createConstraintLink(u1, u2);\r\n\t\tAttributePropagationConstraint c = ConstraintFactory.eINSTANCE\r\n\t\t\t\t.createAttributePropagationConstraint();\r\n\t\tc.setName(\"c\");\r\n\t\tc.setSourceAttributeName(\"fileURIs\");\r\n\t\tc.setTargetAttributeName(\"fileURIs\");\r\n\t\tc.setSourceObjectURI(\"artifact0\");\r\n\t\tc.setTargetObjectURI(\"artifact0\");\r\n\t\tcLink.getConstraints().add(c);\r\n\t\t\r\n\t\tvalidate(top);\r\n\t\t// Assert that there is an error in the topology due to the propagation constraint\r\n\t\tassertHasErrorStatus(top);\r\n\r\n\t\t// Fix the URIs to be equal (satsify constraint)\r\n\t\ta2.getFileURIs().clear();\r\n\t\ta2.getFileURIs().add(a1.getFileURIs().get(0));\r\n\t\t\r\n\t\t// Check that the artifacts going into the same set are not merged\r\n\t\tSet<Artifact> set = new HashSet<Artifact>();\r\n\t\tassertTrue(a1 != a2);\r\n\t\tset.add(a1);\r\n\t\tset.add(a2);\r\n\t\tassertEquals(2, set.size());\r\n\r\n\t\t// Validate that there are no propagation errors\r\n\t\tvalidate(top);\r\n\t\tassertHasNoErrorStatus(top);\r\n\t}",
"@Test\n public void filesInDirsAddedViaHgShouldBeAddedInChangeList() throws Exception {\n final VirtualFile afile = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n final VirtualFile bdir = createDirInCommand(myWorkingCopyDir, BDIR);\n final VirtualFile bfile = createFileInCommand(bdir, BFILE, INITIAL_FILE_CONTENT);\n ProcessOutput processOutput = addAll();\n LOG.debug(processOutput.getStdout());\n LOG.debug(processOutput.getStderr());\n verifyStatus(added(AFILE), added(BFILE_PATH));\n myChangeListManager.checkFilesAreInList(true, afile, bfile);\n }",
"public void testAddJarToBaseTestsList() throws Exception {\n\t\tString runnerOutDir = envController.getRunnerOutDir();\n\t\tFile jarFile = new File(jarFilePath + \"/\" + jarFileName);\n\t\tjarFile.createNewFile();\n\t\tFileUtils.copyFile(jarFile.getAbsolutePath(), runnerOutDir + \"/runnerout/testsProject/lib/\" + jarFileName);\n\t\tjsystem.launch();\n\t\tScenarioUtils.createAndCleanScenario(jsystem, jsystem.getCurrentScenario());\n\t\tString txt = jsystem.openJarList();\n\t\treport.report(txt);\n\t\tFile fileToDelete = new File(runnerOutDir + \"/runnerout/testsProject/lib/\" + jarFileName);\n\t\tfileToDelete.delete();\n\t\tvalidateJarList(txt, 4);\n\t}",
"@Test\n public void flowTest2(){\n ItemToCalculate calculated = new ItemToCalculate(5);\n calculated.workerLastNumber = 5;\n calculated.curProgress = 5;\n calculated.firstRoot = 1;\n calculated.secondRoot = 5;\n\n calcApplication.itemToCalculateArrayList.add(calculated);\n calcApplication.itemToCalculateArrayList.add(new ItemToCalculate(4));\n\n Collections.sort(calcApplication.itemToCalculateArrayList, new ItemToCalculateComparator());\n\n assertEquals(calculated, calcApplication.itemToCalculateArrayList.get(1));\n\n calcApplication.itemToCalculateArrayList.clear();\n }",
"@Test\n public void filesInDirsAddedViaChangeListShouldBeAddedToHg() throws Exception {\n final VirtualFile afile = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n final VirtualFile bdir = createDirInCommand(myWorkingCopyDir, BDIR);\n final VirtualFile bfile = createFileInCommand(bdir, BFILE, INITIAL_FILE_CONTENT);\n myChangeListManager.ensureUpToDate();\n myChangeListManager.addUnversionedFilesToVcs(afile, bdir, bfile);\n verifyStatus(added(AFILE), added(BFILE_PATH));\n myChangeListManager.checkFilesAreInList(true, afile, bfile);\n }",
"private static Bom combineCommonSBoms(List<?> files)\n\t\t\tthrows SBomCombinerException, SBomCommonsException\n\t{\n\t\tBom combinedSBom = new Bom();\n\t\t\n\t\tList<Component> components = new ArrayList<>();\n\t\tList<Dependency> dependencies = new ArrayList<>();\n\t\t\n\t\tList<Component> outerComps = new ArrayList<>();\n\t\tList<Tool> toolsUsed = new ArrayList<>();\n\t\t\n\t\tBom bom = null;\n\t\tList<Component> bomComps;\n\t\tList<Dependency> bomDeps;\n\t\tList<Dependency> innerDeps;\n\t\tboolean dependencyFound = false;\n\t\tfor (Object file : files)\n\t\t{\n\t\t\tif (file instanceof String)\n\t\t\t\tbom = getBomFile((String) file);\n\t\t\telse if (file instanceof InputStreamSource)\n\t\t\t\tbom = getBomFile((InputStreamSource) file);\n\t\t\t\n\t\t\tif (bom != null)\n\t\t\t{\n\t\t\t\tif ((bom.getMetadata() != null) && (bom.getMetadata().getTools() != null) &&\n\t\t\t\t\t\t(!bom.getMetadata().getTools().isEmpty()))\n\t\t\t\t{\n\t\t\t\t\ttoolsUsed = ToolsUtils.addUniqueTools(toolsUsed, bom.getMetadata().getTools());\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif ((bom.getMetadata() != null) && (bom.getMetadata().getComponent() != null))\n\t\t\t\t\touterComps.add(bom.getMetadata().getComponent());\n\t\t\t\n\t\t\t\tbomComps = bom.getComponents();\n\t\t\t\t// Process Components.\n\t\t\t\tfor (Component bomComp : bomComps)\n\t\t\t\t{\n\t\t\t\t\tif (!componentsContain(bomComp, components))\n\t\t\t\t\t{\n\t\t\t\t\t\tcheckReferenceTypes(bomComp);\n\t\t\t\t\t\tcomponents.add(bomComp);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.debug(\"We already have component(\" + bomComp.getName() + \", \" +\n\t\t\t\t\t\t\t\tbomComp.getGroup() + \", \" + bomComp.getVersion() + \")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Process Dependencies.\n\t\t\t\tbomDeps = bom.getDependencies();\n\t\t\t\tif ((bomDeps != null) && (!bomDeps.isEmpty()))\n\t\t\t\t{\n\t\t\t\t\tfor (Dependency bomDep : bomDeps)\n\t\t\t\t\t{\n\t\t\t\t\t\tdependencyFound = false;\n\t\t\t\t\t\tfor (Dependency dep : dependencies)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (dep.equals(bomDep))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdependencyFound = true;\n\t\t\t\t\t\t\t\tlogger.debug(\"Dependency (\" + dep.getRef() +\n\t\t\t\t\t\t\t\t\t\t\") found. Adding inner depenencies.\");\n\t\t\t\t\t\t\t\tinnerDeps = bomDep.getDependencies();\n\t\t\t\t\t\t\t\tif (innerDeps != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tfor (Dependency innerDep : innerDeps)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdep.addDependency(innerDep);\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}\n\t\t\t\t\t\tif (!dependencyFound)\n\t\t\t\t\t\t\tdependencies.add(bomDep);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add in outer Components if they are not already there.\n\t\tfor (Component bomComp : outerComps)\n\t\t{\n\t\t\tif (!componentsContain(bomComp, components))\n\t\t\t{\n\t\t\t\tcheckReferenceTypes(bomComp);\n\t\t\t\tcomponents.add(bomComp);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlogger.debug(\"We already have component(\" + bomComp.getName() + \", \" +\n\t\t\t\t\t\tbomComp.getGroup() + \", \" + bomComp.getVersion() + \")\");\n\t\t}\n\t\tif (combinedSBom.getMetadata() == null)\n\t\t{\n\t\t\tMetadata combinedSBomMetadata = new Metadata();\n\t\t\tcombinedSBomMetadata.setTools(toolsUsed);\n\t\t\tcombinedSBom.setMetadata(combinedSBomMetadata);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcombinedSBom.getMetadata().setTools(toolsUsed);\n\t\t}\n\t\tcombinedSBom.setComponents(components);\n\t\tcombinedSBom.setDependencies(dependencies);\n\t\treturn combinedSBom;\n\t}",
"private List<String> copyDependencies(File javaDirectory) throws MojoExecutionException {\n ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();\n\n List<String> list = new ArrayList<String>();\n\n // First, copy the project's own artifact\n File artifactFile = project.getArtifact().getFile();\n list.add(layout.pathOf(project.getArtifact()));\n\n try {\n FileUtils.copyFile(artifactFile, new File(javaDirectory, layout.pathOf(project.getArtifact())));\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could not copy artifact file \" + artifactFile + \" to \" + javaDirectory, ex);\n }\n\n if (excludeDependencies) {\n // skip adding dependencies from project.getArtifacts()\n return list;\n }\n\n for (Artifact artifact : project.getArtifacts()) {\n File file = artifact.getFile();\n File dest = new File(javaDirectory, layout.pathOf(artifact));\n\n getLog().debug(\"Adding \" + file);\n\n try {\n FileUtils.copyFile(file, dest);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying file \" + file + \" into \" + javaDirectory, ex);\n }\n\n list.add(layout.pathOf(artifact));\n }\n\n return list;\n }",
"@Test\n public void testAddMaterialMultipleMaterial() {\n String[] materials = new String[]{\"material1\", \"material2\", \"material3\"};\n\n for (int i = 0; i < materials.length; i++) {\n planned.addMaterials(materials[i]);\n }\n\n assertEquals(planned.getMaterials().size(), materials.length);\n\n for (int i = 0; i < materials.length; i++) {\n assertTrue(planned.getMaterials().contains(materials[i]));\n }\n\n }",
"private static <File> void merge(ArrayList<File> firstList, ArrayList<File> secondList,\r\n ArrayList<File> wholeList, Comparator<File> usedComparison) {\r\n int i = 0;\r\n int j = 0;\r\n int k = 0;\r\n while (i < firstList.size() && j < secondList.size()) {\r\n if (usedComparison.compare(firstList.get(i), secondList.get(j)) < 0) {\r\n wholeList.set(k++, firstList.get(i++));\r\n } else {\r\n wholeList.set(k++, secondList.get(j++));\r\n }\r\n }\r\n while (i < firstList.size()) {\r\n wholeList.set(k++, firstList.get(i++));\r\n }\r\n while (j < secondList.size()) {\r\n wholeList.set(k++, secondList.get(j++));\r\n }\r\n }",
"public List<MinedDocument> parseCompareArtifacts() {\n//\t\tSystem.out.println(\"parseCompareArtifacts()\");\n\t\tList<MinedDocument> compareDocs = new ArrayList<MinedDocument>();\n\t\t\n\t\tInputStream is;\n\t\tDocxParser docx;\n\t\tString title = null;\n\t\tString text;\n\t\t\n\t\tfor(IArtefact artefact : this.artefacts) {\n\t\t\ttext = null;\n\t\t\t\n\t\t\tif(artefact instanceof NuxeoDocArtefact) {\t// Nuxeo Document:\n\t\t\t\ttry {\n\t\t\t\t\tis = getNuxeoInstance().getDocumentInputStream(artefact.getId());\n\t\t\t\t\t\n\t\t\t\t\ttitle = this.getNuxeoInstance().getLastDocTitle();\n\t\t\t\t\tif(title==null) title = NO_TITLE;\n\t\t\t\t\t\n\t\t\t\t\tif(this.getNuxeoInstance().getLastDocFilePath().endsWith(\".docx\")) {\n\t\t\t\t\t\tdocx = new DocxParser(is);\n\t\t\t\t\t\tdocx.parseDocxSimple();\n\t\t\t\t\t\ttext = docx.getFullText();\n\t\t\t\t\t} else if(this.getNuxeoInstance().getLastDocFilePath().endsWith(\".doc\")) {\n\t\t\t\t\t\ttext = DocxParser.parseDocSimple(is);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read nuxeo doc with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayBlogArtefact) { // Liferay Blog Entry:\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject blogEntry = this.getLiferayInstance().getBlogEntry(artefact.getId());\n\t\t\t\t\ttitle = blogEntry.getString(\"title\");\n\t\t\t\t\ttext = blogEntry.getString(\"content\");\n\t\t\t\t\ttext = TextParser.parseHtml(text);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay blog entry with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayForumArtefact) { // Liferay Forum Message\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject forumEntry = this.getLiferayInstance().getMessageBoardMessage(artefact.getId());\n\t\t\t\t\ttitle = forumEntry.getString(\"subject\");\n\t\t\t\t\ttext = forumEntry.getString(\"body\");\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay forum message with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayWebContentArtefact) { // Liferay Web Content Article (Journal)\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject webContentArticle = this.getLiferayInstance().getWebContentArticle(artefact.getId());\n\t\t\t\t\ttitle = webContentArticle.getString(WEBCONTENT_TITLE);\n\t\t\t\t\ttext = webContentArticle.getString(WEBCONTENT_CONTENT);\n\t\t\t\t\t// check if is \"meeting minutes\" content:\n\t\t\t\t\tJSONObject webContentTemplate = this.getLiferayInstance().getWebContentTemplate(\n\t\t\t\t\t\t\twebContentArticle.getString(WEBCONTENT_TEMPLATE_ID), webContentArticle.getString(WEBCONTENT_GROUP_ID));\n\t\t\t\t\tString templateName = webContentTemplate.getString(WEBCONTENTTEMPLATE_NAME);\n\t\t\t\t\tif(templateName.contains(WEBCONTENTTEMPLATE_MEETING_MINUTES)) {\n\t\t\t\t\t\t((LiferayWebContentArtefact)artefact).setIsMeetingMinutes(true);\n\t\t\t\t\t}\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay web content with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayWikiArtefact) { // Liferay Wiki Page\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject wikiPage = this.getLiferayInstance().getWikiPage(artefact.getId());\n\t\t\t\t\ttitle = wikiPage.getString(\"title\");\n\t\t\t\t\ttext = wikiPage.getString(\"content\");\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay wiki page with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof SocialMessageArtefact) { // Shindig Message\n\t\t\t\tShindigConnector shindigCon;\n\t\t\t\tif(Config.SHINDIG_USAGE.getValue().equals(Config.VAL_SHINDIG_DIRECT))\n\t\t\t\t // disabled\n//\t\t\t\t\tshindigCon = new ShindigDirectConnector();\n\t\t\t\t shindigCon = null;\n\t\t\t\telse\n\t\t\t\t\tshindigCon = new ShindigRESTConnector();\n\t\t\t\tJSONObject message = shindigCon.getOutboxMessage(((SocialMessageArtefact) artefact).getUserId(), artefact.getId());\n\t\t\t\tif(message!=null) {\n\t\t\t\t\ttitle = message.getString(\"title\");\n\t\t\t\t\ttext = message.getString(\"body\");\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"MinedDocument is a SocialMessageArtefact\");\n\t\t\t} else if(artefact instanceof MailArtefact) { // Email via ElastiSearch\n\t\t\t\ttitle = ((MailArtefact)artefact).getSubject();\n\t\t\t\ttext = ((MailArtefact)artefact).getContent();\n\t\t\t}\n\t\t\t\n\t\t\tif(title==null)\n\t\t\t\ttitle = NO_TITLE;\n\t\t\t\n\t\t\tif(text!=null)\n\t\t\t\tcompareDocs.add(new MinedDocument(title, text));\n\t\t\telse\n\t\t\t\tcompareDocs.add(null);\n\t\t}\n\t\t\n\t\treturn compareDocs;\n\t}",
"public abstract List<AbstractDeploymentArtifact> getDeploymentArtifacts();",
"public void saveChanges() {\n if(finalListModel.isEmpty() || finalListModel.size() < initialListModel.size() ) {\n JOptionPane.showMessageDialog(null, \"Sorry, number of buttons should be \" +\n \"equal to the number of files in final list\");\n }\n// else if((finalListModel.toString()).equals(initialListModel.toString())) {\n// JOptionPane.showMessageDialog(null, \"Sorry, make different selections as \" +\n// \"both final and initial list are same\");\n// }\n else {\n save();\n initialListModel.removeAllElements();\n for (int i = 0; i < order.getItemCount(); i++) {\n initialListModel.addElement(finalListModel.getElementAt(i));\n }\n }\n }",
"List<BinaryArtifact> getArtifacts(String instanceUrl, String repoName, long lastUpdated);",
"@Test\n public void fileAddedViaHgShouldBeAddedInChangeList() throws Exception {\n final VirtualFile vf = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n ProcessOutput processOutput = addAll();\n LOG.debug(processOutput.getStdout());\n LOG.debug(processOutput.getStderr());\n myChangeListManager.checkFilesAreInList(true, vf);\n }",
"private void createNewItemsetsFromPreviousOnes() {\n // by construction, all existing itemsets have the same size\n int currentSizeOfItemsets = itemsets.get(0).length;\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"Creating itemsets of size {0} based on {1} itemsets of size {2}\", new Object[]{currentSizeOfItemsets + 1, itemsets.size(), currentSizeOfItemsets});\n\n HashMap<String, String[]> tempCandidates = new HashMap<>(); //temporary candidates\n\n // compare each pair of itemsets of size n-1\n for (int i = 0; i < itemsets.size(); i++) {\n for (int j = i + 1; j < itemsets.size(); j++) {\n String[] X = itemsets.get(i);\n String[] Y = itemsets.get(j);\n\n assert (X.length == Y.length);\n\n //make a string of the first n-2 tokens of the strings\n String[] newCand = new String[currentSizeOfItemsets + 1];\n for (int s = 0; s < newCand.length - 1; s++) {\n newCand[s] = X[s];\n }\n\n int ndifferent = 0;\n // then we find the missing value\n for (int s1 = 0; s1 < Y.length; s1++) {\n boolean found = false;\n // is Y[s1] in X?\n for (int s2 = 0; s2 < X.length; s2++) {\n if (X[s2].equals(Y[s1])) {\n found = true;\n break;\n }\n }\n if (!found) { // Y[s1] is not in X\n ndifferent++;\n // we put the missing value at the end of newCand\n newCand[newCand.length - 1] = Y[s1];\n }\n\n }\n\n // we have to find at least 1 different, otherwise it means that we have two times the same set in the existing candidates\n assert (ndifferent > 0);\n\n /*if (ndifferent==1) {\n \tArrays.sort(newCand);*/\n tempCandidates.put(Arrays.toString(newCand), newCand);\n //}\n }\n }\n\n //set the new itemsets\n itemsets = new ArrayList<>(tempCandidates.values());\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"Created {0} unique itemsets of size {1}\", new Object[]{itemsets.size(), currentSizeOfItemsets + 1});\n\n }",
"@Test\n public void testAdd() {\n list1.add(0, 11.25);\n list1.add(1, 12.25);\n list1.add(2, 13.25);\n list1.add(3, 14.25);\n list1.add(4, 15.25);\n list1.add(5, 17.25);\n list1.add(6, 18.25);\n list1.add(7, 19.25);\n list1.add(3, 16.25);\n assertEquals(16.25 , list1.get(3), 0);\n assertEquals(14.25 , list1.get(4), 0);\n assertEquals(15.25, list1.get(5), 0);\n assertEquals(9, list1.size());\n }",
"@Override\r\n\tpublic void notifyJarChange(List<Jar> changedJars) {\n\r\n\t}",
"@Test\n public void testAppends(){\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n DoubleLinkedList<Integer> list2 = new DoubleLinkedList<Integer>();\n DoubleLinkedList<Integer> list3 = new DoubleLinkedList<Integer>();\n //builing of lists\n list1.addToFront(1);\n list1.addToFront(2);\n list1.addToFront(3);\n list2.addToFront(4);\n list2.addToFront(5);\n list2.addToFront(6);\n list3.addToFront(4);\n list3.addToFront(5);\n list3.addToFront(6);\n list3.addToFront(1);\n list3.addToFront(2);\n list3.addToFront(3);\n list1.append(list2);\n assertTrue(\"testing append with two lists\", list1.equals(list3));\n }",
"@Test\n\tpublic void testAddAll() {\n\t Set<Integer> setA = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));\n\t Set<Integer> setB = new HashSet<>(Arrays.asList(9, 8, 7, 6, 5, 4, 3));\n\t setA.addAll(setB);\n\t Set<Integer> union = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9));\n\t assertEquals(setA, union);\n }",
"public void add(Collection<SimilarResult<T>> results) {\n if (locked) {\n throw new IllegalStateException(\"SimilarResultList has been locked\");\n }\n this.results.addAll(results);\n }",
"default void listArtifacts(\n com.google.cloud.aiplatform.v1.ListArtifactsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListArtifactsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListArtifactsMethod(), responseObserver);\n }",
"public static synchronized void initializeApacheCompareTestArchiveFiles() {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.initializeApacheCompareTestArchiveFiles\");\n\n File oneaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest1a.uyu\");\n File onebSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest1b.uyu\");\n\n File twoaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest2a.uyu\");\n File twobSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest2b.uyu\");\n\n File threeaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest3a.uyu\");\n File threebSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest3b.uyu\");\n\n File fouraSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest4a.uyu\");\n File fourbSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest4b.uyu\");\n\n File fiveaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest5a.uyu\");\n File fivebSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest5b.uyu\");\n\n File sixaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest6a.uyu\");\n File sixbSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest6b.uyu\");\n\n File sevenaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest7a.uyu\");\n File sevenbSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest7b.uyu\");\n\n File eightaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest8a.uyu\");\n File eightbSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest8b.uyu\");\n\n File nineaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest9a.uyu\");\n File ninebSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest9b.uyu\");\n\n File tenaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest10a.uyu\");\n File tenbSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest10b.uyu\");\n\n File twelveaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest12a.uyu\");\n File twelvebSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest12b.uyu\");\n\n String destinationDirName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_PROJECTS_DIRECTORY\n + File.separator\n + getTestProjectName();\n\n File firstDestinationDirectory = new File(destinationDirName);\n firstDestinationDirectory.mkdirs();\n\n File oneaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest1a.uyu\");\n File onebDestinationFile = new File(destinationDirName + File.separator + \"CompareTest1b.uyu\");\n\n File twoaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest2a.uyu\");\n File twobDestinationFile = new File(destinationDirName + File.separator + \"CompareTest2b.uyu\");\n\n File threeaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest3a.uyu\");\n File threebDestinationFile = new File(destinationDirName + File.separator + \"CompareTest3b.uyu\");\n\n File fouraDestinationFile = new File(destinationDirName + File.separator + \"CompareTest4a.uyu\");\n File fourbDestinationFile = new File(destinationDirName + File.separator + \"CompareTest4b.uyu\");\n\n File fiveaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest5a.uyu\");\n File fivebDestinationFile = new File(destinationDirName + File.separator + \"CompareTest5b.uyu\");\n\n File sixaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest6a.uyu\");\n File sixbDestinationFile = new File(destinationDirName + File.separator + \"CompareTest6b.uyu\");\n\n File sevenaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest7a.uyu\");\n File sevenbDestinationFile = new File(destinationDirName + File.separator + \"CompareTest7b.uyu\");\n\n File eightaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest8a.uyu\");\n File eightbDestinationFile = new File(destinationDirName + File.separator + \"CompareTest8b.uyu\");\n\n File nineaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest9a.uyu\");\n File ninebDestinationFile = new File(destinationDirName + File.separator + \"CompareTest9b.uyu\");\n\n File tenaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest10a.uyu\");\n File tenbDestinationFile = new File(destinationDirName + File.separator + \"CompareTest10b.uyu\");\n\n File twelveaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest12a.uyu\");\n File twelvebDestinationFile = new File(destinationDirName + File.separator + \"CompareTest12b.uyu\");\n\n try {\n ServerUtility.copyFile(oneaSourceFile, oneaDestinationFile);\n ServerUtility.copyFile(onebSourceFile, onebDestinationFile);\n\n ServerUtility.copyFile(twoaSourceFile, twoaDestinationFile);\n ServerUtility.copyFile(twobSourceFile, twobDestinationFile);\n\n ServerUtility.copyFile(threeaSourceFile, threeaDestinationFile);\n ServerUtility.copyFile(threebSourceFile, threebDestinationFile);\n\n ServerUtility.copyFile(fouraSourceFile, fouraDestinationFile);\n ServerUtility.copyFile(fourbSourceFile, fourbDestinationFile);\n\n ServerUtility.copyFile(fiveaSourceFile, fiveaDestinationFile);\n ServerUtility.copyFile(fivebSourceFile, fivebDestinationFile);\n\n ServerUtility.copyFile(sixaSourceFile, sixaDestinationFile);\n ServerUtility.copyFile(sixbSourceFile, sixbDestinationFile);\n\n ServerUtility.copyFile(sevenaSourceFile, sevenaDestinationFile);\n ServerUtility.copyFile(sevenbSourceFile, sevenbDestinationFile);\n\n ServerUtility.copyFile(eightaSourceFile, eightaDestinationFile);\n ServerUtility.copyFile(eightbSourceFile, eightbDestinationFile);\n\n ServerUtility.copyFile(nineaSourceFile, nineaDestinationFile);\n ServerUtility.copyFile(ninebSourceFile, ninebDestinationFile);\n\n ServerUtility.copyFile(tenaSourceFile, tenaDestinationFile);\n ServerUtility.copyFile(tenbSourceFile, tenbDestinationFile);\n\n ServerUtility.copyFile(twelveaSourceFile, twelveaDestinationFile);\n ServerUtility.copyFile(twelvebSourceFile, twelvebDestinationFile);\n\n } catch (IOException ex) {\n Logger.getLogger(TestHelper.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void testSortJarList() throws Exception {\n\t\tjsystem.launch();\n\t\tScenarioUtils.createAndCleanScenario(jsystem, jsystem.getCurrentScenario());\n\t\tString txt = jsystem.sortJarList();\n\t\tvalidateJarList(txt, 2);\n\t}",
"@Test\r\n\tpublic void testAddAll() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 4, \"ferrum\"));\r\n\t\tsample.addAll(list);\r\n\t\tAssert.assertEquals(16, sample.size());\r\n\t\tAssert.assertTrue(sample.get(0).equals(new Munitions(2, 4, \"ferrum\")));\r\n\t\tAssert.assertTrue(sample.get(1).equals(list.get(0)));\r\n\t\tAssert.assertTrue(sample.get(15).equals(list.get(14)));\r\n\t}",
"public static List<String> getResolvedLibsList(List<String> libNames) {\n Set<String> removeSet = new HashSet<>();\n // key - nameOfLib , value = list of matched versions\n Map<String, List<String>> versionsMap = new HashMap<>();\n\n for (String libraryName : libNames) {\n LibraryDefinition curLibDef = getLibraryDefinition(libraryName);\n\n String currentLibName = curLibDef.getName();\n String currentLibVersion = curLibDef.getVersion();\n //fill versionsMap\n List<String> tempList = versionsMap.get(currentLibName);\n if (tempList != null)\n tempList.add(currentLibVersion);\n else {\n tempList = new LinkedList<>();\n tempList.add(currentLibVersion);\n versionsMap.put(currentLibName, tempList);\n }\n }\n\n for (Map.Entry<String, List<String>> entry : versionsMap.entrySet()) {\n String key = entry.getKey();\n List<String> versionsList = entry.getValue();\n\n for (int i = 0; i < versionsList.size(); i++) {\n for (int j = i + 1; j < versionsList.size(); j++) {\n String iPlatform = getLibraryPlatform(versionsList.get(i));\n String jPlatform = getLibraryPlatform(versionsList.get(j));\n\n if (!Objects.equals(iPlatform, jPlatform)) {\n continue;\n }\n\n String versionToDelete = getLowestVersion(versionsList.get(i), versionsList.get(j));\n if (versionToDelete != null) {\n versionToDelete = key + \"-\" + versionToDelete + \".jar\";\n removeSet.add(versionToDelete);\n }\n }\n }\n }\n\n List<String> resolvedLibNames = new ArrayList<>(libNames);\n resolvedLibNames.removeAll(removeSet);\n return resolvedLibNames;\n }",
"public QuarkusCodestartTestBuilder addArtifacts(Collection<String> artifacts) {\n this.artifacts = artifacts;\n return this;\n }",
"@Override\n\t\tpublic void add(File explodedAar) {\n if (!isShared(explodedAar))\n files.addAll(getJars(explodedAar));\n\t\t}",
"@Test\n\tvoid test4AddComponentToList() {\n\t\tlistItems.add(comp1);\n\t\tlistItems.add(comp2);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tvc.addComponent(comp3);\n\t\tassertEquals(comp3.hashCode(), vc.getComponentsList().get(vc.getComponentsList().size() - 1).hashCode());\n\t}",
"private List<Set<Factor>> checkComponents(Set<Factor> factors) {\n List<Set<Factor>> components = new ArrayList<Set<Factor>>();\n for (Factor factor : factors) {\n Set<Factor> comp = new HashSet<Factor>();\n comp.add(factor);\n components.add(comp);\n }\n \n List<Set<Factor>> toBeRemoved = new ArrayList<Set<Factor>>();\n while (components.size() > 1) {\n for (int i = 0; i < components.size() - 1; i++) {\n toBeRemoved.clear();\n Set<Factor> comp1 = components.get(i);\n for (int j = i + 1; j < components.size(); j++) {\n Set<Factor> comp2 = components.get(j);\n if (hasSharedVariables(comp1, \n comp2)) {\n comp1.addAll(comp2);\n toBeRemoved.add(comp2);\n }\n }\n if (toBeRemoved.size() > 0) {\n components.removeAll(toBeRemoved);\n break; // Restart from zero since the comparison should be changed now.\n }\n }\n if (toBeRemoved.size() == 0)\n break;\n }\n // Sort it based on size\n Collections.sort(components, new Comparator<Set<Factor>>() {\n public int compare(Set<Factor> comp1, Set<Factor> comp2) {\n return comp2.size() - comp1.size();\n }\n });\n return components;\n }",
"public synchronized void addHist(ArrayList<int[]> subHistogram){\n int j;\n int[] colorHistogram; int[] subColorHistogram;\n for(int i=0;i<3;i++){\n colorHistogram = histogram.get(i);\n subColorHistogram = subHistogram.get(i);\n for(j=0;j<256;j++){\n colorHistogram[j] += subColorHistogram[j];\n }\n histogram.set(i,colorHistogram);\n }\n }",
"private Set<Artifact> getAllArtifacts(Collection<Artifact> artifacts, Set<Artifact> allArtifacts) {\n for (Artifact art : artifacts) {\n if (art.isOnBranch(AtsClientService.get().getAtsBranch())) {\n allArtifacts.addAll(art.getDescendants());\n }\n }\n return allArtifacts;\n }",
"public void testAddJarToList() throws Exception {\n\t\tString runnerOutDir = envController.getRunnerOutDir();\n\t\tFile jarFile = new File(jarFilePath + File.separatorChar + jarFileName);\n\t\tjarFile.createNewFile();\n\t\treport.report(\"DEBUG >>> created the new file \" + jarFile.getAbsolutePath());\n\t\tFileUtils.copyFile(jarFile.getAbsolutePath(), runnerOutDir + \"runnerout\" + File.separatorChar + \"runner\"\n\t\t\t\t+ File.separatorChar + \"lib\" + File.separatorChar + jarFileName);\n\t\treport.report(\"DEBUG >>> copied the new jar file to \" + runnerOutDir + \"runnerout\" + File.separatorChar\n\t\t\t\t+ \"runner\" + File.separatorChar + \"lib\" + File.separatorChar + jarFileName);\n\t\tjsystem.launch();\n\t\tString txt = jsystem.openJarList();\n\t\treport.report(\"DEBUG >>> the jar list is: \" + txt + \"\\n\\nlooking for \" + jarFileName + \" in it!!!\");\n\t\tvalidateJarList(txt, 4);\n\t}",
"private void addComparison() {\n\t\tthis.comparisonCounter++;\n\t}",
"public Merge() {\r\n this.listsOfSorted = new LinkedList<>();\r\n\r\n }",
"public void addAll(List<ImageContent> items) {\n _data = items;\n }",
"@Test(priority =1)\n\tpublic void userAddProductsToCompareList() {\n\t\tsearch = new SearchPage(driver);\n\t\tproductDetails = new ProductDetailsPage(driver);\n\t\tcompare = new AddToCompareListPage(driver);\n\n\t\tsearch.searchUsingAutoCompleteList(\"niko\");\n\t\tassertTrue(productDetails.productNameInBreadCrumb.getText().equalsIgnoreCase(firstProductName));\n\t\tproductDetails.addToCompareList();\n\t\t\n\t\tsearch.searchUsingAutoCompleteList(\"leic\");\n\t\tproductDetails = new ProductDetailsPage(driver);\n\t\tassertTrue(productDetails.productNameInBreadCrumb.getText().equalsIgnoreCase(secondProductName));\n\t\tproductDetails.addToCompareList();\n\t\tproductDetails.openProductComparisonPage();\n\t\tcompare.compareProducts();\n\n\t}",
"@Test\n public void flowTest3(){\n ItemToCalculate calculated = new ItemToCalculate(5);\n calculated.workerLastNumber = 5;\n calculated.curProgress = 5;\n calculated.firstRoot = 1;\n calculated.secondRoot = 5;\n\n ItemToCalculate small_inprog = new ItemToCalculate(10);\n ItemToCalculate big_inprog = new ItemToCalculate(30);\n\n calcApplication.itemToCalculateArrayList.add(calculated);\n calcApplication.itemToCalculateArrayList.add(small_inprog);\n calcApplication.itemToCalculateArrayList.add(big_inprog);\n Collections.sort(calcApplication.itemToCalculateArrayList, new ItemToCalculateComparator());\n\n shadowOf(getMainLooper()).idle();\n // expected to small_inprog be first, second big_inprog, last calculated\n\n assertEquals(calcApplication.itemToCalculateArrayList.get(0), small_inprog);\n assertEquals(calcApplication.itemToCalculateArrayList.get(1), big_inprog);\n assertEquals(calcApplication.itemToCalculateArrayList.get(2), calculated);\n\n\n calcApplication.itemToCalculateArrayList.clear();\n }",
"synchronized void toCrawlList_addAll(LinkedHashSet _toCrawlList, ArrayList _links)\n {\n _toCrawlList.addAll(_links);\n }",
"@When(\"I click on add to compare list link\")\n public void i_click_on_add_to_compare_list_link() {\n BasePage.driverUtils.waitForWebElementToBeClickable(BasePage.htcOneMiniBluePage.getHtcOneMiniBlueAddToCompareListButton());\n BasePage.htcOneMiniBluePage.getHtcOneMiniBlueAddToCompareListButton().click();\n }",
"@Test\n public void fileAddedViaChangeListShouldBeAddedToHg() throws Exception {\n final VirtualFile vf = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n myChangeListManager.ensureUpToDate();\n myChangeListManager.addUnversionedFilesToVcs(vf);\n verifyStatus(added(AFILE));\n myChangeListManager.checkFilesAreInList(true, vf);\n }",
"private void keepActiveManifests(List<ManifestFile> currentManifests) {\n keptManifests.clear();\n currentManifests.stream()\n .filter(\n manifest ->\n !rewrittenManifests.contains(manifest) && !deletedManifests.contains(manifest))\n .forEach(keptManifests::add);\n }",
"private ArrayList<String> getNewConfusables(String[] existing, String[] confusables) {\n Set<String> set = new HashSet<>();\n set.addAll(Arrays.asList(existing));\n set.addAll(Arrays.asList(confusables));\n return new ArrayList<>(set);\n }",
"public static void main(String[] args) {\n\t\tArrayList<Integer> array1 = new ArrayList<Integer>();\n\t\tarray1.add(1);\n\t\tarray1.add(2);\n\t\tarray1.add(3);\n\t\tarray1.add(4);\n\t\tSystem.out.println(array1);\n\t\tArrayList<Integer> array2 = new ArrayList<Integer>();\n\t\tarray2.add(5);\n\t\tarray2.add(6);\n\t\tarray2.add(7);\n\t\tarray2.add(8);\n\t\tSystem.out.println(array2);\n\t\tarray1.addAll(array2);\n\t\tSystem.out.println(array1);\n\t\t\n\t}",
"@Override\n public void combineCons(ArrayList<Note> list) {\n }",
"private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n addFreeLauncher(deployment);\n } else {\n log.info(\"Deployment \" + deployment + \" doesn't have a Service that exposes it. Not adding as a launcher...\");\n }\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n private Void removeGeometriesAnswer()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(adds.isEmpty());\r\n\n // 121\r\n assertEquals(140, removes.size());\r\n boolean hasLines = false;\r\n boolean hasMeshes = false;\r\n boolean hasFootprint = false;\r\n boolean hasImage = false;\r\n\r\n for (Geometry geom : removes)\r\n {\r\n if (geom instanceof PolygonGeometry)\r\n {\r\n hasFootprint = true;\r\n }\r\n else if (geom instanceof PolylineGeometry)\r\n {\r\n hasLines = true;\r\n }\r\n else if (geom instanceof PolygonMeshGeometry)\r\n {\r\n hasMeshes = true;\r\n }\r\n else if (geom instanceof TileGeometry)\r\n {\r\n hasImage = true;\r\n }\r\n }\r\n\r\n assertTrue(hasLines);\r\n assertTrue(hasMeshes);\r\n assertTrue(hasFootprint);\r\n assertTrue(hasImage);\r\n\r\n return null;\r\n }",
"private void calculateDuplicate(ArrayList<String> pathList) {\n\n HashMap<String, byte[]> pathMdHashMap = new HashMap<>();\n\n for (int i = 0; i < pathList.size(); i++) {\n\n LinkedHashMap<File, String> uniquePathAndFileHash = new LinkedHashMap<>();\n\n if (pathList.get(i) == null || !(new File(pathList.get(i)).isFile()) || !(new File(pathList.get(i)).exists()))\n continue;\n\n byte[] fileHash1 = Constant.fileHash(new File(pathList.get(i)));\n\n if (fileHash1 == null)\n continue;\n\n for (int j = i + 1; j < pathList.size(); j++) {\n\n String path = pathList.get(j);\n\n if (path == null || !(new File(path).isFile()) || !(new File(path).exists()))\n continue;\n\n byte[] fileHash2;\n\n if (pathMdHashMap.containsKey(path)) {\n fileHash2 = pathMdHashMap.get(path);\n } else {\n fileHash2 = Constant.fileHash(new File(pathList.get(j)));\n pathMdHashMap.put(path, fileHash2);\n }\n\n boolean flag = MessageDigest.isEqual(fileHash1, fileHash2);\n\n if (flag) {\n\n if (!uniquePathAndFileHashCopy.containsValue(pathList.get(i))) {\n uniquePathAndFileHash.put(new File(pathList.get(i)), pathList.get(i));\n }\n\n if (!uniquePathAndFileHashCopy.containsValue(path)) {\n uniquePathAndFileHash.put(new File(path), path);\n }\n }\n }\n\n if (uniquePathAndFileHash.size() > 1) {\n\n index++;\n\n\n LinkedHashMap<Integer, LinkedHashMap<File, String>> similarVideo = new LinkedHashMap<>();\n\n similarVideo.put(index, uniquePathAndFileHash);\n\n similarVideoCopy.put(index, uniquePathAndFileHash);\n\n uniquePathAndFileHashCopy.putAll(uniquePathAndFileHash);\n\n\n new Handler(Looper.getMainLooper()).post(() ->\n responseLiveData.setValue(FileRemoverResponse.success(similarVideo)));\n\n }\n }\n\n }",
"protected void resolveProjectDependencies() {\n // Create a set of old and new artifacts.\n final Set<String> oldReferences = new HashSet<String>();\n final Set<String> newReferences = new HashSet<String>();\n for (PropertyInfo pi:properties.values()) {\n if (pi != null) {\n if (pi.getPropertyDescriptor().getPropertyParser() == DefaultPropertyParsers.PATH_PARSER) {\n // Get original artifacts\n final List oldList = (List)pi.getOldValue();\n if ( oldList != null ) {\n final Iterator it = oldList.iterator();\n while (it.hasNext()) oldReferences.add(((VisualClassPathItem)it.next()).getRawText());\n }\n \n // Get artifacts after the edit\n final List newList = (List)pi.getValue();\n if ( newList != null ) {\n final Iterator it = newList.iterator();\n while (it.hasNext()) newReferences.add(((VisualClassPathItem)it.next()).getRawText());\n }\n } else if (pi.getPropertyDescriptor().getPropertyParser() == DefaultPropertyParsers.FILE_REFERENCE_PARSER) {\n oldReferences.add(pi.getOldRawValue());\n newReferences.add(pi.getRawValue());\n }\n }\n }\n \n // Create set of removed artifacts and remove them\n final Set<String> removed = new HashSet<String>( oldReferences );\n removed.removeAll( newReferences );\n final Set<String> added = new HashSet<String>(newReferences);\n added.removeAll(oldReferences);\n \n // 1. first remove all project references. The method will modify\n // project property files, so it must be done separately\n for ( String reference : removed ) {\n if (reference != null && !reference.startsWith(LIBS)) { //NOI18N\n refHelper.destroyReference(reference);\n }\n }\n \n // 2. now read project.properties and modify rest\n final EditableProperties ep = antProjectHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n boolean changed = false;\n \n for( final String reference:removed) {\n if (reference != null && reference.startsWith(LIBS)) { //NOI18N\n // remove helper property pointing to library jar if there is any\n ep.remove(reference.substring(2, reference.length()-1));\n changed = true;\n }\n }\n final File projDir = FileUtil.toFile(antProjectHelper.getProjectDirectory());\n for( String reference:added ) {\n if (reference != null && reference.startsWith(LIBS)) { //NOI18N\n // add property to project.properties pointing to relativized\n // library jar(s) if possible\n reference = reference.substring(2, reference.length()-1);\n final String value = relativizeLibraryClasspath(reference, projDir);\n if (value != null) {\n ep.setProperty(reference, value);\n ep.setComment(reference, new String[]{\n NbBundle.getMessage(J2MEProjectProperties.class, \"DESC_J2MEProps_CommentLine1\", reference), //NOI18N\n NbBundle.getMessage(J2MEProjectProperties.class, \"DESC_J2MEProps_CommentLine2\")}, false); //NOI18N\n changed = true;\n }\n }\n }\n if (changed) {\n antProjectHelper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);\n }\n \n }",
"public void add(SimilarResult<T>... results) {\n if (locked) {\n throw new IllegalStateException(\"SimilarResultList has been locked\");\n }\n Collections.addAll(this.results, results);\n }",
"protected void applyPendingAdds ()\n {\n while (!m_aAddStack.isEmpty ())\n addMonitoredFile (m_aAddStack.pop ());\n }",
"protected void createFileList()\n {\n // get a sorted array of files\n File f = new File(appManagementDir);\n String[] files = f.list(new FileFilter(AppSettings.getFilter()));\n \n // get the adapter for this file list\n ArrayAdapter<String> a = (ArrayAdapter<String>)fileList.getAdapter();\n a.clear();\n \n // clear the check boxes\n fileList.clearChoices();\n \n if (files != null && files.length > 0)\n {\n Arrays.sort(files, 0, files.length, new Comparator<Object>() {\n \n @Override\n public int compare(Object object1, Object object2)\n {\n int comp = 0;\n if (object1 instanceof String \n && object2 instanceof String)\n {\n String str1 = (String)object1;\n String str2 = (String)object2;\n \n comp = str1.compareToIgnoreCase(str2);\n }\n \n return comp;\n }});\n \n \n // add all the files\n for (String fileName : files)\n {\n a.add(fileName);\n }\n \n fileList.invalidate();\n }\n }",
"public ArtifactBasicResults readVersions( Collection<ArtifactBasicMetadata> query )\n throws RepositoryException\n {\n if( query == null || query.size() < 1 )\n return null;\n\n ArtifactBasicResults res = new ArtifactBasicResults( query.size() );\n \n String root = _repo.getServer().getURL().toString();\n \n for( ArtifactBasicMetadata bmd : query )\n {\n ArtifactLocation loc = new ArtifactLocation( root, bmd );\n \n Collection<String> versions = null;\n \n try\n {\n versions = getCachedVersions( loc, bmd );\n \n if( Util.isEmpty( versions ) )\n continue;\n }\n catch( Exception e )\n {\n res.addError( bmd, e );\n continue;\n }\n\n VersionRange versionQuery;\n try\n {\n versionQuery = VersionRangeFactory.create( bmd.getVersion(), _repo.getVersionRangeQualityRange() );\n }\n catch( VersionException e )\n {\n res.addError( bmd, new RepositoryException(e) );\n continue;\n }\n\n Quality vq = new Quality( bmd.getVersion() );\n \n if( vq.equals( Quality.FIXED_RELEASE_QUALITY ) \n || vq.equals( Quality.FIXED_LATEST_QUALITY )\n || vq.equals( Quality.SNAPSHOT_QUALITY )\n )\n {\n try\n {\n loc = calculateLocation( root, bmd, res );\n }\n catch( Exception e )\n {\n res.addError( bmd, e );\n continue;\n }\n \n if( loc == null )\n continue;\n \n ArtifactBasicMetadata vmd = new ArtifactBasicMetadata();\n vmd.setGroupId( bmd.getGroupId() );\n vmd.setArtifactId( bmd.getArtifactId() );\n vmd.setClassifier( bmd.getClassifier() );\n vmd.setType( bmd.getType() );\n vmd.setVersion( loc.getVersion() );\n \n res = ArtifactBasicResults.add( res, bmd, vmd );\n \n continue;\n\n }\n \n for( String version : versions )\n {\n Quality q = new Quality( version );\n\n if( ! _repo.isAcceptedQuality( q ) )\n continue;\n \n if( !versionQuery.includes( version ) )\n continue;\n \n ArtifactBasicMetadata vmd = new ArtifactBasicMetadata();\n vmd.setGroupId( bmd.getGroupId() );\n vmd.setArtifactId( bmd.getArtifactId() );\n vmd.setClassifier( bmd.getClassifier() );\n vmd.setType( bmd.getType() );\n vmd.setVersion( version );\n \n res = ArtifactBasicResults.add( res, bmd, vmd );\n }\n \n }\n \n return res;\n }",
"public List<File> gather(File bundleDir, Set<Data> dataSet, IProgressMonitor monitor) throws IOException {\n List<File> bundleFiles = new ArrayList<File>();\n\n List<IDataGatherer> dataGatherers = DataGathererFactory.getDataGatherers();\n\n SubMonitor progress = SubMonitor.convert(monitor, Messages.DataGatherer_monitor_gather, dataSet.size() + dataGatherers.size() + 1);\n\n // There's a size limit on JIRA attachments, so we split logs, config etc. from the project sources\n Set<Data> set1 = EnumSet.copyOf(dataSet);\n set1.remove(Data.MAVEN_SOURCES);\n Set<Data> set2 = EnumSet.copyOf(dataSet);\n set2.removeAll(set1);\n\n try {\n if(!set2.isEmpty()) {\n File bundleFile = File.createTempFile(\"bundle\", \".zip\", bundleDir); //$NON-NLS-1$ //$NON-NLS-2$\n bundleFiles.add(bundleFile);\n\n gather(bundleFile, set2, Collections.<IDataGatherer> emptyList(), false, progress);\n\n if(bundleFile.length() <= 0) {\n bundleFile.delete();\n bundleFiles.remove(bundleFile);\n }\n }\n\n // primary bundle with the potential status logs is created last\n {\n File bundleFile = File.createTempFile(\"bundle\", \".zip\", bundleDir); //$NON-NLS-1$ //$NON-NLS-2$\n bundleFiles.add(0, bundleFile);\n\n gather(bundleFile, set1, dataGatherers, true, progress);\n }\n } catch(IOException e) {\n for(File bundleFile : bundleFiles) {\n bundleFile.delete();\n }\n throw e;\n }\n\n bundleFiles = encryptBundles(bundleFiles, bundleDir, progress.newChild(1));\n\n progress.done();\n\n return bundleFiles;\n }",
"@Test\n public void testRemoveDuplicates() {\n System.out.println(\"removeDuplicates\");\n ArrayList<String> array = new ArrayList<>(Arrays.asList(\n \"A.example.COM,1.1.1.1,NO,11,Faulty fans\",\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n \"C.EXAMPLE.COM,1.1.1.3,no,12.1,\",\n \"d.example.com,1.1.1.4,yes,14,\",\n \"c.example.com,1.1.1.5,no,12,Case a bit loose\",\n \"e.example.com,1.1.1.6,no,12.3,\",\n \"f.example.com,1.1.1.7,No,12.200,\",\n \"g.example.com,1.1.1.6,no,15.0,Guarded by sharks with lasers on their heads\"\n ));\n ArrayList<String> expResult = new ArrayList<>(Arrays.asList(\n \"A.example.COM,1.1.1.1,NO,11,Faulty fans\",\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n \"d.example.com,1.1.1.4,yes,14,\",\n \"f.example.com,1.1.1.7,No,12.200,\"\n ));\n ArrayList<String> result = BTRouterPatch.removeDuplicates(array);\n assertEquals(expResult, result);\n }",
"@Test\n public void addMultipleNonEmptyTest() {\n Set<String> s = this.createFromArgsTest(\"zero\", \"three\");\n Set<String> sExpected = this.createFromArgsRef(\"zero\", \"one\", \"two\",\n \"three\");\n\n s.add(\"two\");\n s.add(\"one\");\n\n assertEquals(sExpected, s);\n }",
"private void compareSecondPass() {\n final int arraySize = this.oldFileNoMatch.size()\r\n + this.newFileNoMatch.size();\r\n this.compareArray = new SubsetElement[arraySize][2];\r\n final Iterator<String> oldIter = this.oldFileNoMatch.keySet()\r\n .iterator();\r\n int i = 0;\r\n while (oldIter.hasNext()) {\r\n final String key = oldIter.next();\r\n final SubsetElement oldElement = this.oldFileNoMatch.get(key);\r\n SubsetElement newElement = null;\r\n if (this.newFileNoMatch.containsKey(key)) {\r\n newElement = this.newFileNoMatch.get(key);\r\n }\r\n this.compareArray[i][0] = oldElement;\r\n this.compareArray[i][1] = newElement;\r\n i++;\r\n }\r\n // now go through the new elements and check for any that have no match.\r\n // these will be new elements with no corresponding old element\r\n final SubsetElement oldElement = null;\r\n final Iterator<String> newIter = this.newFileNoMatch.keySet()\r\n .iterator();\r\n while (newIter.hasNext()) {\r\n final String key = newIter.next();\r\n if (!this.oldFileNoMatch.containsKey(key)) {\r\n final SubsetElement newElement = this.newFileNoMatch.get(key);\r\n this.compareArray[i][0] = oldElement;\r\n this.compareArray[i][1] = newElement;\r\n i++;\r\n }\r\n\r\n }\r\n\r\n }",
"@SuppressWarnings({\"PMD.EmptyCatchBlock\", \"PMD.CloseResource\", \"PMD.UseTryWithResources\"})\n private void merge(@Nonnull Collection<File> inputFiles, @Nonnull File outputFile) throws IOException, GeneralSecurityException {\n final long startTime = System.nanoTime();\n final List<InputState> inputs = new ArrayList<>(inputFiles.size());\n OutputState output = null;\n boolean success = false;\n try {\n for (File file : inputFiles) {\n InputState input = new InputState(file, adapter);\n inputs.add(input);\n input.next();\n }\n output = new OutputState(outputFile, adapter);\n while (true) {\n InputState minState = null;\n for (InputState input : inputs) {\n if (input.key != null) {\n if (minState == null) {\n minState = input;\n } else {\n int comp = adapter.isSerializedOrderReversed() ?\n ByteArrayUtil.compareUnsigned(input.key, minState.key) :\n ByteArrayUtil.compareUnsigned(minState.key, input.key);\n if (comp > 0) {\n minState = input;\n }\n }\n }\n }\n if (minState == null) {\n break;\n }\n output.next(minState.key, minState.value);\n minState.next();\n }\n output.finish();\n output.close();\n success = true;\n } finally {\n if (output != null) {\n try {\n output.close();\n } catch (IOException ex) {\n // swallow cleanup error\n }\n if (!success) {\n try {\n deleteFile(outputFile);\n } catch (IOException ex) {\n // swallow cleanup error\n }\n }\n }\n for (InputState input : inputs) {\n try {\n input.close();\n if (success) {\n deleteFile(input.file);\n }\n } catch (IOException ex) {\n // swallow cleanup error\n }\n }\n if (timer != null) {\n timer.recordSinceNanoTime(SortEvents.Events.FILE_SORT_MERGE_FILES, startTime);\n }\n }\n }",
"public void setProductCompareList(List pProductCompareList) {\n mProductCompareList = pProductCompareList;\n }",
"public void setExperiments(List<Experiment> experiments)\n {\n this.experiments = experiments;\n }",
"@Test\n\tpublic void testAddList() {\n\t\tarrayList = new ArrayListImplementation<String>();\n\t\tarrayList.addItem(\"1\");\n\t\tarrayList.addItem(\"2\");\n\t\tArrayListImplementation<String> tempArrayList = new ArrayListImplementation<String>();\n\t\ttempArrayList.addItem(\"4\");\n\t\ttempArrayList.addItem(\"5\");\n\t\ttempArrayList.addItem(\"6\");\n\t\tint sizeBeforeListAdded = arrayList.getActualSize();\n\t\tarrayList.addList(tempArrayList);\n\t\tint sizeAfterListAdded = arrayList.getActualSize();\n\t\tassertNotEquals(sizeBeforeListAdded, sizeAfterListAdded);\n\t}",
"public void cbListAddElement() {\n cbWorker.clear();\n cbWorker.add(cbJ);\n cbWorker.add(cbK);\n cbWorker.add(cbM);\n cbWorker.add(cbP);\n cbWorker.add(cbA);\n cbWorker.add(cbS);\n }",
"synchronized Collection getZombieAffected(Bundle [] bundles) {\n // set of affected bundles will be in start-level/bundle-id order \n TreeSet affected = new TreeSet(new Comparator() {\n public int compare(Object o1, Object o2) {\n BundleImpl b1 = (BundleImpl)o1; \n BundleImpl b2 = (BundleImpl)o2;\n int dif = b1.getStartLevel() - b2.getStartLevel();\n if (dif == 0) {\n dif = (int)(b1.getBundleId() - b2.getBundleId());\n }\n return dif;\n }\n public boolean equals(Object o) {\n return ((o != null) && getClass().equals(o.getClass()));\n }\n });\n if (bundles == null) {\n if (Debug.packages) {\n Debug.println(\"getZombieAffected: check - null\");\n }\n for (Iterator i = packages.values().iterator(); i.hasNext();) {\n Pkg p = (Pkg)i.next();\n for (Iterator ps = p.providers.iterator(); ps.hasNext(); ) {\n ExportPkg ep = (ExportPkg)ps.next();\n if (ep.zombie) {\n if (Debug.packages) {\n Debug.println(\"getZombieAffected: found zombie - \" + ep.bpkgs.bundle);\n }\n affected.add(ep.bpkgs.bundle);\n }\n }\n }\n } else {\n for (int i = 0; i < bundles.length; i++) {\n if (bundles[i] != null) {\n if (Debug.packages) {\n Debug.println(\"getZombieAffected: check - \" + bundles[i]);\n }\n BundleImpl tmp = (BundleImpl)bundles[i];\n\n if (tmp.isFragment() &&\n tmp.isAttached() && \n !affected.contains(tmp.getFragmentHost())) {\n affected.add(tmp.getFragmentHost());\n } else {\n affected.add(bundles[i]);\n }\n }\n }\n }\n ArrayList moreBundles = new ArrayList(affected);\n for (int i = 0; i < moreBundles.size(); i++) {\n BundleImpl b = (BundleImpl)moreBundles.get(i);\n for (Iterator j = b.getExports(); j.hasNext(); ) {\n ExportPkg ep = (ExportPkg)j.next();\n if (ep.pkg != null && ep.pkg.providers.contains(ep)) {\n for (Iterator k = ep.getPackageImporters().iterator(); k.hasNext(); ) {\n Bundle ib = (Bundle)k.next();\n if (!affected.contains(ib)) {\n moreBundles.add(ib);\n if (Debug.packages) {\n Debug.println(\"getZombieAffected: added - \" + ib);\n }\n affected.add(ib);\n }\n }\n }\n }\n }\n return affected;\n }",
"public void sortCheckAndRemove(List oldlist, List newlist){\n \n List removenode = new ArrayList();\n List addnode = new ArrayList();\n \n for (int i=0;i < newlist.size() ; i++){\n if (!oldlist.contains((String) newlist.get(i))){\n addnode.add((String) newlist.get(i));\n }\n }\n \n for (int i=0;i < oldlist.size() ; i++){\n \n if (!newlist.contains((String)oldlist.get(i))){\n removenode.add((String)oldlist.get(i));\n }\n }\n for (int k=0; k < removenode.size() ; k++){\n //System.out.println(toremove[k]);\n System.out.println(\"Deleting \"+(String) removenode.get(k));\n removeMaster((String) removenode.get(k));\n }\n \n for (int k=0; k < addnode.size() ; k++){\n //System.out.println(toadd[k]);\n System.out.println(\"adding slave \"+(String)addnode.get(k));\n addMaster((String)addnode.get(k),getQueue());\n }\n \n try {\n FileUtils.copyFile(new File(\"/tmp/newmaster\"), new File(\"/tmp/oldmaster\"));\n } catch (IOException ex) {\n System.out.println(\"Could not copy file\");\n }\n }",
"public static void main(String[] args) {\n\t\tArrayList<String> ar = new ArrayList<String>();\n\t\tar.add(\"One\");\n\t\tar.add(\"Two\");\n\t\tSystem.out.println(\"Size of list ar is \"+ar.size());\n\t\t\n\t\tArrayList<String> ar2 = new ArrayList<String>();\n\t\tar2.add(\"Three\");\n\t\tar2.add(\"Four\");\n\t\t\n\t\tar.addAll(ar2);\n\t\tSystem.out.println(\"After performing addll size of ar is\"+ar.size());\n\t\tSystem.out.println(\"Printing elements of ar\");\n\t\tfor(String s:ar) {\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\t\n\t\tar.removeAll(ar2);\n\t\tSystem.out.println(\"After performing removeall size of ar is\"+ar.size());\n\t\tSystem.out.println(\"Printing elements of ar\");\n\t\tfor(String s:ar) {\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\tar.retainAll(ar2);\n\t\tSystem.out.println(\"After performing retain all size of ar is\"+ar.size());\n\t\tSystem.out.println(\"Printing elements of ar\");\n\t\tfor(String s:ar) {\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\tSystem.out.println(ar2.get(1));\n\t\t\n\t}",
"@Test\n public void testArtifactCache() throws Exception {\n addPeers(ImmutableList.of(\"peer1\", \"peer2\"));\n // Get artifact from first peer\n File peer1ArtifactPath = cache.getArtifact(artifactId.toEntityId(), \"peer1\", remoteClient);\n // Get the artifact again. The same path was returned\n Assert.assertEquals(peer1ArtifactPath, cache.getArtifact(artifactId.toEntityId(), \"peer1\", remoteClient));\n\n // Get artifact from another peer. It should be cached in a different path\n File peer2ArtifactPath = cache.getArtifact(artifactId.toEntityId(), \"peer2\", remoteClient);\n Assert.assertNotEquals(peer1ArtifactPath, peer2ArtifactPath);\n\n // Delete and recreate the artifact to update the last modified date\n artifactRepository.deleteArtifact(artifactId);\n // This sleep is needed to delay the file copy so that the lastModified time on the file is different\n Thread.sleep(1000);\n artifactRepository.addArtifact(artifactId, appJarFile);\n // Artifact should be cached in a different path\n File newPeer1ArtifactPath = cache.getArtifact(artifactId.toEntityId(), \"peer1\", remoteClient);\n Assert.assertNotEquals(peer1ArtifactPath, newPeer1ArtifactPath);\n\n // Run the artifact cleaner\n ArtifactLocalizerCleaner cleaner = new ArtifactLocalizerCleaner(Paths.get(cacheDir).resolve(\"peers\"), 1);\n cleaner.run();\n // Older artifact should been deleted\n Assert.assertFalse(peer1ArtifactPath.exists());\n // Latest artifact should still be cached\n Assert.assertTrue(newPeer1ArtifactPath.exists());\n }",
"static void m11180a(List<Component<?>> list) {\n Set<C3246b> c = m11182c(list);\n Set<C3246b> b = m11181b(c);\n int i = 0;\n while (!b.isEmpty()) {\n C3246b next = b.iterator().next();\n b.remove(next);\n i++;\n for (C3246b next2 : next.mo20820d()) {\n next2.mo20823g(next);\n if (next2.mo20822f()) {\n b.add(next2);\n }\n }\n }\n if (i != list.size()) {\n ArrayList arrayList = new ArrayList();\n for (C3246b next3 : c) {\n if (!next3.mo20822f() && !next3.mo20821e()) {\n arrayList.add(next3.mo20819c());\n }\n }\n throw new DependencyCycleException(arrayList);\n }\n }",
"private List<File> checkAndRemoveMatchingFiles(AbstractSchemaElement schemaElement) {\n\t\tSchemaFileMatcher fileMatcher = new SchemaFileMatcher(schemaElement);\n\t\tList<File> matchedFiles = new ArrayList<File>();\n\t\tboolean change = true;\n\t\twhile (change) {\n\t\t\tchange = false;\n\t\t\tfor (int i = 0; i < files.size(); i++) {\n\t\t\t\tFile file = files.get(i);\n\t\t\t\tString filename = file.getName();\n\t\t\t\tif (fileMatcher.matches(filename)) {\n\t\t\t\t\tfiles.remove(i);\n\t\t\t\t\tmatchedFiles.add(file);\n\t\t\t\t\tString schema = schemaElement.getSchema();\n\t\t\t\t\tif (schema != null && checkTrees) {\n\t\t\t\t\t\tLOG.trace(\"*******following: \"+schema);\n\t\t\t\t\t\tContainerCheck schemaCheck = new ContainerCheck(schema);\n\t\t\t\t\t\tschemaCheck.setCheckTrees(checkTrees);\n\t\t\t\t\t\tschemaCheck.checkProject(new SimpleContainer(file));\n//\t\t\t\t\t\tcheckUnmatchedFiles();\n\t\t\t\t\t\tLOG.trace(\"*******end: \"+schema);\n\t\t\t\t\t}\n\t\t\t\t\tchange = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn matchedFiles;\n\t}",
"public static ArrayList<String> joinArrayLists(ArrayList<String> EqList, ArrayList<String> sshList){\n\n\t\t\t\n\t\t\tArrayList<Integer> counteq = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> countssh = new ArrayList<Integer>();\n\t\t\t\n\t\t\tList<String> split1 = new ArrayList<String>();\n\t\t\tList<String> split2 = new ArrayList<String>();\n\t\t\t\n\t\t\tArrayList<String> combine = new ArrayList<String>();\n\t\t\t\n\t\t\t//Checks how many object exist in arrayList and addes their index to a new list\n\t\t\tfor(int i = 0;i<EqList.size();i++){\n\t\t\t\tif(EqList.get(i) == \"Object\"){\n\t\t\t\t\tcounteq.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j = 0;j<sshList.size();j++){\n\t\t\t\tif(sshList.get(j) == \"Object\"){\n\t\t\t\t\tcountssh.add(j);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//The size of the matrices must be equal. If it is 1, removes the ID and object index from the second matrix and addes it to the first arrayList\n\t\t\tif(counteq.size() == countssh.size()){\n\t\t\t\tif(counteq.size() == 1){\n\t\t\t\t\tif(EqList.get(1).equals(sshList.get(1))){\n\t\t\t\t\t\tEqList.remove(0);\n\t\t\t\t\t\tsshList.remove(0);\n\t\t\t\t\t\tsshList.remove(0);\n\t\t\t\t\t\tcombine.addAll(EqList);\n\t\t\t\t\t\tcombine.addAll(sshList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//Based on the IDs of both lists, it splits both lists on the specified index and addes the two parts to the new combined matrix\n\t\t\t\t\t//The indexes are taken from the specified matrices counteq and countssh\n\t\t\t\t\tcounteq.add(EqList.size());\n\t\t\t\t\tcountssh.add(sshList.size());\n\t\t\t\t\tfor(int i = 0;i<counteq.size()-1;i++){\n\t\t\t\t\t\tfor(int j = 0;j<countssh.size()-1;j++){\n\t\t\t\t\t\t\tif(EqList.get(counteq.get(i)+1).equals(sshList.get(countssh.get(j)+1))){\n\n\t\t\t\t\t\t\t\t\tsplit1 = EqList.subList(counteq.get(i),counteq.get(i+1));\n\t\t\t\t\t\t\t\t\tsplit2 = sshList.subList(countssh.get(j)+2,countssh.get(j+1));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcombine.addAll(split1);\n\t\t\t\t\t\t\t\t\tcombine.addAll(split2);\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\t\t\telse\n\t\t\t\tSystem.out.println(\"Error! Arraylists size not the same. Please check the data\");\n\t\t\t\n\t\t\t//If any remaining object indexes are left, remove them\n\t\t\tfor(int i = 0;i<combine.size();i++){\n\t\t\t\tif(combine.get(i) == \"Object\"){\n\t\t\t\t\tcombine.remove(i);\n\t\t\t\t\ti=0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn combine;\n\t\t}",
"protected void ignoreDuplicatedAddRemoveItemRequests()\n \t{\n \t\tif (this.getItems() != null)\n \t\t{\n \t\t\tfinal List<T> removeChildren = new ArrayList<T>();\n \t\t\n \t\t\t/* on the second loop, remove any items that are marked for both add and remove is separate items */\n \t\t\tfor (int i = 0; i < this.getItems().size(); ++i)\n \t\t\t{\n \t\t\t\tfinal T child1 = this.getItems().get(i);\n \t\t\t\t\n \t\t\t\t/* at this point we know that either add1 or remove1 will be true, but not both */\n \t\t\t\tfinal boolean add1 = child1.getAddItem();\n \t\t\t\tfinal boolean remove1 = child1.getRemoveItem();\n \t\t\t\t\n \t\t\t\t/* Loop a second time, looking for duplicates */\n \t\t\t\tfor (int j = i + 1; j < this.getItems().size(); ++j)\n \t\t\t\t{\n \t\t\t\t\tfinal T child2 = this.getItems().get(j);\n \t\t\t\t\t\n \t\t\t\t\tif (child1.getId().equals(child2.getId()))\n \t\t\t\t\t{\n \t\t\t\t\t\tfinal boolean add2 = child2.getAddItem();\n \t\t\t\t\t\tfinal boolean remove2 = child2.getRemoveItem();\n \t\t\t\t\t\t\n \t\t\t\t\t\t/* check for double add, double remove, add and remove, remove and add */\n \t\t\t\t\t\tif ((add1 && add2) || (remove1 && remove2) || (add1 && remove2) || (remove1 && add2))\t\t\t\t\t\t\n \t\t\t\t\t\t\tif (!removeChildren.contains(child1))\n \t\t\t\t\t\t\t\tremoveChildren.add(child1);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n\t\t\t\n\t\t\tfor (final T removeChild : removeChildren)\n\t\t\t\tthis.getItems().remove(removeChild);\n \t\t}\n \t}",
"@Test\n public void testAddAll_int_Collection_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n List expResult = Arrays.asList(3, 1, 2, 3, 2);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }",
"public void addAllToFront(List<UnitOfWork> workUnits) {\n synchronized (addedFrontWork) {\n addedFrontWork.addAll(0, workUnits);\n }\n }",
"@Test\n public void testDiff() throws Exception {\n String newVersionJarPath = \"data/sample/jar/change4.jar\";\n String oldVersionJarPath = \"data/sample/jar/change3.jar\";\n String changePath = \"data/sample/changes_change4_change3.txt\";\n\n// RelationInfo relationInfoForChangedPart = new RelationInfo(newVersionCodePath, oldVersionCodePath, changePath, false);\n// RelationInfo relationInfoForChangedPart = new RelationInfo(newVersionJarPath, oldVersionJarPath, changePath, false);\n// CallRelationGraph callGraphForChangedPart = new CallRelationGraph(relationInfoForChangedPart);\n//\n// double thresholdForInitialRegion = 0.35;\n// RelationInfo oldRelationInfo = new RelationInfo(newVersionJarPath,false);\n// oldRelationInfo.setPruning(thresholdForInitialRegion);\n// RelationInfo newRelationInfo = new RelationInfo(oldVersionJarPath,false);\n// newRelationInfo.setPruning(thresholdForInitialRegion);\n//\n// CallRelationGraph oldCallGraph = new CallRelationGraph(oldRelationInfo);\n// CallRelationGraph newCallGraph = new CallRelationGraph(newRelationInfo);\n//\n// ChangedArtifacts changedArtifacts = new ChangedArtifacts();\n// changedArtifacts.parse(changePath);\n//\n// InitialRegionFetcher fetcher = new InitialRegionFetcher(changedArtifacts, newCallGraph, oldCallGraph);\n//\n// ExportInitialRegion exporter = new ExportInitialRegion(fetcher.getChangeRegion());\n\n }",
"public void compareFiles() {\n\t \n\t\tprepareLinesFile(fileName1, linesFile1);\n\t\tprepareLinesFile(fileName2, linesFile2);\n\t\t\n\t\t//If both files have the same number of lines then we compare each line\n\t if (linesFile1.size() == linesFile2.size()) {\n\t \t \tfor (int i = 0; i < linesFile1.size(); i++) {\n\t \t\tcompareLines(i);\t\t\t\t\n\t\t\t}\n\t }\n\t \n\t //Otherwise\n\t else {\n\t \t//We distinguish the files by their number of lines\n\t \tfinal ArrayList<String> linesLongerFile;\n\t \tfinal ArrayList<String> linesShorterFile;\n\t \t\n\t \t\n\t \tif (linesFile1.size() > linesFile2.size()) {\n\t \t\tlinesLongerFile = linesFile1;\n\t \t\tlinesShorterFile = linesFile2;\n\t \t}\n\t \t\n\t \telse {\n\t \t\tlinesLongerFile = linesFile2;\n\t \t\tlinesShorterFile = linesFile1;\n\t \t}\n\t \t\n\t \tint counter = 0;\n\t \t//We compare each line a number of times equals to the number of the shortest file lines\n\t \tfor (int i = 0; i < linesShorterFile.size(); i++) {\n\t \t\tcompareLines(i);\n\t \t\tcounter = i;\n\t \t}\n\t \t\n\t \t//We show the remaining lines to add into the first file\n\t \tfor (int i = counter+1; i < linesLongerFile.size(); i++) {\n\t \t\t\n\t \t\t//If the second file is the longest then we show the remaining lines to add into the first file\n\t \t\tif (linesLongerFile.size() == linesFile2.size()) {\n\t \t\t\tSystem.out.println(\"+ \"+linesLongerFile.get(i));\n\t \t\t}\n\t \t\t\n\t \t\t//If the first file is the longest then we show the remaining lines to delete \n\t \t\telse {\n\t \t\t\tSystem.out.println(\"- \"+linesLongerFile.get(i));\n\t \t\t}\n\t \t\t\n\t \t}\n\t }\t\t\n\t}",
"private void armarListaCheck() {\n listaCheck = new ArrayList();\n listaCheck.add(chkBici);\n listaCheck.add(chkMoto);\n listaCheck.add(chkAuto);\n }",
"@Test\n\tpublic void testMultipleAddConsistency() {\n\n\t\tcontroller.addNewNodes(2);\n\t\tSignalNode first = controller.getNodesToTest().getFirst();\n\t\tSignalNode last = controller.getNodesToTest().getLast();\n\n\t\tcontroller.addSignalsToNode(first, 10000);\n\n\t\ttry {\n\t\t\tSignal sig = src.next();\n\t\t\tResult r1 = first.findSimilarTo(sig);\n\t\t\tResult r2 = last.findSimilarTo(sig);\n\t\t\tAssert.assertEquals(r1, r2);\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Test\n public void testAddAll_int_Collection_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n List expResult = Arrays.asList(3, 1, 2, 3, 2, 3, 2, 3, 2);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }",
"protected List getDependenciesIncludeList()\n throws MojoExecutionException\n {\n List includes = new ArrayList();\n\n for ( Iterator i = getDependencies().iterator(); i.hasNext(); )\n {\n Artifact a = (Artifact) i.next();\n\n if ( project.getGroupId().equals( a.getGroupId() ) && project.getArtifactId().equals( a.getArtifactId() ))\n {\n continue;\n }\n\n includes.add( a.getGroupId() + \":\" + a.getArtifactId() );\n }\n\n return includes;\n }",
"private void checkList(rgb aver){\n for(rgb colour : colours){\n try {\n if (aver.getDec() == colour.getDec()) {\n try {\n\n colour.anotherFew(aver.getAmount());\n } catch (Exception e) {\n System.out.println(\"Error in the adding of amounts\");\n System.exit(0);\n }\n return;\n }\n }catch (NullPointerException e){System.out.println(\"Error in the decimals\"); System.exit(0);}\n }\n colours.add(aver);\n }",
"public ArrayList<Comparison> distribute (ArrayList<String> release) {\n\t\t\n\t\tfor (int i=0 ; i<release.size()-1 ; i++) {\n\t\t\t Comparison c = new Comparison(release.get(i),release.get(i+1));\n\t\t\t\tcomparison.add(c);\n\t\t}\n\t\t\n\t\treturn comparison;\n\t}",
"@Override\n\tpublic Video concat(List<Video> videos) {\n\t\treturn null;\n\t}",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}",
"@Override\n public void put(Collection<? extends ArtifactUpload> artifactUploads, Collection<? extends MetadataUpload> metadataUploads)\n {\n defaultRepositoryConnector.put(artifactUploads, metadataUploads);\n }",
"public void fill(ArrayList<Package> warehousePackages) {\n\n int range = 0;\n int counter = 0;\n boolean isTrue = true;\n int size = warehousePackages.size();\n int[] change = new int[size];\n for (int i = 0; i < size; i++) {\n change[i] = Math.abs(warehousePackages.get(i).getDestination().getZipCode() - getZipDest());\n }\n Arrays.sort(change);\n while (isTrue) {\n for (int i = 0; i < warehousePackages.size(); i++) {\n if (range > 99999){\n isTrue = false;\n break;\n } else if (isFull() || size == counter) {\n isTrue = false;\n break;\n } else {\n int difference = Math.abs(warehousePackages.get(i).getDestination().getZipCode() - getZipDest());\n if (Math.abs(difference) <= range) {\n if (!getPackages().contains(warehousePackages.get(i))) {\n counter++;\n if (addPackage(warehousePackages.get(i))) {\n System.out.println(warehousePackages.get(i).getID() + \" has been added.\");\n maxRange = difference;\n } else {\n isTrue = false;\n break;\n }\n }\n }\n }\n\n }\n range += 10;\n\n }\n for (Package p : getPackages()) {\n Warehouse.pkgs.remove(p);\n }\n }",
"public Vector checkAllIdReferences()\n {\n Vector resultVector = new Vector();\n String msgText = \"\";\n String idrefValue = \"\";\n boolean iItemdrefResult = false;\n\n if ( !mItemIdrefs.isEmpty() )\n {\n int mItemIdrefsSize = mItemIdrefs.size();\n for ( int i = 0; i < mItemIdrefsSize; i++ )\n {\n idrefValue = (String)mItemIdrefs.elementAt(i);\n\n if ( !idrefValue.equals(\"\") ) \n {\n msgText = Messages.getString(\"ManifestMap.40\", idrefValue ); \n LOGGER.info( \"INFO: \" + msgText ); \n DetailedLogMessageCollection.getInstance().addMessage( \n new LogMessage( MessageType.INFO, msgText ) );\n\n iItemdrefResult = checkIdReference( idrefValue );\n\n // track all idref values whose reference was not valid\n\n if ( !iItemdrefResult )\n {\n msgText = Messages.getString(\"ManifestMap.43\", idrefValue ); \n LOGGER.info( \"FAILED: \" + msgText ); \n DetailedLogMessageCollection.getInstance().addMessage( new LogMessage(\n MessageType.FAILED, msgText ) );\n\n resultVector.add( idrefValue );\n }\n }\n }\n }\n\n if ( !mDependencyIdrefs.isEmpty() )\n {\n int mDependencyIdrefsSize = mDependencyIdrefs.size();\n for ( int i = 0; i < mDependencyIdrefsSize; i++ )\n {\n idrefValue = (String)mDependencyIdrefs.elementAt(i);\n\n if ( !idrefValue.equals(\"\") ) \n {\n msgText = Messages.getString(\"ManifestMap.40\", idrefValue ); \n LOGGER.info( \"INFO: \" + msgText ); \n DetailedLogMessageCollection.getInstance().addMessage( new LogMessage( MessageType.INFO,\n msgText ) );\n \n boolean iDependencydrefResult = checkIdReference( idrefValue );\n\n // track all idref values whose reference was not valid\n\n if ( !iDependencydrefResult )\n {\n msgText = Messages.getString(\"ManifestMap.43\", idrefValue ); \n LOGGER.info( \"FAILED: \" + msgText ); \n DetailedLogMessageCollection.getInstance().addMessage( new LogMessage(\n MessageType.FAILED, msgText ) );\n\n resultVector.add( idrefValue );\n }\n }\n }\n }\n\n return resultVector;\n }",
"@Test\n public void testAddAll_Collection_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }",
"private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }",
"private void linkComponents(List<Set<Factor>> components,\n Set<Factor> factors) {\n // The first component should be the biggest one. All other factors\n // should be linked to the first components randomly\n Set<Factor> first = components.get(0);\n for (int i = 1; i < components.size(); i++) {\n Set<Factor> second = components.get(i);\n Variable var1 = pickUpVar(first);\n Variable var2 = pickUpVar(second);\n Factor factor = createEqualFactor(var1, var2);\n factors.add(factor);\n }\n }",
"@Test\n public void testConcat() {\n// System.out.println(\"---concat---\");\n// //Test1: concatenating two empty lists returns an empty list\n// ADTList instance = ADTList.create();\n// ADTList list = ADTList.create();\n// ADTList expResult = ADTList.create();\n// ADTList result = instance.concat(list);\n// assertEquals(expResult, result);\n// System.out.println(\"Test1 OK\");\n// \n// //Test2.1: concatenating an empty list with a non-empty list returns the non-empty list\n// ADTList instance2 = ADTList.create();\n// ADTList list2 = createTestADTListIns(6);\n// ADTList expResult2 = list2;\n// ADTList result2 = instance2.concat(list2);\n// assertEquals(expResult2, result2);\n// System.out.println(\"Test2.1 OK\");\n// \n// //Test2.2: concatenating a non-empty list with an empty list returns the non-empty list\n// ADTList instance3 = createTestADTListIns(6);\n// ADTList list3 = ADTList.create();\n// ADTList expResult3 = instance3;\n// ADTList result3 = instance3.concat(list3);\n// assertEquals(expResult3, result3);\n// System.out.println(\"Test2.2 OK\");\n// \n// //Test3: concatenating two non-empty lists returns a new list in the form [list1 list2].\n// ADTList instance4 = createTestADTList(1,1,2,2,3,3);\n// ADTList list4 = createTestADTList(4,1,5,2,6,3);\n// ADTList expResult4 = createTestADTListIns(6);\n// ADTList result4 = instance4.concat(list4);\n// assertEquals(expResult4, result4);\n// System.out.println(\"Test3 OK\");\n \n }",
"public ImmutableList<Artifact.DerivedArtifact> getTestStatusArtifacts() {\n return testStatusArtifacts;\n }",
"public abstract NestedSet<Artifact> getTransitiveJackLibrariesToLink();",
"@Override\n public void combineSim(ArrayList<Note> list) {\n }",
"public static void compare(Set<Long> recipeIdList) {\r\n\t\tHistory.newItem(SCREEN_NAME + \"&\" + PARAMETER_ID_LIST + \"=\" + Kuharija.listJoiner.join(recipeIdList));\r\n\t}",
"@Test\n public void equalsDifferentDamageList(){\n\n InputStream url1= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\");\n InputStream url1g= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1g.json\");\n\n Backup backup_a = Backup.initFromFile(url1);\n Backup backup_b = Backup.initFromFile(url1g);\n\n assertNotEquals(backup_a, backup_b);\n }",
"public void testAddAll2() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n Integer[] ints = new Integer[1];\n q.addAll(Arrays.asList(ints));\n shouldThrow();\n }\n catch (NullPointerException success) {}\n }",
"public void moleculesDownloadRequired() {\n swapPanel.removeFromParent();\n downloads.initialise(result);\n swapPanel = downloads;\n\n add(swapPanel);\n buttonBar.clear();\n buttonBar.add(moleculeBtn);\n }",
"private void update_auxlist(ArrayList<Line> auxlist, Line workingSet) {\n\t\tLine new_working_set = new Line(workingSet);\n\n\t\t// Add the working set copy to the set of maximal lines\n\t\tauxlist.add(new_working_set);\n\t}",
"@Test\n public void testItem_Ordering() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 2, 6, 8);\n baseList.addAll(expResult);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), baseList.get(i));\n }\n }",
"public static void main(String[] args) {\n\t\tArrayList<Integer> arr = new ArrayList();\n\t\tarr.add(34);\n\t\tarr.add(89);\n\t\t\n\t\tArrayList<Integer> brr = new ArrayList();\n\t\t\n\t\tbrr.add(100);\n\t\tbrr.add(101);\n\t\t\n\t\tarr.addAll(brr);\n\t\tSystem.out.println(arr);\n\t\tarr.remove(2);\n\t\tSystem.out.println(arr);\n\n\t}",
"@Test\r\n\tpublic void testAddChromebook() {\n\t\tassertNotNull(\"Test if there is valid Chromebook arraylist to add to\", chromebookList);\r\n\r\n\t\t// No.2 - size 1\r\n\t\tResourceCentre.addChromebook(chromebookList, cb1);\r\n\t\tassertEquals(\"Test if that Chromebook arraylist size is 1?\", 1, chromebookList.size());\r\n\r\n\t\t// No.2 - same item added, size 1\r\n\t\tassertSame(\"Test that Chromebook is added same as 1st item of the list?\", cb1, chromebookList.get(0));\r\n\r\n\t\t// No.3 - size 2\r\n\t\tResourceCentre.addChromebook(chromebookList, cb2);\r\n\t\tassertEquals(\"Test that Chromebook arraylist size is 2?\", 2, chromebookList.size());\r\n\r\n\t\t// No.3 - same item added, size 2\r\n\t\tassertSame(\"Test that Chromebook is added same as 2nd item of the list?\", cb2, chromebookList.get(1));\r\n\t\t\n\t}"
]
| [
"0.5271633",
"0.51681507",
"0.5118993",
"0.5082475",
"0.50357825",
"0.49532026",
"0.49117506",
"0.48814127",
"0.48724326",
"0.48556927",
"0.48493692",
"0.4811096",
"0.47776958",
"0.47726998",
"0.4749672",
"0.47318533",
"0.4702475",
"0.4702181",
"0.46982172",
"0.46654725",
"0.46588737",
"0.46571934",
"0.46536008",
"0.46514308",
"0.46478808",
"0.4644084",
"0.4639112",
"0.46350172",
"0.4634083",
"0.46144974",
"0.46105283",
"0.460799",
"0.4605675",
"0.46022767",
"0.45960093",
"0.45829612",
"0.4578624",
"0.4576382",
"0.45714563",
"0.45595697",
"0.4557572",
"0.45562786",
"0.45536",
"0.45466867",
"0.4542806",
"0.45416337",
"0.45355162",
"0.4515089",
"0.45092255",
"0.45059785",
"0.450387",
"0.4499164",
"0.44974586",
"0.44960815",
"0.44919327",
"0.44827652",
"0.44694197",
"0.44663844",
"0.4466279",
"0.44614688",
"0.44596994",
"0.4457555",
"0.4447288",
"0.44464096",
"0.44441155",
"0.44395956",
"0.4431988",
"0.4430068",
"0.44202825",
"0.44184673",
"0.44171247",
"0.4415125",
"0.44148812",
"0.4411881",
"0.4409533",
"0.44083932",
"0.4406634",
"0.44051024",
"0.4404087",
"0.44031897",
"0.44021004",
"0.4400992",
"0.43983823",
"0.43939093",
"0.43896624",
"0.4385829",
"0.4381193",
"0.43782753",
"0.43768394",
"0.4375651",
"0.437487",
"0.4368687",
"0.4363975",
"0.43636012",
"0.43616626",
"0.4361153",
"0.4358048",
"0.4357074",
"0.43568015",
"0.43551"
]
| 0.56919944 | 0 |
Connects to Nuxeo to receive and parse the main document. Uses a docx parser to find chapters. | public MinedMainDocument parseMainArtifact() {
try {
InputStream is = this.getNuxeoInstance().getDocumentInputStream(mainArtefact.getId());
String title = this.getNuxeoInstance().getLastDocTitle();
if(title==null) title = "Main Document";
DocxParser docx = new DocxParser(is);
docx.parseDocxAndChapters();
MinedMainDocument mainDoc = new MinedMainDocument(title, docx.getFullText());
mainDoc.addChapters(docx.getChapterHeadlines(), docx.getChapterTexts());
is.close();
return mainDoc;
} catch (Exception e) {
e.printStackTrace();
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n protected void parseDocuments()\r\n {\n\r\n }",
"public void parse(){\n\n Integer childStart = this.findNewElement(0, this.document.length - 1);\n if(childStart == null){\n return;\n }\n\n this.root.removeData();\n this.copyTextToDocumentTree(this.root, 0, childStart - 1);\n\n DocumentSectionType childType = this.getType(childStart);\n\n do {\n Integer end = this.findNextSameLevelElement(childStart + 1, childType);\n //now we have boundaries of our new element, so let's grab it's index\n //we need appropriate matcher\n\n Matcher childMatcher = childType.getPattern().matcher(this.document[childStart]);\n childMatcher.find();\n DocumentTree child = new DocumentTree(childType, childMatcher.group(1), null);\n\n //now clear first line\n try{\n String group2 = childMatcher.group(2);\n this.document[childStart] = group2 != null ? group2 + \" \" : \"\";\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] = \"\";\n }\n try {\n this.document[childStart] += childMatcher.group(3);\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] += \"\";\n }\n //and copy it's text\n this.copyTextToDocumentTree(child, childStart, end - 1);\n root.addChild(child);\n //finally, parse it\n DocumentParser childParser = new DocumentParser(child, joinChapterWithChapterNames);\n childParser.parse();\n\n childStart = end;\n }while(childStart != this.document.length);\n\n if(this.root.getType() == DocumentSectionType.CHAPTER && this.joinChapterWithChapterNames){\n DocumentTree nameNode = (DocumentTree)this.root.getChildren().get(0);\n this.root.removeData();\n this.root.appendData(nameNode.getIndex());\n this.root.replaceChild(nameNode, nameNode.getChildren());\n }\n\n }",
"public abstract void parseChapter(XMLObject xml, Chapter chapter);",
"@Test\n\tpublic void probandoConParser() {\n\t\tString dBoxUrl = \"/home/julio/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_4_text_mining/material/tp3/\";\n\t\tString modelUrl = dBoxUrl + \"NER/models/es-ner-person.bin\";\n\t\tString filesUrl = dBoxUrl + \"NER/archivoPrueba\";\n\t\tString sampleFile = filesUrl + \"/viernes-23-05-14-alan-fitzpatrick-gala-cordoba.html\";\n\t\tList<String> docs = getMyDocsFromSomewhere(filesUrl);\n\n\t\ttry {\n\t\t\t// detecting the file type\n\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tFileInputStream inputstream = new FileInputStream(new File(sampleFile));\n\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t// Html parser\n\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\tSystem.out.println(\"Contents of the document:\" + handler.toString());\n\t\t\tSystem.out.println(\"Metadata of the document:\");\n\t\t\tString[] metadataNames = metadata.names();\n\n\t\t\tfor (String name : metadataNames) {\n\t\t\t\tSystem.out.println(name + \": \" + metadata.get(name));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\n\t}",
"public Document readDocument();",
"public static void main(String args[]) {\n\t\tNuxeoClient client = new NuxeoClient.Builder().url(\"http://localhost:8080/parliament\")\n\t\t// NuxeoClient client = new NuxeoClient.Builder().url(\"http://tourismministry.phoenixsolutions.com.np:8888/parliament\")\n\t\t\t\t.authentication(\"Administrator\", \"Administrator\").schemas(\"*\") // fetch all document schemas\n\t\t\t\t.connect();\n\t\tRepository repository = client.repository();\n\n//Menu\n\t//create\n\t\tDocument file = Document.createWithName(\"One\", \"Band\");\n\t\tDocument menu = Document.createWithName(\"menu\", \"Folder\");\n\t\t// menu.setPropertyValue(\"band:abbr\", \"ELF\");\n\t\trepository.createDocumentByPath(\"/\", menu);\n\t\tDocument report = Document.createWithName(\"report-list\", \"Report-List\");\n\t\trepository.createDocumentByPath(\"/menu\", report);\n\t\tDocument event = Document.createWithName(\"event-list\", \"Event-List\");\n\t\trepository.createDocumentByPath(\"/menu\", event);\n\t\tDocument meeting = Document.createWithName(\"meeting-list\", \"Meeting-List\");\n\t\trepository.createDocumentByPath(\"/menu\", meeting);\n\t\tDocument ics = Document.createWithName(\"integrated-central-status-list\", \"Integrated-Central-Status-List\");\n\t\trepository.createDocumentByPath(\"/menu\", ics);\n\n\n\t\tUserManager userManager = client.userManager();\n\n\t\tcreateUsers(userManager,\"operator\",\"Operator\",\"operator\");\n\t\tcreateUsers(userManager,\"secretary\",\"Secretary\",\"secretary\");\n\t\tcreateUsers(userManager,\"depsecretary\",\"DepSecretary\",\"depsecretary\");\n\t\tcreateUsers(userManager,\"education\",\"Education\",\"education\");\n\t\tcreateUsers(userManager,\"health\",\"Health\",\"health\");\n\t\tcreateUsers(userManager,\"tourism\",\"Tourism\",\"tourism\");\n\n\t\tString[] memberUsersSecretariat = {\"operator\",\"secretary\",\"depsecretary\"};\n\t\tString[] memberUsersBeruju = {\"education\",\"health\",\"tourism\"};\n\t\tcreateGroup(userManager,\"secretariat\",\"Secretariat\",memberUsersSecretariat);\n\t\tcreateGroup(userManager,\"beruju\",\"Beruju\",memberUsersBeruju);\n\t\n//fetching\n\n\t\t// Document myfile = repository.fetchDocumentByPath(\"/default-domain/workspaces/Bikings/Liferay/One\");\n\t\t// String title = myfile.getPropertyValue(\"band:band_name\"); // equals to folder\n\t\t// System.out.println(title);\n\n\n// file upload\n\n\t\t// Document domain = client.repository().fetchDocumentByPath(\"/default-domain\");\n\n\t\t// Let's first retrieve batch upload manager to handle our batch:\n\t\t// BatchUploadManager batchUploadManager = client.batchUploadManager();\n\n\t\t// // // getting local file\n\t\t// ClassLoader classLoader = new NuxeoConnect().getClass().getClassLoader();\n\t\t// File file = new File(classLoader.getResource(\"dipesh.jpg\").getFile());\n\n\t\t// // // create a new batch\n\t\t// BatchUpload batchUpload = batchUploadManager.createBatch();\n\t\t// Blob fileBlob = new FileBlob(file);\n\t\t// batchUpload = batchUpload.upload(\"0\", fileBlob);\n\n\t\t// // // attach the blob\n\t\t\n\t\t// Document doc = client.repository().fetchDocumentByPath(\"/default-domain/workspaces/Phoenix/DipeshCollection/dipeshFile\");\n\t\t// doc.setPropertyValue(\"file:content\", batchUpload.getBatchBlob());\n\t\t// doc = doc.updateDocument();\n\t\t// // get\n\t\t// Map pic = doc.getPropertyValue(\"file:content\");\n\t\t// System.out.print(pic);\n\t}",
"@Override\n\tpublic void startDocument() {\n\t\t\n\t}",
"public abstract WalkerDocument newDocument(IOptions options);",
"private static Nodes downloadXMLDocument(\n URL source, String xpointer, Builder builder, ArrayList baseURLs,\n String accept, String acceptLanguage, String parentLanguage) \n throws IOException, ParsingException, XIncludeException, \n XPointerSyntaxException, XPointerResourceException {\n\n String base = source.toExternalForm();\n if (xpointer == null && baseURLs.indexOf(base) != -1) {\n throw new InclusionLoopException(\n \"Tried to include the already included document \" + base +\n \" from \" + baseURLs.get(baseURLs.size()-1), (String) baseURLs.get(baseURLs.size()-1));\n } \n \n URLConnection uc = source.openConnection();\n setHeaders(uc, accept, acceptLanguage);\n InputStream in = new BufferedInputStream(uc.getInputStream());\n Document doc;\n try {\n doc = builder.build(in, source.toExternalForm());\n }\n finally {\n in.close();\n }\n \n resolveInPlace(doc, builder, baseURLs); \n Nodes included;\n if (xpointer != null && xpointer.length() != 0) {\n included = XPointer.query(doc, xpointer); \n // fill in lang attributes here\n for (int i = 0; i < included.size(); i++) {\n Node node = included.get(i);\n // Current implementation can only select elements\n Element top = (Element) node;\n Attribute lang = top.getAttribute(\"lang\", \n \"http://www.w3.org/XML/1998/namespace\");\n if (lang == null) {\n String childLanguage = getXMLLangValue(top);\n if (!parentLanguage.equals(childLanguage)) {\n top.addAttribute(new Attribute(\"xml:lang\", \n \"http://www.w3.org/XML/1998/namespace\", \n childLanguage));\n }\n }\n }\n }\n else {\n included = new Nodes();\n for (int i = 0; i < doc.getChildCount(); i++) {\n Node child = doc.getChild(i);\n if (!(child instanceof DocType)) {\n included.append(child);\n } \n }\n }\n // so we can detach the old root if necessary\n doc.setRootElement(new Element(\"f\")); \n for (int i = 0; i < included.size(); i++) {\n Node node = included.get(i);\n // Take account of xml:base attribute, which we normally \n // don't do when detaching\n String noFragment = node.getBaseURI();\n if (noFragment.indexOf('#') >= 0) {\n noFragment = noFragment.substring(0, noFragment.indexOf('#'));\n }\n node.detach();\n if (node instanceof Element) {\n ((Element) node).setBaseURI(noFragment);\n }\n } \n \n return included;\n \n }",
"public abstract WalkerDocument newDocument(DocumentTag adapter, IOptions options);",
"public Document setUpDocumentToParse() throws ParserConfigurationException, SAXException, IOException{\n\t\tFile file = new File (dataFilePath);\n\t\tDocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tDocument document = documentBuilder.parse(file);\n\n\t\treturn document;\n\t}",
"@Override\npublic\tvoid parseInput() {\n InputStream is = new ByteArrayInputStream(this.body.toString().getBytes());\n\t\t\n\t\t\n\t\ttry {\n\t\t\tthis.domIn = new XMLInputConversion(is);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.rootXML = this.domIn.extractDOMContent();\n\t}",
"public OpenOfficeXMLDocumentParser() {\r\n }",
"@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档开始----\");\n\t}",
"public Object parseChannel(int rssType, Document doc) throws Exception;",
"public void startDocument ()\n\t\t{\n\t\t\t//System.out.println(\"Start document\");\n\t\t}",
"@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"开始解析文档\");\n\t}",
"public void buildDocument() {\n/* 220 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 222 */ syncAccessMethods();\n/* */ }",
"public void addReceivedInternalDocument(AddReceivedInternalDocumentCommand aCommand);",
"public XWPFDocument startConversion() {\n\n convertParagraphs(docx);\n convertFooter(docx);\n convertHeader(docx);\n convertTables(docx);\n updateStylesToNewFont();\n\n\n return docx;\n }",
"public void read() {\n\t\tSystem.out.println(\"word document\");\r\n\t}",
"public Duc2002Document getParsedDocument(Document document) throws Exception {\n\t\tDuc2002Document ducDoc=new Duc2002Document();\n\t\t// iterate through child elements of root\n\t\tElement root = document.getRootElement();\n\t\tfor ( Iterator i = root.elementIterator(); i.hasNext(); ) {\n\t\t\tElement element = (Element) i.next();\n\t\t\tString elementName=element.getQualifiedName();\n\t\t\tif(elementName.equals(\"DOCNO\"))\n\t\t\t\tducDoc.setDocNo(element.getStringValue());\n\t\t\telse if(elementName.equals(\"HEAD\"))\n\t\t\t\tducDoc.setTopic(element.getStringValue());\n\t\t\telse if(elementName.equals(\"TEXT\"))\n\t\t\t{\n\t\t\t\tducDoc.setText(element.getStringValue());\n\t\t\t\tString[] sentences = new String[element.elements().size()];\n\t\t\t\tint[] sentenceWordCounts = new int[element.elements().size()];\n\t\t\t\tint no=0;\n\t\t\t\tfor(Iterator j=element.elementIterator(); j.hasNext();) {\n\t\t\t\t\tElement sentence = (Element) j.next();\n\t\t\t\t\tsentences[no]=sentence.getStringValue();\n\t\t\t\t\tfor(Iterator k=sentence.attributeIterator(); k.hasNext(); ) {\n\t\t\t\t\t\tAttribute attribute=(Attribute) k.next();\n\t\t\t\t\t\tif(attribute.getQualifiedName().equals(\"wdcount\"))\n\t\t\t\t\t\t\tsentenceWordCounts[no]=Integer.parseInt(attribute.getStringValue());\n\t\t\t\t\t}\n\t\t\t\t\tno++;\n\t\t\t\t}\n\t\t\t\tducDoc.setSentences(sentences);\n\t\t\t\tducDoc.setSentenceWordCounts(sentenceWordCounts);\n\t\t\t}\n\t\t}\n\t\treturn ducDoc;\n\t}",
"public void setup (SourceResolver sourceResolver, Map objectModel, String source,\n\t\t Parameters parameters)\n throws ProcessingException, SAXException, IOException\n {\n final String METHOD_NAME = \"setup\";\n this.logDebug(METHOD_NAME + \" 1/3: started\");\n\n try\n {\n // Ensure services are released:\n this.releaseServices();\n\n super.setup(sourceResolver, objectModel, source, parameters);\n \n\t// Document type:\n int type = ParamUtil.getAsDocType(this.parameters, \"type\", \"type-name\");\n\n\t// Document id:\n int id = ParamUtil.getAsId(this.parameters, \"id\");\n\n\tthis.logDebug(METHOD_NAME + \" 2/3: type = \" + type + \", id = \" + id);\n\n // Get a document selector wrapper if necessary:\n if ( this.documentSelector == null )\n {\n this.logDebug(METHOD_NAME + \" 2/3.1: Instanciating a ServiceSelectorWrapper\");\n String label = \"DocumentReader#\" + this.instanceStatus.getInstanceId();\n this.documentSelector = new ServiceSelectorWrapper\n (label, this.getLogger().getChildLogger(label));\n }\n\n // Get a document selector and wrap it:\n\tthis.documentSelector.wrap\n\t ((ServiceSelector)this.serviceManager.lookup(Document.ROLE + \"Selector\"));\n\n\t// Get a document from the pool:\n\tthis.document = (Document)this.documentSelector.select(DocType.hintFor[type]);\n\n // Set id and use mode:\n this.document.setId(id);\n\tthis.document.setUseMode(UseMode.SERVE);\n\n\tthis.logDebug\n (METHOD_NAME + \" 4/5: Done. this.document = \" + LogUtil.identify(this.document));\n }\n catch (Exception exception)\n {\n\tthrow new ProcessingException(exception);\n }\n\n this.logDebug(METHOD_NAME + \" 5/5: finished\");\n }",
"public void buildDocument() {\n/* 310 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 312 */ syncAccessMethods();\n/* */ }",
"public void buildDocument() {\n/* 248 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 250 */ syncAccessMethods();\n/* */ }",
"private static Nodes downloadTextDocument(\n URL source, String encoding, Builder builder,\n String accept, String language) \n throws IOException, XIncludeException {\n \n if (encoding == null || encoding.length() == 0) {\n encoding = \"UTF-8\"; \n }\n\n URLConnection uc = source.openConnection();\n setHeaders(uc, accept, language);\n \n String encodingFromHeader = uc.getContentEncoding();\n String contentType = uc.getContentType();\n int contentLength = uc.getContentLength();\n if (contentLength < 0) contentLength = 1024;\n InputStream in = new BufferedInputStream(uc.getInputStream());\n try {\n if (encodingFromHeader != null) encoding = encodingFromHeader;\n else {\n if (contentType != null) {\n contentType = contentType.toLowerCase(Locale.ENGLISH);\n if (contentType.equals(\"text/xml\") \n || contentType.equals(\"application/xml\") \n || (contentType.startsWith(\"text/\") \n && contentType.endsWith(\"+xml\") ) \n || (contentType.startsWith(\"application/\") \n && contentType.endsWith(\"+xml\"))) {\n encoding \n = EncodingHeuristics.readEncodingFromStream(in);\n }\n }\n }\n // workaround for pre-1.3 VMs that don't recognize UTF-16\n if (version.startsWith(\"1.2\") || version.startsWith(\"1.1\")) {\n if (encoding.equalsIgnoreCase(\"UTF-16\")) {\n // is it big-endian or little-endian?\n in.mark(2);\n int first = in.read();\n if (first == 0xFF) encoding = \"UnicodeLittle\";\n else encoding=\"UnicodeBig\";\n in.reset(); \n }\n else if (encoding.equalsIgnoreCase(\"UnicodeBigUnmarked\")) {\n encoding = \"UnicodeBig\";\n }\n else if (encoding.equalsIgnoreCase(\"UnicodeLittleUnmarked\")) {\n encoding = \"UnicodeLittle\";\n }\n }\n Reader reader = new BufferedReader(\n new InputStreamReader(in, encoding)\n );\n StringBuffer sb = new StringBuffer(contentLength);\n for (int c = reader.read(); c != -1; c = reader.read()) {\n sb.append((char) c);\n }\n \n NodeFactory factory = builder.getNodeFactory();\n if (factory != null) {\n return factory.makeText(sb.toString());\n }\n else return new Nodes(new Text(sb.toString()));\n }\n finally {\n in.close(); \n }\n \n }",
"public static Document getDocument(InputSource in){\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory docbuilderf = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docb = docbuilderf.newDocumentBuilder();\n\t\t\treturn docb.parse(in);\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Parseprobleem... Invalide bestand.\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (IOException e) {\n\t\t\t// TODO IOException, bestand bestaat niet of doet iets anders.\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// Configuratie zou moeten werken\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"public DocumentController() {\n\t\tthis.content = this.getstartpage();\n\t\tthis.url = \"https://\";\n\t}",
"protected void handleEmbededOfficeDoc(\n DirectoryEntry dir, XHTMLContentHandler xhtml)\n throws IOException, SAXException, TikaException {\n // Is it an embedded OLE2 document, or an embedded OOXML document?\n try {\n Entry ooxml = dir.getEntry(\"Package\");\n\n // It's OOXML\n TikaInputStream ooxmlStream = TikaInputStream.get(\n new DocumentInputStream((DocumentEntry)ooxml)\n );\n ZipContainerDetector detector = new ZipContainerDetector();\n MediaType type = detector.detect(ooxmlStream, new Metadata());\n handleEmbeddedResource(ooxmlStream, null, type.toString(), xhtml);\n return;\n } catch(FileNotFoundException e) {\n // It's regular OLE2\n }\n\n // Need to dump the directory out to a new temp file, so\n // it's stand along\n POIFSFileSystem newFS = new POIFSFileSystem();\n copy(dir, newFS.getRoot());\n\n File tmpFile = File.createTempFile(\"tika\", \".ole2\");\n try {\n FileOutputStream out = new FileOutputStream(tmpFile);\n newFS.writeFilesystem(out);\n out.close();\n\n // What kind of document is it?\n Metadata metadata = new Metadata();\n POIFSDocumentType type = POIFSDocumentType.detectType(dir);\n metadata.set(Metadata.CONTENT_TYPE, type.getType().toString());\n\n // Trigger for the document itself \n TikaInputStream embedded = TikaInputStream.get(tmpFile);\n try {\n if (extractor.shouldParseEmbedded(metadata)) {\n extractor.parseEmbedded(embedded, xhtml, metadata);\n }\n } finally {\n embedded.close();\n }\n } finally {\n tmpFile.delete();\n }\n }",
"public void run() throws NuxeoException {\n\n // In case the caller calls several time the run() method\n if (!alreadyParsed) {\n\n fileName = pdfBlob.getFilename();\n File pdfFile = pdfBlob.getFile();\n if (pdfFile == null) {\n fileSize = -1;\n } else {\n fileSize = pdfFile.length();\n }\n\n try {\n pdfDoc = PDDocument.load(pdfBlob.getStream());\n\n isEncrypted = pdfDoc.isEncrypted();\n if (isEncrypted) {\n pdfDoc.openProtection(new StandardDecryptionMaterial(\n password));\n }\n\n numberOfPages = pdfDoc.getNumberOfPages();\n PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog();\n pageLayout = checkNotNull(docCatalog.getPageLayout());\n pdfVersion = \"\" + pdfDoc.getDocument().getVersion();\n\n PDDocumentInformation docInfo = pdfDoc.getDocumentInformation();\n author = checkNotNull(docInfo.getAuthor());\n contentCreator = checkNotNull(docInfo.getCreator());\n keywords = checkNotNull(docInfo.getKeywords());\n try {\n creationDate = docInfo.getCreationDate();\n } catch(IOException e) {\n creationDate = null;\n }\n try {\n modificationDate = docInfo.getModificationDate();\n } catch(IOException e) {\n modificationDate = null;\n }\n producer = checkNotNull(docInfo.getProducer());\n subject = checkNotNull(docInfo.getSubject());\n title = checkNotNull(docInfo.getTitle());\n \n permissions = pdfDoc.getCurrentAccessPermission();\n\n // Getting dimension is a bit tricky\n mediaBoxWidthInPoints = -1;\n mediaBoxHeightInPoints = -1;\n cropBoxWidthInPoints = -1;\n cropBoxHeightInPoints = -1;\n \n @SuppressWarnings(\"unchecked\")\n List<PDPage> allPages = docCatalog.getAllPages();\n \n boolean gotMediaBox = false;\n boolean gotCropBox = false;\n for (PDPage page : allPages) {\n\n if (page != null) {\n PDRectangle r = page.findMediaBox();\n if (r != null) {\n mediaBoxWidthInPoints = r.getWidth();\n mediaBoxHeightInPoints = r.getHeight();\n gotMediaBox = true;\n }\n r = page.findCropBox();\n if (r != null) {\n cropBoxWidthInPoints = r.getWidth();\n cropBoxHeightInPoints = r.getHeight();\n gotCropBox = true;\n }\n }\n if (gotMediaBox && gotCropBox) {\n break;\n }\n }\n\n if (doXMP) {\n xmp = null;\n PDMetadata metadata = docCatalog.getMetadata();\n if (metadata != null) {\n xmp = \"\";\n InputStream xmlInputStream = metadata.createInputStream();\n\n InputStreamReader isr = new InputStreamReader(\n xmlInputStream);\n BufferedReader reader = new BufferedReader(isr);\n String line;\n do {\n line = reader.readLine();\n if (line != null) {\n xmp += line + \"\\n\";\n }\n } while (line != null);\n reader.close();\n }\n }\n\n } catch (IOException | BadSecurityHandlerException\n | CryptographyException e) {\n throw new NuxeoException(/*\n * \"Cannot get PDF info: \" +\n * e.getMessage(),\n */e);\n } finally {\n if (pdfDoc != null) {\n try {\n pdfDoc.close();\n } catch (IOException e) {\n // Ignore\n }\n pdfDoc = null;\n }\n alreadyParsed = true;\n }\n }\n }",
"public void startDocument ()\n {\n\tSystem.out.println(\"Start document\");\n }",
"public void processDocument() {\n\n\t\t// compact concepts\n\t\tprocessConcepts(concepts);\n\t}",
"public abstract XMLDocument parse(URL url);",
"public static Document parse(String filename) throws ParserException {\n\t\t// TODO YOU MUST IMPLEMENT THIS\n\t\t// girish - All the code below is mine\n\t\t\t\n\t\t// Creating the object for the new Document\n\t\t\n\t\t\n\t\tif (filename == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\t// Variable indexPos to track the current pointer location in the String Array\n\t\tint indexPos = 0;\n\t\t\n\t\t// Creating an instance of the document class to store the parsed content\n\t\tDocument d = new Document();\n\t\t\n\t\t// to store the result sent from the regexAuthor method and regexPlaceDate method\n\t\tObject[] resultAuthor = {null, null, null};\n\t\tObject[] resultPlaceDate = {null, null, null};\n\t\tStringBuilder news = new StringBuilder();\n\t\t\n\t\t// Next 4 lines contains the code to get the fileID and Category metadata\n\t\tString[] fileCat = new String[2];\n\t\t\n\t\tfileCat = regexFileIDCat(\"/((?:[a-z]|-)+)/([0-9]{7})\", filename);\n\t\t// System.out.println(filename);\n\t\t// throw an exception if the file is blank, junk or null\n\t\tif (fileCat[0] == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\td.setField(FieldNames.CATEGORY, fileCat[0]);\n\t\td.setField(FieldNames.FILEID, fileCat[1]);\n\t\t\n\t\t\n\t\t// Now , parsing the file\n\t\tFile fileConnection = new File(filename);\n\t\t\n\t\t// newscollated - it will store the parsed file content on a line by line basis\n\t\tArrayList<String> newscollated = new ArrayList<String>();\n\t\t\n\t\t// String that stores the content obtained from the . readline() operation\n\t\tString temp = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tBufferedReader getInfo = new BufferedReader(new FileReader(fileConnection));\n\t\t\twhile ((temp = getInfo.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(temp.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\ttemp = temp + \" \";\n\t\t\t\t\tnewscollated.add(temp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tgetInfo.close();\n\t\t\t\n\t\t\t//-- deprecated (REMOVE THIS IF OTHER WORKS)\n\t\t\t// setting the title using the arraylist's 0th index element\n\t\t\t//d.setField(FieldNames.TITLE, newscollated.get(0));\n\t\t\t\n\t\t\t// Appending the lines into one big string using StringBuilder\n\t\t\t\n\t\t\tfor (String n: newscollated)\n\t\t\t{\n\t\t\t\tnews.append(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Obtaining the TITLE of the file\n\t\t\tObject[] titleInfo = new Object[2];\n\t\t\t\n\t\t\ttitleInfo = regexTITLE(\"([^a-z]+)\\\\s{2,}\", news.toString());\n\t\t\td.setField(FieldNames.TITLE, titleInfo[0].toString().trim());\n\t\t\tindexPos = (Integer) titleInfo[1];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Getting the Author and Author Org\n\t\t\tresultAuthor = regexAuthor(\"<AUTHOR>(.*)</AUTHOR>\", news.toString());\n\t\t\t\n\t\t\tif (resultAuthor[0] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHOR, resultAuthor[0].toString());\n\t\t\t}\n\t\t\t\n\t\t\tif (resultAuthor[1] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHORORG, resultAuthor[1].toString());\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t if ((Integer) resultAuthor[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultAuthor[2];\n\t\t }\n\t\t\t\n\t\t \n\t\t \n\t\t // Getting the Place and Date\n \t\t\tresultPlaceDate = regexPlaceDate(\"\\\\s{2,}(.+),\\\\s(?:([A-Z][a-z]+\\\\s[0-9]{1,})\\\\s{1,}-)\", news.toString());\n \t\t\t\n \t\t\tif (resultPlaceDate[0] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.PLACE, resultPlaceDate[0].toString().trim());\n \t\t\t}\n \t\t \n \t\t\tif (resultPlaceDate[1] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.NEWSDATE, resultPlaceDate[1].toString().trim());\n \t\t\t}\n \t\t\t\n \t\t // getting the content\n \t\t \n \t\t if ((Integer) resultPlaceDate[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultPlaceDate[2];\n\t\t }\n \t\t \n \t\t \n \t\t d.setField(FieldNames.CONTENT, news.substring(indexPos + 1));\n \t\t \n \t\t return d;\n \t\t \n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tthrow new ParserException();\n\t\t\t\n\t\t}\n\n\t\tcatch(IOException e){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn d;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public void init() { \n\t\ttry { \n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder(); \n\t\t\tthis.document = builder.newDocument(); \n\t\t\tlogger.info(\"initilize the document success.\");\n\t\t} catch (ParserConfigurationException e) { \n\t\t\t\n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}",
"public void runStarted(OpenDefinitionsDocument doc) { }",
"private void Obtengo_el_documento(String inputString) throws ParserConfigurationException, UnsupportedEncodingException, SAXException, IOException {\n DocumentBuilderFactory factory\n = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n\n //\n StringBuilder xmlStringBuilder = new StringBuilder();\n xmlStringBuilder.append(inputString);\n ByteArrayInputStream input = new ByteArrayInputStream(\n xmlStringBuilder.toString().getBytes(\"UTF-8\"));\n \n doc = builder.parse(input);\n \n }",
"public manageDoc() {\r\r\r\n\r\r\r\n }",
"public void processDocument(String url) throws PageReadException {\n // TODO: reset the results.\n impossible = false;\n givenUrl = url;\n nextPageLink = null;\n if (!notFirstPage) {\n xmlImages = new ArrayList<String>();\n title = null;\n }\n\n String content = pageReader.readPage(url);\n\n document = Jsoup.parse(content);\n\n if (document.getElementsByTag(\"body\").size() == 0) {\n LOG.error(\"no body to parse \" + url);\n impossible = true;\n throw new PageReadException(\"no body to parse\");\n }\n\n init(); // this needs another name, it does all the work.\n if (readAllPages && nextPageLink != null) {\n try {\n String textSoFar = articleText;\n notFirstPage = true;\n processDocument(nextPageLink);\n if (articleText != null) {\n articleText = textSoFar + articleText;\n }\n } finally {\n notFirstPage = false;\n System.out.println(articleText);\n }\n }\n\n }",
"public read(PDDocument doc) throws IOException {\r\n super();\r\n document =doc;\r\n\r\n }",
"static void processDoc1(Document doc, int docno) throws IOException {\n\t\tString script = JetTest.config.getProperty(\"processDocument\");\n\t\t// if there is a name tagger, clear its cache\n\t\tif (JetTest.nameTagger != null) JetTest.nameTagger.newDocument();\n\t\tSpan all = new Span(0, doc.length());\n\t\tControl.applyScript (doc, all, script);\n\t}",
"protected void engineStarted() throws XDocletException { }",
"public void loadDocument() {\n\t\ttry {\n\t\t\tString defaultDirectory = Utils.lastVisitedDirectory;\n\t\t\tif (Utils.lastVisitedDocumentDirectory != null)\n\t\t\t\tdefaultDirectory = Utils.lastVisitedDocumentDirectory;\n\n\t\t\tJFileChooser fileChooser = new JFileChooser(defaultDirectory);\n\t\t\tint returnVal = fileChooser.showOpenDialog(new JFrame());\n\n\t\t\tif (returnVal != JFileChooser.APPROVE_OPTION) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tURL fileURL = fileChooser.getSelectedFile().toURL();\n\n\t\t\t((XsdTreeStructImpl) xsdTree).loadDocument(fileURL);\n\t\t\txsdTree.getMessageManager().sendMessage(\"XML document \" + fileURL + \" loaded.\", MessageManagerInt.simpleMessage);\n\t\t} catch (IOException urie) {\n\n\t\t} catch (SAXException saxe) {\n\n\t\t}\n\t\texampleLine = null;\n\t\t// updatePreview();\n\t}",
"private void viewDocument() throws Exception{ \r\n CoeusVector cvDataObject = new CoeusVector();\r\n HashMap hmDocumentDetails = new HashMap();\r\n hmDocumentDetails.put(\"awardNumber\", awardBaseBean.getMitAwardNumber());\r\n hmDocumentDetails.put(\"sequenceNumber\", EMPTY_STRING+awardBaseBean.getSequenceNumber());\r\n hmDocumentDetails.put(\"fileName\", awardAddDocumentForm.txtFileName.getText());\r\n hmDocumentDetails.put(\"document\", getBlobData()); \r\n cvDataObject.add(hmDocumentDetails);\r\n RequesterBean requesterBean = new RequesterBean();\r\n DocumentBean documentBean = new DocumentBean();\r\n Map map = new HashMap();\r\n map.put(\"DATA\", cvDataObject);\r\n map.put(DocumentConstants.READER_CLASS, \"edu.mit.coeus.award.AwardDocumentReader\");\r\n map.put(\"USER\", CoeusGuiConstants.getMDIForm().getUserId());\r\n map.put(\"MODULE_NAME\", \"VIEW_DOCUMENT\");\r\n documentBean.setParameterMap(map);\r\n requesterBean.setDataObject(documentBean);\r\n requesterBean.setFunctionType(DocumentConstants.GENERATE_STREAM_URL); \r\n AppletServletCommunicator appletServletCommunicator = new\r\n AppletServletCommunicator(STREAMING_SERVLET, requesterBean);\r\n appletServletCommunicator.send();\r\n ResponderBean responder = appletServletCommunicator.getResponse(); \r\n if(!responder.isSuccessfulResponse()){\r\n throw new CoeusException(responder.getMessage(),0);\r\n }\r\n map = (Map)responder.getDataObject();\r\n String url = (String)map.get(DocumentConstants.DOCUMENT_URL);\r\n if(url == null || url.trim().length() == 0 ) {\r\n CoeusOptionPane.showErrorDialog(\r\n coeusMessageResources.parseMessageKey(\"protocolUpload_exceptionCode.1009\"));\r\n return;\r\n }\r\n url = url.replace('\\\\', '/') ;\r\n try{\r\n URL urlObj = new URL(url);\r\n URLOpener.openUrl(urlObj);\r\n }catch (MalformedURLException malformedURLException) {\r\n malformedURLException.printStackTrace();\r\n }catch( Exception ue) {\r\n ue.printStackTrace() ;\r\n }\r\n }",
"public Document parse(InputSource aXmlInstance)\n\t\t\t\t throws org.xml.sax.SAXException, java.io.IOException {\n\t\tif (aXmlInstance == null) {\n\t\t\tthrow new IllegalArgumentException(\"InputSource cannot be null\");\n\t\t}\n\n\t\tparserImpl.parse(aXmlInstance);\n\n\t\treturn parserImpl.getDocument();\n\t}",
"@Override\n\tpublic void openDocument(String path, String name) {\n\t\t\n\t}",
"public void newDocument();",
"public RichDocument()\n {\n setMeta(new DocumentMeta());\n _paragraphs=new ArrayList<Paragraph>();\n }",
"@Override\n\tpublic void initialize(UimaContext context){\n\t\t\n\t\ttry {\n\t\t\tsuper.initialize(context);\n\t\t} catch (ResourceInitializationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t//\tread = true;\n\t\t\tdocument = Jsoup.connect(\"https://en.wikipedia.org/wiki/Ubiquitous_Knowledge_Processing_Lab\").get();\n\t\t\tdocElements = document.select(\"body\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n//\t\t title = doc.title();\n\t}",
"public abstract WordAudioDocument convertToAudioDocument(TextDocument doc) throws IOException;",
"public void generarDoc(){\n generarDocP();\n }",
"public static Document parse(String filename) throws ParserException {\n\t\tif (filename == null) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\tFile file = new File(filename);\n\t\tif (!file.exists() || !file.isFile()) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\tFile subDir = file.getParentFile();\n\t\tif (!subDir.exists() || !subDir.isDirectory()) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t// Document should be valid by here\n\t\tDocument doc = new Document();\n\t\tFieldNames field = FieldNames.TITLE;\n\t\tList<String> authors = new LinkedList<String>();\n\t\tString content = new String();\n\t\tboolean startContent = false;\n\n\t\tdoc.setField(FieldNames.FILEID, file.getName());\n\t\tdoc.setField(FieldNames.CATEGORY, subDir.getName());\n\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\t\tString line = reader.readLine();\n\n\t\t\twhile (line != null) {\n\t\t\t\tif (!line.isEmpty()) {\n\t\t\t\t\tswitch (field) {\n\t\t\t\t\tcase TITLE:\n\t\t\t\t\t\tdoc.setField(field, line);\n\t\t\t\t\t\tfield = FieldNames.AUTHOR;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase AUTHOR:\n\t\t\t\t\tcase AUTHORORG:\n\t\t\t\t\t\tif (line.startsWith(\"<AUTHOR>\") || !authors.isEmpty()) {\n\t\t\t\t\t\t\tString[] seg = null;\n\t\t\t\t\t\t\tString[] author = null;\n\n\t\t\t\t\t\t\tline = line.replace(\"<AUTHOR>\", \"\");\n\t\t\t\t\t\t\tseg = line.split(\",\");\n\t\t\t\t\t\t\tauthor = seg[0].split(\"and\");\n\t\t\t\t\t\t\tauthor[0] = author[0].replaceAll(\"BY|By|by\", \"\");\n\t\t\t\t\t\t\t// Refines author names\n\t\t\t\t\t\t\tfor (int i = 0; i < author.length; ++i) {\n\t\t\t\t\t\t\t\tauthor[i] = author[i].trim();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tauthor[author.length - 1] = author[author.length - 1]\n\t\t\t\t\t\t\t\t\t.replace(\"</AUTHOR>\", \"\").trim();\n\t\t\t\t\t\t\tauthors.addAll(Arrays.asList(author));\n\n\t\t\t\t\t\t\t// Saves author organization\n\t\t\t\t\t\t\tif (seg.length > 1) {\n\t\t\t\t\t\t\t\tdoc.setField(FieldNames.AUTHORORG, seg[1]\n\t\t\t\t\t\t\t\t\t\t.replace(\"</AUTHOR>\", \"\").trim());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (line.endsWith(\"</AUTHOR>\")) {\n\t\t\t\t\t\t\t\t// Saves author\n\t\t\t\t\t\t\t\tdoc.setField(FieldNames.AUTHOR, authors\n\t\t\t\t\t\t\t\t\t\t.toArray(new String[authors.size()]));\n\t\t\t\t\t\t\t\tfield = FieldNames.PLACE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// This should be a PLACE\n\t\t\t\t\t\t\tfield = FieldNames.PLACE;\n\t\t\t\t\t\t}\n\t\t\t\t\tcase PLACE:\n\t\t\t\t\t\tif (!line.contains(\"-\")) {\n\t\t\t\t\t\t\tfield = FieldNames.CONTENT;\n\t\t\t\t\t\t\tstartContent = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString[] seg = line.split(\"-\");\n\t\t\t\t\t\t\tString[] meta = seg[0].split(\",\");\n\t\t\t\t\t\t\tif (seg.length != 0 && !seg[0].isEmpty()) {\n\n\t\t\t\t\t\t\t\tif (meta.length > 1) {\n\t\t\t\t\t\t\t\t\tdoc.setField(\n\t\t\t\t\t\t\t\t\t\t\tFieldNames.PLACE,\n\t\t\t\t\t\t\t\t\t\t\tseg[0].substring(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\tseg[0].lastIndexOf(\",\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.trim());\n\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.NEWSDATE,\n\t\t\t\t\t\t\t\t\t\t\tmeta[meta.length - 1].trim());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmeta[0] = meta[0].trim();\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tnew SimpleDateFormat(\"MMM d\",\n\t\t\t\t\t\t\t\t\t\t\t\tLocale.ENGLISH).parse(meta[0]);\n\t\t\t\t\t\t\t\t\t\t// This is a news date\n\t\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.NEWSDATE,\n\t\t\t\t\t\t\t\t\t\t\t\tmeta[0]);\n\t\t\t\t\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t\t\t\t\t// This is a place\n\t\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.PLACE, meta[0]);\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}\n\t\t\t\t\t\tfield = FieldNames.CONTENT;\n\t\t\t\t\tcase CONTENT:\n\t\t\t\t\t\tif (!startContent) {\n\t\t\t\t\t\t\t// First line of content\n\t\t\t\t\t\t\tString[] cont = line.split(\"-\");\n\t\t\t\t\t\t\tif (cont.length > 1) {\n\t\t\t\t\t\t\t\tfor (int i = 1; i < cont.length; ++i) {\n\t\t\t\t\t\t\t\t\tcontent += cont[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstartContent = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontent += \" \" + line;\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t}\n\t\t\tdoc.setField(FieldNames.CONTENT, content);\n\t\t\tdoc.setField(FieldNames.LENGTH, Integer.toString(content.trim().split(\"\\\\s+\").length));\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ParserException();\n\t\t}\n\n\t\treturn doc;\n\t}",
"public static CV parseDocx(String nom, String prenom, String mail, String tel,File file) throws IOException{\n CV moncv=null;\n try {\n FileInputStream fis = new FileInputStream(file);\n XWPFDocument xdoc = new XWPFDocument(OPCPackage.open(fis));\n XWPFWordExtractor extractor = new XWPFWordExtractor(xdoc);\n String text = extractor.getText();\n if(text.trim().equals(\"\")) {\n throw new IOException(\"Format non valide\");\n //System.out.println(\"VIDE\");\n }\n\n String[] l = text.split(\"\\\\s\");\n Arrays.stream(l).forEach(System.out::println);\n //On récupère tous les mots clées et competences du PDF\n ArrayList<String> competences= getCompetences(l);\n ArrayList<String> allkeyword = getCompetences(l);\n\n //Creation du CV\n moncv= new CV(String.valueOf(cpt++),\n prenom,\n nom,\n getAge(l),\n mail,\n tel,\n competences,\n allkeyword);\n\n fis.close();\n\n } catch (InvalidFormatException e) {\n e.printStackTrace();\n }\n\n return moncv;\n\n\n }",
"@Override\n void execute() {\n doc.open();\n }",
"public abstract int getChapterNumber(XMLObject xml);",
"public void prepareForRun(OpenDefinitionsDocument doc) { }",
"private Document parseFile() throws IOException {\n\tString contents = instream_to_contents();\n\tDocument doc = Jsoup.parse(contents);\n\treturn doc;\n }",
"public void fileOpened(OpenDefinitionsDocument doc) { }",
"public void fileOpened(OpenDefinitionsDocument doc) { }",
"private void startParsing(){\r\n pondred = new ArrayList<>();\r\n //extract docs from corpus\r\n for (String xml:parseDocsFile(docs_file))\r\n {\r\n try {\r\n pondred.add(loadXMLFromString(xml));\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n System.out.println(\"Ending parsing\");\r\n for (Core pon:pondred){\r\n for (String string:pon.abstractTerm){\r\n Double tf = pon.getAbstractFerq(string)/pon.getAbstractSize();\r\n Double idf = Math.log10(Core.count/countingDuplicates(string));\r\n pon.abstractFrequence.put(string,tf*idf);\r\n }\r\n pon.finish();\r\n }\r\n }",
"TestDocument getDocument(DocumentReference reference);",
"public Document openHttp2Document(URL url) throws IOException {\r\n InputStream in = null;\r\n try {\r\n in = openHttp2Stream(url);\r\n return ExtXMLElement.toDocument(in);\r\n } finally {\r\n in.close();\r\n }\r\n }",
"private void startDoc(Attributes attributes) {\n\n\t\t// Start storing the document in the content store\n\t\tstartCaptureContent();\n\n\t\t// Create a new Lucene document\n\t\tcurrentLuceneDoc = new Document();\n\t\tcurrentLuceneDoc.add(new Field(\"fromInputFile\", fileName, Store.YES, Index.NOT_ANALYZED,\n\t\t\t\tTermVector.NO));\n\n\t\t// Store attribute values from the <doc> tag as fields\n\t\tfor (int i = 0; i < attributes.getLength(); i++) {\n\t\t\tString attName = attributes.getLocalName(i);\n\t\t\tString value = attributes.getValue(i);\n\n\t\t\tcurrentLuceneDoc.add(new Field(attName, value, Store.YES, Index.ANALYZED_NO_NORMS,\n\t\t\t\t\tTermVector.WITH_POSITIONS_OFFSETS));\n\t\t}\n\n\t\t// Report indexing progress\n\t\treportDocumentStarted(attributes);\n\t}",
"IDocument getDocument(File file);",
"public abstract List<T> readDoc(final Document document);",
"@Test\n public void application_with_document_api() throws IOException {\n String services =\n \"<container version='1.0'>\" +\n \" <http><server port=\\\"\" + findRandomOpenPortOnAllLocalInterfaces() + \"\\\" id=\\\"foobar\\\"/></http>\" +\n \" <document-api/>\" +\n \"</container>\";\n try (Application application = Application.fromServicesXml(services, Networking.enable)) {\n }\n }",
"@Override\n\tpublic Document parse(final CharSequence content) {\n\t\tfinal LagartoParser lagartoParser = new LagartoParser(config.parserConfig, content);\n\t\treturn parseWithLagarto(lagartoParser);\n\t}",
"public void parseDocument(String XMLFilePath) {\n\t \n\t SAXParserFactory spf = SAXParserFactory.newInstance();\n\t try {\n\t\tSAXParser sp = spf.newSAXParser();\n\t\tsp.parse(XMLFilePath, this);\n\t }catch(SAXException se) {\n\t\tse.printStackTrace();\n\t }catch(ParserConfigurationException pce) {\n\t\tpce.printStackTrace();\n\t }catch (IOException ie) {\n\t\tie.printStackTrace();\n\t }\n\t}",
"public interface DocumentReader\n {\n\t/**\n\t* Read a single Document from the specified file.\n\t* @returns The next Document if there are more, or null if there are not.\n\t*/\n public Document readDocument();\n }",
"void process(Document document, Repository repository) throws Exception;",
"public ModDocument() {\r\n\t\tsuper();\r\n\t}",
"private void createDocs() {\n\t\t\n\t\tArrayList<Document> docs=new ArrayList<>();\n\t\tString foldername=\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\input\";\n\t\tFile folder=new File(foldername);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tfor (File file : listOfFiles) {\n\t\t\ttry {\n\t\t\t\tFileInputStream fisTargetFile = new FileInputStream(new File(foldername+\"\\\\\"+file.getName()));\n\t\t\t\tString fileContents = IOUtils.toString(fisTargetFile, \"UTF-8\");\n\t\t\t\tString[] text=fileContents.split(\"ParseText::\");\n\t\t\t\tif(text.length>1){\n\t\t\t\t\tString snippet=text[1].trim().length()>100 ? text[1].trim().substring(0, 100): text[1].trim();\n\t\t\t\t\tDocument doc=new Document();\n\t\t\t\t\tdoc.setFileName(file.getName().replace(\".txt\", \"\"));\n\t\t\t\t\tdoc.setUrl(text[0].split(\"URL::\")[1].trim());\n\t\t\t\t\tdoc.setText(snippet+\"...\");\n\t\t\t\t\tdocs.add(doc);\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\n\t\t}\t\n\t\tDBUtil.insertDocs(docs);\n\t}",
"public Map<String, String> NextDocument() throws IOException {\n\t\tMap<String, String> map = new HashMap<>();\n\t\tStringBuffer content = new StringBuffer();\n\t\tString line = inputStream.readLine();\n\t\tif(line==null) {\n\t\t\tinputStream.close();\n\t\t\treturn null;\n\t\t} else {\n\t\t\tmap.put(\"DOCNO\", line);\n\t\t\tmap.put(\"CONTENT\", inputStream.readLine());\n\t\t\treturn map;\n\t\t}\n\t}",
"public SimpleDocReader() { }",
"public abstract Iterable<String> addDocument(TextDocument doc) throws IOException;",
"@Override\r\n\tprotected void indexDocument(PluginServiceCallbacks callbacks, JSONResponse jsonResults, HttpServletRequest request,\r\n\t\t\tIndexing indexing) throws Exception {\n\t\t\r\n\t}",
"public List<DocumentInfo> getAnalyzedDocumentWithTopic(String collectionId, int offset, int num_count, int maxTextSize) {\r\n \tList<DocumentInfo> toReturn = new ArrayList<DocumentInfo>();\r\n \r\n if (null == collectionId || 0 == collectionId.length() ) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\", \"offset\", \"num_count\", \"item_delimiter\", \"weight_delimiter\", \"value_delimiter\", \"document_delimiter\",\r\n \"max_text_size\"};\r\n SocketMessage request = new SocketMessage(\"retriever\", \"analyzed_doc_info_with_topic\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY,\r\n \"\", paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n request.setValue(\"offset\", String.valueOf(offset) );\r\n request.setValue(\"num_count\", String.valueOf(num_count) );\r\n request.setValue(\"max_text_size\", Integer.toString(maxTextSize));\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n request.setValue(\"weight_delimiter\", WEIGHT_DELIMITER);\r\n request.setValue(\"value_delimiter\", VALUE_DELIMITER);\r\n request.setValue(\"document_delimiter\", DOCUMENT_DELIMITER);\r\n\r\n SocketMessage response = handleMessage(request);\r\n System.out.print( response );\r\n \r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0361\", \"retrieval of analyzed document wasn't successful: coll_id=\" + collectionId + \"/offset=\"\r\n + offset + \"/num_count=\" + num_count);\r\n } else {\r\n wrapError(\"APIL_0361\", \"retrieval of analyzed document wasn't successful: coll_id=\" + collectionId + \"/offset=\"\r\n + offset + \"/num_count=\" + num_count);\r\n }\r\n } else { \r\n \t//docId, date, keywords, topics, title, content\r\n \tString[] docIdsArray = StringTool.stringToArray(response.getValue(\"docId\"), DOCUMENT_DELIMITER);\r\n \tString[] datesArray = StringTool.stringToArray(response.getValue(\"date\"), DOCUMENT_DELIMITER);\r\n \tString[] keywordsArray = StringTool.stringToArray(response.getValue(\"keywords\"), DOCUMENT_DELIMITER);\r\n \tString[] topicsArray = StringTool.stringToArray(response.getValue(\"topics\"), DOCUMENT_DELIMITER);\r\n \tString[] titlesArray = StringTool.stringToArray(response.getValue(\"title\"), DOCUMENT_DELIMITER);\r\n \tString[] contentsArray = StringTool.stringToArray(response.getValue(\"content\"), DOCUMENT_DELIMITER);\r\n \t\r\n int itemCount = docIdsArray.length;\r\n if (itemCount != datesArray.length || itemCount != keywordsArray.length || itemCount != topicsArray.length\r\n || itemCount != titlesArray.length || itemCount != contentsArray.length ) {\r\n setError(\"APIL_0415\", \"error in parsing result message for topic info retrieval: coll_id=\" + collectionId);\r\n return toReturn;\r\n }\r\n \r\n for (int i = 0; i < itemCount; i++) {\r\n \tString docId = docIdsArray[i];\r\n \tString date = datesArray[i];\r\n \tString title = titlesArray[i];\r\n \tString content = contentsArray[i];\r\n \tSystem.out.println(topicsArray[i]);\r\n \tString[] keywords = StringTool.stringToArray(keywordsArray[i], ITEM_DELIMITER);\r\n \tList<Pair<String>> topics = Tools.getPairListStr(topicsArray[i], ITEM_DELIMITER, WEIGHT_DELIMITER);\r\n \tList<Pair<Integer>> temp = new ArrayList<Pair<Integer>>();\r\n \t\r\n DocumentInfo docInfo = new DocumentInfo(docId, title, content, date, keywords, temp, topics, topics); \r\n toReturn.add( docInfo );\r\n }\r\n }\r\n\r\n return toReturn;\r\n }",
"private void parseRawText() {\n\t\t//1-new lines\n\t\t//2-pageObjects\n\t\t//3-sections\n\t\t//Clear any residual data.\n\t\tlinePositions.clear();\n\t\tsections.clear();\n\t\tpageObjects.clear();\n\t\tcategories.clear();\n\t\tinterwikis.clear();\n\t\t\n\t\t//Generate data.\n\t\tparsePageForNewLines();\n\t\tparsePageForPageObjects();\n\t\tparsePageForSections();\n\t}",
"private void readDocument(Attributes attrs) {\n this.state = DOC_TEXT_STATE;\n }",
"@Override\r\n\tpublic void handleFile(String inFilename, String outFilename) \r\n\t{\n\r\n\r\n\t\tString s = slurpFile(inFilename);\r\n\t\tDocument teiDocument = parsePlainText(s);\r\n\t\ttry \r\n\t\t{\r\n\t\t\tPrintStream pout = new PrintStream(new FileOutputStream(outFilename));\r\n\t\t\tpout.print(XML.documentToString(teiDocument));\r\n\t\t\tpout.close();\r\n\t\t} catch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace\r\n\t\t\t();\r\n\r\n\t\t}\t\r\n\t}",
"public void openDocument(L documentLocation) throws IOException;",
"public String getDocument() throws Exception;",
"public Document parse(DocumentParser parser, InputStream InputStream) throws RedPenException {\n return parser.parse(InputStream, sentenceExtractor, configuration.getTokenizer());\n }",
"public boolean addReceivedExternalDocument(AddReceivedExternalDocumentsCommand aCommand);",
"public Object parseItem(int rssType, Document doc, int index) throws Exception;",
"public static void main(String[] args) throws ParseException {\n String text;\n\n File file;\n\n /* pdfStripper = null;\n pdDoc = null;\n cosDoc = null;\n */ String parsed = parseWithTika();\n file = new File(filePath);\n try {\n /* parser = new PDFParser(new FileInputStream(file)); // update for PDFBox V 2.0\n parser.parse();\n cosDoc = parser.getDocument();\n pdfStripper = new PDFTextStripper();\n pdDoc = new PDDocument(cosDoc);\n pdDoc.getNumberOfPages();\n */ //pdfStripper.setStartPage(1);\n //pdfStripper.setEndPage(10);\n /* text = pdfStripper.getText(pdDoc);\n String resultString = text.replaceAll(\"\\\\p{C}|\\\\p{Sm}|\\\\p{Sk}|\\\\p{So}\", \" \");\n */\n\n //testDictionary();\n testOpenNlp(parsed);\n testOpenNlp(\"anas al bassit\");\n testOpenNlp(\"Anas Al Bassit\");\n testOpenNlp(\"barack obama\");\n testOpenNlp(\"Barack Obama\");\n\n\n System.out.println();\n } catch (IOException e) {\n e.printStackTrace();\n }\n// catch (ParseException e) {\n// e.printStackTrace();\n// }\n }",
"public void run() {\n try {\r\n TransformerFactory tFactory = TransformerFactory.newInstance();\r\n // Fortify Mod: prevent external entity injection\r\n tFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);\r\n Transformer transformer = tFactory.newTransformer();\r\n transformer.setOutputProperty(\"encoding\", \"UTF-8\");\r\n transformer.setOutputProperty(\"indent\", \"yes\");\r\n transformer.transform(new DOMSource(doc), new StreamResult(\r\n pos));\r\n } catch (Exception e) {\r\n throw new RuntimeException(\r\n \"Error converting Document to InputStream. \"\r\n + e.getMessage());\r\n } finally {\r\n try {\r\n pos.close();\r\n } catch (IOException e) {\r\n\r\n }\r\n }\r\n }",
"public static void getDocument(Client client, String index, String type, String id) {\n\r\n GetResponse getResponse = client.prepareGet(index, type, id).get();\r\n Map<String, Object> source = getResponse.getSource();\r\n\r\n System.out.println(\"------------------------------\");\r\n System.out.println(\"Index: \" + getResponse.getIndex());\r\n System.out.println(\"Type: \" + getResponse.getType());\r\n System.out.println(\"Id: \" + getResponse.getId());\r\n System.out.println(\"Version: \" + getResponse.getVersion());\r\n System.out.println(source);\r\n System.out.println(\"------------------------------\");\r\n\r\n }",
"@Test\n @SuppressWarnings(\"unchecked\")\n public void testOperations() throws IOException {\n String response = nuxeoClient.get(NUXEO_URL + \"/site/automation/Repository.GetDocument\").body().string();\n assertEquals(\"Repository.GetDocument\",\n ((Map<String, Object>) nuxeoClient.getConverterFactory().readJSON(response, Map.class)).get(\"id\"));\n\n // Fetch a document\n // TODO\n }",
"private static void createIndex() {\n XML_Shell workFile = new XML_Shell();\n String messageFromServer = ClientService.getLastMessageFromServer();\n\n try {\n XML_Manager.stringToDom(messageFromServer, workFile);\n } catch (SAXException | ParserConfigurationException | IOException | TransformerException e) {\n e.printStackTrace();\n }\n\n }",
"public void startInfo(Document src);",
"String buildDoc(ControllerNode controllerNode) throws IOException;",
"public static Document getDocument(byte xml[])\n {\n return XMLTools.getDocument(xml, false);\n }",
"protocol.VersionedTextDocumentIdentifier getTextDocument();",
"@Override\n public void execute(HttpServletRequest request,Document document) throws Exception {\n\n Font FontChinese = WordUtil.font;//加入document:\n\n\n /** 创建文档主体内容 */\n document.add(new Paragraph(\"First page of the document.\"));// Paragraph添加文本\n document.add(new Paragraph(\"我们是害虫\", FontChinese));\n /** 创建章节对象 */\n Paragraph title1 = new Paragraph(\"第一章\", FontChinese);\n Chapter chapter1 = new Chapter(title1, 1);\n chapter1.setNumberDepth(0);\n /** 创建章节中的小节 */\n Paragraph title11 = new Paragraph(\"表格的添加\", FontChinese);\n Section section1 = chapter1.addSection(title11);\n /** 创建段落并添加到小节中 */\n Paragraph someSectionText = new Paragraph(\"下面展示的为3 X 2 表格.\",\n FontChinese);\n section1.add(someSectionText);\n /** 创建表格对象(包含行列矩阵的表格) */\n Table t = new Table(3, 2);// 2行3列\n t.setBorderColor(new Color(220, 255, 100));\n t.setPadding(5);\n t.setSpacing(5);\n t.setBorderWidth(1);\n Cell c1 = new Cell(new Paragraph(\"第一格\", FontChinese));\n t.addCell(c1);\n c1 = new Cell(\"Header2\");\n t.addCell(c1);\n c1 = new Cell(\"Header3\");\n t.addCell(c1);\n // 第二行开始不需要new Cell()\n t.addCell(\"1.1\");\n t.addCell(\"1.2\");\n t.addCell(\"1.3\");\n section1.add(t);\n /** 创建章节中的小节 */\n Paragraph title13 = new Paragraph(\"列表的添加\", FontChinese);\n Section section3 = chapter1.addSection(title13);\n /** 创建段落并添加到小节中 */\n Paragraph someSectionText3 = new Paragraph(\"下面展示的为列表.\", FontChinese);\n section3.add(someSectionText3);\n /** 创建列表并添加到pdf文档中 */\n List l = new List(true, true, 10);// 第一个参数为true,则创建一个要自行编号的列表,\n // 如果为false则不进行自行编号\n l.add(new ListItem(\"First item of list\"));\n l.add(new ListItem(\"第二个列表\", FontChinese));\n section3.add(l);\n document.add(chapter1);\n /** 创建章节对象 */\n Paragraph title2 = new Paragraph(\"第二章\", FontChinese);\n Chapter chapter2 = new Chapter(title2, 1);\n chapter2.setNumberDepth(0);\n /** 创建章节中的小节 */\n Paragraph title12 = new Paragraph(\"png图片添加\", FontChinese);\n Section section2 = chapter2.addSection(title12);\n /** 添加图片 */\n section2.add(new Paragraph(\"图片添加: 饼图\", FontChinese));\n Image png = Image.getInstance(\"D:/pie.png\");//图片的地址\n section2.add(png);\n document.add(chapter2);\n\n }",
"void readAPFdocument (Document apfDoc, String fileText) {\n\t\tNodeList sourceFileElements = apfDoc.getElementsByTagName(\"source_file\");\n\t\tElement sourceFileElement = (Element) sourceFileElements.item(0);\n\t\tsourceFile = sourceFileElement.getAttribute(\"URI\");\n\t\tsourceType = sourceFileElement.getAttribute(\"SOURCE\");\n\n\t\tNodeList documentElements = apfDoc.getElementsByTagName(\"document\");\n\t\tElement documentElement = (Element) documentElements.item(0);\n\t\tdocID = documentElement.getAttribute(\"DOCID\");\n\n\t\tif (Ace.perfectMentions & !Ace.perfectEntities) {\n\t\t\treadPerfectMentions (apfDoc, fileText);\n\t\t\treturn;\n\t\t}\n\n\t\tNodeList entityElements = apfDoc.getElementsByTagName(\"entity\");\n\t\tfor (int i=0; i<entityElements.getLength(); i++) {\n\t\t\tElement entityElement = (Element) entityElements.item(i);\n\t\t\tAceEntity entity = new AceEntity (entityElement, fileText);\n\t\t\taddEntity(entity);\n\t\t}\n\t\tNodeList valueElements = apfDoc.getElementsByTagName(\"value\");\n\t\tfor (int i=0; i<valueElements.getLength(); i++) {\n\t\t\tElement valueElement = (Element) valueElements.item(i);\n\t\t\tAceValue value = new AceValue (valueElement, fileText);\n\t\t\taddValue(value);\n\t\t}\n\t\tNodeList timexElements = apfDoc.getElementsByTagName(\"timex2\");\n\t\tfor (int i=0; i<timexElements.getLength(); i++) {\n\t\t\tElement timexElement = (Element) timexElements.item(i);\n\t\t\tAceTimex timex = new AceTimex (timexElement, fileText);\n\t\t\taddTimeExpression(timex);\n\t\t}\n\t\tNodeList relationElements = apfDoc.getElementsByTagName(\"relation\");\n\t\tfor (int i=0; i<relationElements.getLength(); i++) {\n\t\t\tElement relationElement = (Element) relationElements.item(i);\n\t\t\tAceRelation relation = new AceRelation (relationElement, this, fileText);\n\t\t\taddRelation(relation);\n\t\t}\n\t\tNodeList eventElements = apfDoc.getElementsByTagName(\"event\");\n\t\tfor (int i=0; i<eventElements.getLength(); i++) {\n\t\t\tElement eventElement = (Element) eventElements.item(i);\n\t\t\tAceEvent event = new AceEvent (eventElement, this, fileText);\n\t\t\taddEvent(event);\n\t\t}\n\t}",
"public interface INodeFileCabin {\r\n /**\r\n * Get Documents According to TransID or DataFlow\r\n * @param tIDorDataFlow String TRANS_ID or DATAFLOW_NAME\r\n * @param isTransID true if TransID, false if DataFlow\r\n * @return ClsNodeDocument[] FILE_CONTENT\r\n */\r\n public ClsNodeDocument[] GetDocuments (String tIDorDataFlow, boolean isTransID);\r\n\r\n /**\r\n * Get Documents According to Names in ClsNodeDocument[]\r\n * @param searchDocs ClsNodeDocument[] Search Criteria\r\n * @return ClsNodeDocument[] FILE_CONTENT\r\n */\r\n public ClsNodeDocument[] GetDocuments (ClsNodeDocument[] searchDocs);\r\n\r\n /**\r\n * Get Documents According to TransID and DataFlow\r\n * @param transID String TRANS_ID\r\n * @param dataFlow String DATAFLOW_NAME\r\n * @return ClsNodeDocument[] FILE_CONTENT\r\n */\r\n public ClsNodeDocument[] GetDocuments (String transID, String dataFlow);\r\n\r\n /**\r\n * Get Documents According to TransID and DataFlow\r\n * @param transID String TRANS_ID\r\n * @param dataFlow String DATAFLOW_NAME\r\n * @param searchDocs ClsNodeDocument[] FILE_NAME\r\n * @return ClsNodeDocument[] FILE_CONTENT\r\n */\r\n public ClsNodeDocument[] GetDocuments (String transID, String dataFlow, ClsNodeDocument[] searchDocs);\r\n\r\n /**\r\n * Get Documents According to TransID and DataFlow\r\n * @param transID String TRANS_ID\r\n * @param dataFlow String DATAFLOW_NAME\r\n * @param operation String OPERATION_NAME\r\n * @param searchDocs ClsNodeDocument[] FILE_NAME\r\n * @return ClsNodeDocument[] FILE_CONTENT\r\n */\r\n public ClsNodeDocument[] GetDocuments (String transID, String dataFlow,String[] operationArr, ClsNodeDocument[] searchDocs);\r\n /**\r\n * Upload Documents to the Database\r\n * @param docs Documents to be upload (required)\r\n * @param transID String TRANS_ID (optional, although strongly recommended)\r\n * @param status String STATUS (optional)\r\n * @param dataFlow String DATAFLOW_NAME (optional)\r\n * @param submitURL String SUBMIT_URL (optional)\r\n * @param token String SUBMIT_TOKEN (optional)\r\n * @param submitted Date SUBMIT_DATE (optional)\r\n * @param submittedTS Timestamp SUBMIT_DATE (optional)\r\n * @return boolean true if successful, false otherwise\r\n */\r\n public boolean UploadDocuments (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);\r\n\r\n /**\r\n * Upload Documents to the Database\r\n * @param docs Documents to be upload (required)\r\n * @param transID String TRANS_ID (optional, although strongly recommended)\r\n * @param status String STATUS (optional)\r\n * @param dataFlow String DATAFLOW_NAME (optional)\r\n * @param submitURL String SUBMIT_URL (optional)\r\n * @param token String SUBMIT_TOKEN (optional)\r\n * @param submitted Date SUBMIT_DATE (optional)\r\n * @param submittedTS Timestamp SUBMIT_DATE (optional)\r\n * @return boolean true if successful, false otherwise\r\n */\r\n public boolean UploadHugeDocuments (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);\r\n\t// WI 22695\r\n /**\r\n * Upload Documents to the Database without delete the temp file\r\n * @param docs Documents to be upload (required)\r\n * @param transID String TRANS_ID (optional, although strongly recommended)\r\n * @param status String STATUS (optional)\r\n * @param dataFlow String DATAFLOW_NAME (optional)\r\n * @param submitURL String SUBMIT_URL (optional)\r\n * @param token String SUBMIT_TOKEN (optional)\r\n * @param submitted Date SUBMIT_DATE (optional)\r\n * @param submittedTS Timestamp SUBMIT_DATE (optional)\r\n * @return boolean true if successful, false otherwise\r\n */\r\n public boolean UploadHugeDocumentsWithoutDelete (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);\r\n /**\r\n * Query Documents\r\n * @param transID String TRANS_ID\r\n * @param dataFlow String DATAFLOW_NAME\r\n * @param names String[] Search Names\r\n * @return XmlDocument Return Result, null if no documents found\r\n */\r\n public XmlDocument QueryDocs (String transID, String dataFlow, String[] names);\r\n\r\n /**\r\n * Search Documents\r\n * @param docName String\r\n * @param transID String\r\n * @param domainName String\r\n * @param opName String\r\n * @param start Date\r\n * @param end Date\r\n * @return Document[]\r\n */\r\n public Document[] SearchDocuments (String docName, String transID, String domainName, String opName, Date start, Date end, String[] adminDomains, String version_no);\r\n\r\n /**\r\n * Get Unique Operations\r\n * @param domains String[] Domains Admin has rights to, null for all operations\r\n * @return String[]\r\n */\r\n public String[] GetOperationNames (String[] domains);\r\n\r\n /**\r\n * Get Document\r\n * @param fileID int\r\n * @return Document\r\n */\r\n public Document GetDocument (int fileID);\r\n\r\n /**\r\n * Get Document\r\n * @param fileID int\r\n * @return Document\r\n * The content of Document object is the temporary file path, not real data\r\n */\r\n public Document GetHugeDocument (int fileID);\r\n\r\n /**\r\n * Remove Documents\r\n * @param fileIDs int[]\r\n * @return boolean\r\n */\r\n public boolean RemoveDocuments (int[] fileIDs);\r\n\r\n /**\r\n * Remove Documents\r\n * @param transID String\r\n * @param names String[]\r\n * @return boolean\r\n */\r\n public boolean RemoveDocuments (String transID, String[] names);\r\n\r\n /**\r\n * Get Document Transanction ID\r\n * @param fileID int\r\n * @return Document\r\n */\r\n public String GetDocumentTransactionID (int fileID);\r\n\r\n /**\r\n * SaveDocument\r\n * @param fileID\r\n * @param transID\r\n * @param fileName\r\n * @param fileType\r\n * @param status\r\n * @param dataFlow\r\n * @param submitURL\r\n * @param submitToken\r\n * @param submitDate\r\n * @param content\r\n * @param user\r\n * @return String\r\n */\r\n public String SaveDocument (int fileID, String transID, String fileName, String fileType, String status, String dataFlow,\r\n String submitURL, String submitToken, Date submitDate, byte[] content, String user);\r\n\r\n /**\r\n * SaveDocument\r\n * @param fileID\r\n * @param documentID\r\n * @param transID\r\n * @param fileName\r\n * @param fileType\r\n * @param status\r\n * @param dataFlow\r\n * @param submitURL\r\n * @param submitToken\r\n * @param submitDate\r\n * @param content\r\n * @param user\r\n * @return String\r\n */\r\n public String SaveDocument (int fileID, String documentID,String transID, String fileName, String fileType, String status, String dataFlow,\r\n String submitURL, String submitToken, Date submitDate, byte[] content, String user);\r\n}",
"private void indexDocument(File f) throws IOException {\n\n\t\tHashMap<String, StringBuilder> fm;\n\t\tif (!f.getName().equals(\".DS_Store\")) {\n\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\n\t\t\tString s = \"\";\n\t\t\twhile ((s = br.readLine()) != null) {\n\n\t\t\t\tString temp = \"\";\n\n\t\t\t\tif (s.contains(\"<DOC>\")) {\n\n\t\t\t\t\ts = br.readLine();\n\n\t\t\t\t\twhile (!s.contains(\"</DOC>\")) {\n\n\t\t\t\t\t\ttemp += s + \" \";\n\n\t\t\t\t\t\ts = br.readLine();\n\t\t\t\t\t}\n\n\t\t\t\t\tfm = parseTags(temp);\n\t\t\t\t\tindexDocumentHelper(fm);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t}",
"@Override\n\tpublic Document parse(final char[] content) {\n\t\tfinal LagartoParser lagartoParser = new LagartoParser(config.parserConfig, content);\n\t\treturn parseWithLagarto(lagartoParser);\n\t}",
"public WalkerDocument newDocument() { return newDocument((IOptions)null); }"
]
| [
"0.6015931",
"0.59455585",
"0.572101",
"0.5671998",
"0.55608815",
"0.55593306",
"0.55022496",
"0.53509545",
"0.5349113",
"0.5302841",
"0.52227324",
"0.52211684",
"0.51894057",
"0.51831573",
"0.5174183",
"0.51721025",
"0.51310295",
"0.512964",
"0.5127121",
"0.5124797",
"0.5095846",
"0.50944877",
"0.5092835",
"0.5088613",
"0.50815046",
"0.50810635",
"0.507305",
"0.50689876",
"0.5065416",
"0.5043672",
"0.50360996",
"0.5020006",
"0.5001248",
"0.49838114",
"0.4971199",
"0.49662971",
"0.4959477",
"0.49509832",
"0.49501723",
"0.4937098",
"0.4933133",
"0.49299484",
"0.49299064",
"0.4926898",
"0.49062812",
"0.4902716",
"0.48903102",
"0.4880154",
"0.48785168",
"0.48784906",
"0.48679113",
"0.4860063",
"0.4855825",
"0.48540485",
"0.48510864",
"0.48470002",
"0.48439512",
"0.48380592",
"0.48380592",
"0.48313624",
"0.48301584",
"0.48263818",
"0.48257253",
"0.48184675",
"0.48143947",
"0.47999707",
"0.47933847",
"0.47776154",
"0.47665372",
"0.4765601",
"0.47633076",
"0.47610572",
"0.4759104",
"0.47572818",
"0.4751522",
"0.47467414",
"0.47452953",
"0.47441778",
"0.47393054",
"0.47372517",
"0.47343072",
"0.47309935",
"0.47177473",
"0.4716835",
"0.4711762",
"0.46970922",
"0.4694526",
"0.46897665",
"0.4689454",
"0.467786",
"0.46760997",
"0.46685895",
"0.4658577",
"0.4655524",
"0.4652379",
"0.46471024",
"0.46465623",
"0.4645079",
"0.4638347",
"0.46309295"
]
| 0.53127384 | 9 |
Depending on the artifact, connects to nuxeo, liferay or shindig to parse the artifact and get its title and content. Adds null to the returnlist if an artifact cannot be parsed. | public List<MinedDocument> parseCompareArtifacts() {
// System.out.println("parseCompareArtifacts()");
List<MinedDocument> compareDocs = new ArrayList<MinedDocument>();
InputStream is;
DocxParser docx;
String title = null;
String text;
for(IArtefact artefact : this.artefacts) {
text = null;
if(artefact instanceof NuxeoDocArtefact) { // Nuxeo Document:
try {
is = getNuxeoInstance().getDocumentInputStream(artefact.getId());
title = this.getNuxeoInstance().getLastDocTitle();
if(title==null) title = NO_TITLE;
if(this.getNuxeoInstance().getLastDocFilePath().endsWith(".docx")) {
docx = new DocxParser(is);
docx.parseDocxSimple();
text = docx.getFullText();
} else if(this.getNuxeoInstance().getLastDocFilePath().endsWith(".doc")) {
text = DocxParser.parseDocSimple(is);
}
} catch (Exception e) {
System.out.println("Error: Can not read nuxeo doc with id: "+artefact.getId());
continue;
}
} else if(artefact instanceof LiferayBlogArtefact) { // Liferay Blog Entry:
try {
JSONObject blogEntry = this.getLiferayInstance().getBlogEntry(artefact.getId());
title = blogEntry.getString("title");
text = blogEntry.getString("content");
text = TextParser.parseHtml(text);
} catch (Exception e) {
System.out.println("Error: Can not read Liferay blog entry with id: "+artefact.getId());
continue;
}
} else if(artefact instanceof LiferayForumArtefact) { // Liferay Forum Message
try {
JSONObject forumEntry = this.getLiferayInstance().getMessageBoardMessage(artefact.getId());
title = forumEntry.getString("subject");
text = forumEntry.getString("body");
} catch(Exception e) {
System.out.println("Error: Can not read Liferay forum message with id: "+artefact.getId());
continue;
}
} else if(artefact instanceof LiferayWebContentArtefact) { // Liferay Web Content Article (Journal)
try {
JSONObject webContentArticle = this.getLiferayInstance().getWebContentArticle(artefact.getId());
title = webContentArticle.getString(WEBCONTENT_TITLE);
text = webContentArticle.getString(WEBCONTENT_CONTENT);
// check if is "meeting minutes" content:
JSONObject webContentTemplate = this.getLiferayInstance().getWebContentTemplate(
webContentArticle.getString(WEBCONTENT_TEMPLATE_ID), webContentArticle.getString(WEBCONTENT_GROUP_ID));
String templateName = webContentTemplate.getString(WEBCONTENTTEMPLATE_NAME);
if(templateName.contains(WEBCONTENTTEMPLATE_MEETING_MINUTES)) {
((LiferayWebContentArtefact)artefact).setIsMeetingMinutes(true);
}
} catch(Exception e) {
System.out.println("Error: Can not read Liferay web content with id: "+artefact.getId());
continue;
}
} else if(artefact instanceof LiferayWikiArtefact) { // Liferay Wiki Page
try {
JSONObject wikiPage = this.getLiferayInstance().getWikiPage(artefact.getId());
title = wikiPage.getString("title");
text = wikiPage.getString("content");
} catch(Exception e) {
System.out.println("Error: Can not read Liferay wiki page with id: "+artefact.getId());
continue;
}
} else if(artefact instanceof SocialMessageArtefact) { // Shindig Message
ShindigConnector shindigCon;
if(Config.SHINDIG_USAGE.getValue().equals(Config.VAL_SHINDIG_DIRECT))
// disabled
// shindigCon = new ShindigDirectConnector();
shindigCon = null;
else
shindigCon = new ShindigRESTConnector();
JSONObject message = shindigCon.getOutboxMessage(((SocialMessageArtefact) artefact).getUserId(), artefact.getId());
if(message!=null) {
title = message.getString("title");
text = message.getString("body");
}
// System.out.println("MinedDocument is a SocialMessageArtefact");
} else if(artefact instanceof MailArtefact) { // Email via ElastiSearch
title = ((MailArtefact)artefact).getSubject();
text = ((MailArtefact)artefact).getContent();
}
if(title==null)
title = NO_TITLE;
if(text!=null)
compareDocs.add(new MinedDocument(title, text));
else
compareDocs.add(null);
}
return compareDocs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JsonObject getArtifact(String wrksName, String artName) throws CartagoException {\n var info = getArtInfo(wrksName, artName);\n\n var artifact = Json.createObjectBuilder()\n .add(\"artifact\", artName)\n .add(\"type\", info.getId().getArtifactType());\n\n\n // Get artifact's properties\n var properties = Json.createArrayBuilder();\n for (ArtifactObsProperty op : info.getObsProperties()) {\n var values = Json.createArrayBuilder();\n for (Object vl : op.getValues()) {\n values.add(\n Json.createValue(vl.toString())\n );\n }\n properties.add(\n Json.createObjectBuilder()\n .add(op.getName(), values)\n );\n }\n artifact.add(\"properties\", properties);\n\n // Get artifact's operations\n var operations = Json.createArrayBuilder();\n info.getOperations().forEach(y -> {\n operations.add(y.getOp().getName());\n });\n artifact.add(\"operations\", operations);\n\n // Get agents that are observing the artifact\n var observers = Json.createArrayBuilder();\n info.getObservers().forEach(y -> {\n // do not print agents_body observation\n if (!info.getId().getArtifactType().equals(AgentBodyArtifact.class.getName())) {\n observers.add(y.getAgentId().getAgentName());\n }\n });\n artifact.add(\"observers\", observers);\n\n // linked artifacts\n /* not used anymore\n var linkedArtifacts = Json.createArrayBuilder();\n info.getLinkedArtifacts().forEach(y -> {\n // linked artifact node already exists if it belongs to this workspace\n linkedArtifacts.add(y.getName());\n });\n artifact.add(\"linkedArtifacts\", linkedArtifacts);*/\n\n return artifact.build();\n }",
"public String getArtifact() {\n return artifact;\n }",
"public abstract List<AbstractDeploymentArtifact> getDeploymentArtifacts();",
"private PluginInfo extractPluginInfo(Artifact artifact) {\n if (artifact != null\n && \"jar\".equals(artifact.getExtension())\n && \"\".equals(artifact.getClassifier())\n && artifact.getFile() != null) {\n Path artifactPath = artifact.getFile().toPath();\n if (Files.isRegularFile(artifactPath)) {\n try (JarFile artifactJar = new JarFile(artifactPath.toFile(), false)) {\n ZipEntry pluginDescriptorEntry = artifactJar.getEntry(PLUGIN_DESCRIPTOR_LOCATION);\n\n if (pluginDescriptorEntry != null) {\n try (InputStream is = artifactJar.getInputStream(pluginDescriptorEntry)) {\n // Note: using DOM instead of use of\n // org.apache.maven.plugin.descriptor.PluginDescriptor\n // as it would pull in dependency on:\n // - maven-plugin-api (for model)\n // - Plexus Container (for model supporting classes and exceptions)\n XmlNode root = XmlNodeBuilder.build(is, null);\n String groupId = root.getChild(\"groupId\").getValue();\n String artifactId = root.getChild(\"artifactId\").getValue();\n String goalPrefix = root.getChild(\"goalPrefix\").getValue();\n String name = root.getChild(\"name\").getValue();\n return new PluginInfo(groupId, artifactId, goalPrefix, name);\n }\n }\n } catch (Exception e) {\n // here we can have: IO. ZIP or Plexus Conf Ex: but we should not interfere with user intent\n }\n }\n }\n return null;\n }",
"public ArtifactResults readArtifacts( Collection<ArtifactBasicMetadata> query )\n throws RepositoryException\n {\n if( query == null || query.size() < 1 )\n return null;\n \n ArtifactResults res = new ArtifactResults();\n \n for( ArtifactBasicMetadata bmd : query )\n {\n try\n {\n readArtifact( bmd, res );\n }\n catch( Exception e )\n {\n res.addError( bmd, e );\n }\n }\n\n return res;\n }",
"List<BinaryArtifact> getArtifacts(String instanceUrl, String repoName, long lastUpdated);",
"protected abstract Artifact getArtifact(BuildContext buildContext) throws BuildStepException;",
"ArtifactResult result();",
"public List/* <AttachedNarArtifact> */getAttachedNarDependencies(\n \t\t\tList/* <NarArtifacts> */narArtifacts, String aol, String type)\n \t\t\tthrows MojoExecutionException, MojoFailureException {\n \t\tboolean noarch = false;\n \t\tif (aol == null) {\n \t\t\tnoarch = true;\n \t\t\taol = defaultAOL;\n \t\t}\n \n \t\tList artifactList = new ArrayList();\n \t\tfor (Iterator i = narArtifacts.iterator(); i.hasNext();) {\n \t\t\tArtifact dependency = (Artifact) i.next();\n \t\t\tNarInfo narInfo = getNarInfo(dependency);\n \t\t\tif (noarch) {\n \t\t\t\tartifactList.addAll(getAttachedNarDependencies(dependency,\n \t\t\t\t\t\tnull, \"noarch\"));\n \t\t\t}\n \n \t\t\t// use preferred binding, unless non existing.\n \t\t\tString binding = narInfo.getBinding(aol, type != null ? type\n \t\t\t\t\t: \"static\");\n \n \t\t\t// FIXME kludge\n \t\t\tif (aol.equals(\"noarch\")) {\n \t\t\t\t// FIXME no handling of local\n \t\t\t\tartifactList.addAll(getAttachedNarDependencies(dependency,\n \t\t\t\t\t\tnull, \"noarch\"));\n \t\t\t} else {\n \t\t\t\tartifactList.addAll(getAttachedNarDependencies(dependency, aol,\n \t\t\t\t\t\tbinding));\n \t\t\t}\n \t\t}\n \t\treturn artifactList;\n \t}",
"private Artifact buildArtifactFromString(ArrayList<String> pluginOutput, int unusedDependencyIndex) {\n String line = pluginOutput.get(unusedDependencyIndex);\n String[] splitValues = line.split(\":|\\\\s+\");\n String groupId = splitValues[1];\n String artifactId = splitValues[2];\n String type = splitValues[3];\n String version = splitValues[4];\n String scope = splitValues[5];\n return new DefaultArtifact(groupId, artifactId, version, scope, type, null, new DefaultArtifactHandler());\n\n\n }",
"public final EObject ruleGetArtifact() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token this_BEGIN_1=null;\n Token this_END_3=null;\n EObject lv_artifact_2_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:6810:2: ( (otherlv_0= Get_artifact this_BEGIN_1= RULE_BEGIN ( (lv_artifact_2_0= ruleGetArtifactBody ) ) this_END_3= RULE_END ) )\n // InternalRMParser.g:6811:2: (otherlv_0= Get_artifact this_BEGIN_1= RULE_BEGIN ( (lv_artifact_2_0= ruleGetArtifactBody ) ) this_END_3= RULE_END )\n {\n // InternalRMParser.g:6811:2: (otherlv_0= Get_artifact this_BEGIN_1= RULE_BEGIN ( (lv_artifact_2_0= ruleGetArtifactBody ) ) this_END_3= RULE_END )\n // InternalRMParser.g:6812:3: otherlv_0= Get_artifact this_BEGIN_1= RULE_BEGIN ( (lv_artifact_2_0= ruleGetArtifactBody ) ) this_END_3= RULE_END\n {\n otherlv_0=(Token)match(input,Get_artifact,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getGetArtifactAccess().getGet_artifactKeyword_0());\n \t\t\n this_BEGIN_1=(Token)match(input,RULE_BEGIN,FOLLOW_74); \n\n \t\t\tnewLeafNode(this_BEGIN_1, grammarAccess.getGetArtifactAccess().getBEGINTerminalRuleCall_1());\n \t\t\n // InternalRMParser.g:6820:3: ( (lv_artifact_2_0= ruleGetArtifactBody ) )\n // InternalRMParser.g:6821:4: (lv_artifact_2_0= ruleGetArtifactBody )\n {\n // InternalRMParser.g:6821:4: (lv_artifact_2_0= ruleGetArtifactBody )\n // InternalRMParser.g:6822:5: lv_artifact_2_0= ruleGetArtifactBody\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getGetArtifactAccess().getArtifactGetArtifactBodyParserRuleCall_2_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_artifact_2_0=ruleGetArtifactBody();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getGetArtifactRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"artifact\",\n \t\t\t\t\t\tlv_artifact_2_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.GetArtifactBody\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_3=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_3, grammarAccess.getGetArtifactAccess().getENDTerminalRuleCall_3());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public abstract List<EXIFContent> parse();",
"public List<ModuleArtifact> getModuleArtifactsForDiffWithPaging(BuildParams buildParams, String offset, String limit) {\n ResultSet rs = null;\n List<ModuleArtifact> artifacts = new ArrayList<>();\n Map<String, ModuleArtifact> artifactMap = new HashMap<>();\n ResultSet rsArtCurr = null;\n ResultSet rsArtPrev = null;\n try {\n Object[] diffParams = getArtifatBuildQueryParam(buildParams);\n String buildQuery = getArtifactBuildDiffQuery(buildParams);\n rs = jdbcHelper.executeSelect(buildQuery, diffParams);\n while (rs.next()) {\n ModuleArtifact artifact = new ModuleArtifact(null, null, rs.getString(1), rs.getString(2), rs.getString(3));\n artifact.setStatus(rs.getString(4));\n if (buildParams.isAllArtifact()) {\n artifact.setModule(rs.getString(5));\n }\n artifacts.add(artifact);\n }\n // update artifact repo path data\n if (!artifacts.isEmpty()) {\n rsArtCurr = getArtifactNodes(buildParams.getBuildName(), buildParams.getCurrBuildNum(), artifactMap);\n if (buildParams.isAllArtifact()) {\n rsArtPrev = getArtifactNodes(buildParams.getBuildName(), buildParams.getComperedBuildNum(), artifactMap);\n }\n for (ModuleArtifact artifact : artifacts) {\n ModuleArtifact moduleArtifact = artifactMap.get(artifact.getSha1());\n if (moduleArtifact != null) {\n artifact.setRepoKey(moduleArtifact.getRepoKey());\n artifact.setPath(moduleArtifact.getPath());\n }\n }\n }\n } catch (SQLException e) {\n log.error(e.toString());\n } finally {\n DbUtils.close(rsArtCurr);\n DbUtils.close(rsArtPrev);\n DbUtils.close(rs);\n }\n return artifacts;\n }",
"ArtifactSet resolveComponentArtifacts(ComponentArtifactResolveMetadata component, Collection<? extends ComponentArtifactMetadata> artifacts, ImmutableAttributes overriddenAttributes);",
"java.lang.String getArtifactUrl();",
"public final EObject entryRuleGetArtifact() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleGetArtifact = null;\n\n\n try {\n // InternalRMParser.g:6797:52: (iv_ruleGetArtifact= ruleGetArtifact EOF )\n // InternalRMParser.g:6798:2: iv_ruleGetArtifact= ruleGetArtifact EOF\n {\n newCompositeNode(grammarAccess.getGetArtifactRule()); \n pushFollow(FOLLOW_1);\n iv_ruleGetArtifact=ruleGetArtifact();\n\n state._fsp--;\n\n current =iv_ruleGetArtifact; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"default void getArtifact(\n com.google.cloud.aiplatform.v1.GetArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetArtifactMethod(), responseObserver);\n }",
"Artifact getArtifact(String version) throws ArtifactNotFoundException;",
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.aiplatform.v1.Artifact>\n getArtifact(com.google.cloud.aiplatform.v1.GetArtifactRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getGetArtifactMethod(), getCallOptions()), request);\n }",
"private Artifact getArtifactFromReactor(Artifact artifact) {\n\t\t// check project dependencies first off\n\t\tfor (Artifact a : (Set<Artifact>) project.getArtifacts()) {\n\t\t\tif (equals(artifact, a) && hasFile(a)) {\n\t\t\t\treturn a;\n\t\t\t}\n\t\t}\n\n\t\t// check reactor projects\n\t\tfor (MavenProject p : reactorProjects == null ? Collections.<MavenProject> emptyList() : reactorProjects) {\n\t\t\t// check the main artifact\n\t\t\tif (equals(artifact, p.getArtifact()) && hasFile(p.getArtifact())) {\n\t\t\t\treturn p.getArtifact();\n\t\t\t}\n\n\t\t\t// check any side artifacts\n\t\t\tfor (Artifact a : (List<Artifact>) p.getAttachedArtifacts()) {\n\t\t\t\tif (equals(artifact, a) && hasFile(a)) {\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// not available\n\t\treturn null;\n\t}",
"public NarInfo getNarInfo(Artifact dependency)\n \t\t\tthrows MojoExecutionException {\n \t\tif (dependency.isSnapshot())\n \t\t\t;\n \n \t\tFile file = new File(repository.getBasedir(), repository\n \t\t\t\t.pathOf(dependency));\n \t\tJarFile jar = null;\n \t\ttry {\n \t\t\tjar = new JarFile(file);\n \t\t\tNarInfo info = new NarInfo(dependency.getGroupId(), dependency\n \t\t\t\t\t.getArtifactId(), dependency.getVersion(), log);\n \t\t\tif (!info.exists(jar))\n \t\t\t\treturn null;\n \t\t\tinfo.read(jar);\n \t\t\treturn info;\n \t\t} catch (IOException e) {\n \t\t\tthrow new MojoExecutionException(\"Error while reading \" + file, e);\n \t\t} finally {\n \t\t\tif (jar != null) {\n \t\t\t\ttry {\n \t\t\t\t\tjar.close();\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\t// ignore\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"private ResultSet getArtifactNodes(String buildName, String buildNumber, Map<String, ModuleArtifact> artifactMap) throws SQLException {\n ResultSet rsArtifact;\n rsArtifact = jdbcHelper.executeSelect(\"select distinct n.repo,n.node_path,n.node_name,n.node_id,n.depth,n.sha1_actual,n.sha1_original,n.md5_actual,n.md5_original \\n\" +\n \"from nodes n left outer join node_props np100 on np100.node_id = n.node_id left outer join node_props np101 on np101.node_id = n.node_id \\n\" +\n \"where (( np100.prop_key = 'build.name' and np100.prop_value = ?) and( np101.prop_key = 'build.number' and np101.prop_value =?)) and n.node_type = 1\", buildName, buildNumber);\n\n while (rsArtifact.next()) {\n String sha1 = rsArtifact.getString(6);\n if (artifactMap.get(sha1) == null) {\n artifactMap.put(sha1, new ModuleArtifact(rsArtifact.getString(1), rsArtifact.getString(2), rsArtifact.getString(3), null, null));\n }\n }\n return rsArtifact;\n }",
"Path getArtifact(String identifier);",
"public com.google.cloud.aiplatform.v1.Artifact getArtifact(\n com.google.cloud.aiplatform.v1.GetArtifactRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetArtifactMethod(), getCallOptions(), request);\n }",
"public MinedMainDocument parseMainArtifact() {\n\t\ttry {\n\t\t\tInputStream is = this.getNuxeoInstance().getDocumentInputStream(mainArtefact.getId());\n\t\t\t\n\t\t\tString title = this.getNuxeoInstance().getLastDocTitle();\n\t\t\tif(title==null) title = \"Main Document\";\n\t\t\t\n\t\t\tDocxParser docx = new DocxParser(is);\n\t\t\tdocx.parseDocxAndChapters();\n\t\t\tMinedMainDocument mainDoc = new MinedMainDocument(title, docx.getFullText());\n\t\t\tmainDoc.addChapters(docx.getChapterHeadlines(), docx.getChapterTexts());\n\t\t\tis.close();\n\t\t\treturn mainDoc;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"protected InvMetadata readMetadata( InvCatalog catalog, InvDatasetImpl dataset, Element mdataElement) {\n Namespace namespace;\r\n List inlineElements = mdataElement.getChildren();\r\n if (inlineElements.size() > 0) // look at the namespace of the children, if they exist\r\n namespace = ((Element) inlineElements.get( 0)).getNamespace();\r\n else\r\n namespace = mdataElement.getNamespace(); // will be thredds\r\n\r\n String mtype = mdataElement.getAttributeValue(\"metadataType\");\r\n String href = mdataElement.getAttributeValue(\"href\", xlinkNS);\r\n String title = mdataElement.getAttributeValue(\"title\", xlinkNS);\r\n String inheritedS = mdataElement.getAttributeValue(\"inherited\");\r\n boolean inherited = (inheritedS != null) && inheritedS.equalsIgnoreCase(\"true\");\r\n\r\n boolean isThreddsNamespace = ((mtype == null) || mtype.equalsIgnoreCase(\"THREDDS\")) &&\r\n namespace.getURI().equals(XMLEntityResolver.CATALOG_NAMESPACE_10);\r\n\r\n // see if theres a converter for it.\r\n MetadataConverterIF metaConverter = factory.getMetadataConverter( namespace.getURI());\r\n if (metaConverter == null) metaConverter = factory.getMetadataConverter( mtype);\r\n if (metaConverter != null) {\r\n if (debugMetadataRead) System.out.println(\"found factory for metadata type = \"+mtype+\" namespace = \"+\r\n namespace+\"=\"+metaConverter.getClass().getName());\r\n\r\n // see if theres any inline content\r\n Object contentObj = null;\r\n if (inlineElements.size() > 0) {\r\n contentObj = metaConverter.readMetadataContent( dataset, mdataElement);\r\n return new InvMetadata( dataset, mtype, namespace.getURI(), namespace.getPrefix(),\r\n inherited, false, metaConverter, contentObj);\r\n\r\n } else { // otherwise it must be an Xlink; defer reading\r\n return new InvMetadata(dataset, href, title, mtype, namespace.getURI(),\r\n namespace.getPrefix(), inherited, false, metaConverter);\r\n }\r\n }\r\n\r\n // the case where its not ThreddsMetadata, but theres no converter\r\n if (!isThreddsNamespace) {\r\n if (inlineElements.size() > 0) {\r\n // just hold onto the jdom elements as the \"content\" LOOK should be DOM?\r\n return new InvMetadata( dataset, mtype, namespace.getURI(), namespace.getPrefix(),\r\n inherited, false, this, mdataElement);\r\n\r\n } else { // otherwise it must be an Xlink, never read\r\n return new InvMetadata(dataset, href, title, mtype, namespace.getURI(),\r\n namespace.getPrefix(), inherited, false, null);\r\n }\r\n\r\n }\r\n\r\n // the case where its ThreddsMetadata\r\n if (inlineElements.size() > 0) {\r\n ThreddsMetadata tmg = new ThreddsMetadata(false);\r\n readThreddsMetadata( catalog, dataset, mdataElement, tmg);\r\n return new InvMetadata( dataset, mtype, namespace.getURI(), namespace.getPrefix(),\r\n inherited, true, this, tmg);\r\n\r\n } else { // otherwise it must be an Xlink; defer reading\r\n return new InvMetadata(dataset, href, title, mtype, namespace.getURI(),\r\n namespace.getPrefix(), inherited, true, this);\r\n }\r\n\r\n }",
"private static List<OBREntry> getUsedOBRArtifacts(ArtifactRepository artifactRepository, URL obrBaseUrl) throws IOException {\n final String baseURL = obrBaseUrl.toExternalForm();\n\n List<OBREntry> fromRepository = new ArrayList<>();\n\n List<ArtifactObject> artifactObjects = artifactRepository.get();\n artifactObjects.addAll(artifactRepository.getResourceProcessors());\n\n for (ArtifactObject ao : artifactObjects) {\n String artifactURL = ao.getURL();\n if ((artifactURL != null) /*&& artifactURL.startsWith(baseURL)*/) {\n // we now know this artifact comes from the OBR we are querying,\n // so we are interested.\n fromRepository.add(convertToOBREntry(ao, baseURL));\n }\n }\n return fromRepository;\n }",
"private void fetchNpmMetaData(ArtifactoryRestRequest artifactoryRequest, RestResponse artifactoryResponse,\n NpmArtifactInfo npmArtifactInfo) {\n String repoKey = npmArtifactInfo.getRepoKey();\n String path = npmArtifactInfo.getPath();\n RepoPath repoPath = InternalRepoPathFactory.create(repoKey, path);\n NpmArtifactInfo npmArtifactInfoModel = (NpmArtifactInfo) artifactoryRequest.getImodel();\n /// get npm add on\n AddonsManager addonsManager = ContextHelper.get().beanForType(AddonsManager.class);\n NpmAddon npmAddon = addonsManager.addonByType(NpmAddon.class);\n if (npmAddon != null) {\n // get npm meta data\n ItemInfo itemInfo = repositoryService.getItemInfo(repoPath);\n NpmMetadataInfo npmMetaDataInfo = npmAddon.getNpmMetaDataInfo((FileInfo) itemInfo);\n npmArtifactInfo.setNpmDependencies(npmMetaDataInfo.getNpmDependencies());\n npmArtifactInfo.setNpmInfo(npmMetaDataInfo.getNpmInfo());\n npmArtifactInfo.clearRepoData();\n artifactoryResponse.iModel(npmArtifactInfoModel);\n }\n }",
"public abstract List<String> getContent( );",
"public Artifact read(final UUID artifactUniqueId);",
"@Override\r\n public final List<Article> getArticles() {\r\n final IssueId issueId = getIssueId();\r\n final List<Article> articles = new ArrayList<Article>();\r\n final List<Node> articleNodes = getArticleNodes();\r\n for (final Node articleNode : articleNodes) {\r\n try {\r\n final Article article = getArticle(articleNode, issueId);\r\n if (article != null) {\r\n article.setIssueRef(issueId);\r\n articles.add(article);\r\n }\r\n } catch (Exception e) {\r\n log().warn(\"Error reading article details from \" + issueId, e);\r\n }\r\n }\r\n return articles;\r\n }",
"public List<ModuleArtifact> getModuleArtifact(String buildName, String buildNumber, String date,\n String moduleId, String orderBy, String direction, String offset,\n String limit) throws SQLException {\n ResultSet rsArtifact = null;\n ResultSet rs = null;\n List<ModuleArtifact> artifacts = new ArrayList<>();\n Map<String, ModuleArtifact> artifactMap = new HashMap<>();\n try {\n // get artifact info\n rs = getPaginatedArtifact(buildNumber, Long.parseLong(date), moduleId, orderBy, direction, offset, limit);\n while (rs.next()) {\n artifacts.add(new ModuleArtifact(null, null, rs.getString(1), rs.getString(2), rs.getString(3)));\n }\n if (!artifacts.isEmpty()) {\n // query for artifact nodes\n rsArtifact = getArtifactNodes(buildName, buildNumber, artifactMap);\n for (ModuleArtifact artifact : artifacts) {\n ModuleArtifact moduleArtifact = artifactMap.get(artifact.getSha1());\n if (moduleArtifact != null) {\n artifact.setRepoKey(moduleArtifact.getRepoKey());\n artifact.setPath(moduleArtifact.getPath());\n }\n }\n }\n\n } finally {\n DbUtils.close(rsArtifact);\n DbUtils.close(rs);\n }\n return artifacts;\n }",
"public ArrayList<ListArt> PrintWikiArticles()\r\n\t{\r\n\t\t//----- Declare variables----------//\r\n\t\tfinal String Art = \"Article\";\r\n\t\tint NumberCross = 0;\r\n\t\tfinal Label recordClassLabel = DynamicLabel.label(Art); \r\n\t\tListArt aux = null;\r\n\t\t//---------------------------------//\r\n\r\n\t\ttry (Transaction tx = graphDb.beginTx()) {\r\n\t\t\tResourceIterator<Node> it = graphDb.findNodes(recordClassLabel, \"wikiid\", \"1395966\"); // Node representing a component\r\n\t\t\tNode next = null; \r\n\t\t\twhile( it.hasNext() ) { \r\n\t\t\t\tnext = it.next(); \r\n\t\t\t\tString lang = (String)next.getProperty(\"lang\");\r\n\t\t\t\tif ( lang.equals(\"en\") ) // language of the node\r\n\t\t\t\t\tbreak; \r\n\t\t\t} \r\n\r\n\t\t\tvisit(graphDb, next, /*visited,*/ NumberCross, aux, ListNode);\r\n\t\t\ttx.success(); \r\n\r\n\t\t}\r\n\t\treturn ListNode;\r\n\r\n\t}",
"public List<Artifact> getDependenciesFor( Artifact artifact ) throws MojoExecutionException\n {\n final List<Artifact> results = new ArrayList<Artifact>();\n\n final org.eclipse.aether.artifact.Artifact artifactToResolve =\n new DefaultArtifact(\n artifact.getGroupId(),\n artifact.getArtifactId(),\n artifact.getType(),\n artifact.getVersion()\n );\n\n final List<Dependency> transitiveDeps = getDependenciesFor( artifactToResolve );\n for ( Dependency dependency : transitiveDeps )\n {\n final Artifact artifactDep = new org.apache.maven.artifact.DefaultArtifact(\n dependency.getArtifact().getGroupId(),\n dependency.getArtifact().getArtifactId(),\n dependency.getArtifact().getVersion(),\n dependency.getScope(),\n dependency.getArtifact().getExtension(),\n dependency.getArtifact().getClassifier(),\n artifactHandler\n );\n results.add( artifactDep );\n }\n\n return results;\n }",
"public String getArtifactId()\n {\n return artifactId;\n }",
"Artifact resolveArtifact(ArtifactRequest request, RemoteRepository... repositories)\n throws ArtifactResolutionException;",
"public List<RssItem> getItems() throws Exception {\n if (rssUrl.equals(\"http://www.prothom-alo.com/\"))\n return ProthomAlo.GetLinks();\n if (rssUrl.equals(\"http://www.bhorerkagoj.net/online/\"))\n return Bhorerkagoj.GetLinks();\n SAXParserFactory factory = SAXParserFactory.newInstance();\n SAXParser saxParser = factory.newSAXParser();\n\n RssParseHandler handler = new RssParseHandler();\n\n saxParser.parse(rssUrl, handler);\n\n\n return handler.getItems();\n\n }",
"public Object caseArtifact(Artifact object) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic void process(ResultItems resultItems, Task task) {\n\t\tfinal String url = resultItems.getRequest().getUrl();\r\n\t\tSystem.out.println(\"****************--Entry Pipeline Process--*****************\");\r\n\t\tSystem.out.println(\"Get page: \" + url);\r\n\r\n\t\t/*\r\n\t\t * if(url.matches(\r\n\t\t * \"http://blog\\\\.sina\\\\.com\\\\.cn/s/articlelist_.*\\\\.html\")){//文章列表\r\n\t\t * System.out.println(\"No Op in Article List\"); // }else\r\n\t\t * if(url.matches(\"http://www\\\\.asianews\\\\.it/news-en/.*\")){\r\n\t\t */\r\n\t\t// 具体文章内容\r\n\t\tString time = null, title = null, content = null, abstracts = null, convertUrl = null,query=\"\";\r\n\r\n\t\tfor (Map.Entry<String, Object> entry : resultItems.getAll().entrySet()) {\r\n\t\t\t// System.out.println(entry.getKey()+\":\\n\"+entry.getValue());\r\n\r\n\t\t\tif (AsianViewDetailItem.TIME.equals(entry.getKey())) {\r\n\t\t\t\ttime = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.TITLE.equals(entry.getKey())) {\r\n\t\t\t\ttitle = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.ABSTRACT.equals(entry.getKey())) {\r\n\t\t\t\tabstracts = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.CONTENT.equals(entry.getKey())) {\r\n\t\t\t\tcontent = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.URL.equals(entry.getKey())) {\r\n\t\t\t\tassert url.equals(entry.getValue());\r\n\t\t\t} else if (AsianViewDetailItem.CONVERT_URL.equals(entry.getKey())) {\r\n\t\t\t\tconvertUrl = (String) entry.getValue();\r\n\t\t\t}else if(AsianViewDetailItem.QUERY.equals(entry.getKey())){\r\n//\t\t\t\tquery=\"//query_\"+(String) entry.getValue();\r\n\t\t\t\tquery=(entry.getValue()!=null)?\"//query_\"+entry.getValue():\"\";\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// System.out.println(\"Time:\\n\"+CorpusFormatter.timeFormat(time));\r\n\t\t//\r\n\t\t// System.out.println(\"Title:\\n\"+title);\r\n\t\t//\r\n\t\t// System.out.println(\"Abstract:\\n\"+abstracts);\r\n\t\t//\r\n\t\t// System.out.println(\"Content:\\n\"+content);\r\n\t\t//\r\n\t\t// System.out.println(\"Url:\\n\"+url);\r\n\r\n\t\tString id = String.format(\"%s-%s\", time, ++counter);\r\n\r\n\t\tfinal String fileName = String.format(\".//\" + FileUtils.docName + \"%s//%s.txt\",query, id);\r\n\t\tSystem.out.println(\"File name :\" + fileName);\r\n\t\t// FileUtils.writeContent(fileName, time, title, content);\r\n\t\tFileUtils.writeCorpus(fileName,\r\n\t\t\t\tconvertUrl != null\r\n\t\t\t\t\t\t? CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\", convertUrl)\r\n\t\t\t\t\t\t: CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\"));\r\n\r\n\t\t// }else{\r\n\t\t// System.out.println(\"Can't match Url\");\r\n\t\t// }\r\n\t\tSystem.out.println(\"****************--Exit Pipeline Process--*****************\");\r\n\r\n\t}",
"public CTFArtifact findTrackerArtifact(CTFTracker tracker,\n AbstractBuild<?, ?> build) throws IOException, InterruptedException {\n if (this.cna == null) {\n this.log(\"Cannot call findTrackerArtifact, not logged in!\");\n return null;\n }\n String title = this.getInterpreted(build, this.getTitle());\n List<CTFArtifact> r = tracker.getArtifactsByTitle(title);\n Collections.sort(r, new Comparator<CTFArtifact>() {\n public int compare(CTFArtifact o1, CTFArtifact o2) {\n return o2.getLastModifiedDate().compareTo(o1.getLastModifiedDate());\n }\n });\n if (r.size()>0) return r.get(0);\n return null;\n }",
"Artifact resolveArtifact(ArtifactRequest request, RepositorySystemSession session, RemoteRepository... repositories)\n throws ArtifactResolutionException;",
"@SuppressWarnings(\"unchecked\")\n private Catalog extract(Job job, Attachment image) throws TextAnalyzerException, MediaPackageException {\n\n final Attachment attachment;\n final URI imageUrl;\n\n // Make sure the attachment is a tiff\n\n // Make sure this image is of type tif\n if (!image.getURI().getPath().endsWith(\".tif\")) {\n try {\n logger.info(\"Converting \" + image + \" to tif format\");\n Job conversionJob;\n conversionJob = composerService.convertImage(image, TIFF_CONVERSION_PROFILE);\n JobBarrier barrier = new JobBarrier(serviceRegistry, conversionJob);\n Result result = barrier.waitForJobs();\n if (!result.isSuccess()) {\n throw new TextAnalyzerException(\"Unable to convert \" + image + \" to tiff\");\n }\n conversionJob = serviceRegistry.getJob(conversionJob.getId()); // get the latest copy\n attachment = (Attachment) MediaPackageElementParser.getFromXml(conversionJob.getPayload());\n imageUrl = attachment.getURI();\n } catch (EncoderException e) {\n throw new TextAnalyzerException(e);\n } catch (NotFoundException e) {\n throw new TextAnalyzerException(e);\n } catch (ServiceRegistryException e) {\n throw new TextAnalyzerException(e);\n }\n } else {\n attachment = (Attachment) image;\n imageUrl = attachment.getURI();\n }\n\n try {\n Mpeg7CatalogImpl mpeg7 = Mpeg7CatalogImpl.newInstance();\n\n logger.info(\"Starting text extraction from {}\", imageUrl);\n\n File imageFile;\n try {\n imageFile = workspace.get(imageUrl);\n } catch (NotFoundException e) {\n throw new TextAnalyzerException(\"Image \" + imageUrl + \" not found in workspace\", e);\n } catch (IOException e) {\n throw new TextAnalyzerException(\"Unable to access \" + imageUrl + \" in workspace\", e);\n }\n VideoText[] videoTexts = analyze(imageFile, image.getIdentifier());\n\n // Create a temporal decomposition\n MediaTime mediaTime = new MediaTimeImpl(0, 0);\n Video avContent = mpeg7.addVideoContent(image.getIdentifier(), mediaTime, null);\n TemporalDecomposition<VideoSegment> temporalDecomposition = (TemporalDecomposition<VideoSegment>) avContent\n .getTemporalDecomposition();\n\n // Add a segment\n VideoSegment videoSegment = temporalDecomposition.createSegment(\"segment-0\");\n videoSegment.setMediaTime(mediaTime);\n\n // Add the video text to the spacio temporal decomposition of the segment\n SpatioTemporalDecomposition spatioTemporalDecomposition = videoSegment.createSpatioTemporalDecomposition(true,\n false);\n for (VideoText videoText : videoTexts) {\n spatioTemporalDecomposition.addVideoText(videoText);\n }\n\n logger.info(\"Text extraction of {} finished, {} lines found\", attachment.getURI(), videoTexts.length);\n\n URI uri;\n try {\n uri = workspace.putInCollection(COLLECTION_ID, job.getId() + \".xml\", mpeg7CatalogService.serialize(mpeg7));\n } catch (IOException e) {\n throw new TextAnalyzerException(\"Unable to put mpeg7 into the workspace\", e);\n }\n Catalog catalog = (Catalog) MediaPackageElementBuilderFactory.newInstance().newElementBuilder()\n .newElement(Catalog.TYPE, MediaPackageElements.TEXTS);\n catalog.setURI(uri);\n\n logger.info(\"Finished text extraction of {}\", imageUrl);\n\n return catalog;\n } catch (Exception e) {\n logger.warn(\"Error extracting text from \" + imageUrl, e);\n if (e instanceof TextAnalyzerException) {\n throw (TextAnalyzerException) e;\n } else {\n throw new TextAnalyzerException(e);\n }\n }\n }",
"public List getList(String name)\n\t\t{\n\t\t\tif(m_structuredArtifact == null)\n\t\t\t{\n\t\t\t\tm_structuredArtifact = new Hashtable();\n\t\t\t}\n\t\t\tObject value = m_structuredArtifact.get(name);\n\t\t\tList rv = new Vector();\n\t\t\tif(value == null)\n\t\t\t{\n\t\t\t\tm_structuredArtifact.put(name, rv);\n\t\t\t}\n\t\t\telse if(value instanceof Collection)\n\t\t\t{\n\t\t\t\trv.addAll((Collection)value);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\trv.add(value);\n\t\t\t}\n\t\t\treturn rv;\n\n\t\t}",
"private Manifest getManifest( final File artifact ) throws IOException {\n if ( artifact.isDirectory() ) {\n // this is maybe a classes directory, try to read manifest file directly\n final File dir = new File(artifact, \"META-INF\");\n if ( !dir.exists() || !dir.isDirectory() ) {\n return null;\n }\n final File mf = new File(dir, \"MANIFEST.MF\");\n if ( !mf.exists() || !mf.isFile() ) {\n return null;\n }\n final InputStream is = new FileInputStream(mf);\n try {\n return new Manifest(is);\n } finally {\n try { is.close(); } catch (final IOException ignore) { }\n }\n }\n JarFile file = null;\n try {\n file = new JarFile( artifact );\n return file.getManifest();\n } finally {\n if ( file != null ) {\n try { file.close(); } catch ( final IOException ignore ) {}\n }\n }\n }",
"private File getArtifactFile(Artifact artifactQuery)\n\t\t\tthrows MojoExecutionException {\n\n\t\tArtifactRequest request = new ArtifactRequest(artifactQuery,\n\t\t\t\tprojectRepos, null);\n\t\tList<ArtifactRequest> arts = new ArrayList<ArtifactRequest>();\n\t\tarts.add(request);\n\t\ttry {\n\t\t\tArtifactResult a = repoSystem.resolveArtifact(repoSession, request);\n\t\t\treturn a.getArtifact().getFile();\n\t\t} catch (ArtifactResolutionException e) {\n\t\t\tthrow new MojoExecutionException(\n\t\t\t\t\t\"could not resolve artifact to compare with\", e);\n\t\t}\n\n\t}",
"public ArtifactBasicResults readVersions( Collection<ArtifactBasicMetadata> query )\n throws RepositoryException\n {\n if( query == null || query.size() < 1 )\n return null;\n\n ArtifactBasicResults res = new ArtifactBasicResults( query.size() );\n \n String root = _repo.getServer().getURL().toString();\n \n for( ArtifactBasicMetadata bmd : query )\n {\n ArtifactLocation loc = new ArtifactLocation( root, bmd );\n \n Collection<String> versions = null;\n \n try\n {\n versions = getCachedVersions( loc, bmd );\n \n if( Util.isEmpty( versions ) )\n continue;\n }\n catch( Exception e )\n {\n res.addError( bmd, e );\n continue;\n }\n\n VersionRange versionQuery;\n try\n {\n versionQuery = VersionRangeFactory.create( bmd.getVersion(), _repo.getVersionRangeQualityRange() );\n }\n catch( VersionException e )\n {\n res.addError( bmd, new RepositoryException(e) );\n continue;\n }\n\n Quality vq = new Quality( bmd.getVersion() );\n \n if( vq.equals( Quality.FIXED_RELEASE_QUALITY ) \n || vq.equals( Quality.FIXED_LATEST_QUALITY )\n || vq.equals( Quality.SNAPSHOT_QUALITY )\n )\n {\n try\n {\n loc = calculateLocation( root, bmd, res );\n }\n catch( Exception e )\n {\n res.addError( bmd, e );\n continue;\n }\n \n if( loc == null )\n continue;\n \n ArtifactBasicMetadata vmd = new ArtifactBasicMetadata();\n vmd.setGroupId( bmd.getGroupId() );\n vmd.setArtifactId( bmd.getArtifactId() );\n vmd.setClassifier( bmd.getClassifier() );\n vmd.setType( bmd.getType() );\n vmd.setVersion( loc.getVersion() );\n \n res = ArtifactBasicResults.add( res, bmd, vmd );\n \n continue;\n\n }\n \n for( String version : versions )\n {\n Quality q = new Quality( version );\n\n if( ! _repo.isAcceptedQuality( q ) )\n continue;\n \n if( !versionQuery.includes( version ) )\n continue;\n \n ArtifactBasicMetadata vmd = new ArtifactBasicMetadata();\n vmd.setGroupId( bmd.getGroupId() );\n vmd.setArtifactId( bmd.getArtifactId() );\n vmd.setClassifier( bmd.getClassifier() );\n vmd.setType( bmd.getType() );\n vmd.setVersion( version );\n \n res = ArtifactBasicResults.add( res, bmd, vmd );\n }\n \n }\n \n return res;\n }",
"public interface ArtifactoryClient {\n\n /**\n * Obtain list of repos in the given artifactory\n *\n * @param instanceUrl server url\n * @param artifactoryEndpoint endpoint of the artifactory in the instance url\n * @return\n */\n List<ArtifactoryRepo> getRepos(String instanceUrl);\n\n /**\n * Obtain all the artifacts in the given artifactory repo\n *\n * @param instanceUrl server url\n * @param repoName repo name\n * @param lastUpdated timestamp when the repo was last updated\n * @return\n */\n List<BinaryArtifact> getArtifacts(String instanceUrl, String repoName, long lastUpdated);\n\n List<BaseArtifact> getArtifactItems(String instanceUrl, String repoName,String pattern, long lastUpdated);\n}",
"@Override\n\t\tpublic List<InJarResourceImpl> getContents(InJarResourceImpl serializationArtefact) {\n\t\t\treturn serializationArtefact.getContents(false);\n\t\t}",
"protected ArtifactInfo getArtInfo(String wrksName, String artName) throws CartagoException {\n ICartagoController ctrl = CartagoEnvironment.getInstance().getController( \"/main/\"+wrksName); //.getId().getFullName());\n return ctrl.getArtifactInfo(artName);\n }",
"private List<Dependency> getDependenciesFor( org.eclipse.aether.artifact.Artifact artifact )\n throws MojoExecutionException\n {\n final List<Dependency> results = new ArrayList<Dependency>();\n\n final ArtifactDescriptorRequest descriptorRequest = new ArtifactDescriptorRequest();\n descriptorRequest.setArtifact( artifact );\n descriptorRequest.setRepositories( remoteRepos );\n\n final ArtifactDescriptorResult descriptorResult;\n try\n {\n descriptorResult = repoSystem.readArtifactDescriptor( repoSession, descriptorRequest );\n }\n catch ( ArtifactDescriptorException e )\n {\n throw new MojoExecutionException( \"Could not resolve dependencies for \" + artifact, e );\n }\n\n for ( Dependency dependency : descriptorResult.getDependencies() )\n {\n log.debug( \"Found dependency: \" + dependency );\n final String extension = dependency.getArtifact().getExtension();\n if ( extension.equals( APKLIB ) || extension.equals( AAR ) || extension.equals( APK ) )\n {\n results.add( dependency );\n results.addAll( getDependenciesFor( dependency.getArtifact() ) );\n }\n }\n\n return results;\n }",
"public interface ArtifactVisitor extends Visitor {\n default void visit(Artifacts artifacts){\n artifacts.accept(this);\n }\n\n default void visit(Artifact artifact){\n artifact.accept(this);\n }\n\n default void visit(Ids ids, Classes classes){\n ids.accept(this);\n classes.accept(this);\n }\n\n /**\n * This method is called when artifacts building phase was failed (failed on reading jar file).\n * @param ids groupId, artifactId, version.\n * @param e exception.\n */\n default void visitFailed(Ids ids, Exception e){\n }\n\n /**\n * This method is called when parsing of class file was failed (illegal class format).\n * \n * @param name class name.\n * @param e exception.\n */\n default void visitFailed(ClassName name, Exception e){\n }\n\n default void visit(Class target){\n target.accept(this);\n }\n}",
"private JSONArray getBlogItems(){\n String reqUrl = \"https://www.tistory.com/apis/post/list\";\n String data = String.format(\"access_token=%s&output=%s&blogName=%s&count=%d\"\n ,blog.getAccess_token(),\"json\",blog.getBlogName(),itemCnt);\n try{\n HttpURLConnection conn = initConnGET(reqUrl,data);\n StringBuilder builder = new StringBuilder();\n String line = \"\";\n if (conn.getResponseCode() == conn.HTTP_OK) {\n InputStreamReader isr = new InputStreamReader(conn.getInputStream(), \"UTF-8\");\n BufferedReader reader = new BufferedReader(isr);\n while ((line = reader.readLine()) != null) {\n builder.append(line);\n }\n reader.close();\n }\n conn.disconnect();\n JSONArray items = new JSONObject(builder.toString())\n .getJSONObject(\"tistory\")\n .getJSONObject(\"item\")\n .getJSONArray(\"posts\");\n return items;\n }catch(Exception err){\n return null;\n }\n }",
"private org.apache.maven.artifact.Artifact findMatchingArtifact(MavenProject project, Artifact requestedArtifact) {\n String requestedRepositoryConflictId = getConflictId(requestedArtifact);\n\n org.apache.maven.artifact.Artifact mainArtifact = project.getArtifact();\n if (requestedRepositoryConflictId.equals(getConflictId(mainArtifact))) {\n return mainArtifact;\n }\n\n Collection<org.apache.maven.artifact.Artifact> attachedArtifacts = project.getAttachedArtifacts();\n if (attachedArtifacts != null && !attachedArtifacts.isEmpty()) {\n for (org.apache.maven.artifact.Artifact attachedArtifact : attachedArtifacts) {\n if (requestedRepositoryConflictId.equals(getConflictId(attachedArtifact))) {\n return attachedArtifact;\n }\n }\n }\n\n return null;\n }",
"ArtifactSet resolveLocalArtifacts(LocalFileDependencyMetadata fileDependencyMetadata);",
"void placeArtifacts()\r\n\t{\r\n\t\t\r\n\t\tfor( Map.Entry <String, Artifact> entry : artPlace.entrySet()) \r\n\t\t{\r\n\t\t\t String key = entry.getKey();\r\n\t\t\t Artifact value = entry.getValue();\r\n\t\t\t \r\n\t\t\t System.out.print( value.getName().trim() + \", \");\r\n\t\t\t \r\n\t\t\t/* if (! (value.getName().isEmpty()))\r\n\t\t\t {\r\n\t\t\t\t io.display( value.getName().trim() + \", \");\r\n\t\t\t } */\r\n \r\n\t\t\t// System.out.print( value.getName().trim() + \", \");\r\n\t\t}\r\n\t}",
"public Optional<PagedSearchIterable<GHContent>> getGHContents(String org, String img)\n throws IOException, InterruptedException {\n PagedSearchIterable<GHContent> contentsWithImage = null;\n for (int i = 0; i < 5; i++) {\n contentsWithImage = findFilesWithImage(img, org);\n if (contentsWithImage.getTotalCount() > 0) {\n break;\n } else {\n getGitHubUtil().waitFor(TimeUnit.SECONDS.toMillis(1));\n }\n }\n\n int numOfContentsFound = contentsWithImage.getTotalCount();\n if (numOfContentsFound <= 0) {\n log.info(\"Could not find any repositories with given image: {}\", img);\n return Optional.empty();\n }\n return Optional.of(contentsWithImage);\n }",
"@Override\n public InferredOWLOntologyID publishArtifact(final InferredOWLOntologyID ontologyIRI) throws PoddClientException\n {\n return null;\n }",
"private static List<Article> extractFeatureFromJson(String jsonString) {\n\n // If Json string is empty or null, return early\n if (TextUtils.isEmpty(jsonString)) {\n return null;\n }\n\n List<Article> articles = new ArrayList<>();\n\n try {\n\n // Get json root string\n JSONObject jsonObjectString = new JSONObject(jsonString);\n\n // Get the response object in the root json string\n JSONObject responseObj = jsonObjectString.getJSONObject(\"response\");\n\n // Get th array that contains all the articles inside the response\n JSONArray articlesArray = responseObj.getJSONArray(\"results\");\n\n // Loop through every article object in the array\n for (int i = 0; i < articlesArray.length(); i++) {\n\n // get current article at the current index\n JSONObject currentArticle = articlesArray.getJSONObject(i);\n\n // Get the object that contains all fields of info on the currentArticle\n JSONObject feilds = currentArticle.getJSONObject(\"fields\");\n\n // Get the articles title\n String title = feilds.getString(\"headline\");\n\n // Get the articles webUrl\n String url = currentArticle.getString(\"webUrl\");\n\n // Get the articles picture\n String image = feilds.getString(\"thumbnail\");\n\n // Create bitmap from image url string\n Bitmap picture = readImageUrl(image);\n\n // Get Authors name\n String author = feilds.optString(\"byline\");\n\n // Get the date the article was published\n String datePublished = feilds.getString(\"firstPublicationDate\");\n\n // Get the articles section name\n String section = currentArticle.getString(\"sectionName\");\n\n // Create a new article and add it to the list\n articles.add(new Article(title, url, author, image, datePublished, section, picture));\n }\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error parsing json:\" + e);\n }\n\n // Return list of articles\n return articles;\n\n }",
"public final EObject entryRuleGetArtifactBody() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleGetArtifactBody = null;\n\n\n try {\n // InternalRMParser.g:6847:56: (iv_ruleGetArtifactBody= ruleGetArtifactBody EOF )\n // InternalRMParser.g:6848:2: iv_ruleGetArtifactBody= ruleGetArtifactBody EOF\n {\n newCompositeNode(grammarAccess.getGetArtifactBodyRule()); \n pushFollow(FOLLOW_1);\n iv_ruleGetArtifactBody=ruleGetArtifactBody();\n\n state._fsp--;\n\n current =iv_ruleGetArtifactBody; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"private String getXMLDependencyStanza(String sha1Hash)\n {\n try\n {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n Document doc = db.parse(new URL(REST_BASE_URL + sha1Hash).openStream());\n\n NodeList nl = doc.getElementsByTagName(\"artifact\");\n if (nl.getLength() > 0)\n {\n String groupId = ((Element) nl.item(0)).getElementsByTagName(\"groupId\").item(0).getTextContent();\n String artifactId = ((Element) nl.item(0)).getElementsByTagName(\"artifactId\").item(0).getTextContent();\n String version = ((Element) nl.item(0)).getElementsByTagName(\"version\").item(0).getTextContent();\n\n StringBuilder b = new StringBuilder(\"<dependency>\\n\");\n b.append(\" <groupId>\");\n b.append(groupId);\n b.append(\"</groupId>\\n\");\n\n b.append(\" <artifactId>\");\n b.append(artifactId);\n b.append(\"</artifactId>\\n\");\n\n b.append(\" <version>\");\n b.append(version);\n b.append(\"</version>\\n\");\n\n b.append(\"</dependency>\\n\");\n\n return b.toString();\n }\n\n return null;\n }\n catch (Exception e)\n {\n throw new RuntimeException(e);\n }\n }",
"public Object caseUma_Artifact(org.topcased.spem.uma.Artifact object) {\n\t\treturn null;\n\t}",
"private File getLastArtifact() throws MojoExecutionException {\n\t\torg.eclipse.aether.version.Version v = getLastVersion();\n\t\tif (v == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tArtifact artifactQuery = new DefaultArtifact(groupId.concat(\":\")\n\t\t\t\t.concat(name).concat(\":\").concat(v.toString()));\n\t\tgetLog().debug(\n\t\t\t\tString.format(\"looking for artifact %s\",\n\t\t\t\t\t\tartifactQuery.toString()));\n\t\treturn getArtifactFile(artifactQuery);\n\n\t}",
"@Override\n protected String doInBackground(String... arg0) {\n jobj = jsonparser.makeHttpRequest(url);\n try {\n metadata = jobj.getString(TAG_METADATA);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return metadata;\n }",
"public void testExtractFromBadContent() throws Exception {\n String url = \"http://www.example.com/vol1/issue2/art3/\";\n MockCachedUrl cu = new MockCachedUrl(url, msueau);\n cu.setContent(badContent);\n cu.setContentSize(badContent.length());\n cu.setProperty(CachedUrl.PROPERTY_CONTENT_TYPE, \"text/html\");\n FileMetadataExtractor me = new MichiganStateUniversityExtensionHtmlMetadataExtractorFactory.MichiganStateUniversityExtensionHtmlMetadataExtractor();\n FileMetadataListExtractor mle = new FileMetadataListExtractor(me);\n List<ArticleMetadata> mdlist = mle.extract(MetadataTarget.Any, cu);\n assertNotEmpty(mdlist);\n ArticleMetadata md = mdlist.get(0);\n assertNotNull(md);\n assertNull(md.get(MetadataField.FIELD_AUTHOR));\n assertNull(md.get(MetadataField.FIELD_JOURNAL_TITLE));\n assertNull(md.get(MetadataField.FIELD_ARTICLE_TITLE));\n }",
"public abstract NestedSet<Artifact> getTransitiveJackLibrariesToLink();",
"public List<NexusArtifactEvent> filterArtifactEventList( List<NexusArtifactEvent> artifactEvents )\n {\n if( artifactEvents == null )\n {\n return null;\n }\n \n List<NexusArtifactEvent> filteredList = new ArrayList<NexusArtifactEvent>();\n\n for ( NexusArtifactEvent nexusArtifactEvent : artifactEvents )\n {\n if ( this.filterEvent( nexusArtifactEvent ) )\n {\n filteredList.add( nexusArtifactEvent );\n }\n }\n\n return filteredList;\n }",
"@Override\n public InferredOWLOntologyID unpublishArtifact(final InferredOWLOntologyID ontologyIRI) throws PoddClientException\n {\n return null;\n }",
"protected String extractPackageName(String record) {\n var payload = new JSONObject(record);\n if (payload.has(\"payload\")) {\n payload = payload.getJSONObject(\"payload\");\n }\n JSONArray array1 = payload.getJSONArray(\"files\");\n logger.info(\"Package name:\");\n for (int j = 0; j < array1.length(); j++) {\n JSONObject obj2 = array1.getJSONObject(j);\n //System.out.println(obj2);\n if (obj2.has(\"packageName\")){\n String packageName = obj2.getString(\"packageName\");\n System.out.println(packageName);\n return packageName;\n }\n }\n System.out.println(\"Package name not retrieved.\");\n return null;\n }",
"@Override\n public List<BazelPublishArtifact> getBazelArtifacts(AspectRunner aspectRunner, Project project, Task bazelExecTask) {\n final File outputArtifactFolder = super.getBazelArtifacts(aspectRunner, project, bazelExecTask).get(0).getFile().getParentFile();\n final File aarOutputFile = new File(outputArtifactFolder, mConfig.targetName + \".aar\");\n return Collections.singletonList(new BazelPublishArtifact(bazelExecTask, aarOutputFile));\n }",
"private void getArticles() throws Exception {\n\t\t\tHttpClient httpClient = new DefaultHttpClient();\n\n\t\t\tStringBuilder uriBuilder = new StringBuilder(BASE_URL);\n\t\t\turiBuilder.append(mURL);\n\n\t\t\tHttpGet request = new HttpGet(uriBuilder.toString());\n\t\t\tHttpResponse response = httpClient.execute(request);\n\n\t\t\tint status = response.getStatusLine().getStatusCode();\n\n\t\t\tif (status != HttpStatus.SC_OK) {\n\n\t\t\t\t// Log whatever the server returns in the response body.\n\t\t\t\tByteArrayOutputStream ostream = new ByteArrayOutputStream();\n\n\t\t\t\tresponse.getEntity().writeTo(ostream);\n\t\t\t\tmHandler.sendEmptyMessage(0);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tInputStream content = response.getEntity().getContent();\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(content));\n\t\t\tStringBuilder result = new StringBuilder();\n\n\t\t\tString line;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tresult.append(line);\n\t\t\t}\n\n\t\t\t// Clean up and close connection.\n\t\t\tcontent.close();\n\n\t\t\tString html = result.toString();\n\t\t\t//This is our regex to match each article\n\t\t\t//This website's html is not xml compatible so regex is next best thing\n\t\t\tPattern p = Pattern.compile(\"<td class=\\\"title\\\"><a href=\\\"(.*?)\\\".*?>(.*?)<\\\\/a>(<span class=\\\"comhead\\\">(.*?)<\\\\/span>)?.*?<\\\\/td><\\\\/tr><tr><td colspan=2><\\\\/td><td class=\\\"subtext\\\">.*? by <a href=\\\"user\\\\?.*?\\\">(.*?)<\\\\/a>.*?<a href=\\\"item\\\\?id=(.*?)\\\">\");\n\t\t\tMatcher m = p.matcher(html);\n\t\t\tList<Article> articles = new ArrayList<Article>();\n\t\t\twhile(m.find()) {\n\t\t\t\tString url = m.group(1);\n\t\t\t\tString title = m.group(2);\n\t\t\t\tString domain = m.group(4);\n\t\t\t\tString author = m.group(5);\n\t\t\t\tString discussionID = m.group(6);\n\t\t\t\tArticle eachArticle = new Article(title, domain, url, author, discussionID);\n\t\t\t\tarticles.add(eachArticle); \n\t\t\t}\n\n\t\t\tMessage msg = mHandler.obtainMessage();\n\t\t\tBundle bundle = new Bundle();\n\t\t\tbundle.putParcelableArrayList(\"articles\", (ArrayList<? extends Parcelable>) articles);\n\t\t\tmsg.setData(bundle);\n\t\t\tmHandler.sendMessage(msg);\n\t\t}",
"public void getArtifact(\n com.google.cloud.aiplatform.v1.GetArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getGetArtifactMethod(), getCallOptions()),\n request,\n responseObserver);\n }",
"@Override\n public InferredOWLOntologyID appendArtifact(final InferredOWLOntologyID ontologyIRI,\n final InputStream partialInputStream, final RDFFormat format) throws PoddClientException\n {\n return null;\n }",
"void placeArtifacts(IO io)\r\n\t{\r\n\t\t\r\n\t\tfor( Map.Entry <String, Artifact> entry : artPlace.entrySet()) \r\n\t\t{\r\n\t\t\t String key = entry.getKey();\r\n\t\t\t Artifact value = entry.getValue();\r\n\t\t\t \r\n\t\t\t if (! (value.getName().isEmpty()))\r\n\t\t\t {\r\n\t\t\t\t io.display( value.getName().trim() + \", \");\r\n\t\t\t }\r\n\r\n\t\t\t \r\n\t\t\t// System.out.print( value.getName().trim() + \", \");\r\n\t\t}\r\n\t}",
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.aiplatform.v1.ListArtifactsResponse>\n listArtifacts(com.google.cloud.aiplatform.v1.ListArtifactsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListArtifactsMethod(), getCallOptions()), request);\n }",
"synchronized public ResolveReport resolveArtifacts(String org, String version, boolean retrieve) throws ParseException, IOException {\r\n info(\"%s %s.%s\", (retrieve) ? \"retrieving\" : \"resolve\", org, version);\r\n // clear errors for this install\r\n errors.clear();\r\n\r\n Library library = new Library(org, version);\r\n libraries.put(library.getKey(), library);\r\n // creates clear ivy settings\r\n // IvySettings ivySettings = new IvySettings();\r\n String module;\r\n int p = org.lastIndexOf(\".\");\r\n if (p != -1) {\r\n module = org.substring(p + 1, org.length());\r\n } else {\r\n module = org;\r\n }\r\n\r\n // creates an Ivy instance with settings\r\n // Ivy ivy = Ivy.newInstance(ivySettings);\r\n if (ivy == null) {\r\n ivy = Ivy.newInstance();\r\n ivy.getLoggerEngine().pushLogger(new DefaultMessageLogger(Message.MSG_DEBUG));\r\n\r\n // PROXY NEEDED ?\r\n // CredentialsStore.INSTANCE.addCredentials(realm, host, username,\r\n // passwd);\r\n\r\n URLHandlerDispatcher dispatcher = new URLHandlerDispatcher();\r\n URLHandler httpHandler = URLHandlerRegistry.getHttp();\r\n dispatcher.setDownloader(\"http\", httpHandler);\r\n dispatcher.setDownloader(\"https\", httpHandler);\r\n URLHandlerRegistry.setDefault(dispatcher);\r\n\r\n // File communication is used\r\n // for ivy - the url branch info is in ivychain.xml\r\n // theoretically this would never change\r\n File ivychain = new File(\"ivychain.xml\");\r\n if (!ivychain.exists()) {\r\n try {\r\n String xml = FileIO.resourceToString(\"framework/ivychain.xml\");\r\n Platform platform = Platform.getLocalInstance();\r\n xml = xml.replace(\"{release}\", platform.getBranch());\r\n FileOutputStream fos = new FileOutputStream(ivychain);\r\n fos.write(xml.getBytes());\r\n fos.close();\r\n } catch (Exception e) {\r\n Logging.logError(e);\r\n }\r\n }\r\n ivy.configure(ivychain);\r\n ivy.pushContext();\r\n\r\n }\r\n\r\n IvySettings settings = ivy.getSettings();\r\n // GAP20151208 settings.setDefaultCache(new\r\n // File(System.getProperty(\"user.home\"), \".repo\"));\r\n settings.setDefaultCache(new File(REPO_DIR));\r\n settings.addAllVariables(System.getProperties());\r\n\r\n File cache = new File(settings.substitute(settings.getDefaultCache().getAbsolutePath()));\r\n\r\n if (!cache.exists()) {\r\n cache.mkdirs();\r\n } else if (!cache.isDirectory()) {\r\n log.error(cache + \" is not a directory\");\r\n }\r\n\r\n Platform platform = Platform.getLocalInstance();\r\n String platformConf = String.format(\"runtime,%s.%s.%s\", platform.getArch(), platform.getBitness(), platform.getOS());\r\n log.info(String.format(\"requesting %s\", platformConf));\r\n\r\n String[] confs = new String[] { platformConf };\r\n String[] dep = new String[] { org, module, version };\r\n\r\n File ivyfile = File.createTempFile(\"ivy\", \".xml\");\r\n ivyfile.deleteOnExit();\r\n\r\n DefaultModuleDescriptor md = DefaultModuleDescriptor.newDefaultInstance(ModuleRevisionId.newInstance(dep[0], dep[1] + \"-caller\", \"working\"));\r\n DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(md, ModuleRevisionId.newInstance(dep[0], dep[1], dep[2]), false, false, true);\r\n for (int i = 0; i < confs.length; i++) {\r\n dd.addDependencyConfiguration(\"default\", confs[i]);\r\n }\r\n md.addDependency(dd);\r\n XmlModuleDescriptorWriter.write(md, ivyfile);\r\n confs = new String[] { \"default\" };\r\n\r\n ResolveOptions resolveOptions = new ResolveOptions().setConfs(confs).setValidate(true).setResolveMode(null).setArtifactFilter(NO_FILTER);\r\n // resolve & retrieve happen here ...\r\n ResolveReport report = ivy.resolve(ivyfile.toURI().toURL(), resolveOptions);\r\n List<?> err = report.getAllProblemMessages();\r\n\r\n if (err.size() > 0) {\r\n for (int i = 0; i < err.size(); ++i) {\r\n String errStr = err.get(i).toString();\r\n error(errStr);\r\n }\r\n } else {\r\n // set as installed & save state\r\n info(\"%s %s.%s for %s\", (retrieve) ? \"retrieved\" : \"installed\", org, version, platform.getPlatformId());\r\n library.setInstalled(true);\r\n save();\r\n }\r\n // TODO - no error\r\n if (retrieve && err.size() == 0) {\r\n\r\n // TODO check on extension here - additional processing\r\n\r\n String retrievePattern = \"libraries/[type]/[artifact].[ext]\";// settings.substitute(line.getOptionValue(\"retrieve\"));\r\n\r\n String ivyPattern = null;\r\n int ret = ivy.retrieve(md.getModuleRevisionId(), retrievePattern, new RetrieveOptions().setConfs(confs).setSync(false)// check\r\n .setUseOrigin(false).setDestIvyPattern(ivyPattern).setArtifactFilter(NO_FILTER).setMakeSymlinks(false).setMakeSymlinksInMass(false));\r\n\r\n log.info(\"retrieve returned {}\", ret);\r\n\r\n setInstalled(getKey(org, version));\r\n save();\r\n\r\n // TODO - retrieve should mean unzip from local cache -> to root of\r\n // execution\r\n ArtifactDownloadReport[] artifacts = report.getAllArtifactsReports();\r\n for (int i = 0; i < artifacts.length; ++i) {\r\n ArtifactDownloadReport ar = artifacts[i];\r\n Artifact artifact = ar.getArtifact();\r\n File file = ar.getLocalFile();\r\n log.info(\"{}\", file.getAbsoluteFile());\r\n // FIXME - native move up one directory !!! - from denormalized\r\n // back to normalized Yay!\r\n // maybe look for PlatformId in path ?\r\n // ret > 0 && <-- retrieved -\r\n if (\"zip\".equalsIgnoreCase(artifact.getType())) {\r\n String filename = String.format(\"libraries/zip/%s.zip\", artifact.getName());\r\n info(\"unzipping %s\", filename);\r\n Zip.unzip(filename, \"./\");\r\n info(\"unzipped %s\", filename);\r\n }\r\n }\r\n }\r\n\r\n return report;\r\n }",
"@Override\n\tpublic GetContentResponse listContents() {\n\t\tLOGGER.debug(\"LIST ALL CONTENTS\");\n\t\t\n\t\tClientConfig clientConfig = new ClientConfig();\n\t\t \n\t HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic(env.getProperty(\"liferay.user.id\"), env.getProperty(\"liferay.user.key\"));\n\t clientConfig.register( feature) ;\n\t \n\t clientConfig.register(JacksonFeature.class);\n\t\t\n\t\tClient client = ClientBuilder.newClient(clientConfig);\n\t\tWebTarget webTarget = client.target(env.getProperty(\"liferay.api.rootpath\")).path(\"article-id/0/content-type/tagtest\");\n\t\t \n\t\tInvocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\t\n\t\tResponse response = invocationBuilder.get();\n\t\t \n\t\tGetContentResponse content = response.readEntity(GetContentResponse.class);\n\t\t\n\t\t\n\t\n\t\t \n\t\tLOGGER.info(\"status::\"+response.getStatus());\n\t\t\n\t\t\n\t\t\n\t\tcontent.setStatusCode(200);\n\t\tcontent.setStatusMessage(\"Content List\");\n\t\n\t\treturn content;\n\t}",
"private void parseResponse(String response, List<NewsDetailItem> items) {\n\n Pattern pText = Pattern.compile(ITEM_TEXT_PREF + \".*?\" + ITEM_TEXT_POSTF);\n Pattern pTitle = Pattern.compile(TITLE_PREF + \".*?\" + TITLE_POSTF);\n Pattern pDate = Pattern.compile(\"class=\\\"metadata\\\">.*?</a>\");\n Pattern pDate2 = Pattern.compile(\"</strong>.*?<\");\n\n Pattern pImage2 = Pattern.compile(IMG_PREF + \".*?\" + IMG_POSTF);\n\n Pattern pVideo = Pattern.compile(VIDEO_PREF + \".*?\" + VIDEO_POSTF);\n\n Pattern pImageUrl = Pattern.compile(IMG_URL_PREF + \".*?\" + IMG_URL_POSTF);\n\n Pattern pComment = Pattern.compile(\"li class=\\\" item\\\" id=\\\"comment.*?</li>\");\n Pattern pAuthor = Pattern.compile(\"class=\\\"commentauthor\\\".*?</span>\");\n\n Pattern pAuthorName1 = Pattern.compile(\"'>.*?</span>\");\n Pattern pAuthorName2 = Pattern.compile(\"/>.*?</span>\");\n Pattern pAuthorImage = Pattern.compile(AUTHOR_IMAGE_PREF + \".*?\" + AUTHOR_IMAGE_POSTF);\n\n Pattern pCommentText = Pattern.compile(\"<span id=\\\"co_.*?</li>\");\n Pattern pCommentId = Pattern.compile(COMMENT_ID_PREFIX + \".*?\" + COMMENT_ID_POSTFIX);\n\n Pattern pCommentTex2t = Pattern.compile(\"dislike-counter.*?comment-toolbar\"); //Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pCommentText3 = Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pThumbsDown = Pattern.compile(\"dislike-counter-comment.*?</span>\");\n Pattern pThumbsUp = Pattern.compile(\"like-counter-comment.*?</span>\");\n Pattern pThumb2 = Pattern.compile(THUMB_PREF + \".*?\" + THUMB_POSTF);\n\n Pattern pCommentDate = Pattern.compile(COMMENTDATE_PREF + \".*?\" + COMMENTDATE_POSTF);\n Pattern pWidth = Pattern.compile(WIDTH_PREF + \".*?\" + WIDTH_POSTF);\n Pattern pHeight = Pattern.compile(HEIGHT_PREF + \".*?\" + HEIGHT_POSTF);\n\n Pattern pAkismet = Pattern.compile(\"vortex_ajax_comment\"+\".*?\"+\";\");\n\n Pattern pAkismet2 = Pattern\n .compile(\"\\\"nonce\\\":\\\".*?\"+\"\\\"\");\n\n Pattern pValue = Pattern.compile(\"value=\\\".*?\\\"\");\n\n Pattern pAk_js = Pattern\n .compile(\"id=\\\"ak_js\\\".*?/>\");\n\n\n String akismet = \"\";\n String ak_js = \"\";\n String postId = \"\";\n Matcher makismet_comment = pAkismet.matcher(response);\n if (makismet_comment.find()) {\n Matcher mvalue = pAkismet2.matcher(makismet_comment.group());\n if (mvalue.find()) {\n akismet = mvalue.group();\n akismet = akismet.replace(\"\\\"\", \"\");\n akismet = akismet.replace(\"nonce:\", \"\");\n }\n }\n\n Matcher mak_js = pAk_js.matcher(response);\n if (mak_js.find()) {\n Matcher mvalue = pValue.matcher(mak_js.group());\n if (mvalue.find()) {\n ak_js = mvalue.group();\n ak_js = ak_js.replace(\"\\\"\", \"\");\n ak_js = ak_js.replace(\"value=\", \"\");\n }\n }\n\n\n Pattern ppost_id = Pattern.compile(\"name=\\\"comment_post_ID\\\".*?/>\");\n Matcher mpost_id = ppost_id.matcher(response);\n if (mpost_id.find()) {\n Matcher mvalue = pValue.matcher(mpost_id.group());\n if (mvalue.find()) {\n postId = mvalue.group();\n postId = postId.replace(\"\\\"\", \"\");\n postId = postId.replace(\"value=\", \"\");\n }\n }\n\n Matcher itemMatcher;\n itemMatcher = pDate.matcher(response);\n String date = \"\";\n if (itemMatcher.find()) {\n itemMatcher = pDate2.matcher(itemMatcher.group());\n if (itemMatcher.find()) {\n date = itemMatcher.group().substring(10);\n date = date.substring(0, date.length() - 2);\n }\n }\n\n Matcher mTitle = pTitle.matcher(response);\n if (mTitle.find()) {\n String itemText = mTitle.group().substring(TITLE_PREF.length()); //(\" dc:title=\\\"\".length()).replace(\"\\\"\", \"\");\n itemText = itemText.substring(0, itemText.length() - TITLE_POSTF.length());\n NewsDetailItem item = new NewsDetailItem();\n item.setText(itemText);\n item.setDate(date);\n item.setContentType(NewsDetailDBHelper.NewsItemType.TITLE.ordinal());\n item.setPostUrl(mUrl);\n item.setCommentId(postId);\n item.setAkismet(akismet);\n item.setAk_js(ak_js);\n items.add(item);\n }\n\n Matcher mText = pText.matcher(response);\n int imageEnd = 0;\n int textStart;\n\n if (mText.find()) {\n String text = mText.group().substring(ITEM_TEXT_PREF.length());\n text = text.substring(0, text.length() - ITEM_TEXT_POSTF.length());\n Matcher mImage = pImage2.matcher(text);\n while (mImage.find()) {\n int textEnd = mImage.start();\n textStart = imageEnd;\n imageEnd = mImage.end();\n String itemText = text.substring(textStart, textEnd);\n addTextItem(items, itemText);\n processImageItem(items, mImage.group(), pImageUrl, pWidth, pHeight);\n }\n\n Matcher mVideo = pVideo.matcher(text);\n while (mVideo.find()) {\n int textEnd = mVideo.start();\n textStart = imageEnd;\n imageEnd = mVideo.end();\n String itemText = \"\";\n if (textEnd >= textStart) {\n itemText = text.substring(textStart, textEnd);\n }\n addTextItem(items, itemText);\n processVideoItem(items, mVideo.group(), pImageUrl, pWidth, pHeight);\n }\n\n text = text.substring(imageEnd);\n addTextItem(items, text);\n }\n\n\n NewsDetailItem item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY_HEADER.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n\n Matcher mComment = pComment.matcher(response);\n while (mComment.find()) {\n item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n item.setAkismet(akismet);\n String comment = mComment.group();\n\n // if (comment.contains(CAN_CHANGE_KARMA_PREFIX)) {\n item.setCanChangeKarma(1);\n // } else {\n // item.setCanChangeKarma(0);\n // }\n\n Matcher mAuthor = pAuthor.matcher(comment);\n if (mAuthor.find()) {\n String authorText = mAuthor.group();\n item.setAuthorImage(getAuthorImgage(authorText, pAuthorImage));\n item.setAuthor(getAuthorName(authorText, pAuthorName1, pAuthorName2));\n }\n Matcher mCommentText = pCommentText.matcher(comment);\n if (mCommentText.find()) {\n String s = mCommentText.group();\n mCommentText = pCommentTex2t.matcher(s);\n if (mCommentText.find()) {\n mCommentText = pCommentText3.matcher(mCommentText.group());\n if (mCommentText.find()) {\n String commentText = mCommentText.group().substring(COMMENT_PREFIX.length());\n commentText = commentText.substring(0, commentText.length() - COMMENT_POSTFIX.length());\n commentText = commentText.replace(\"<p>\", \"\");\n commentText = commentText.replace(\"</p>\", \"\");\n item.setText(commentText);\n }\n }\n }\n Matcher mCommentId = pCommentId.matcher(comment);\n if (mCommentId.find()) {\n String commentId = mCommentId.group().substring(COMMENTDATE_PREF.length());\n commentId = commentId.substring(0, commentId.length() - COMMENT_ID_POSTFIX.length());\n item.setCommentId(commentId);\n }\n Matcher mCommentDate = pCommentDate.matcher(comment);\n if (mCommentDate.find()) {\n String commentDate = mCommentDate.group().substring(COMMENTDATE_PREF.length());\n commentDate = commentDate.substring(0, commentDate.length() - COMMENTDATE_POSTF.length());\n item.setDate(commentDate);\n }\n item.setKarmaUp(getKarma(comment, pThumbsUp, pThumb2));\n item.setkarmaDown(getKarma(comment, pThumbsDown, pThumb2));\n }\n }",
"public interface MetaExtractor {\n List<Meta> extract(String url);\n}",
"private String getContent(String url) throws BoilerpipeProcessingException, IOException {\n int code;\n HttpURLConnection connection = null;\n URL uri;\n do{\n uri = new URL(url);\n if(connection != null)\n connection.disconnect();\n connection = (HttpURLConnection)uri.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setConnectTimeout(5000);\n connection.setReadTimeout(5000);\n connection.connect();\n code = connection.getResponseCode();\n if(code == 301)\n url = connection.getHeaderField( \"Location\" );\n }while (code == 301);\n\n System.out.println(url + \" :: \" + code);\n String content = null;\n if(code < 400) {\n content = ArticleExtractor.INSTANCE.getText(uri);\n }\n connection.disconnect();\n return content;\n }",
"public void addArtifact(ArtifactModel artifact);",
"public void addMainArtefact(NuxeoDocArtefact nuxeoDocArtifact) {\n\t\tthis.mainArtefact = nuxeoDocArtifact;\n\t}",
"java.util.List<java.lang.String> getContentsList();",
"@Override\n public ContentHandle get(int index) {\n return storage.getArtifactByContentId(contentIds.get(index)).getContent();\n }",
"private void saveArtifact(ArtifactDto artifactDto) {\n //start off by removing the existing entry (if present)\n Artifact artifact = this.artifactRepository.findById(artifactDto.getId());\n if (artifact == null) {\n artifact = new Artifact();\n }\n\n artifact.setAbbreviation(artifactDto.getAbbreviation());\n artifact.setDetailedText(artifactDto.getDetailedText());\n artifact.setDocumentTitle(artifactDto.getDocumentTitle());\n artifact.setId(artifactDto.getId());\n artifact.setDocumentName(artifactDto.getDocumentName());\n\n artifact.setLovDocumentType(artifactDto.getDocumentType());\n\n LibraryLevel libraryEntry = this.libraryLevelRepository.findById(artifactDto.getLibraryId());\n\n if (libraryEntry != null) {\n artifact.setLibraryLevel(libraryEntry);\n }\n\n //delete the existing tags/comments\n for (Tag tag : artifact.getTags())\n {\n this.tagRepository.delete(tag.getId());\n }\n for (Annotation annotation : artifact.getAnnotations())\n {\n this.annotationRepository.delete(annotation.getId());\n }\n\n artifact.getTags().clear();\n artifact.getAnnotations().clear();\n\n //add all the incoming tags\n for (TagDto tagDto : artifactDto.getTagDtos()) {\n Lov tagLov = this.lovRepository.findById(tagDto.getLovDto().getId());\n\n Tag tag = new Tag();\n tag.setId(tagDto.getId());\n tag.setTagValue(tagDto.getTagValue());\n tag.setArtifact(artifact);\n tag.setLovTagType(tagLov);\n\n //note - if the tag already exists, it won't be added again\n artifact.addTag(tag);\n }\n\n //add all the incoming annotations\n for (AnnotationDto annotationDto : artifactDto.getAnnotationDtos()) {\n Annotation annotation = new Annotation();\n annotation.setId(annotationDto.getId());\n annotation.setAnnotationText(annotationDto.getAnnotationText());\n\n artifact.addAnnotation(annotation);\n }\n this.artifactRepository.save(artifact);\n\n }",
"private void extractRemainingMetadata(ArticleMetadata thisAM,\n CachedUrl mdCu) {\n\n // Which top node is appropriate for this specific dtd\n String top_node = null;\n String dtdString = thisAM.getRaw(ElsevierDTD5XmlSchemaHelper.dataset_dtd_metadata);\n Matcher mat = DTD_PATTERN.matcher(dtdString);\n if (mat.matches() && JOURNAL_ARTICLE.equals(mat.group(1))) {\n top_node = JASchemaMap.get(mat.group(3));\n }\n //String top_node = SchemaMap.get(dtdString);\n if (top_node == null) {\n log.siteWarning(\"Unknown type of Elsevier DTD provided for article\" + dtdString);\n return; // we can't extract article level metadata (author & title)\n }\n try {\n List<ArticleMetadata> amList = \n new XPathXmlMetadataParser(null, \n top_node,\n ElsevierDTD5XmlSchemaHelper.articleLevelMDMap,\n false).extractMetadata(MetadataTarget.Any(), mdCu);\n /*\n * There should only be ONE top_node per main.xml; don't verify\n * but just access first one.\n */\n if (amList.size() > 0) {\n log.debug3(\"found article level metadata...\");\n ArticleMetadata oneAM = amList.get(0);\n String rawVal = oneAM.getRaw(ElsevierDTD5XmlSchemaHelper.common_title);\n if (rawVal != null) {\n thisAM.putRaw(ElsevierDTD5XmlSchemaHelper.common_title, rawVal);\n } else {\n // a simple-article might use document heading, like \"Book Review\" as title\n rawVal = oneAM.getRaw(ElsevierDTD5XmlSchemaHelper.common_dochead);\n if (rawVal != null) {\n // store it in the title anyway, it only exists if title doesn't\n thisAM.putRaw(ElsevierDTD5XmlSchemaHelper.common_title, rawVal);\n }\n }\n rawVal = oneAM.getRaw(ElsevierDTD5XmlSchemaHelper.common_author_group);\n if ( rawVal != null) {\n thisAM.putRaw(ElsevierDTD5XmlSchemaHelper.common_author_group, rawVal);\n }\n } else {\n log.debug3(\"no md extracted from \" + mdCu.getUrl());\n }\n } catch (XPathExpressionException e) {\n log.debug3(\"Xpath expression exception:\",e); // this is a note to the PLUGIN writer!\n } catch (IOException e) {\n // We going to keep going and just not extract from this file\n log.siteWarning(\"IO exception loading article level XML file\", e);\n } catch (SAXException e) {\n // We going to keep going and just not extract from this file\n log.siteWarning(\"SAX exception loading article level XML file\", e);\n } \n }",
"@SuppressWarnings(\"unchecked\")\n public void execute() {\n try {\n\n DefaultArtifact artifact = new DefaultArtifact(\n getProject().getGroupId(),\n getProject().getArtifactId(),\n artifactHandlerManager\n .getArtifactHandler(getProject().getPackaging())\n .getExtension(),\n \"[0,)\");\n\n getLog().debug(\"Artifact for lookup released version: \" + artifact);\n VersionRangeRequest request =\n new VersionRangeRequest(artifact, getProject().getRemoteProjectRepositories(), null);\n\n VersionRangeResult versionRangeResult = repoSystem.resolveVersionRange(repoSession, request);\n\n getLog().debug(\"Resolved versions: \" + versionRangeResult.getVersions());\n\n DefaultArtifactVersion releasedVersion = versionRangeResult.getVersions().stream()\n .filter(v -> !ArtifactUtils.isSnapshot(v.toString()))\n .map(v -> new DefaultArtifactVersion(v.toString()))\n .max(DefaultArtifactVersion::compareTo)\n .orElse(null);\n\n getLog().debug(\"Released version: \" + releasedVersion);\n\n if (releasedVersion != null) {\n // Use ArtifactVersion.toString(), the major, minor and incrementalVersion return all an int.\n String releasedVersionValue = releasedVersion.toString();\n\n // This would not always reflect the expected version.\n int dashIndex = releasedVersionValue.indexOf('-');\n if (dashIndex >= 0) {\n releasedVersionValue = releasedVersionValue.substring(0, dashIndex);\n }\n\n defineVersionProperty(\"version\", releasedVersionValue);\n defineVersionProperty(\"majorVersion\", releasedVersion.getMajorVersion());\n defineVersionProperty(\"minorVersion\", releasedVersion.getMinorVersion());\n defineVersionProperty(\"incrementalVersion\", releasedVersion.getIncrementalVersion());\n defineVersionProperty(\"buildNumber\", releasedVersion.getBuildNumber());\n defineVersionProperty(\"qualifier\", releasedVersion.getQualifier());\n } else {\n getLog().debug(\"No released version found.\");\n }\n\n } catch (VersionRangeResolutionException e) {\n if (getLog().isWarnEnabled()) {\n getLog().warn(\"Failed to retrieve artifacts metadata, cannot resolve the released version\");\n }\n }\n }",
"private List<Site> readRemoteData( ) {\n\t\tList<Site> siteList = null;\n\n\t\t// Open a connection to the remote version URL\n\t\t// and get an inputStream\n\t\tURLConnection \tconnection = null; \n\t\tInputStream \tinputStream = null;\n\t\ttry {\n\t\t\tconnection = dataURL_.openConnection();\n\t\t\tinputStream = connection.getInputStream();\n\t\t} catch( IOException e ) {\n\t\t\tLog.e( getClass( ).getCanonicalName(), \"Problem getting remote data.\", e);\n\n\t\t\t// Tidy up. NB inputStream must be null to get here\n\t\t\tif( connection != null ) {\n\t\t\t\tconnection = null;\n\t\t\t}\n\t\t}\n\n\n\n\t\tif( inputStream != null ) {\n\t\t\t// Wrap inputStream as an Inputsource\n\t\t\tInputSource source = new InputSource( inputStream );\n\n\t\t\t/** Handling XML */\n\t\t\tSAXParserFactory saxParserFactory = SAXParserFactory.newInstance();\n\t\t\tSiteListContentHandler handler = new SiteListContentHandler( );\n\n\t\t\ttry {\n\t\t\t\tSAXParser saxParser = saxParserFactory .newSAXParser();\n\t\t\t\tXMLReader xmlReader = saxParser.getXMLReader();\n\n\t\t\t\t// Parse XML using handler\n\t\t\t\txmlReader.setContentHandler( handler );\n\t\t\t\txmlReader.parse( source );\n\t\t\t} catch (ParserConfigurationException e) {\n\t\t\t\tLog.e( getClass().getCanonicalName(), \"Problem creating parser\", e);\n\t\t\t} catch (SAXException e) {\n\t\t\t\tLog.e( getClass().getCanonicalName(), \"Problem parsing Sites from input\", e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.e( getClass().getCanonicalName(), \"Problem parsing Sites from input\", e);\n\t\t\t}\n\t\t\tsiteList = handler.getSiteList();\n\t\t} else {\n\t\t\tLog.e( getClass().getCanonicalName(), \"inputStream was null\");\n\t\t}\n\n\t\treturn siteList;\n\t}",
"private static List<OBREntry> parseOBRRepository(final ConnectionFactory connectionFactory, URL obrBaseUrl, String repositoryName) throws XPathExpressionException, IOException {\n FixedIndexedRepo fixedIndexedRepo = new FixedIndexedRepo();\n \n AceUrlConnector aceUrlConnector = new AceUrlConnector(connectionFactory);\n Registry registry = new RegistryImpl(aceUrlConnector);\n fixedIndexedRepo.setRegistry(registry);\n \n Map<String, String> properties = new HashMap<>();\n properties.put(FixedIndexedRepo.PROP_LOCATIONS, new URL(obrBaseUrl, repositoryName).toString());\n fixedIndexedRepo.setProperties(properties);\n \n Requirement requirement = new CapReqBuilder(\"osgi.identity\")\n .addDirective(\"filter\", \"(&(osgi.identity=*)(version=*)(type=*))\")\n .buildSyntheticRequirement();\n \n Map<Requirement, Collection<Capability>> sourceResources = fixedIndexedRepo.findProviders(Collections.singleton(requirement));\n if (sourceResources.isEmpty() || sourceResources.get(requirement).isEmpty()) {\n return Collections.emptyList();\n }\n List<OBREntry> obrList = new ArrayList<>();\n Iterator<Capability> capabilities = sourceResources.get(requirement).iterator();\n while (capabilities.hasNext()) {\n Capability capability = capabilities.next();\n \n Resource resource = capability.getResource();\n List<Capability> identities = resource.getCapabilities(IdentityNamespace.IDENTITY_NAMESPACE);\n String bsn = null;\n Version version = null;\n if (identities != null && identities.size() == 1){\n Capability id = identities.get(0);\n bsn = (String) id.getAttributes().get(IdentityNamespace.IDENTITY_NAMESPACE);\n version = (Version) id.getAttributes().get(IdentityNamespace.CAPABILITY_VERSION_ATTRIBUTE);\n }\n \n URI uri = null;\n List<Capability> contentCapabilities = resource.getCapabilities(ContentNamespace.CONTENT_NAMESPACE);\n if (contentCapabilities != null && contentCapabilities.size() == 1) {\n Capability content = contentCapabilities.get(0);\n uri = (URI) content.getAttributes().get(ContentNamespace.CAPABILITY_URL_ATTRIBUTE);\n }\n \n if (bsn != null && uri != null) {\n obrList.add(new OBREntry(bsn, bsn, version.toString(), uri.toString().substring(obrBaseUrl.toString().length())));\n } else {\n throw new IllegalStateException(\"No Identity or multiple identities\");\n }\n }\n\n return obrList;\n }",
"public void testExtractFromGoodContent() throws Exception {\n String url = \"http://web2.msue.msu.edu/Bulletins/Bulletin/PDF/Historical/finished_pubs/e49/index.html\";\n MockCachedUrl cu = new MockCachedUrl(url, msueau);\n cu.setContent(goodContent);\n cu.setContentSize(goodContent.length());\n cu.setProperty(CachedUrl.PROPERTY_CONTENT_TYPE, \"text/html\");\n FileMetadataExtractor me = \n new MichiganStateUniversityExtensionHtmlMetadataExtractorFactory.MichiganStateUniversityExtensionHtmlMetadataExtractor();\n FileMetadataListExtractor mle = new FileMetadataListExtractor(me);\n List<ArticleMetadata> mdlist = mle.extract(MetadataTarget.Any, cu);\n assertNotEmpty(mdlist);\n ArticleMetadata md = mdlist.get(0);\n assertNotNull(md);\n assertEquals(Arrays.asList(goodAuthors), md.getList(MetadataField.FIELD_AUTHOR));\n assertEquals(goodArticleTitle, md.get(MetadataField.FIELD_ARTICLE_TITLE));\n assertEquals(goodJournalTitle, md.get(MetadataField.FIELD_JOURNAL_TITLE));\n assertEquals(goodDate, md.get(MetadataField.FIELD_DATE));\n assertEquals(goodPdfUrl, md.get(MetadataField.FIELD_ACCESS_URL));\n md = mdlist.get(4);\n assertEquals(goodRenamedArticleTitle, md.get(MetadataField.FIELD_ARTICLE_TITLE));\n }",
"public final EObject ruleEArtifacts() throws RecognitionException {\n EObject current = null;\n\n EObject lv_artifacts_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:7738:2: ( ( () ( (lv_artifacts_1_0= ruleEArtifactDefinition ) )* ) )\n // InternalRMParser.g:7739:2: ( () ( (lv_artifacts_1_0= ruleEArtifactDefinition ) )* )\n {\n // InternalRMParser.g:7739:2: ( () ( (lv_artifacts_1_0= ruleEArtifactDefinition ) )* )\n // InternalRMParser.g:7740:3: () ( (lv_artifacts_1_0= ruleEArtifactDefinition ) )*\n {\n // InternalRMParser.g:7740:3: ()\n // InternalRMParser.g:7741:4: \n {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getEArtifactsAccess().getEArtifactsAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n\n }\n\n // InternalRMParser.g:7747:3: ( (lv_artifacts_1_0= ruleEArtifactDefinition ) )*\n loop59:\n do {\n int alt59=2;\n int LA59_0 = input.LA(1);\n\n if ( (LA59_0==RULE_ID) ) {\n alt59=1;\n }\n\n\n switch (alt59) {\n \tcase 1 :\n \t // InternalRMParser.g:7748:4: (lv_artifacts_1_0= ruleEArtifactDefinition )\n \t {\n \t // InternalRMParser.g:7748:4: (lv_artifacts_1_0= ruleEArtifactDefinition )\n \t // InternalRMParser.g:7749:5: lv_artifacts_1_0= ruleEArtifactDefinition\n \t {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getEArtifactsAccess().getArtifactsEArtifactDefinitionParserRuleCall_1_0());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_43);\n \t lv_artifacts_1_0=ruleEArtifactDefinition();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getEArtifactsRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"artifacts\",\n \t \t\t\t\t\t\tlv_artifacts_1_0,\n \t \t\t\t\t\t\t\"org.sodalite.dsl.RM.EArtifactDefinition\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop59;\n }\n } while (true);\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"default String getArtifactId() {\n return getIdentifier().getArtifactId();\n }",
"@ApiOperation(value = \"Searches for artifacts with attributes matching the values specified as query parameters. \" //\n\t\t\t+ \"Defaults to match all (conjunction); send junction query parameter '_j=o' to match any (disjunction).\", //\n\t\t\tresponse = MLPArtifact.class, responseContainer = \"Page\")\n\t@ApiPageable\n\t@ApiResponses({ @ApiResponse(code = 400, message = \"Bad request\", response = ErrorTransport.class) })\n\t@RequestMapping(value = \"/\" + CCDSConstants.SEARCH_PATH, method = RequestMethod.GET)\n\tpublic Object searchArtifacts(//\n\t\t\t@ApiParam(value = \"Junction\", allowableValues = \"a,o\") //\n\t\t\t@RequestParam(name = CCDSConstants.JUNCTION_QUERY_PARAM, required = false) String junction, //\n\t\t\t@RequestParam(name = MLPArtifact_.ARTIFACT_TYPE_CODE, required = false) String artifactTypeCode, //\n\t\t\t@RequestParam(name = MLPArtifact_.NAME, required = false) String name, //\n\t\t\t@RequestParam(name = MLPArtifact_.URI, required = false) String uri, //\n\t\t\t@RequestParam(name = MLPArtifact_.VERSION, required = false) String version, //\n\t\t\t@RequestParam(name = MLPArtifact_.USER_ID, required = false) String userId, //\n\t\t\tPageable pageRequest, HttpServletResponse response) {\n\t\tlogger.debug(\"searchArtifacts enter\");\n\t\tboolean isOr = junction != null && \"o\".equals(junction);\n\t\tif (artifactTypeCode == null && name == null && uri == null && version == null && userId == null) {\n\t\t\tresponse.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t\treturn new ErrorTransport(HttpServletResponse.SC_BAD_REQUEST, \"Missing query\", null);\n\t\t}\n\t\ttry {\n\t\t\treturn artifactSearchService.findArtifacts(artifactTypeCode, name, uri, version, userId, isOr, pageRequest);\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"searchArtifacts failed: {}\", ex.toString());\n\t\t\tresponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n\t\t\treturn new ErrorTransport(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,\n\t\t\t\t\tex.getCause() != null ? ex.getCause().getMessage() : \"searchArtifacts failed\", ex);\n\t\t}\n\t}",
"Digital_Artifact createDigital_Artifact();",
"public com.google.cloud.aiplatform.v1.ListArtifactsResponse listArtifacts(\n com.google.cloud.aiplatform.v1.ListArtifactsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListArtifactsMethod(), getCallOptions(), request);\n }",
"public DependencyResolver getArtifactResolver() {\n return artifactResolver;\n }",
"public Object caseArtifactDefinition(ArtifactDefinition object) {\n\t\treturn null;\n\t}",
"private void parseLastfm() {\t\t\r\n\t\tfor(String artist : library.getCopyArtists()) {\r\n\t\t\ttry {\r\n\t\t\t\tartist = URLEncoder.encode(artist, \"UTF-8\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tthis.wq.execute(new Fetcher(artist, library));\r\n\t\t}\r\n\t}",
"public Object getValue(String name)\n\t\t{\n\t\t\tString[] names = name.split(ResourcesMetadata.DOT);\n\t\t\tObject rv = m_structuredArtifact;\n\t\t\tif(rv != null && (rv instanceof Map) && ((Map) rv).isEmpty())\n\t\t\t{\n\t\t\t\trv = null;\n\t\t\t}\n\t\t\tfor(int i = 1; rv != null && i < names.length; i++)\n\t\t\t{\n\t\t\t\tif(rv instanceof Map)\n\t\t\t\t{\n\t\t\t\t\trv = ((Map) rv).get(names[i]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\trv = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rv;\n\n\t\t}",
"protected Collection<ArticleMetadata> modifyAMList(SourceXmlSchemaHelper helper,\n CachedUrl datasetCu, List<ArticleMetadata> allAMs) {\n\n Matcher mat = TOP_METADATA_PATTERN.matcher(datasetCu.getUrl());\n Pattern ARTICLE_METADATA_PATTERN = null;\n if (mat.matches()) {\n // must create this here because it is specific to this tar set\n String pattern_string = \"^\" + mat.group(1) + mat.group(2) + \"[A-Z]\\\\.tar!/\" + mat.group(2) + \"/.*/main\\\\.xml$\";\n log.debug3(\"Iterate and find the pattern: \" + pattern_string);\n ARTICLE_METADATA_PATTERN = Pattern.compile(pattern_string, Pattern.CASE_INSENSITIVE);\n\n // Limit the scope of the iteration to only those TAR archives that share this tar number\n List<String> rootList = createRootList(datasetCu, mat);\n // Now create the map of files to the tarfile they're in\n ArchivalUnit au = datasetCu.getArchivalUnit();\n SubTreeArticleIteratorBuilder articlebuilder = new SubTreeArticleIteratorBuilder(au);\n SubTreeArticleIterator.Spec artSpec = articlebuilder.newSpec();\n // Limit it just to this group of tar files\n artSpec.setRoots(rootList); \n artSpec.setPattern(ARTICLE_METADATA_PATTERN); // look for url-ending \"main.xml\" files\n artSpec.setExcludeSubTreePattern(NESTED_ARCHIVE_PATTERN); //but do not descend in to any underlying archives\n artSpec.setVisitArchiveMembers(true);\n articlebuilder.setSpec(artSpec);\n articlebuilder.addAspect(MAIN_XML_PATTERN,\n XML_REPLACEMENT,\n ArticleFiles.ROLE_ARTICLE_METADATA);\n\n for (SubTreeArticleIterator art_iterator = articlebuilder.getSubTreeArticleIterator();\n art_iterator.hasNext(); ) {\n // because we haven't set any roles, the AF will be what the iterator matched\n String article_xml_url = art_iterator.next().getFullTextCu().getUrl();\n log.debug3(\"tar map iterator found: \" + article_xml_url);\n int tarspot = StringUtil.indexOfIgnoreCase(article_xml_url, \".tar!/\");\n int dividespot = StringUtil.indexOfIgnoreCase(article_xml_url, \"/\", tarspot+6);\n TarContentsMap.put(article_xml_url.substring(dividespot + 1), article_xml_url);\n log.debug3(\"TarContentsMap add key: \" + article_xml_url.substring(dividespot + 1));\n }\n } else {\n log.warning(\"ElsevierDTD5: Unable to create article-level map for \" + datasetCu.getUrl() + \" - metadata will not include article titles or useful access.urls\");\n }\n return allAMs;\n }",
"static public void readRepository(){\n File cache_file = getCacheFile();\n if (cache_file.exists()) {\n try {\n // Read the cache acutally\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document document = builder.parse(cache_file);\n NodeList images_nodes = document.getElementsByTagName(\"image\");\n for (int i = 0; i < images_nodes.getLength(); i++) {\n Node item = images_nodes.item(i);\n String image_path = item.getTextContent();\n File image_file = new File(image_path);\n if (image_file.exists()){\n AppImage image = Resources.loadAppImage(image_path);\n images.add(image);\n }\n }\n }\n catch (Exception e) {\n throw new RuntimeException(e);\n }\n }\n }"
]
| [
"0.5722722",
"0.56573343",
"0.5578998",
"0.5531136",
"0.5422633",
"0.53876543",
"0.5371926",
"0.53367573",
"0.5331336",
"0.52364105",
"0.52174914",
"0.5189639",
"0.5139688",
"0.5094468",
"0.50897884",
"0.50672185",
"0.50175",
"0.4977778",
"0.49615318",
"0.4960615",
"0.49195394",
"0.4865792",
"0.48613825",
"0.48377982",
"0.48256543",
"0.4815903",
"0.47970912",
"0.478414",
"0.47813526",
"0.4767685",
"0.47593865",
"0.47498754",
"0.47353157",
"0.47320783",
"0.4730999",
"0.47206715",
"0.47162452",
"0.47162414",
"0.47124496",
"0.47110158",
"0.46949416",
"0.46925545",
"0.4677163",
"0.46767807",
"0.467423",
"0.4672266",
"0.46701777",
"0.46630067",
"0.46618515",
"0.46552825",
"0.46431348",
"0.46387705",
"0.46339542",
"0.46310836",
"0.462973",
"0.46079117",
"0.46076804",
"0.4600719",
"0.45943168",
"0.4585554",
"0.4583325",
"0.45819855",
"0.45798978",
"0.45759225",
"0.45676792",
"0.45622292",
"0.4562057",
"0.4560535",
"0.45527247",
"0.45501897",
"0.4546791",
"0.45348853",
"0.45283824",
"0.4524125",
"0.45227477",
"0.45118204",
"0.45034286",
"0.44995403",
"0.44948792",
"0.449268",
"0.44922444",
"0.4489655",
"0.44841626",
"0.44785982",
"0.4466048",
"0.44604155",
"0.44541368",
"0.4450949",
"0.44385928",
"0.4428289",
"0.4408522",
"0.4405453",
"0.4392616",
"0.4390564",
"0.4390214",
"0.4389846",
"0.4389698",
"0.4385137",
"0.43833113",
"0.43823504"
]
| 0.59978575 | 0 |
Only creates one NuxeoConnector instance and returns it. | public NuxeoConnector getNuxeoInstance() {
if(this.nuxeoConnector==null) {
nuxeoConnector = new NuxeoConnector();
}
return this.nuxeoConnector;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static GaConnector createConnector() {\n return new GaConnector();\n }",
"public static GomokuConnector getInstance(){\n if(instance == null){\n System.err.println(\"getInstance() called on a null GomokuConnector.\");\n return null;\n }\n return instance;\n }",
"public JupiterConnector getConnector(@Nullable String name) {\n if (Strings.isEmpty(name) || DEFAULT_NAME.equals(name)) {\n return getDefault();\n }\n\n return new JupiterConnector(this,\n name,\n redis.getPool(name),\n fallbackPools.computeIfAbsent(name, this::fetchFallbackPool));\n }",
"public static ConnectorManager getInstance() {\n synchronized (ConnectorManager.class) {\n if (instance == null) {\n instance = new ConnectorManager();\n }\n }\n\n return instance;\n }",
"public static Connector GetConnection(){\n\t\ttry{\n\t\t\tif(c_connection == null){\n\t\t\t\tc_connection = new Connector();\n\t\t\t}\n\t\t\treturn c_connection;\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}",
"public JupiterConnector getDefault() {\n if (defaultConnection == null) {\n defaultConnection = new JupiterConnector(this,\n DEFAULT_NAME,\n redis.getPool(DEFAULT_NAME),\n fallbackPools.computeIfAbsent(DEFAULT_NAME, this::fetchFallbackPool));\n }\n\n return defaultConnection;\n }",
"public static DbConnector getInstancia() {\r\n\t\tif (instancia == null) {\r\n\t\t\tinstancia = new DbConnector();\r\n\t\t}\r\n\t\treturn instancia;\r\n\t}",
"Connector getConnector(int index);",
"protected NuxeoClient getClient() {\n if (client == null) {\n initClient();\n }\n return client;\n }",
"@Override\n protected Connector createConnector(Map<String, Object> readChannels, String[] writeChannels, Boolean useTcsSimulation) {\n return new Connector(readChannels, writeChannels);\n }",
"protected ConnectionProvider createConnectionProviderIfNotSupplied() {\n\t\tif (connectionProviderSupplier != null) {\n\t\t\treturn connectionProviderSupplier.get();\n\t\t}\n\t\treturn new CoreConnectionPool();\n\t}",
"public LiferayConnector getLiferayInstance() {\n\t\tif(this.liferayConnector==null) {\n\t\t\tthis.liferayConnector = new LiferayConnector();\n\t\t}\n\t\treturn this.liferayConnector;\n\t}",
"@Nullable Connector getConnector();",
"public static Casino getInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tcreateInstance();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"@Override\n public Connection getConnection() {\n boolean createNewConnection = false;\n Connection returnConnection = null;\n synchronized (connections) { //Lock the arraylist\n if (connections.isEmpty()) { //Check if any connections available\n createNewConnection = true; //If not, create new one\n } else {\n returnConnection = connections.get(0); //Get first available one\n connections.remove(0); //And remove from list\n }\n }\n if (createNewConnection) { //If new connection needed\n returnConnection = createConnection();\n }\n return returnConnection;\n }",
"public static NPIconFactory getInstance()\r\n {\r\n if(instance==null)\r\n instance = new NPIconFactory();\r\n return instance;\r\n }",
"UUID getConnectorId();",
"public static Comms connect() {\r\n\t\tComms client = null;\r\n\t\ttry(ServerSocket server = new ServerSocket(4444)) {\r\n\t\t\tclient = new Comms(server.accept());\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn client;\r\n\t}",
"public static Connection getConnection() {\n return singleInstance.createConnection();\n }",
"public ConnectionConfig createConnection()\n {\n return _connectionConfig;\n }",
"@Override\n\tpublic Connector getConnector() {\n\t\treturn null;\n\t}",
"private static MongoClient getConnection() {\n if (instance == null) {\n instance = MongoClients.create();\n }\n return instance;\n }",
"public static ConnectionPool getInstance() {\n if (!createdInstance.get()) {\n try {\n lock.lock();\n\n if (instance == null) {\n instance = new ConnectionPool();\n createdInstance.set(true);\n\n LOGGER.log(Level.INFO, \"ConnectionPool instance created!\");\n }\n } finally {\n lock.unlock();\n }\n }\n\n return instance;\n }",
"public static RetrofitClient getInstance() {\n return OUR_INSTANCE;\n }",
"public static RpcClient getInstance() {\n\t\tif (instance == null) {\n\t\t\tsynchronized (RpcClient.class) {\n\t\t\t\tif (instance == null) {\n\t\t\t\t\tinstance = new RpcClient(\"ye-cheng.duckdns.org\", 8980); // FIXME: ugly hard code\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}",
"public static ConnectionPool getInstance() {\n if (!created.get()) {\n try {\n createLock.lock();\n if (instance == null) {\n instance = new ConnectionPool();\n created.set(true);\n }\n } finally {\n createLock.unlock();\n }\n }\n return instance;\n }",
"public synchronized static Connection getInstance()\n\t{\n\t\tif(connect == null)\n\t\t{\n\t\t\tnew DAOconnexion();\n\t\t}\n\t\treturn connect;\n\t}",
"@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}",
"public static Connection createConnection() {\n\t\treturn new FabricaDeConexoes().getConnection();\n\t}",
"public static Executor getInstance() {\n Object object = sDirectExecutor;\n if (object != null) {\n return sDirectExecutor;\n }\n object = DirectExecutor.class;\n synchronized (object) {\n DirectExecutor directExecutor = sDirectExecutor;\n if (directExecutor == null) {\n sDirectExecutor = directExecutor = new DirectExecutor();\n }\n return sDirectExecutor;\n }\n }",
"public static TCPClient getInstance() {\r\n if (tcpClient == null) {\r\n tcpClient = new TCPClient();\r\n }\r\n return tcpClient;\r\n }",
"public static CommandBrocker getInstance() {\n\t\tif (cb == null) {\n\t\t\tcb = new CommandBrocker();\n\t\t}\n\t\treturn cb;\n\t}",
"public static RemoteNXT Connect(){\n\t\tNXTCommConnector c = Bluetooth.getConnector();\r\n\t\t\n\t\t// if no devices have been recognized\n\t\t// no connection can be made,\n\t\t// therefore, the system terminates the \n\t\t// program with an error\n\t\tif (c == null) {\n\t\t\tLCD.clear();\n\t\t\tLCD.drawString(\"No device in range\", 0, 0);\n\t\t\t// terminate the program with an error\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tString fname = \"Slave\";\r\n\t\ttry {\n\t\t\t// try to establish the connection \n\t\t\t// by passing in the name of the remote NXT brick\n\t\t\t// along with the singleton connection object\n\t\t\t// instantiated previuosly\r\n\t\t\tslave = new RemoteNXT(fname, c);\r\n\t\t} catch (IOException e) {\n\t\t\t// throw exception if connection\n\t\t\t// failed to establish\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tString con = \"Connected to \";\r\n\n\t\tLCD.clear();\n\t\tLCD.drawString(con, 2, 3);\n\t\tLCD.drawString(fname, 6, 4);\n\t\t\r\n\t\treturn slave;\r\n\t}",
"public static GitClient getOrCreate() {\n\t\tIPath path = ConfigPersistenceManager.getPathToGit();\n\t\tString reference = ConfigPersistenceManager.getBranch();\n\t\tString projectKey = ConfigPersistenceManager.getProjectKey();\n\t\treturn getOrCreate(path, reference, projectKey);\n\t}",
"private static ConnectClient getPool(String address, Class<? extends ConnectClient> connectClientImpl,\n final XxlRpcReferenceBean xxlRpcReferenceBean) throws Exception {\n if (connectClientMap == null) {\n synchronized (ConnectClient.class) {\n if (connectClientMap == null) {\n // init\n connectClientMap = new ConcurrentHashMap<String, ConnectClient>();\n // stop callback\n xxlRpcReferenceBean.getInvokerFactory().addStopCallBack(new BaseCallback() {\n @Override\n public void run() throws Exception {\n if (connectClientMap.size() > 0) {\n for (String key : connectClientMap.keySet()) {\n ConnectClient clientPool = connectClientMap.get(key);\n clientPool.close();\n }\n connectClientMap.clear();\n }\n }\n });\n }\n }\n }\n\n // get-valid client\n ConnectClient connectClient = connectClientMap.get(address);\n if (connectClient != null && connectClient.isValidate()) {\n return connectClient;\n }\n\n // lock\n Object clientLock = connectClientLockMap.get(address);\n if (clientLock == null) {\n connectClientLockMap.putIfAbsent(address, new Object());\n clientLock = connectClientLockMap.get(address);\n }\n\n // remove-create new client\n synchronized (clientLock) {\n\n // get-valid client, avlid repeat\n connectClient = connectClientMap.get(address);\n if (connectClient != null && connectClient.isValidate()) {\n return connectClient;\n }\n\n // remove old\n if (connectClient != null) {\n connectClient.close();\n connectClientMap.remove(address);\n }\n\n // set pool\n ConnectClient connectClient_new = connectClientImpl.newInstance();\n try {\n connectClient_new.init(address, xxlRpcReferenceBean.getSerializerInstance(), xxlRpcReferenceBean.getInvokerFactory());\n connectClientMap.put(address, connectClient_new);\n } catch (Exception e) {\n connectClient_new.close();\n throw e;\n }\n\n return connectClient_new;\n }\n\n }",
"public int getNumberOfConnectors() { return numberOfConnectors; }",
"public LDAPSDKConnection createConnection() {\r\n return new NetscapeV3Connection(false);\r\n }",
"public static QuestionRepository getInstance() {\n if (sCrimeRepository == null)\n sCrimeRepository = new QuestionRepository();\n\n return sCrimeRepository;\n }",
"public static ConnectionServer getInstance(Activity ctx) {\n if (instance == null) {\n instance = new ConnectionServer(ctx);\n }\n\n return instance;\n }",
"public static BackendFactory getInstance() {\n return INSTANCE;\n }",
"public static synchronized TowerManager getUniqueInstance() {\n if (uniqueInstance == null) {\n uniqueInstance = new TowerManager();\n }\n return uniqueInstance;\n }",
"public ConnectionInstance getConnection(NetworkManager manager)\n {\n ConnectionInstance ret = connections.get(manager);\n if (ret == null)\n {\n ret = new ConnectionInstance(manager);\n connections.put(manager, ret);\n }\n return ret;\n }",
"public synchronized CuratorFramework getLocalConnection() throws IOException\n {\n if ( localConnection == null )\n {\n CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()\n .connectString(\"localhost:\" + configManager.getConfig().getInt(IntConfigs.CLIENT_PORT))\n .sessionTimeoutMs(arguments.connectionTimeOutMs * 10)\n .connectionTimeoutMs(arguments.connectionTimeOutMs)\n .retryPolicy(new ExponentialBackoffRetry(1000, 3));\n\n if ( arguments.aclProvider != null )\n {\n builder = builder.aclProvider(arguments.aclProvider);\n }\n\n localConnection = builder.build();\n localConnection.start();\n }\n return localConnection;\n }",
"public static ConnectionManager getInstance() {\r\n if (connectionManager == null) {\r\n synchronized (ConnectionManager.class) {\r\n if (connectionManager == null) {\r\n connectionManager = new ConnectionManager();\r\n }\r\n }\r\n }\r\n\r\n return connectionManager;\r\n }",
"private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}",
"NodeConnection createNodeConnection();",
"public static Connection getInstance() {\n\n if (instance == null) {\n instance = new Connection();\n }\n return instance;\n }",
"public T caseConnector(Connector object) {\n\t\treturn null;\n\t}",
"public static OneByOneManager getInstance() {\n // The static instance of this class\n return INSTANCE;\n }",
"public T caseEConnector(EConnector object) {\n\t\treturn null;\n\t}",
"public interface JettyConnectorFactory {\n\n\t/**\n\t * Build and configure a connector for our web server.\n\t */\n\tpublic Connector buildConnector(Server server, int serverPort);\n}",
"DatabaseConnector getConnector() {return db;}",
"public static RCProxy instance(){\n\t\treturn SingletonHolder.INSTANCE;\n\t}",
"public Object GetPlugin()\r\n\t{\r\n\t\tif (_isSingleton)\r\n\t\t{\r\n\t\t\tif (_singletonPlugin == null)\r\n\t\t\t{\r\n\t\t\t\ttry {\r\n\t\t\t\t\t_singletonPlugin = ClassFactory.CreateObject(_pluginType);\r\n\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n if (_configuration != null && !_configuration.equals(\"\"))\r\n {\r\n \tPathUtilities.PushFilename(_filename);\r\n \ttry\r\n \t{\r\n XmlFramework.DeserializeXml(_configuration, _singletonPlugin);\r\n \t}\r\n catch(Exception e)\r\n {\r\n _singletonPlugin = null;\r\n }\r\n \tfinally\r\n \t{\r\n \t\tPathUtilities.PopFilename(_filename);\r\n \t}\r\n }\r\n\t\t\t}\r\n\t\t\treturn _singletonPlugin;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tObject plugin = null;\r\n\t\t\ttry {\r\n\t\t\t\tplugin = ClassFactory.CreateObject(_pluginType);\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n if (_configuration != null && !_configuration.equals(\"\"))\r\n {\r\n \tPathUtilities.PushFilename(_filename);\r\n try\r\n {\r\n XmlFramework.DeserializeXml(_configuration, plugin);\r\n }\r\n catch(Exception e)\r\n {\r\n plugin = null;\r\n }\r\n \tfinally\r\n \t{\r\n \tPathUtilities.PopFilename(_filename);\r\n \t}\r\n }\r\n return plugin;\r\n\t\t}\r\n\t}",
"public static LoCurso GetInstancia(){\n if (instancia==null)\n {\n instancia = new LoCurso();\n \n }\n\n return instancia;\n }",
"public DNSConnector getConnector() {\r\n\t\treturn (new DNSUDPConnector());\r\n\t}",
"public PooledConnection newInstance() {\n return new PooledConnection(pool);\n }",
"public static DeliveryConv getInstance(int x, int y) /* x and y of top conveyor: (1,5)*/ {\n if (single_instance == null) {\n single_instance = new DeliveryConv(x, y);\n } \n return single_instance; \n }",
"protected Connection createConnectionFigure() {\n\t\treturn new SyncFigure();\n\t}",
"public static AMQProtocolServer getInstance() {\n if (!_invoked) {\n // Read config\n config = Application.readConfigurationFiles();\n\n // Attempt to extract host and port from configuration file\n String configHost = config.getProperty(\"AMQP_HOST\", DEFAULT_HOST);\n Integer configPort = null;\n try {\n configPort = Integer.parseInt(config.getProperty(\"AMQP_PORT\", Integer.toString(DEFAULT_PORT)));\n } catch (NumberFormatException e) {\n log.error(\"Failed to parse AMQP Port, using default: \" + DEFAULT_PORT);\n }\n\n // Update singleton\n _singleton = new AMQProtocolServer(configHost, configPort);\n _singleton.useQueue = Boolean.parseBoolean(config.getProperty(\"AMQP_USE_QUEUE\", DEFAULT_USE_QUEUE));\n _singleton.useSASL = Boolean.parseBoolean(config.getProperty(\"AMQP_USE_SASL\", DEFAULT_USE_SASL));\n }\n\n return _singleton;\n }",
"public Connection create() {\n\t\tif(ds==null)return null ;\n\t\ttry{\n\t\t\treturn ds.getConnection();\n\t\t}catch(Exception e ){\n\t\t\tSystem.out.println(e) ;\n\t\t\treturn null ;\n\t\t}\n\t\t\n\t}",
"public static PoolInfoClient create() {\n return new PoolInfoClient();\n }",
"public static SingleObject getInstance(){\n return instance;\n }",
"@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }",
"public static Servidor getInstance() throws IOException {\n if (instancia == null) {\n instancia = new Servidor(\"Servidor liga 19/20\");\n }\n\n return instancia;\n }",
"io.netifi.proteus.admin.om.Connection getConnection(int index);",
"public Connector buildConnector(Server server, int serverPort);",
"private synchronized Connection getConnection(String serverName)\n {\n if (configurationStoreConnection == null)\n {\n ConnectorConfigurationFactory connectorConfigurationFactory = new ConnectorConfigurationFactory();\n\n return connectorConfigurationFactory.getServerConfigConnection(serverName);\n }\n else\n {\n return configurationStoreConnection;\n }\n }",
"public static ConnectionFactory getInstance() {\n if (_instance == null) {\n synchronized (ConnectionFactory.class) {\n if (_instance == null) {\n _instance = new ConnectionFactory();\n }\n }\n }\n return _instance;\n }",
"public static FacadeCommandOfService getInstance(){\n if(facadeCommandOfService == null){\n facadeCommandOfService = new FacadeCommandOfService();\n }\n return facadeCommandOfService;\n }",
"List<IConnector> getConnectors();",
"ConnectionImpl getNewConnection() {\n if (injectedConnection != null) {\n return injectedConnection;\n }\n return new ConnectionImpl();\n }",
"Connection createConnection();",
"public static SingleObject getInstance()\r\n {\r\n return instance;\r\n }",
"@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static ConnectionPool getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new ConnectionPool();\n\t\t}\n\t\treturn instance;\n\t}",
"@Override\n public Connection call() throws Exception {\n return createConnection();\n }",
"public static ConnectorCfg create(\n SchemeType scheme, Configuration config) {\n ConnectorCfg result = null;\n if (scheme.equals(SchemeType.TCP)) {\n result = new TCPConnectorCfg(config);\n } else if (scheme.equals(SchemeType.TCPS)) {\n result = new TCPSConnectorCfg(config);\n } else if (scheme.equals(SchemeType.RMI)) {\n result = new RMIConnectorCfg(config);\n } else if (scheme.equals(SchemeType.HTTP)) {\n result = new HTTPConnectorCfg(config);\n } else if (scheme.equals(SchemeType.HTTPS)) {\n result = new HTTPSConnectorCfg(config);\n } else if (scheme.equals(SchemeType.EMBEDDED)) {\n result = new VMConnectorCfg(config);\n }\n return result;\n }",
"public static CoeurAStockage getInstance() \n\t{\n\t\tif(instance == null)\n\t\t\tinstance = new CoeurAStockageImpl();\n\t\treturn instance;\n\t}",
"public static synchronized ControladorVentanaConsola getInstance() {\r\n\r\n if (handler == null) {\r\n handler = new ControladorVentanaConsola();\r\n }\r\n return handler;\r\n }",
"@Override\n public GeneralOrthoMclSettingsVisualPanel getComponent() {\n if (component == null) {\n component = new GeneralOrthoMclSettingsVisualPanel();\n\n }\n return component;\n }",
"public static ETLgineServerJetty getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tinstance = new ETLgineServerJetty();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"public static PSUniqueObjectGenerator getInstance()\n {\n if ( null == ms_instance )\n ms_instance = new PSUniqueObjectGenerator();\n return ms_instance;\n }",
"@Override\n public Widget getWidget() {\n if (widget == null) {\n if (Profiler.isEnabled()) {\n Profiler.enter(\"AbstractComponentConnector.createWidget for \"\n + getClass().getSimpleName());\n }\n widget = createWidget();\n if (Profiler.isEnabled()) {\n Profiler.leave(\"AbstractComponentConnector.createWidget for \"\n + getClass().getSimpleName());\n }\n }\n\n return widget;\n }",
"public static Connection getInstance() {\n return LazyHolder.INSTANCE;\n }",
"public Connector getConnector (Address farAddr, boolean blocking) \n throws IOException {\n if (blocking) {\n return new TlsConnector (\n new EndPoint(this, (IPAddress)farAddr));\n } else {\n //return new SchedulableTcpConnector (\n // new EndPoint(this, (IPAddress)farAddr));\n throw new UnsupportedOperationException();\n }\n }",
"public static ThreadedPmClientInstanceResolver get() {\n\t\t// synchronization :: rely on registry to return same impl\n\t\tif (instance == null) {\n\t\t\tinstance = Registry.impl(ThreadedPmClientInstanceResolver.class);\n\t\t}\n\t\treturn instance;\n\t}",
"public static OI getInstance() {\n\t\treturn INSTANCE;\n\t}",
"private CuratorFramework createCurator() {\n // Create list of Servers\n final String serverStr = sharedZookeeperTestResource.getZookeeperConnectString();\n final List<String> serverList = Arrays.asList(Tools.splitAndTrim(serverStr));\n\n // Create config map\n final Map<String, Object> config = new HashMap<>();\n config.put(\"servers\", serverList);\n\n return CuratorFactory.createNewCuratorInstance(config, getClass().getSimpleName());\n }",
"public static FluentdRemoteSettings getInstance() {\n return INSTANCE;\n }",
"private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }",
"@Override\n\tpublic SwimConnection createInstance() {\n\t\tSwimConnection connection = null;\n\t\t\n\t\tif (this.hasSpecification()) {\n\t\t\tif (this.getSpecification().getId().equals(Specification.CONNECTION_SWIM_SIMULATED_ID)) {\n\t\t\t\tSimulatedSwimConnectionProperties properties = (SimulatedSwimConnectionProperties) this.getSpecification().getProperties();\n\t\t\t\tconnection = new SimulatedSwimConnection(\n\t\t\t\t\t\tproperties.getResourceDirectory(),\n\t\t\t\t\t\tDuration.ofMillis(properties.getUpdatePeriod()),\n\t\t\t\t\t\tproperties.getUpdateProbability(),\n\t\t\t\t\t\tproperties.getUpdateQuantity());\n\t\t\t\tif (properties.getSubscribesAIXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.AIXM);\n\t\t\t\tif (properties.getSubscribesFIXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.FIXM);\n\t\t\t\tif (properties.getSubscribesWXXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.WXXM);\n\t\t\t\tif (properties.getSubscribesIWXXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.IWXXM);\n\t\t\t\tif (properties.getSubscribesAMXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.AMXM);\n\t\t\t} else if (this.getSpecification().getId().equals(Specification.CONNECTION_SWIM_LIVE_ID)) {\n\t\t\t\tLiveSwimConnectionProperties properties = (LiveSwimConnectionProperties) this.getSpecification().getProperties();\n\t\t\t\tconnection = new LiveSwimConnection();\n\t\t\t\t// TODO: set properties for live SWIM connection\n\t\t\t\tif (properties.getSubscribesAIXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.AIXM);\n\t\t\t\tif (properties.getSubscribesFIXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.FIXM);\n\t\t\t\tif (properties.getSubscribesWXXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.WXXM);\n\t\t\t\tif (properties.getSubscribesIWXXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.IWXXM);\n\t\t\t\tif (properties.getSubscribesAMXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.AMXM);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn connection;\n\t}",
"@Override\n public FTPClient borrowObject()\n throws Exception {\n if (ftpBlockingQueue.size() == 0) {\n synchronized (FTPClient.class) {\n initPool(DEFAULT_POOL_SIZE);\n }\n }\n FTPClient client = ftpBlockingQueue.take();\n if (ObjectUtils.isEmpty(client)) {\n client = ftpClientFactory.create();\n // Put into the connection pool\n returnObject(client);\n // Verify that the object is valid\n } else if (!ftpClientFactory.validateObject(ftpClientFactory.wrap(client))) {\n // Process invalid objects\n invalidateObject(client);\n // Create a new object\n client = ftpClientFactory.create();\n // Put the new object into the connection pool\n returnObject(client);\n }\n return client;\n }",
"private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }",
"public static EngineBuilderFactory getInstance() {\n if (instance == null) {\n instance = new EngineBuilderFactory();\n }\n\n return instance;\n }",
"public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }",
"private RabbitMQConnectionFactory getConnectionFactory(RabbitMQOutTransportInfo transportInfo) {\n Hashtable<String, String> props = transportInfo.getProperties();\n RabbitMQConnectionFactory factory = rabbitMQConnectionFactoryManager.getConnectionFactory(props);\n return factory;\n }",
"public IntegrityConnection getDefaultConnection() throws IntegrityExceptionEx\n {\n try \n {\n Command cmd = new Command(Command.IM, \"servers\");\n Response resp = _cmdRunner.execute(cmd);\n if (resp.getWorkItemListSize() > 0) // Connected to something.\n {\n WorkItemIterator wkit = resp.getWorkItems();\n boolean found = false;\n while (wkit.hasNext() && !found)\n {\n WorkItem wk = wkit.next();\n if (wk.getField(\"default\").getBoolean().booleanValue())\n {\n String h = wk.getField(\"hostname\").getString();\n int p = wk.getField(\"portnumber\").getInteger().intValue();\n String u = wk.getField(\"username\").getString();\n _log.message(\"Found default connection \" + u + \"@\" + h + \":\" + p);\n return new IntegrityConnection(h, p, u);\n }\n }\n }\n return null;\n } catch (APIException ex) \n {\n throw IntegrityExceptionEx.create(\"Could not get the default api connection\", ex);\n }\n }",
"public static synchronized ChatAdministration getInstance(){\n\t\treturn singleInstance;\n\t}",
"private Handler getConnectorHandler() {\n return connectorHandler;\n }"
]
| [
"0.6610134",
"0.6145394",
"0.58588415",
"0.5854075",
"0.5843968",
"0.56083864",
"0.55633575",
"0.5473825",
"0.5443702",
"0.5431703",
"0.5426923",
"0.54139966",
"0.5381329",
"0.53496385",
"0.53442276",
"0.5332497",
"0.53322023",
"0.53187555",
"0.5281173",
"0.5270395",
"0.5259293",
"0.52384",
"0.5170778",
"0.5153027",
"0.51278234",
"0.5096919",
"0.50606376",
"0.50528246",
"0.5033854",
"0.5029001",
"0.502684",
"0.50085706",
"0.5003982",
"0.49948788",
"0.4986827",
"0.49674818",
"0.49638873",
"0.49529913",
"0.49479327",
"0.49442416",
"0.49414432",
"0.4937786",
"0.49336773",
"0.49327788",
"0.4932616",
"0.49234232",
"0.4923297",
"0.4921411",
"0.4919621",
"0.49137303",
"0.49051642",
"0.4883571",
"0.4882394",
"0.4879387",
"0.48639256",
"0.48573315",
"0.4856933",
"0.48513302",
"0.48450556",
"0.48390588",
"0.4835238",
"0.48304763",
"0.48279464",
"0.48261473",
"0.48229402",
"0.48207447",
"0.48181212",
"0.48176223",
"0.48168656",
"0.48101053",
"0.48087254",
"0.47947434",
"0.47866043",
"0.47701496",
"0.47695312",
"0.47658077",
"0.47601187",
"0.47588155",
"0.47583508",
"0.4757467",
"0.47455245",
"0.4740979",
"0.47405592",
"0.47386464",
"0.47375315",
"0.47329018",
"0.47303805",
"0.47301957",
"0.47296965",
"0.4727558",
"0.47272426",
"0.4726083",
"0.47231257",
"0.47225964",
"0.47219482",
"0.4721756",
"0.47108728",
"0.46961823",
"0.4694353",
"0.46937993"
]
| 0.80057997 | 0 |
Only creates one LiferayConnector instance and returns it. | public LiferayConnector getLiferayInstance() {
if(this.liferayConnector==null) {
this.liferayConnector = new LiferayConnector();
}
return this.liferayConnector;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static GaConnector createConnector() {\n return new GaConnector();\n }",
"public static ConnectorManager getInstance() {\n synchronized (ConnectorManager.class) {\n if (instance == null) {\n instance = new ConnectorManager();\n }\n }\n\n return instance;\n }",
"public static PredictionServiceConnector createForLocalService() {\n return new PredictionServiceConnector(Environment.getPredictionURL(), Environment.getPredictionPort());\n }",
"public static Connector GetConnection(){\n\t\ttry{\n\t\t\tif(c_connection == null){\n\t\t\t\tc_connection = new Connector();\n\t\t\t}\n\t\t\treturn c_connection;\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}",
"public static DbConnector getInstancia() {\r\n\t\tif (instancia == null) {\r\n\t\t\tinstancia = new DbConnector();\r\n\t\t}\r\n\t\treturn instancia;\r\n\t}",
"public static LOCFacade getInstance() {\r\n\t\tcreateInstance();\r\n\t\treturn instance;\r\n\t}",
"public JupiterConnector getConnector(@Nullable String name) {\n if (Strings.isEmpty(name) || DEFAULT_NAME.equals(name)) {\n return getDefault();\n }\n\n return new JupiterConnector(this,\n name,\n redis.getPool(name),\n fallbackPools.computeIfAbsent(name, this::fetchFallbackPool));\n }",
"public NuxeoConnector getNuxeoInstance() {\n\t\tif(this.nuxeoConnector==null) {\n\t\t\tnuxeoConnector = new NuxeoConnector();\n\t\t}\n\t\treturn this.nuxeoConnector;\n\t}",
"@Nullable Connector getConnector();",
"DatabaseConnector getConnector() {return db;}",
"private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}",
"public static GomokuConnector getInstance(){\n if(instance == null){\n System.err.println(\"getInstance() called on a null GomokuConnector.\");\n return null;\n }\n return instance;\n }",
"public JupiterConnector getDefault() {\n if (defaultConnection == null) {\n defaultConnection = new JupiterConnector(this,\n DEFAULT_NAME,\n redis.getPool(DEFAULT_NAME),\n fallbackPools.computeIfAbsent(DEFAULT_NAME, this::fetchFallbackPool));\n }\n\n return defaultConnection;\n }",
"LaunchingConnector findLaunchingConnector() {\n List<Connector> connectors = Bootstrap.virtualMachineManager().allConnectors();\n for (Connector connector : connectors) {\n if (connector.name().equals(\"com.sun.jdi.CommandLineLaunch\")) {\n return (LaunchingConnector) connector;\n }\n }\n throw new Error(\"No launching connector\");\n }",
"ISModifyConnector createISModifyConnector();",
"public T caseConnector(Connector object) {\n\t\treturn null;\n\t}",
"public interface ConnectorContext {\n\n\n /**\n * Get a reference to a global state manager for state coordination, dedup and ordering semantics\n *\n * @return global state manager instance\n */\n StateManager getStateManager();\n\n /**\n * Get a Globally unique connector instance identifier for the connector instance\n *\n * @return globally unique uuid\n */\n UUID getConnectorId();\n\n /**\n * Partition id for the connector instance.\n *\n * @return local partition id in cluster\n */\n int getPartitionId();\n\n /**\n * Get expected total instances of this connector type currently active\n *\n * @return total active instance count\n */\n int getInstanceCount();\n\n /**\n * Notifying the external runtime of metrics and other related events\n *\n * @param event Event to Sent\n * @return Error or success code\n */\n Integer publishEvent(SendableEvent event);\n\n /**\n * Receiving events from an external manager post initialization, meant for throttling and config updates.\n *\n * @param listener Local listener object to bind to.\n */\n void subscribeToEvents(Listener listener);\n\n /**\n * Get a reference to the global state manager\n *\n * @return a client object to interact with the scheme registry\n */\n SchemaManager getSchemaManager();\n}",
"public static DBCatalog getInstance(){\n return instance;\n }",
"public LoginServerConnector getLoginServerConnector() {\n\t\treturn connector;\n\t}",
"public static ConnectionPool getInstance() {\n if (!createdInstance.get()) {\n try {\n lock.lock();\n\n if (instance == null) {\n instance = new ConnectionPool();\n createdInstance.set(true);\n\n LOGGER.log(Level.INFO, \"ConnectionPool instance created!\");\n }\n } finally {\n lock.unlock();\n }\n }\n\n return instance;\n }",
"private LdapContext createConnection(String connectorName) throws Exception {\n\n\t\tMap<String, String> parameters = new HashMap<String, String>();\n\t\tMap<String, String> resourceMap = new HashMap<String, String>();\n\t\tresourceMap.put(\"IT Resources.Name\", \"COMMS_RECONCILIATION\");\n\t\ttcResultSet moResultSet;\n\t\tLdapContext cxt = null;\n\t\tHashtable<String, String> environment = new Hashtable<String, String>();\n\t\ttry {\n\t\t\tmoResultSet = moITResourceUtility.findITResourceInstances(resourceMap);\n\t\t\tlong resourceKey = moResultSet.getLongValue(\"IT Resources.Key\");\n\t\t\tmoResultSet = null;\n\t\t\tmoResultSet = moITResourceUtility.getITResourceInstanceParameters(resourceKey);\n\t\t\tfor (int i = 0; i < moResultSet.getRowCount(); i++) {\n\t\t\t\tmoResultSet.goToRow(i);\n\t\t\t\tString name = moResultSet.getStringValue(\"IT Resources Type Parameter.Name\");\n\t\t\t\tString value = moResultSet.getStringValue(\"IT Resources Type Parameter Value.Value\");\n\t\t\t\tparameters.put(name, value);\n\t\t\t}\n\n\t\t\tbaseDN = parameters.get(\"ldapBASE\");\n\t\t\tenvironment.put(Context.INITIAL_CONTEXT_FACTORY, \"com.sun.jndi.ldap.LdapCtxFactory\");\n\t\t\tenvironment.put(Context.PROVIDER_URL, parameters.get(\"ldapURL\"));\n\t\t\tenvironment.put(Context.SECURITY_AUTHENTICATION, \"simple\");\n\t\t\tenvironment.put(Context.SECURITY_PRINCIPAL, parameters.get(\"ldapDN\"));\n\t\t\tenvironment.put(Context.SECURITY_CREDENTIALS, parameters.get(\"ldapPW\"));\n\t\t\tenvironment.put(Context.SECURITY_PROTOCOL, \"ssl\");\n\t\t\tenvironment.put(\"java.naming.ldap.factory.socket\", edu.duke.oit.idms.oracle.ssl.BlindSSLSocketFactory.class.getName());\n\t\t\tcxt = new InitialLdapContext(environment, null);\n\n\t\t} catch (Exception e) {\n\t\t\tString exceptionName = e.getClass().getSimpleName();\n\t\t\tif (exceptionName.contains(\"tcAPIException\") || exceptionName.contains(\"tcColumnNotFoundException\") || exceptionName.contains(\"tcITResourceNotFoundException\")) {\n\t\t\t\tthrow new RuntimeException(EmailUsers.addLogEntry(connectorName, \"ERROR\", \"Could not retrieve LDAP connection information from OIM.\"), e);\n\t\t\t} else if (exceptionName.contains(\"NamingException\")) {\n\t\t\t\tthrow new RuntimeException(EmailUsers.addLogEntry(connectorName, \"ERROR\", \"Could not instantiate LdapContext for new LDAP connection.\"), e);\n\t\t\t} else {\n\t\t\t\tlogger.info(EmailUsers.addLogEntry(connectorName, \"DEBUG\", \"Unhandled exception caught: \" + e.getClass().getCanonicalName() + \":\" + e.getMessage()));\n\t\t\t}\n\t\t}\n\t\treturn cxt;\n\t}",
"Connector getConnector(int index);",
"UUID getConnectorId();",
"public synchronized static Connection getInstance()\n\t{\n\t\tif(connect == null)\n\t\t{\n\t\t\tnew DAOconnexion();\n\t\t}\n\t\treturn connect;\n\t}",
"public static ReferenceLoginManager getInstance() {\n if (instance == null) {\n throw new RuntimeException(\"Persistence not configured yet!\");\n } else return instance;\n }",
"public static ConnectionPool getInstance() {\n if (!created.get()) {\n try {\n createLock.lock();\n if (instance == null) {\n instance = new ConnectionPool();\n created.set(true);\n }\n } finally {\n createLock.unlock();\n }\n }\n return instance;\n }",
"public TraversalStrategyFactory getInstance() {\n\t\treturn instance;\n\t}",
"public HdfsLeDescriptors getActiveNN() {\n try {\n List<HdfsLeDescriptors> res = em.createNamedQuery(\n \"HdfsLeDescriptors.findEndpoint\", HdfsLeDescriptors.class).\n getResultList();\n \n if (res.isEmpty()) {\n return null;\n } else {\n //Try to open a connection to NN\n Configuration conf = new Configuration();\n for (HdfsLeDescriptors hdfsLeDesc : res) {\n try {\n DistributedFileSystemOps dfso = dfsService.getDfsOps(\n new URI(\"hdfs://\" + hdfsLeDesc.getHostname()));\n if (null != dfso) {\n return hdfsLeDesc;\n }\n } catch (URISyntaxException ex) {\n Logger.getLogger(HdfsLeDescriptorsFacade.class.getName()).\n log(Level.SEVERE, null, ex);\n }\n }\n }\n } catch (NoResultException e) {\n return null;\n }\n return null;\n }",
"public static RCProxy instance(){\n\t\treturn SingletonHolder.INSTANCE;\n\t}",
"@Override\n\tpublic Connector getConnector() {\n\t\treturn null;\n\t}",
"List<IConnector> getConnectors();",
"NewPortalConfig getPortalConfig(String ownerType, String template) {\n for (NewPortalConfig portalConfig : configs) {\n if (portalConfig.getOwnerType().equals(ownerType)) {\n // We are defensive, we make a deep copy\n return new NewPortalConfig(portalConfig);\n }\n }\n return null;\n }",
"public static CompanyManager getInstance() {\n synchronized (CompanyManager.class) {\n if (instance == null) {\n instance = new CompanyManager();\n }\n }\n //noinspection SynchronizeOnNonFinalField\n synchronized (instance) { checkout++; }\n return instance;\n }",
"public static GitClient getOrCreate() {\n\t\tIPath path = ConfigPersistenceManager.getPathToGit();\n\t\tString reference = ConfigPersistenceManager.getBranch();\n\t\tString projectKey = ConfigPersistenceManager.getProjectKey();\n\t\treturn getOrCreate(path, reference, projectKey);\n\t}",
"@Override\n public Connection getConnection() {\n boolean createNewConnection = false;\n Connection returnConnection = null;\n synchronized (connections) { //Lock the arraylist\n if (connections.isEmpty()) { //Check if any connections available\n createNewConnection = true; //If not, create new one\n } else {\n returnConnection = connections.get(0); //Get first available one\n connections.remove(0); //And remove from list\n }\n }\n if (createNewConnection) { //If new connection needed\n returnConnection = createConnection();\n }\n return returnConnection;\n }",
"public static DBManager getInstance() {\n DBManager current = db;\n // fast check to see if already created\n if (current == null) {\n // sync so not more then one creates it\n synchronized (DBManager.class) {\n current = db;\n // check if between first check and sync if someone has created it\n if (current == null) {\n //create it\n db = current = new DBManager();\n }\n }\n }\n return current;\n }",
"public static Object getLiferayPortlet(PortletRequest portletRequest) {\n\n // Try to get the Liferay portlet object from a typical Liferay request attribute.\n Object portlet = portletRequest.getAttribute(LIFERAY_REQ_ATTR_RENDER_PORTLET);\n\n // If not found, then\n if (portlet == null) {\n\n // Try to get it using Java Reflection, assuming that the portlet request is an instance of Liferay's\n // RenderRequestImpl which has a getPortlet() method.\n try {\n Method method = portletRequest.getClass().getMethod(LIFERAY_METHOD_NAME_GET_PORTLET, (Class[]) null);\n\n if (method != null) {\n portlet = method.invoke(portletRequest, (Object[]) null);\n }\n } catch (Exception e) {\n // ignore\n }\n\n // Last chance -- it might be the case that the PortletRequest is being wrapped\n // by a JSF portlet bridge PortletRequest, and so try and get the wrapped Liferay\n // PortletRequest implementation instance from the javax.portlet.request attribute\n // and then try reflection again.\n if (portlet == null) {\n PortletRequest portletRequest2 = (PortletRequest) portletRequest.getAttribute(\n REQUEST_ATTR_PORTLET_REQUEST);\n\n if (portletRequest2 != null) {\n\n try {\n Method method = portletRequest2.getClass().getMethod(LIFERAY_METHOD_NAME_GET_PORTLET,\n (Class[]) null);\n\n if (method != null) {\n portlet = method.invoke(portletRequest2, (Object[]) null);\n }\n } catch (Exception e) {\n // ignore\n }\n }\n }\n }\n\n if (portlet == null) {\n\n // Note that the Liferay ActionRequestImpl does not have a getPortlet() method\n // so only report an error if this is a RenderRequest or a ResourceRequest.\n if (!(portletRequest instanceof ActionRequest)) {\n\n if (portletRequest.getClass().getName().indexOf(LIFERAY_PACKAGE_PREFIX) >= 0) {\n logger.log(Level.SEVERE, \"Could not retrieve Liferay portlet object\");\n }\n }\n }\n\n return portlet;\n }",
"public AccountDao getActiveServer(int currentPort) {\r\n\t\tUtil util = new Util();\r\n\t\tAccountDao stub = null;\r\n\t\tMap<String, String> serverMap = util.getPropValue();\r\n\t\tfor (String entry : serverMap.keySet()) {\r\n\t\t\tfinal int port = Integer.parseInt(serverMap.get(entry));\r\n\t\t\tif (port != currentPort)\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tRegistry registry = LocateRegistry.getRegistry(port);\r\n\t\t\t\t\tstub = (AccountDao) registry.lookup(entry);\r\n\t\t\t\t\treturn stub;\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tSystem.out.println(\"Exception get the instance of server \" + entry);\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\r\n\t}",
"private synchronized Connection getConnection(String serverName)\n {\n if (configurationStoreConnection == null)\n {\n ConnectorConfigurationFactory connectorConfigurationFactory = new ConnectorConfigurationFactory();\n\n return connectorConfigurationFactory.getServerConfigConnection(serverName);\n }\n else\n {\n return configurationStoreConnection;\n }\n }",
"public static Connection getConnection() {\n return singleInstance.createConnection();\n }",
"public ConnectionConfig createConnection()\n {\n return _connectionConfig;\n }",
"public Class<?> getConnectorClass() {\n\t\t\treturn connectorClass;\n\t\t}",
"public static Connector CreateConnector(String name, ConnectorType connType, CompoundType compoundType,List<Component> LComponent , List<Port> LPort)\n\t{\n\t\tConnector connector = interFactory.createConnector();\n\t\tconnector.setName(name);\n\t\tconnector.setType(connType);\n\t\tconnector.setCompoundType(compoundType);\n\t\t\n\t\tfor(Object o : LComponent)\n\t\t{\n\t\t\tComponent comp = (Component) o ;\n\t\t\tPort p = LPort.get(LComponent.indexOf(o));\n\t\t\tInnerPortReference ipr = interFactory.createInnerPortReference();\n\t\t\tipr.setTargetPort(p);\n\t\t\tPartElementReference PE = interFactory.createPartElementReference();\n\t\t\tPE.setTargetPart(comp);\n\t\t\tipr.setTargetInstance(PE);\n\t\t\tconnector.getActualPort().add(ipr);\n\t\t}\n\t\treturn connector;\n\t}",
"public static MySqlUserDao getInstance() {\n\t\treturn Holder.INSTANCE;\n\t}",
"private Handler getConnectorHandler() {\n return connectorHandler;\n }",
"public Object getObjectInstance(Object obj,\n Name name,\n Context nameCtx,\n Hashtable environment)\n throws NamingException\n {\n synchronized (this)\n {\n if (null == ods)\n {\n System.out.println(\"Creating OracleDataSource\");\n\n String user = null;\n String password = null;\n String url = null;\n int scheme = DEFAULT_SCHEME;\n int maxlimit = DEFAULT_MAXLIMIT;\n int minlimit = DEFAULT_MINLIMIT;\n\n // Get the configuration parameters\n Reference ref = (Reference) obj;\n Enumeration addrs = ref.getAll();\n while (addrs.hasMoreElements())\n {\n RefAddr addr = (RefAddr) addrs.nextElement();\n String addrName = addr.getType();\n String value = (String) addr.getContent();\n if (addrName.equals(\"user\"))\n {\n user = value;\n }\n if (addrName.equals(\"password\")) \n {\n password = value;\n }\n if (addrName.equals(\"url\")) \n {\n url = value;\n }\n if (addrName.equals(\"scheme\")) \n {\n if (value.equals(\"DYNAMIC_SCHEME\"))\n scheme = OracleConnectionCacheImpl.DYNAMIC_SCHEME;\n if (value.equals(\"FIXED_WAIT_SCHEME\"))\n scheme = OracleConnectionCacheImpl.FIXED_WAIT_SCHEME;\n if (value.equals(\"FIXED_RETURN_NULL_SCHEME\"))\n scheme = OracleConnectionCacheImpl.FIXED_RETURN_NULL_SCHEME;\n }\n if (addrName.equals(\"maxlimit\")) \n {\n try { maxlimit = Integer.parseInt(value); }\n catch (NumberFormatException ignored) {}\n }\n if (addrName.equals(\"minlimit\")) \n {\n try { minlimit = Integer.parseInt(value); }\n catch (NumberFormatException ignored) {}\n }\n }\n\n // Create the data source object\n try\n {\n ocpds = new OracleConnectionPoolDataSource();\n ocpds.setURL(url);\n ocpds.setUser(user);\n ocpds.setPassword(password);\n ods = new OracleConnectionCacheImpl(ocpds);\n ods.setMaxLimit(maxlimit);\n ods.setMinLimit(minlimit);\n ods.setCacheScheme(scheme);\n }\n catch (SQLException e)\n {\n System.out.println(\"FAILURE: OracleDataSourceFactory: \" + e.toString());\n return null;\n }\n }\n }\n \n // Echo the cache size\n System.out.println(\"Active size : \" + ods.getActiveSize());\n System.out.println(\"Cache Size is \" + ods.getCacheSize());\n\n // Return the data source\n return ods;\n }",
"public static DALFacade getInstance()\n {\n Log.d(TAG, \"getInstance: Attempting get instance. Instance: \" + (instance != null));\n if (instance == null)\n {\n instance = new DALFacade();\n Log.d(TAG, \"getInstance: Facade instance created.\");\n }\n Log.d(TAG, \"getInstance: Returning facade instance.\");\n return instance;\n }",
"public static Login getInstance(){\n if (login==null){\n login=new Login();\n }\n return login;\n }",
"public LDAPSDKConnection createConnection() {\r\n return new NetscapeV3Connection(false);\r\n }",
"public Connector buildConnector(Server server, int serverPort);",
"public static HibernateToListDAO getInstance()\r\n\t{\r\n\t\tif(_instanceDAO == null) {\r\n\t\t\t_instanceDAO = new HibernateToListDAO();\r\n\t }\r\n\t\treturn _instanceDAO;\r\n\t}",
"public static FacadeCommandOfService getInstance(){\n if(facadeCommandOfService == null){\n facadeCommandOfService = new FacadeCommandOfService();\n }\n return facadeCommandOfService;\n }",
"public static ETLgineServerJetty getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tinstance = new ETLgineServerJetty();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"public static Connector createConnector(String name, ConnectorType connType, CompoundType compoundType,List<Part> LComponent , List<Port> LPort)\n\t{\n\t\tConnector connector = interFactory.createConnector();\n\t\tconnector.setName(name);\n\t\tconnector.setType(connType);\n\t\tconnector.setCompoundType(compoundType);\n\t\t\n\t\tfor(Object o : LComponent)\n\t\t{\n\t\t\tPort p = LPort.get(LComponent.indexOf(o));\n\t\t\tInnerPortReference ipr = interFactory.createInnerPortReference();\n\t\t\tipr.setTargetPort(p);\n\t\t\tPartElementReference PE = interFactory.createPartElementReference();\n\t\t\tPE.setTargetPart((Part)o);\n\t\t\tipr.setTargetInstance(PE);\n\t\t\tconnector.getActualPort().add(ipr);\n\t\t}\n\t\treturn connector;\n\t}",
"public static ConnectionManager getInstance() {\r\n if (connectionManager == null) {\r\n synchronized (ConnectionManager.class) {\r\n if (connectionManager == null) {\r\n connectionManager = new ConnectionManager();\r\n }\r\n }\r\n }\r\n\r\n return connectionManager;\r\n }",
"@Bean\n public IPortalUrlFactory getPortalUrlFactory() {\n return Locator.findMBean(IPortalUrlFactory.class, IPortalUrlFactory.MBEAN_NAME);\n }",
"@Bean\n public IPortalUrlFactory getPortalUrlFactory() {\n return Locator.findMBean(IPortalUrlFactory.class, IPortalUrlFactory.MBEAN_NAME);\n }",
"public BLFacadeImplementation() {\t\t\r\n\t\tSystem.out.println(\"Creating BLFacadeImplementation instance\");\r\n\t\tConfigXML c=ConfigXML.getInstance();\r\n\t\t\r\n\t\tif (c.getDataBaseOpenMode().equals(\"initialize\")) {\r\n\t\t\tDataAccess dbManager=new DataAccess(c.getDataBaseOpenMode().equals(\"initialize\"));\r\n\t\t\tdbManager.initializeDB();\r\n\t\t\tdbManager.close();\r\n\t\t\t}\r\n\t\t\r\n\t}",
"public interface JettyConnectorFactory {\n\n\t/**\n\t * Build and configure a connector for our web server.\n\t */\n\tpublic Connector buildConnector(Server server, int serverPort);\n}",
"public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }",
"@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}",
"public static OneByOneManager getInstance() {\n // The static instance of this class\n return INSTANCE;\n }",
"public int getNumberOfConnectors() { return numberOfConnectors; }",
"public static FluentdRemoteSettings getInstance() {\n return INSTANCE;\n }",
"public Connector getConnector (Address farAddr, boolean blocking) \n throws IOException {\n if (blocking) {\n return new TlsConnector (\n new EndPoint(this, (IPAddress)farAddr));\n } else {\n //return new SchedulableTcpConnector (\n // new EndPoint(this, (IPAddress)farAddr));\n throw new UnsupportedOperationException();\n }\n }",
"public static synchronized ChatAdministration getInstance(){\n\t\treturn singleInstance;\n\t}",
"public static LinkTool getTool()\n {\n if (singleton == null) {\n // new Throwable(\"Warning: LinkTool.getTool: class not initialized by VUE\").printStackTrace();\n new LinkTool();\n }\n return singleton;\n }",
"public static ServerModelFacade getInstance() {\n if(m_theFacade == null)\n m_theFacade = new ServerModelFacade(new ServerProxy(new HttpCommunicator()));\n return m_theFacade;\n }",
"@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public LoginManager getLoginManager() {\n AppMethodBeat.m2504i(92642);\n LoginManager instance = LoginManager.getInstance();\n instance.setDefaultAudience(LoginButton.this.getDefaultAudience());\n instance.setLoginBehavior(LoginButton.this.getLoginBehavior());\n instance.setAuthType(LoginButton.this.getAuthType());\n AppMethodBeat.m2505o(92642);\n return instance;\n }",
"@Override\n\t\tpublic ConnectorLogger getLogFactory() {\n\t\t\treturn new MockConnectorLogger();\n\t\t}",
"public synchronized CuratorFramework getLocalConnection() throws IOException\n {\n if ( localConnection == null )\n {\n CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()\n .connectString(\"localhost:\" + configManager.getConfig().getInt(IntConfigs.CLIENT_PORT))\n .sessionTimeoutMs(arguments.connectionTimeOutMs * 10)\n .connectionTimeoutMs(arguments.connectionTimeOutMs)\n .retryPolicy(new ExponentialBackoffRetry(1000, 3));\n\n if ( arguments.aclProvider != null )\n {\n builder = builder.aclProvider(arguments.aclProvider);\n }\n\n localConnection = builder.build();\n localConnection.start();\n }\n return localConnection;\n }",
"public Connection create() {\n\t\tif(ds==null)return null ;\n\t\ttry{\n\t\t\treturn ds.getConnection();\n\t\t}catch(Exception e ){\n\t\t\tSystem.out.println(e) ;\n\t\t\treturn null ;\n\t\t}\n\t\t\n\t}",
"public static Light getInstance() {\n\treturn INSTANCE;\n }",
"protected ConnectionProvider createConnectionProviderIfNotSupplied() {\n\t\tif (connectionProviderSupplier != null) {\n\t\t\treturn connectionProviderSupplier.get();\n\t\t}\n\t\treturn new CoreConnectionPool();\n\t}",
"Anywhere createAnywhere();",
"public LoginManager getLoginManager() {\n AppMethodBeat.m2504i(92680);\n if (this.loginManager == null) {\n this.loginManager = LoginManager.getInstance();\n }\n LoginManager loginManager = this.loginManager;\n AppMethodBeat.m2505o(92680);\n return loginManager;\n }",
"public static RssFeedServiceImpl getInstance()\n {\n if (single_instance == null)\n single_instance = new RssFeedServiceImpl();\n \n return single_instance;\n }",
"public interface ConnectorConstants {\n\n /**\n * Represents the connector container module name / type\n */\n public static final String CONNECTOR_MODULE = \"connector\";\n\n /**\n * JAXR system resource adapter name.\n */\n public static final String JAXR_RA_NAME = \"jaxr-ra\";\n\n /** \n * JDBC datasource system resource adapter name.\n */\n public static final String JDBCDATASOURCE_RA_NAME = \"__ds_jdbc_ra\";\n \n /** \n * JDBC connectionpool datasource system resource adapter name.\n */\n public static final String JDBCCONNECTIONPOOLDATASOURCE_RA_NAME = \"__cp_jdbc_ra\";\n \n /** \n * JDBC XA datasource system resource adapter name.\n */\n public static final String JDBCXA_RA_NAME = \"__xa_jdbc_ra\";\n\n /**\n * JDBC Driver Manager system resource adapter name.\n */\n public static final String JDBCDRIVER_RA_NAME = \"__dm_jdbc_ra\";\n\n /** \n * JMS datasource system resource adapter name.\n */\n public static final String DEFAULT_JMS_ADAPTER = \"jmsra\";\n\n /**\n * List of jdbc system resource adapter names\n */\n public static final List<String> jdbcSystemRarNames = Collections.unmodifiableList(\n Arrays.asList(\n JDBCDATASOURCE_RA_NAME,\n JDBCCONNECTIONPOOLDATASOURCE_RA_NAME,\n JDBCXA_RA_NAME,\n JDBCDRIVER_RA_NAME\n ));\n\n\n /**\n * List of system resource adapter names \n */\n public static final List<String> systemRarNames = Collections.unmodifiableList(\n Arrays.asList(\n JAXR_RA_NAME,\n JDBCDATASOURCE_RA_NAME,\n JDBCCONNECTIONPOOLDATASOURCE_RA_NAME,\n JDBCXA_RA_NAME,\n JDBCDRIVER_RA_NAME,\n DEFAULT_JMS_ADAPTER\n ));\n\n /**\n * Indicates the list of system-rars for which connector connection pools can be created\n */\n public static final List<String> systemRarsAllowingPoolCreation = Collections.unmodifiableList(\n Arrays.asList(\n DEFAULT_JMS_ADAPTER,\n JAXR_RA_NAME\n ));\n\n \n /** \n * Reserver JNDI context under which sub contexts for default resources \n * and all connector connection pools are created\n * Subcontext for connector descriptors bounding is also done under \n * this context.\n */\n public static String RESERVE_PREFIX = \"__SYSTEM\";\n\n /**\n * Sub context for binding connector descriptors.\n */\n public static final String DD_PREFIX= RESERVE_PREFIX+\"/descriptors/\";\n\n /**\n * Constant used to determine whether execution environment is appserver\n * runtime. \n */\n public static final int SERVER = 1;\n\n /**\n * Constant used to determine whether execution environment is application\n * client container. \n */\n public static final int CLIENT = 2;\n\n /** \n * Token used for generation of poolname pertaining to sun-ra.xml. \n * Generated pool name will be \n * rarName+POOLNAME_APPENDER+connectionDefName+SUN_RA_POOL.\n * SUNRA connector connections pools are are named and bound after \n * this name. Pool object will be bound under POOLS_JNDINAME_PREFIX \n * subcontext. To lookup a pool the jndi name should be \n * POOLS_JNDINAME_PREFIX/rarName+POOLNAME_APPENDER+connectionDefName\n * +SUN_RA_POOL\n */\n public static final String SUN_RA_POOL = \"sunRAPool\";\n public static final String ADMINISTERED_OBJECT_FACTORY =\n \"com.sun.enterprise.resource.naming.AdministeredObjectFactory\";\n\n /**\n * Meta char for mapping the security for connection pools\n */\n public static String SECURITYMAPMETACHAR=\"*\";\n\n /** \n * Token used for default poolname generation. Generated pool name will be \n * rarName+POOLNAME_APPENDER+connectionDefName.Default connector connections\n * pools are are named and bound after this name. Pool object will be bound\n * under POOLS_JNDINAME_PREFIX subcontext. To lookup a pool the jndi name\n * should be \n * POOLS_JNDINAME_PREFIX/rarName+POOLNAME_APPENDER+connectionDefName\n */\n public static String POOLNAME_APPENDER=\"#\";\n\n /** \n * Token used for default connector resource generation.Generated connector\n * resource name and JNDI names will be \n * RESOURCE_JNDINAME_PREFIX+rarName+RESOURCENAME_APPENDER+connectionDefName\n * This name should be used to lookup connector resource.\n */\n public static String RESOURCENAME_APPENDER=\"#\";\n\n /**\n * resource-adapter archive extension name\n */\n public static String RAR_EXTENSION=\".rar\";\n\n\n /**\n * represents the monitoring-service level element name\n */\n public static String MONITORING_CONNECTOR_SERVICE_MODULE_NAME = \"connector-service\";\n public static String MONITORING_JMS_SERVICE_MODULE_NAME = \"jms-service\";\n\n /**\n * represents the monitoring-service hierarchy elements <br>\n * eg: server.connector-service.<RA-NAME>.work-management<br>\n */\n public static String MONITORING_CONNECTOR_SERVICE = \"connector-service\";\n public static String MONITORING_JMS_SERVICE = \"jms-service\";\n public static String MONITORING_WORK_MANAGEMENT = \"work-management\";\n public static String MONITORING_SEPARATOR = \"/\";\n\n /**\n * Reserved sub-context where datasource-definition objets (resource and pool) are bound with generated names.\n */\n public static String DATASOURCE_DEFINITION_JNDINAME_PREFIX=\"__datasource_definition/\";\n\n /**\n * Reserved sub-context where pool objets are bound with generated names.\n */\n public static String POOLS_JNDINAME_PREFIX=RESERVE_PREFIX+\"/pools/\";\n\n /**\n * Reserved sub-context where connector resource objects are bound with \n * generated names.\n */\n public static String RESOURCE_JNDINAME_PREFIX=RESERVE_PREFIX+\"/resource/\";\n public static String USERGROUPDISTINGUISHER=\"#\";\n public static String CAUTION_MESSAGE=\"Please add the following permissions to the \" +\n \"server.policy file and restart the appserver.\";\n \n /**\n * Token used for generating the name to refer to the embedded rars.\n * It will be AppName+EMBEDDEDRAR_NAME_DELIMITER+embeddedRarName.\n */\n\n public static String EMBEDDEDRAR_NAME_DELIMITER=\"#\";\n\n /**\n * Property name for distinguishing the transaction exceptions \n * propagation capability.\n */\n public final static String THROW_TRANSACTED_EXCEPTIONS_PROP\n = \"resourceadapter.throw.transacted.exceptions\";\n \n /**\n * System Property value for distinguishing the transaction exceptions \n * propagation capability.\n */\n static String sysThrowExcp\n = System.getProperty(THROW_TRANSACTED_EXCEPTIONS_PROP);\n\n /**\n * Property value for distinguishing the transaction exceptions \n * propagation capability.\n */\n public static boolean THROW_TRANSACTED_EXCEPTIONS\n = sysThrowExcp != null && !(sysThrowExcp.trim().equals(\"true\")) ?\n false : true;\n \n public static final int DEFAULT_RESOURCE_ADAPTER_SHUTDOWN_TIMEOUT = 30;\n \n public String JAVAX_SQL_DATASOURCE = \"javax.sql.DataSource\";\n \n public String JAVAX_SQL_CONNECTION_POOL_DATASOURCE = \"javax.sql.ConnectionPoolDataSource\";\n \n public String JAVAX_SQL_XA_DATASOURCE = \"javax.sql.XADataSource\";\n \n public String JAVA_SQL_DRIVER = \"java.sql.Driver\";\n\n /**\n * Property value for defining NoTransaction transaction-support in\n * a connector-connection-pool\n */\n public String NO_TRANSACTION_TX_SUPPORT_STRING = \"NoTransaction\";\n \n /**\n * Property value for defining LocalTransaction transaction-support in\n * a connector-connection-pool\n */\n public String LOCAL_TRANSACTION_TX_SUPPORT_STRING = \"LocalTransaction\";\n \n /**\n * Property value for defining XATransaction transaction-support in\n * a connector-connection-pool\n */\n public String XA_TRANSACTION_TX_SUPPORT_STRING = \"XATransaction\";\n \n /**\n * Property value defining the NoTransaction transaction-support value\n * as an integer\n */\n \n public int NO_TRANSACTION_INT = 0;\n /**\n * Property value defining the LocalTransaction transaction-support value\n * as an integer\n */\n \n public int LOCAL_TRANSACTION_INT = 1;\n \n /**\n * Property value defining the XATransaction transaction-support value\n * as an integer\n */\n public int XA_TRANSACTION_INT = 2;\n \n /**\n * Property value defining an undefined transaction-support value\n * as an integer\n */\n public int UNDEFINED_TRANSACTION_INT = -1;\n\n /**\n * Min pool size for JMS connection pools.\n */\n public static int JMS_POOL_MINSIZE = 1;\n\n /**\n * Min pool size for JMS connection pools.\n */\n public static int JMS_POOL_MAXSIZE = 250;\n \n public static enum PoolType {\n\n ASSOCIATE_WITH_THREAD_POOL, STANDARD_POOL, PARTITIONED_POOL,\n POOLING_DISABLED;\n }\n\n public static int NON_ACC_CLIENT = 0;\n\n public static String PM_JNDI_SUFFIX = \"__pm\";\n\n public static String NON_TX_JNDI_SUFFIX = \"__nontx\" ;\n\n /**\n * Name of the JNDI environment property that can be provided so that the \n * <code>ObjectFactory</code> can decide which type of datasource create.\n */\n public static String JNDI_SUFFIX_PROPERTY = \"com.sun.enterprise.connectors.jndisuffix\";\n \n /**\n * Valid values that can be provided to the JNDI property.\n */\n public static String[] JNDI_SUFFIX_VALUES = { PM_JNDI_SUFFIX , NON_TX_JNDI_SUFFIX };\n\n public static final String CCP = \"ConnectorConnectionPool\";\n public static final String CR = \"ConnectorResource\";\n public static final String AOR = \"AdminObjectResource\";\n public static final String SEC = \"Security\";\n public static final String RA = \"ResourceAdapter\";\n public static final String JDBC = \"Jdbc\";\n\n public static final String INSTALL_ROOT = \"com.sun.aas.installRoot\";\n\n /**\n * Constant to denote external jndi resource type.\n */\n public static final String RES_TYPE_EXTERNAL_JNDI = \"external-jndi\";\n\n public static final String RES_TYPE_JDBC = \"jdbc\";\n\n /**\n * Constant to denote jdbc connection pool resource type.\n */\n public static final String RES_TYPE_JCP = \"jcp\";\n\n /**\n * Constant to denote connector connection pool resource type.\n */\n public static final String RES_TYPE_CCP = \"ccp\";\n\n /**\n * Constant to denote connector resource type.\n */\n public static final String RES_TYPE_CR = \"cr\";\n\n /**\n * Constant to denote custom resource type.\n */\n public static final String RES_TYPE_CUSTOM = \"custom\";\n\n /**\n * Constant to denote admin object resource type.\n */\n public static final String RES_TYPE_AOR = \"aor\";\n\n /**\n * Constant to denote resource adapter config type.\n */\n public static final String RES_TYPE_RAC = \"rac\";\n\n /**\n * Constant to denote connector-work-security-map type.\n */\n public static final String RES_TYPE_CWSM = \"cwsm\";\n\n /**\n * Constant to denote mail resource type.\n */\n public static final String RES_TYPE_MAIL = \"mail\";\n\n public static final String JMS_QUEUE = \"javax.jms.Queue\";\n public static final String JMS_TOPIC = \"javax.jms.Topic\";\n public static final String JMS_QUEUE_CONNECTION_FACTORY = \"javax.jms.QueueConnectionFactory\";\n public static final String JMS_TOPIC_CONNECTION_FACTORY = \"javax.jms.TopicConnectionFactory\";\n public static final String JMS_MESSAGE_LISTENER = \"javax.jms.MessageListener\";\n /** resource type residing in an external JNDI repository */\n public static final String EXT_JNDI_RES_TYPE = \"external-jndi-resource\";\n\n // name by which connector's implemenation of message-bean-client-factory service is available.\n // MDB-Container can use this constant to get connector's implementation of the factory\n public static final String CONNECTOR_MESSAGE_BEAN_CLIENT_FACTORY=\"ConnectorMessageBeanClientFactory\";\n\n public static final String EXPLODED_EMBEDDED_RAR_EXTENSION=\"_rar\";\n\n public static final String JAVA_BEAN_FACTORY_CLASS = \"org.glassfish.resources.custom.factory.JavaBeanFactory\";\n public static final String PRIMITIVES_AND_STRING_FACTORY_CLASS =\n \"org.glassfish.resources.custom.factory.PrimitivesAndStringFactory\";\n public static final String URL_OBJECTS_FACTORY = \"org.glassfish.resources.custom.factory.URLObjectFactory\";\n public static final String PROPERTIES_FACTORY = \"org.glassfish.resources.custom.factory.PropertiesFactory\";\n\n //service-names for the ActiveResourceAdapter contract's implementations\n // service providing inbound support\n public static final String AIRA = \"ActiveInboundResourceAdapter\";\n // service providing outbound support\n public static final String AORA = \"ActiveOutboundResourceAdapter\";\n\n public static final String CLASSLOADING_POLICY_DERIVED_ACCESS = \"derived\";\n public static final String CLASSLOADING_POLICY_GLOBAL_ACCESS = \"global\";\n\n public static final String RAR_VISIBILITY = \"rar-visibility\";\n public static final String RAR_VISIBILITY_GLOBAL_ACCESS = \"*\";\n\n //flag to indicate that all applications have access to all deployed standalone RARs\n public static final String ACCESS_ALL_RARS = \"access-all-rars\";\n //flag to indiate additional RARs required for an application, apart from the ones referred via app's DD\n public static final String REQUIRED_RARS_FOR_APP_PREFIX=\"required-rars-for-\";\n}",
"public static RetrofitClient getInstance() {\n return OUR_INSTANCE;\n }",
"public static ConnectionPool getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new ConnectionPool();\n\t\t}\n\t\treturn instance;\n\t}",
"public static LanterneFactory init() {\n\t\ttry {\n\t\t\tLanterneFactory theLanterneFactory = (LanterneFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://lanterne\"); \n\t\t\tif (theLanterneFactory != null) {\n\t\t\t\treturn theLanterneFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new LanterneFactoryImpl();\n\t}",
"public static Connection getInstance() {\n return LazyHolder.INSTANCE;\n }",
"public static CppTestRuleSetDAOImpl getInstance()\r\n {\r\n return instance;\r\n }",
"public ArrayList<Connector> getConnectors() {\n\t\treturn this.connectors;\n\t}",
"public static FacadeMiniBank getInstance(){\r\n\r\n\t\tif(singleton==null){\r\n\t\t\ttry {\r\n\t\t\t\t//premier essai : implementation locale\r\n\t\t\t\tsingleton=(FacadeMiniBank) Class.forName(implFacadePackage + \".\" + localeFacadeClassName).newInstance();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.err.println(e.getMessage() + \" not found or not created\");\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t}\r\n\t\tif(singleton==null){\r\n\t\t\t//deuxieme essai : business delegate \r\n\t\t singleton=getRemoteInstance();\r\n\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\treturn singleton;\r\n\t}",
"public T caseEConnector(EConnector object) {\n\t\treturn null;\n\t}",
"public static synchronized TowerManager getUniqueInstance() {\n if (uniqueInstance == null) {\n uniqueInstance = new TowerManager();\n }\n return uniqueInstance;\n }",
"public static ConnectorCfg create(\n SchemeType scheme, Configuration config) {\n ConnectorCfg result = null;\n if (scheme.equals(SchemeType.TCP)) {\n result = new TCPConnectorCfg(config);\n } else if (scheme.equals(SchemeType.TCPS)) {\n result = new TCPSConnectorCfg(config);\n } else if (scheme.equals(SchemeType.RMI)) {\n result = new RMIConnectorCfg(config);\n } else if (scheme.equals(SchemeType.HTTP)) {\n result = new HTTPConnectorCfg(config);\n } else if (scheme.equals(SchemeType.HTTPS)) {\n result = new HTTPSConnectorCfg(config);\n } else if (scheme.equals(SchemeType.EMBEDDED)) {\n result = new VMConnectorCfg(config);\n }\n return result;\n }",
"public static DALFileLocator getInstance() {\n\t\treturn instance;\n\t}",
"private SunOneHttpJmxConnectorFactory() {\n }",
"public static CabsDAO getInstance()\n {\n return getInstance( FuberConstants.FUBER_DB );\n }",
"public DNSConnector getConnector() {\r\n\t\treturn (new DNSUDPConnector());\r\n\t}",
"@NbBundle.Messages(value = {\n \"MSG_AgentConnectionBroken=Control connection with JShell VM is broken, could not connect to agent\",\n \"MSG_AgentNotReady=The JShell VM is not ready for operation\"\n })\n public JShellConnection createConnection() throws IOException {\n JShellConnection old;\n synchronized (this) {\n if (closed) {\n throw new IOException(Bundle.MSG_AgentConnectionBroken());\n }\n if (expectDebugger && debuggerMachine == null) {\n return null;\n }\n// old = connection;\n// connection = null;\n }\n /*\n if (old != null) {\n old.shutDown();\n // notify about the old connection being trashed\n ShellLaunchEvent ev = new ShellLaunchEvent(mgr, old, false);\n mgr.fire((l) -> l.connectionClosed(ev));\n }\n */\n SocketChannel sc = SocketChannel.open();\n sc.configureBlocking(true);\n Socket sock = sc.socket();\n sock.connect(connectAddress, ShellLaunchManager.CONNECT_TIMEOUT);\n // turn to nonblocking mode\n sc.configureBlocking(false);\n boolean notify = false;\n JShellConnection con = new JShellConnection(this, sock.getChannel());\n /*\n synchronized (this) {\n if (connection == null) {\n connection = con;\n notify = true;\n } else {\n con = connection;\n }\n }\n */\n synchronized (this) {\n connections.add(con);\n }\n if (notify) {\n ShellLaunchEvent ev = new ShellLaunchEvent(mgr, con, false);\n mgr.fire((l) -> l.connectionInitiated(ev));\n }\n return con;\n }",
"public static final Connector build(TerminalSymbol type) {\n\t\tObjects.requireNonNull(type, \"Type cannot be null\");\n\n\t\tList<TerminalSymbol> typesOfConnectors = Arrays.asList(TerminalSymbol.PLUS, TerminalSymbol.MINUS,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TerminalSymbol.TIMES, TerminalSymbol.DIVIDE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TerminalSymbol.OPEN, TerminalSymbol.CLOSE);\n\t\t\n\t\tif (!typesOfConnectors.contains(type)) {\n\t\t\tthrow new IllegalArgumentException(\"Type must be one of: PLUS, MINUS, TIMES, DIVIDE, OPEN, CLOSE\");\t\n\t\t}\n\t\t\n\t\telse {\n\t\t\tFunction<TerminalSymbol, Connector> connectorConstructor = x -> new Connector(x);\n\t\t\treturn cache.get(type, connectorConstructor);\n\t\t}\n\t}",
"public static Catalog instance() {\r\n if (catalog == null) {\r\n return (catalog = new Catalog());\r\n } else {\r\n return catalog;\r\n }\r\n }",
"public static KapConfig getInstanceFromEnv() {\n return wrap(KylinConfig.getInstanceFromEnv());\n }",
"public static FloorFacade getInstance(){\n if(self == null){\n \tself = new FloorFacade();\n }\n return self;\n }",
"public static LocalVpnService getInstance() {\n\n return instance;\n }",
"public Tunnel getTunnel( String destinationHostname, int destinationPort ) {\n // might be better to cache, but dont anticipate massive numbers\n // of tunnel connections...\n for ( TunnelConnection tunnelConnection : tunnelConnections ) {\n Tunnel tunnel = tunnelConnection.getTunnel(\n destinationHostname, destinationPort );\n if ( tunnel != null ) {\n return tunnel;\n }\n }\n return null;\n }"
]
| [
"0.61443293",
"0.6083965",
"0.60475343",
"0.5877798",
"0.57126385",
"0.5661103",
"0.5484736",
"0.54494745",
"0.52622867",
"0.5260464",
"0.51627356",
"0.5154156",
"0.5091194",
"0.5084318",
"0.5027457",
"0.50024265",
"0.49967727",
"0.49922726",
"0.49816757",
"0.49678332",
"0.4965338",
"0.49376714",
"0.49294445",
"0.49280238",
"0.4914997",
"0.49125007",
"0.48997626",
"0.48889804",
"0.4873324",
"0.48727748",
"0.48669848",
"0.48611692",
"0.48542395",
"0.48470888",
"0.4832987",
"0.48093224",
"0.4799744",
"0.4798366",
"0.47900766",
"0.47872058",
"0.47764418",
"0.47726598",
"0.47720477",
"0.47664046",
"0.47322458",
"0.47303644",
"0.47303498",
"0.47267663",
"0.47193578",
"0.47081155",
"0.470798",
"0.46994376",
"0.46976486",
"0.46972123",
"0.46961534",
"0.4690317",
"0.4690317",
"0.46882638",
"0.46696466",
"0.46695414",
"0.4664905",
"0.4656348",
"0.46555966",
"0.46515998",
"0.46492666",
"0.4648306",
"0.4643707",
"0.46431735",
"0.46357176",
"0.4635691",
"0.46334243",
"0.46303144",
"0.463002",
"0.4625178",
"0.46223494",
"0.46108162",
"0.45992428",
"0.45986742",
"0.4588937",
"0.45878464",
"0.4587364",
"0.45818254",
"0.45672318",
"0.45663273",
"0.45596275",
"0.45530564",
"0.4546921",
"0.45415094",
"0.45396164",
"0.45343807",
"0.45329285",
"0.45300928",
"0.4527191",
"0.45222113",
"0.45213977",
"0.4519693",
"0.45173255",
"0.45162034",
"0.4511813",
"0.45109248"
]
| 0.80258155 | 0 |
static: Creates and returns the (empty) main artifact. | public static NuxeoDocArtefact createMainArtefact(String mainDocId) {
return new NuxeoDocArtefact(mainDocId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Active_Digital_Artifact createActive_Digital_Artifact();",
"Digital_Artifact createDigital_Artifact();",
"public MinedMainDocument parseMainArtifact() {\n\t\ttry {\n\t\t\tInputStream is = this.getNuxeoInstance().getDocumentInputStream(mainArtefact.getId());\n\t\t\t\n\t\t\tString title = this.getNuxeoInstance().getLastDocTitle();\n\t\t\tif(title==null) title = \"Main Document\";\n\t\t\t\n\t\t\tDocxParser docx = new DocxParser(is);\n\t\t\tdocx.parseDocxAndChapters();\n\t\t\tMinedMainDocument mainDoc = new MinedMainDocument(title, docx.getFullText());\n\t\t\tmainDoc.addChapters(docx.getChapterHeadlines(), docx.getChapterTexts());\n\t\t\tis.close();\n\t\t\treturn mainDoc;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"void createMainContent() {\n appContent = new DashboardMain(this);\n }",
"private File getCurrentArtifact() {\n\t\treturn new File(target, jarName.concat(EXTENSION));\n\t}",
"public Path mainJar() {\n return mainJar;\n }",
"default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }",
"Manifest createManifest();",
"private static Object createStandaloneTester() {\n List<URL> urls = new ArrayList<>();\n for (String path : Splitter.on(':').split(System.getProperty(\"java.class.path\"))) {\n\n // A small hack is needed since we didn't make example application under different groupId and not prefixed\n // the artifactId with something special (cdap- and hive-)\n // Check for io/cdap/cdap\n if (path.contains(\"/io/cdap/cdap/\")) {\n String artifactFile = Paths.get(path).getFileName().toString();\n if (!artifactFile.startsWith(\"cdap-\") && !artifactFile.startsWith(\"hive-\")) {\n continue;\n }\n }\n\n try {\n urls.add(Paths.get(path).toUri().toURL());\n } catch (MalformedURLException e) {\n throw Throwables.propagate(e);\n }\n }\n\n ClassLoader classLoader = new MainClassLoader(urls.toArray(new URL[urls.size()]), null);\n try {\n Class<?> clz = classLoader.loadClass(StandaloneTester.class.getName());\n Constructor<?> constructor = clz.getConstructor(Object[].class);\n return constructor.newInstance((Object) new Object[0]);\n } catch (Exception e) {\n throw Throwables.propagate(e);\n }\n }",
"public Project build() {\n return new Project(descriptor.build());\n }",
"public static WebArchive baseDeployment() {\n return baseDeployment(new BeansXml(BeanDiscoveryMode.ALL), DEFAULT_WEB_XML);\n }",
"public IntelMainboard createMainboard() {\n\t\treturn new IntelMainboard();\n\t}",
"public static JavaArchive createJarDemoDeployment(String artifactId) {\n return ShrinkwrapUtil.getSwitchYardJavaArchive(QS_DEMO_GID, artifactId);\n }",
"public static Stage getMainStage() {\n return mainStage;\n }",
"private Component buildMainPanel() {\r\n \tDPanel mainPanel = new DPanel();\r\n \tJLabel backGroundLabel = new JLabel(ImageUtil.getImageIcon(\"happycow.jpg\"));\r\n \tmainPanel.add(backGroundLabel);\r\n \tsetCurrentContentPane(mainPanel);\r\n \thome = mainPanel;\r\n return home;\r\n }",
"@Deployment\n\tpublic static Archive<?> createTestArchive() {\n\t\tFile[] libs = Maven.resolver().loadPomFromFile(\"pom.xml\").resolve(\"io.swagger:swagger-jaxrs:1.5.15\")\n\t\t\t\t.withTransitivity().asFile();\n\n\t\treturn ShrinkWrap.create(WebArchive.class, \"test.war\")\n\t\t\t\t.addPackages(true, \"uk.ac.ncl.tongzhou.enterprisemiddleware\")\n\t\t\t\t.addPackages(true, \"org.jboss.quickstarts.wfk\").addAsLibraries(libs)\n\t\t\t\t.addAsResource(\"META-INF/test-persistence.xml\", \"META-INF/persistence.xml\")\n\t\t\t\t.addAsWebInfResource(\"arquillian-ds.xml\").addAsWebInfResource(EmptyAsset.INSTANCE, \"beans.xml\");\n\t}",
"public ProjectModule() {\n packaging = AutomationConstant.PACKAGING_POM;\n }",
"GradleBuild create();",
"private Manifest getManifest() {\n Manifest manifest = new Manifest();\n Attributes attributes = manifest.getMainAttributes();\n attributes.put(Attributes.Name.MANIFEST_VERSION, \"1.0\");\n attributes.put(Attributes.Name.IMPLEMENTATION_VENDOR, \"Balahnin Sergey\");\n return manifest;\n }",
"default String getArtifactId() {\n return getIdentifier().getArtifactId();\n }",
"Project createProject();",
"Project createProject();",
"Project createProject();",
"@SuppressWarnings(\"synthetic-access\")\n\t\tpublic GitHubProject build() {\n\t\t\treturn new GitHubProject(this);\n\t\t}",
"CdapArtifact createCdapArtifact();",
"private AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\n\t\t// Setzt die Hintergrundfarbe auf Grün\n\t\tmainLayout.addStyleName(\"backgroundErfassung\");\n\t\tmainLayout.setWidth(\"100%\");\n\t\tmainLayout.setHeight(\"100%\");\n\n\t\treturn mainLayout;\n\t}",
"public FinalProject() {\n initComponents();\n iconImage();\n }",
"@Deployment\n public static Archive<?> createTestArchive() {\n File[] libs = Maven.resolver()\n .loadPomFromFile(\"pom.xml\")\n .resolve(\"io.swagger:swagger-jaxrs:1.5.16\")\n .withTransitivity()\n .asFile();\n\n return ShrinkWrap\n .create(WebArchive.class, \"test.war\")\n .addPackages(true, \"org.jboss.quickstarts.wfk\")\n .addAsLibraries(libs)\n .addAsResource(\"META-INF/test-persistence.xml\", \"META-INF/persistence.xml\")\n .addAsWebInfResource(\"arquillian-ds.xml\")\n .addAsWebInfResource(EmptyAsset.INSTANCE, \"beans.xml\");\n }",
"ArtifactResult result();",
"public static Stage getMainStage(){\r\n return mainStage;\r\n }",
"java.lang.String getArtifactUrl();",
"public static WebArchive baseDeployment(Asset webXml) {\n return baseDeployment(new BeansXml(BeanDiscoveryMode.ALL), webXml);\n }",
"Path getMainCatalogueFilePath();",
"public static WebArchive createWarDemoDeployment(String artifactId) {\n return ShrinkwrapUtil.getSwitchYardWebArchive(QS_DEMO_GID, artifactId);\n }",
"@Deployment\n public static WebArchive createDeployment() {\n File[] libs = Maven.resolver()\n .offline(false)\n .loadPomFromFile(\"pom.xml\")\n .importRuntimeAndTestDependencies().resolve().withTransitivity().asFile();\n\n return ShrinkWrap\n .create(WebArchive.class, \"fulltext-tasklist.war\")\n // add needed dependencies\n .addAsLibraries(libs)\n // prepare as process application archive for camunda BPM Platform\n .addAsResource(\"META-INF/processes.xml\", \"META-INF/processes.xml\")\n // enable CDI\n .addAsWebInfResource(EmptyAsset.INSTANCE, \"beans.xml\")\n // boot JPA persistence unit\n .addAsResource(\"META-INF/persistence.xml\", \"META-INF/persistence.xml\")\n // add your own classes (could be done one by one as well)\n .addPackages(false, \"com.camunda.consulting.tasklist.fulltext\") // not recursive to skip package 'nonarquillian'\n .addPackages(false, \"com.camunda.consulting.tasklist.fulltext.entity\")\n .addPackages(false, \"com.camunda.consulting.tasklist.fulltext.resource\")\n // add process definition\n .addAsResource(\"process.bpmn\")\n .addAsResource(\"incidentProcess.bpmn\")\n // add process image for visualizations\n .addAsResource(\"process.png\")\n .addAsResource(\"incidentProcess.png\")\n // now you can add additional stuff required for your test case\n ;\n }",
"Passive_Digital_Artifact createPassive_Digital_Artifact();",
"java.lang.String getArtifactId();",
"public MainDeployer getMainDeployer()\n {\n return mainDeployer;\n }",
"@Override\n protected TsArtifact composeApplication() {\n final TsQuarkusExt extH = new TsQuarkusExt(\"ext-h\");\n install(extH);\n final TsQuarkusExt extIConditional = new TsQuarkusExt(\"ext-i-conditional\");\n extIConditional.setDependencyCondition(extH);\n install(extIConditional);\n\n final TsQuarkusExt extGConditional = new TsQuarkusExt(\"ext-g-conditional\");\n\n final TsQuarkusExt extA = new TsQuarkusExt(\"ext-a\");\n extA.setConditionalDeps(extGConditional);\n\n final TsQuarkusExt extB = new TsQuarkusExt(\"ext-b\");\n extB.addDependency(extA);\n\n final TsQuarkusExt extC = new TsQuarkusExt(\"ext-c\");\n extC.addDependency(extB);\n\n final TsQuarkusExt extD = new TsQuarkusExt(\"ext-d\");\n extD.addDependency(extB);\n\n final TsQuarkusExt extEConditional = new TsQuarkusExt(\"ext-e-conditional\");\n extEConditional.setDependencyCondition(extB);\n install(extEConditional);\n\n final TsQuarkusExt extF = new TsQuarkusExt(\"ext-f\");\n extF.setConditionalDeps(extEConditional, extIConditional);\n\n extGConditional.setDependencyCondition(extC);\n extGConditional.addDependency(extF);\n install(extGConditional);\n\n addToExpectedLib(extA.getRuntime());\n addToExpectedLib(extB.getRuntime());\n addToExpectedLib(extC.getRuntime());\n addToExpectedLib(extD.getRuntime());\n addToExpectedLib(extEConditional.getRuntime());\n addToExpectedLib(extF.getRuntime());\n addToExpectedLib(extGConditional.getRuntime());\n\n return TsArtifact.jar(\"app\")\n .addManagedDependency(platformDescriptor())\n .addManagedDependency(platformProperties())\n .addDependency(extC)\n .addDependency(extD);\n }",
"@Deployment\n public static WebArchive deploy() {\n final File[] dependencies = Maven\n .resolver()\n .loadPomFromFile(\"pom.xml\")\n .resolve(\"mysql:mysql-connector-java\",\n \"org.assertj:assertj-core\").withoutTransitivity()\n .asFile();\n\n // The webArchive is the special packaging of your project\n // so that only the test cases run on the server or embedded\n // container\n final WebArchive webArchive = ShrinkWrap.create(WebArchive.class)\n .setWebXML(new File(\"src/main/webapp/WEB-INF/web.xml\"))\n .addPackage(Books.class.getPackage())\n .addPackage(BooksAction.class.getPackage())\n .addPackage(BooksController.class.getPackage())\n .addPackage(JsfUtil.class.getPackage())\n .addAsWebInfResource(EmptyAsset.INSTANCE, \"beans.xml\")\n .addAsWebInfResource(new File(\"src/main/webapp/WEB-INF/glassfish-resources.xml\"), \"glassfish-resources.xml\")\n .addAsResource(new File(\"src/main/resources/META-INF/persistence.xml\"), \"META-INF/persistence.xml\")\n .addAsResource(\"pacmabooks.sql\")\n .addAsLibraries(dependencies);\n\n return webArchive;\n }",
"@AutoGenerated\n\tprivate AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"460px\");\n\t\tmainLayout.setHeight(\"260px\");\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"460px\");\n\t\tsetHeight(\"260px\");\n\t\t\n\t\t// popupDateField_2\n\t\tpopupDateField_2 = new PopupDateField();\n\t\tpopupDateField_2.setImmediate(false);\n\t\tpopupDateField_2.setWidth(\"-1px\");\n\t\tpopupDateField_2.setHeight(\"-1px\");\n\t\tmainLayout.addComponent(popupDateField_2, \"top:120.0px;left:120.0px;\");\n\t\t\n\t\treturn mainLayout;\n\t}",
"protected abstract Artifact getArtifact(BuildContext buildContext) throws BuildStepException;",
"String getArtifactId();",
"public interface BuildMainSpaceAPI extends API {\n\n /**\n * Build all assets of the main code space.\n *\n * <ul>\n * <li>Compile sources and jar generated classes\n * <li>Check modules\n * <li>Generate API documentation\n * <li>Generate custom runtime image\n * </ul>\n *\n * @see #buildMainBuildModules()\n * @see #buildMainCheckModules()\n * @see #buildMainGenerateAPIDocumentation()\n * @see #buildMainGenerateCustomRuntimeImage()\n */\n default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }\n\n /** Compile and jar main modules. */\n default void buildMainBuildModules() {\n var main = bach().project().spaces().main();\n var modules = main.declarations();\n if (modules.isEmpty()) {\n log(\"Main module list is empty, nothing to build here.\");\n return;\n }\n var s = modules.size() == 1 ? \"\" : \"s\";\n say(\"Build %d main module%s: %s\", modules.size(), s, modules.toNames(\", \"));\n\n var release = main.release();\n var feature = release != 0 ? release : Runtime.version().feature();\n var classes = bach().folders().workspace(\"classes-main-\" + feature);\n\n var workspaceModules = bach().folders().workspace(\"modules\");\n Paths.deleteDirectories(workspaceModules);\n if (feature == 8) {\n bach().run(buildMainJavac(9, classes)).requireSuccessful();\n buildMainSpaceClassesForJava8(classes);\n } else {\n bach().run(buildMainJavac(release, classes)).requireSuccessful();\n }\n\n Paths.createDirectories(workspaceModules);\n var jars = new ArrayList<Jar>();\n var javacs = new ArrayList<Javac>();\n for (var declaration : modules.map().values()) {\n for (var folder : declaration.sources().list()) {\n if (!folder.isTargeted()) continue;\n javacs.add(buildMainJavac(declaration, folder, classes));\n }\n jars.add(buildMainJar(declaration, classes));\n }\n if (!javacs.isEmpty()) bach().run(javacs.stream()).requireSuccessful();\n bach().run(jars.stream()).requireSuccessful();\n }\n\n /** Check main modules. */\n default void buildMainCheckModules() {\n if (!bach().project().settings().tools().enabled(\"jdeps\")) return;\n say(\"Check main modules\");\n var main = bach().project().spaces().main();\n var modules = main.declarations();\n var jdeps = new ArrayList<JDeps>();\n for (var declaration : modules.map().values()) {\n jdeps.add(buildMainJDeps(declaration));\n }\n bach().run(jdeps.stream()).requireSuccessful();\n }\n\n /** Generate HTML pages of API documentation from main modules' source files. */\n default void buildMainGenerateAPIDocumentation() {\n if (!bach().project().settings().tools().enabled(\"javadoc\")) return;\n say(\"Generate API documentation\");\n var api = bach().folders().workspace(\"documentation\", \"api\");\n bach().run(buildMainJavadoc(api)).requireSuccessful();\n bach().run(buildMainJavadocJar(api)).requireSuccessful();\n }\n\n /** Assemble and optimize main modules and their dependencies into a custom runtime image. */\n default void buildMainGenerateCustomRuntimeImage() {\n if (!bach().project().settings().tools().enabled(\"jlink\")) return;\n say(\"Assemble custom runtime image\");\n var image = bach().folders().workspace(\"image\");\n Paths.deleteDirectories(image);\n bach().run(buildMainJLink(image));\n }\n\n default void buildMainSpaceClassesForJava8(Path classes) {\n var project = bach().project();\n var folders = project.settings().folders();\n var main = project.spaces().main();\n var classPaths = new ArrayList<Path>();\n main.declarations().toNames().forEach(name -> classPaths.add(classes.resolve(name)));\n classPaths.addAll(Paths.list(bach().folders().externalModules(), Paths::isJarFile));\n var javacs = new ArrayList<Javac>();\n for (var declaration : main.declarations().map().values()) {\n var name = declaration.name();\n var sources = declaration.sources();\n var root = sources.list().isEmpty() ? folders.root() : sources.first().path();\n var java8Files = Paths.find(root, 99, BuildMainSpaceAPI::isJava8File);\n if (java8Files.isEmpty()) continue; // skip aggregator module\n var compileSources =\n Command.javac()\n .with(\"--release\", main.release()) // 8\n .with(\"--class-path\", classPaths)\n .ifTrue(bach().is(Flag.STRICT), javac -> javac.with(\"-Xlint\").with(\"-Werror\"))\n .withAll(main.tweaks().arguments(\"javac\"))\n .with(\"-d\", classes.resolve(name))\n .withAll(java8Files);\n javacs.add(compileSources);\n }\n if (javacs.isEmpty()) return; // no javac command collected\n bach().run(javacs.stream()).requireSuccessful();\n }\n\n /** Test supplied path for pointing to a Java 8 compilation unit. */\n private static boolean isJava8File(Path path) {\n var name = Paths.name(path);\n return !path.startsWith(\".bach\") // ignore all files in `.bach` directory\n && name.endsWith(\".java\")\n && !name.equals(\"module-info.java\") // ignore module declaration compilation units\n && Files.isRegularFile(path);\n }\n\n /**\n * {@return the {@code javac} call to compile all configured modules of the main space}\n *\n * @param release the Java feature release number to compile modules for\n */\n default Javac buildMainJavac(int release, Path classes) {\n var project = bach().project();\n var main = project.spaces().main();\n return Command.javac()\n .ifTrue(release != 0, javac -> javac.with(\"--release\", release))\n .with(\"--module\", main.declarations().toNames(\",\"))\n .with(\"--module-version\", project.version())\n .forEach(\n main.declarations().toModuleSourcePaths(false),\n (javac, path) -> javac.with(\"--module-source-path\", path))\n .ifPresent(\n main.modulePaths().pruned(), (javac, paths) -> javac.with(\"--module-path\", paths))\n .ifTrue(bach().is(Flag.STRICT), javac -> javac.with(\"-Xlint\").with(\"-Werror\"))\n .withAll(main.tweaks().arguments(\"javac\"))\n .with(\"-d\", classes);\n }\n\n /** {@return the {@code javac} call to compile a specific version of a multi-release module} */\n default Javac buildMainJavac(LocalModule local, SourceFolder folder, Path classes) {\n var name = local.name();\n var project = bach().project();\n var main = project.spaces().main();\n var release = folder.release();\n var javaSourceFiles = Paths.find(folder.path(), 99, Paths::isJavaFile);\n return Command.javac()\n .with(\"--release\", release)\n .with(\"--module-version\", project.version())\n .ifPresent(\n main.modulePaths().pruned(), (javac, paths) -> javac.with(\"--module-path\", paths))\n .with(\"--class-path\", classes.resolve(name))\n .with(\"-implicit:none\") // generate classes for explicitly referenced source files\n .withAll(main.tweaks().arguments(\"javac\"))\n .withAll(main.tweaks().arguments(\"javac(\" + name + \")\"))\n .withAll(main.tweaks().arguments(\"javac(\" + release + \")\"))\n .withAll(main.tweaks().arguments(\"javac(\" + name + \"@\" + release + \")\"))\n .with(\"-d\", buildMultiReleaseClassesDirectory(name, release))\n .withAll(javaSourceFiles);\n }\n\n private Path buildMultiReleaseClassesDirectory(String module, int release) {\n return bach().folders().workspace(\"classes-mr-\" + release, module);\n }\n\n default Jar buildMainJar(LocalModule local, Path classes) {\n var project = bach().project();\n var main = project.spaces().main();\n var name = local.name();\n var file = bach().folders().workspace(\"modules\", buildMainJarFileName(name));\n var mainClass = local.reference().descriptor().mainClass();\n var jar =\n Command.jar()\n .ifTrue(bach().is(Flag.VERBOSE), command -> command.with(\"--verbose\"))\n .with(\"--create\")\n .with(\"--file\", file)\n .ifPresent(mainClass, (args, value) -> args.with(\"--main-class\", value))\n .withAll(main.tweaks().arguments(\"jar\"))\n .withAll(main.tweaks().arguments(\"jar(\" + name + \")\"));\n var baseClasses = classes.resolve(name);\n if (Files.isDirectory(baseClasses)) jar = jar.with(\"-C\", baseClasses, \".\");\n // include base resources\n for (var folder : local.resources().list()) {\n if (folder.isTargeted()) continue; // handled later\n jar = jar.with(\"-C\", folder.path(), \".\");\n }\n // add (future) targeted classes and targeted resources in ascending order\n for (int release = 9; release <= Runtime.version().feature(); release++) {\n var paths = new ArrayList<Path>();\n var isSourceTargeted = local.sources().stream(release).findAny().isPresent();\n if (isSourceTargeted) paths.add(buildMultiReleaseClassesDirectory(name, release));\n local.resources().stream(release).map(SourceFolder::path).forEach(paths::add);\n if (paths.isEmpty()) continue;\n jar = jar.with(\"--release\", release);\n for (var path : paths) jar = jar.with(\"-C\", path, \".\");\n }\n return jar;\n }\n\n default String buildMainJarFileName(String module) {\n return module + '@' + bach().project().versionNumberAndPreRelease() + \".jar\";\n }\n\n default JDeps buildMainJDeps(LocalModule local) {\n var folders = bach().folders();\n return Command.jdeps()\n .with(\"--check\", local.name())\n .with(\"--multi-release\", \"BASE\")\n .with(\"--module-path\", List.of(folders.workspace(\"modules\"), folders.externalModules()));\n }\n\n default Javadoc buildMainJavadoc(Path destination) {\n var project = bach().project();\n var main = project.spaces().main();\n return Command.javadoc()\n .with(\"--module\", main.declarations().toNames(\",\"))\n .forEach(\n main.declarations().toModuleSourcePaths(false),\n (javadoc, path) -> javadoc.with(\"--module-source-path\", path))\n .ifPresent(\n main.modulePaths().pruned(), (javadoc, paths) -> javadoc.with(\"--module-path\", paths))\n .ifTrue(bach().is(Flag.STRICT), javadoc -> javadoc.with(\"-Xdoclint\").with(\"-Werror\"))\n .withAll(main.tweaks().arguments(\"javadoc\"))\n .with(\"-d\", destination);\n }\n\n /** {@return the jar call generating the API documentation archive} */\n default Jar buildMainJavadocJar(Path api) {\n var project = bach().project();\n var file = project.name() + \"-api-\" + project.version() + \".zip\";\n return Command.jar()\n .with(\"--create\")\n .with(\"--file\", api.getParent().resolve(file))\n .with(\"--no-manifest\")\n .with(\"-C\", api, \".\");\n }\n\n default JLink buildMainJLink(Path image) {\n var project = bach().project();\n var main = project.spaces().main();\n var test = project.spaces().test();\n return Command.jlink()\n .ifPresent(main.launcher(), (jlink, launcher) -> jlink.with(\"--launcher\", launcher.value()))\n .with(\"--add-modules\", main.declarations().toNames(\",\"))\n .ifPresent(\n test.modulePaths().pruned(), (jlink, paths) -> jlink.with(\"--module-path\", paths))\n .withAll(main.tweaks().arguments(\"jlink\"))\n .with(\"--output\", image);\n }\n}",
"@AutoGenerated\r\n\tprivate AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"360px\");\r\n\t\tmainLayout.setHeight(\"440px\");\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tsetWidth(\"360px\");\r\n\t\tsetHeight(\"440px\");\r\n\t\t\r\n\t\t// userSelect\r\n\t\tuserSelect = new ListSelect();\r\n\t\tuserSelect.setCaption(\"Select User\");\r\n\t\tuserSelect.setImmediate(false);\r\n\t\tuserSelect.setWidth(\"320px\");\r\n\t\tuserSelect.setHeight(\"326px\");\r\n\t\tmainLayout.addComponent(userSelect, \"top:34.0px;left:20.0px;\");\r\n\t\t\r\n\t\t// submitButton\r\n\t\tsubmitButton = new Button();\r\n\t\tsubmitButton.setCaption(\"OK\");\r\n\t\tsubmitButton.setImmediate(true);\r\n\t\tsubmitButton.setWidth(\"-1px\");\r\n\t\tsubmitButton.setHeight(\"-1px\");\r\n\t\tmainLayout.addComponent(submitButton, \"top:394.0px;left:155.0px;\");\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}",
"Path getArtifact(String identifier);",
"private DeploymentFactoryInstaller() {\n }",
"@AutoGenerated\n\tprivate AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"100%\");\n\t\tmainLayout.setHeight(\"100%\");\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"100.0%\");\n\t\tsetHeight(\"100.0%\");\n\t\t\n\t\t// tablaGestionEvaluaciones\n\t\ttablaGestionEvaluaciones = new Table();\n\t\ttablaGestionEvaluaciones.setImmediate(false);\n\t\ttablaGestionEvaluaciones.setWidth(\"100.0%\");\n\t\ttablaGestionEvaluaciones.setHeight(\"100.0%\");\n\t\tmainLayout.addComponent(tablaGestionEvaluaciones,\n\t\t\t\t\"top:57.0px;right:20.0px;bottom:20.0px;left:20.0px;\");\n\t\t\n\t\t// botonCrearEvaluacion\n\t\tbotonCrearEvaluacion = new Button();\n\t\tbotonCrearEvaluacion.setCaption(\"Crear Evaluación\");\n\t\tbotonCrearEvaluacion.setImmediate(true);\n\t\tbotonCrearEvaluacion.setWidth(\"-1px\");\n\t\tbotonCrearEvaluacion.setHeight(\"-1px\");\n\t\tmainLayout\n\t\t\t\t.addComponent(botonCrearEvaluacion, \"top:14.0px;left:20.0px;\");\n\t\t\n\t\t// buttonEditarEvaluacion\n\t\tbuttonEditarEvaluacion = new Button();\n\t\tbuttonEditarEvaluacion.setCaption(\"Editar Evaluación\");\n\t\tbuttonEditarEvaluacion.setImmediate(false);\n\t\tbuttonEditarEvaluacion.setWidth(\"-1px\");\n\t\tbuttonEditarEvaluacion.setHeight(\"-1px\");\n\t\tmainLayout.addComponent(buttonEditarEvaluacion,\n\t\t\t\t\"top:14.0px;left:160.0px;\");\n\t\t\n\t\treturn mainLayout;\n\t}",
"@AutoGenerated\n\tprivate HorizontalLayout buildMainLayout() {\n\t\tmainLayout = new HorizontalLayout();\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"-1px\");\n\t\tmainLayout.setHeight(\"29px\");\n\t\tmainLayout.setMargin(false);\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"-1px\");\n\t\tsetHeight(\"29px\");\n\t\t\n\t\t// pnToolbar\n\t\tpnToolbar = buildPnToolbar();\n\t\tmainLayout.addComponent(pnToolbar);\n\t\t\n\t\treturn mainLayout;\n\t}",
"public AddonInstaller() {\n \n }",
"ArtifactIdentifier getLatestVersion();",
"private Main() {\n\n super();\n }",
"@Deployment(testable = false)\n public static WebArchive createDeployment() {\n\n // Import Maven runtime dependencies\n File[] files = Maven.resolver().loadPomFromFile(\"pom.xml\")\n .importRuntimeDependencies().resolve().withTransitivity().asFile();\n\n return ShrinkWrap.create(WebArchive.class)\n .addPackage(Session.class.getPackage())\n .addClasses(SessionEndpoint.class, SessionRepository.class, Application.class)\n .addAsResource(\"META-INF/persistence-test.xml\", \"META-INF/persistence.xml\")\n .addAsWebInfResource(EmptyAsset.INSTANCE, \"beans.xml\")\n .addAsLibraries(files);\n }",
"private Resource useDeveloperBuild() throws IOException { Find ourselves in the CLASSPATH. We should be a loose class file.\n //\n URL u = getClass().getResource(getClass().getSimpleName() + \".class\");\n if (u == null) {\n throw new FileNotFoundException(\"Cannot find web application root\");\n }\n if (!\"file\".equals(u.getProtocol())) {\n throw new FileNotFoundException(\"Cannot find web root from \" + u);\n }\n\n // Pop up to the top level classes folder that contains us.\n //\n File dir = new File(u.getPath());\n String myName = getClass().getName();\n for (;;) {\n int dot = myName.lastIndexOf('.');\n if (dot < 0) {\n dir = dir.getParentFile();\n break;\n }\n myName = myName.substring(0, dot);\n dir = dir.getParentFile();\n }\n\n // We should be in a Maven style output, that is $jar/target/classes.\n //\n if (!dir.getName().equals(\"classes\")) {\n throw new FileNotFoundException(\"Cannot find web root from \" + u);\n }\n dir = dir.getParentFile(); // pop classes\n if (!dir.getName().equals(\"target\")) {\n throw new FileNotFoundException(\"Cannot find web root from \" + u);\n }\n dir = dir.getParentFile(); // pop target\n dir = dir.getParentFile(); // pop the module we are in\n\n // Drop down into gerrit-gwtui to find the WAR assets we need.\n //\n dir = new File(new File(dir, \"gerrit-gwtui\"), \"target\");\n final File[] entries = dir.listFiles();\n if (entries == null) {\n throw new FileNotFoundException(\"No \" + dir);\n }\n for (File e : entries) {\n if (e.isDirectory() /* must be a directory */\n && e.getName().startsWith(\"gerrit-gwtui-\")\n && new File(e, \"gerrit/gerrit.nocache.js\").isFile()) {\n return Resource.newResource(e.toURI());\n }\n }\n throw new FileNotFoundException(\"No \" + dir + \"/gerrit-gwtui-*\");\n }",
"public JawbComponent getMainComponent () {\n return null;\n }",
"@Test\n public void downloadToplevel_treeArtifacts() throws Exception {\n if (OS.getCurrent() == OS.WINDOWS) {\n return;\n }\n setDownloadToplevel();\n writeOutputDirRule();\n write(\n \"BUILD\",\n \"load(':output_dir.bzl', 'output_dir')\",\n \"output_dir(\",\n \" name = 'foo',\",\n \" content_map = {'file-1': '1', 'file-2': '2', 'file-3': '3'},\",\n \")\");\n\n buildTarget(\"//:foo\");\n\n assertValidOutputFile(\"foo/file-1\", \"1\");\n assertValidOutputFile(\"foo/file-2\", \"2\");\n assertValidOutputFile(\"foo/file-3\", \"3\");\n // TODO(chiwang): Make metadata for downloaded outputs local.\n // assertThat(getMetadata(\"//:foo\").values().stream().noneMatch(FileArtifactValue::isRemote))\n // .isTrue();\n }",
"public RepositoryArtifact createProject(RepositoryConnector connector, String rootFolderId, String projectName, String processDefinitionXml) {\r\n RepositoryArtifact result = null;\r\n try {\r\n ZipInputStream projectTemplateInputStream = new ZipInputStream(getProjectTemplate());\r\n ZipEntry zipEntry = null;\r\n \r\n String rootSubstitution = null;\r\n \r\n while ((zipEntry = projectTemplateInputStream.getNextEntry()) != null) {\r\n String zipName = zipEntry.getName();\r\n if (zipName.endsWith(\"/\")) {\r\n zipName = zipName.substring(0, zipName.length() - 1);\r\n }\r\n String path = \"\";\r\n String name = zipName;\r\n if (zipName.contains(\"/\")) {\r\n path = zipName.substring(0, zipName.lastIndexOf(\"/\"));\r\n name = zipName.substring(zipName.lastIndexOf(\"/\") + 1);\r\n }\r\n if (\"\".equals(path)) {\r\n // root folder is named after the project, not like the\r\n // template\r\n // folder name\r\n rootSubstitution = name;\r\n name = projectName;\r\n } else {\r\n // rename the root folder in all other paths as well\r\n path = path.replace(rootSubstitution, projectName);\r\n }\r\n String absolutePath = rootFolderId + \"/\" + path;\r\n boolean isBpmnModel = false;\r\n if (zipEntry.isDirectory()) {\r\n connector.createFolder(absolutePath, name);\r\n } else {\r\n Content content = new Content();\r\n \r\n if (\"template.bpmn20.xml\".equals(name)) {\r\n // This file shall be replaced with the process\r\n // definition\r\n content.setValue(processDefinitionXml);\r\n name = projectName + \".bpmn20.xml\";\r\n isBpmnModel = true;\r\n log.log(Level.INFO, \"Create processdefinition from Signavio process model \" + projectName);\r\n } else {\r\n byte[] bytes = IoUtil.readInputStream(projectTemplateInputStream, \"ZIP entry '\" + zipName + \"'\");\r\n String txtContent = new String(bytes).replaceAll(REPLACE_STRING, projectName).replaceAll(\"@@ACTIVITI.HOME@@\", ACTIVITI_HOME_PATH);\r\n content.setValue(txtContent);\r\n }\r\n log.log(Level.INFO, \"Create new artifact from zip entry '\" + zipEntry.getName() + \"' in folder '\" + absolutePath + \"' with name '\" + name + \"'\");\r\n RepositoryArtifact artifact = connector.createArtifact(absolutePath, name, null, content);\r\n if (isBpmnModel) {\r\n result = artifact;\r\n }\r\n }\r\n projectTemplateInputStream.closeEntry();\r\n }\r\n projectTemplateInputStream.close();\r\n } catch (IOException ex) {\r\n throw new RepositoryException(\"Couldn't create maven project due to IO errors\", ex);\r\n }\r\n return result;\r\n }",
"public static Stage getPrimaryStage()\n {\n return Main.primaryStage;\n }",
"default void buildMainBuildModules() {\n var main = bach().project().spaces().main();\n var modules = main.declarations();\n if (modules.isEmpty()) {\n log(\"Main module list is empty, nothing to build here.\");\n return;\n }\n var s = modules.size() == 1 ? \"\" : \"s\";\n say(\"Build %d main module%s: %s\", modules.size(), s, modules.toNames(\", \"));\n\n var release = main.release();\n var feature = release != 0 ? release : Runtime.version().feature();\n var classes = bach().folders().workspace(\"classes-main-\" + feature);\n\n var workspaceModules = bach().folders().workspace(\"modules\");\n Paths.deleteDirectories(workspaceModules);\n if (feature == 8) {\n bach().run(buildMainJavac(9, classes)).requireSuccessful();\n buildMainSpaceClassesForJava8(classes);\n } else {\n bach().run(buildMainJavac(release, classes)).requireSuccessful();\n }\n\n Paths.createDirectories(workspaceModules);\n var jars = new ArrayList<Jar>();\n var javacs = new ArrayList<Javac>();\n for (var declaration : modules.map().values()) {\n for (var folder : declaration.sources().list()) {\n if (!folder.isTargeted()) continue;\n javacs.add(buildMainJavac(declaration, folder, classes));\n }\n jars.add(buildMainJar(declaration, classes));\n }\n if (!javacs.isEmpty()) bach().run(javacs.stream()).requireSuccessful();\n bach().run(jars.stream()).requireSuccessful();\n }",
"private SizedJPanel getMainPanel() {\n if (mainPanel == null) {\n mainPanel = new GuiMainPanel(this, config.paths.getValue(),\n config.outFile.getValue(), config.isOboToOwl.getValue());\n }\n return mainPanel;\n }",
"private File getLastArtifact() throws MojoExecutionException {\n\t\torg.eclipse.aether.version.Version v = getLastVersion();\n\t\tif (v == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tArtifact artifactQuery = new DefaultArtifact(groupId.concat(\":\")\n\t\t\t\t.concat(name).concat(\":\").concat(v.toString()));\n\t\tgetLog().debug(\n\t\t\t\tString.format(\"looking for artifact %s\",\n\t\t\t\t\t\tartifactQuery.toString()));\n\t\treturn getArtifactFile(artifactQuery);\n\n\t}",
"Artifact getArtifact(String version) throws ArtifactNotFoundException;",
"public SystemPackagingTask() {\n super();\n exten = new SystemPackagingExtension();\n parentExten = getProject().getExtensions().findByType(ProjectPackagingExtension.class);\n\n if (parentExten != null) {\n getRootSpec().with(parentExten.getDelegateCopySpec());\n }\n }",
"@Override\n\tpublic Project packageArchive(IProject ipr, IProject relativeTo) {\n\t\t//throw new RuntimeException(\"This method is not supported for Web based build configurations\");\n\t\tProject proj = null;\n\t\t\n\t\t\n\t\tProjectDeploymentStructure pds = readDeploymentAssembly(ipr);\n\t\t\n\t\tproj = generateArchive(pds, ipr, relativeTo);\n\t\tproj.setProperties(BuildCore.getProjectProperties(relativeTo.getLocation()));\n\t\t/**\n\t\t * If the ProjectDeploymentStructure instance is null. Then it is clear that this archive doesn't need packaging of other archives.\n\t\t * Hence, Only archive this Project.\n\t\t * \n\t\t */\n\t\t\n\t\treturn proj;\n\t}",
"public static JARArchive createDefaultJar(Class<?> aClass) {\n JARArchive archive = ShrinkWrap.create(JARArchive.class);\n ClassLoader cl = aClass.getClassLoader();\n\n Set<CodeSource> codeSources = new HashSet<>();\n\n URLPackageScanner.Callback callback = (className, asset) -> {\n ArchivePath classNamePath = AssetUtil.getFullPathForClassResource(className);\n ArchivePath location = new BasicPath(\"\", classNamePath);\n archive.add(asset, location);\n\n try {\n Class<?> cls = cl.loadClass(className);\n codeSources.add(cls.getProtectionDomain().getCodeSource());\n } catch (ClassNotFoundException | NoClassDefFoundError e) {\n e.printStackTrace();\n }\n };\n\n URLPackageScanner scanner = URLPackageScanner.newInstance(\n true,\n cl,\n callback,\n aClass.getPackage().getName());\n\n scanner.scanPackage();\n\n Set<String> prefixes = codeSources.stream().map(e -> e.getLocation().toExternalForm()).collect(Collectors.toSet());\n\n try {\n List<URL> resources = Collections.list(cl.getResources(\"\"));\n\n resources.stream()\n .filter(e -> {\n for (String prefix : prefixes) {\n if (e.toExternalForm().startsWith(prefix)) {\n return true;\n }\n }\n return false;\n })\n .filter(e -> e.getProtocol().equals(\"file\"))\n .map(e -> getPlatformPath(e.getPath()))\n .map(e -> Paths.get(e))\n .filter(e -> Files.isDirectory(e))\n .forEach(e -> {\n try {\n Files.walkFileTree(e, new SimpleFileVisitor<Path>() {\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n if (!file.toString().endsWith(\".class\")) {\n Path location = e.relativize(file);\n archive.add(new FileAsset(file.toFile()), javaSlashize(location));\n }\n return super.visitFile(file, attrs);\n }\n });\n } catch (IOException e1) {\n }\n });\n\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return archive;\n }",
"@Override\r\n public String getProjectPath() {\r\n \treturn String.format(\":%s\", getArtifactId());\r\n }",
"@Override\n\tpublic void createBootstrapJar() throws IOException {\n\t\t\n\t}",
"public static WebArchive createWarQSDeployment(String artifactId) {\n return ShrinkwrapUtil.getSwitchYardWebArchive(QS_GID, artifactId);\n }",
"abstract public MediaFile getMainFile();",
"BuildClient createBuildClient();",
"protected AppFile createChildAppFile(WebFile aFile)\n{\n // Get basic file info\n String name = aFile.getName(), path = aFile.getPath(); boolean dir = aFile.isDir();\n String type = aFile.getType(); int tlen = type.length();\n\n // Skip hidden files, build dir, child packages\n if(name.startsWith(\".\")) return null;\n //if(dir && _proj!=null && aFile==_proj.getBuildDir()) return null;\n if(_type==FileType.PACKAGE_DIR && dir && tlen==0) return null; // Skip child packages\n \n // Create AppFile\n AppFile fitem = new AppFile(this, aFile);\n //if(dir && _proj!=null && aFile==_proj.getSourceDir() && !aFile.isRoot()) {\n // fitem._type = FileType.SOURCE_DIR; fitem._priority = 1; }\n //else if(_type==FileType.SOURCE_DIR && dir && tlen==0) {\n // fitem._type = FileType.PACKAGE_DIR; fitem._priority = -1; }\n \n // Set priorities for special files\n if(type.equals(\"java\")) fitem._priority = 1;\n if(type.equals(\"snp\")) fitem._priority = 1;\n\n // Otherwise just add FileItem\n return fitem;\n}",
"public static JavaArchive createJarQSDeployment(String artifactId) {\n return ShrinkwrapUtil.getSwitchYardJavaArchive(QS_GID, artifactId);\n }",
"public void execute() throws MojoExecutionException {\n\n // 1. Create and set up directories\n getLog().info(\"Creating and setting up the bundle directories\");\n buildDirectory.mkdirs();\n\n File bundleDir = new File(buildDirectory, bundleName + \".app\");\n bundleDir.mkdirs();\n\n File contentsDir = new File(bundleDir, \"Contents\");\n contentsDir.mkdirs();\n\n File resourcesDir = new File(contentsDir, \"Resources\");\n resourcesDir.mkdirs();\n\n File javaDirectory = new File(contentsDir, \"Java\");\n javaDirectory.mkdirs();\n\n File macOSDirectory = new File(contentsDir, \"MacOS\");\n macOSDirectory.mkdirs();\n\n // 2. Copy in the native java application stub\n getLog().info(\"Copying the native Java Application Stub\");\n File launcher = new File(macOSDirectory, javaLauncherName);\n launcher.setExecutable(true);\n\n FileOutputStream launcherStream = null;\n try {\n launcherStream = new FileOutputStream(launcher);\n } catch (FileNotFoundException ex) {\n throw new MojoExecutionException(\"Could not copy file to directory \" + launcher, ex);\n }\n\n InputStream launcherResourceStream = this.getClass().getResourceAsStream(javaLauncherName);\n try {\n IOUtil.copy(launcherResourceStream, launcherStream);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could not copy file \" + javaLauncherName + \" to directory \" + macOSDirectory, ex);\n }\n\n // 3.Copy icon file to the bundle if specified\n if (iconFile != null) {\n File f = searchFile(iconFile, project.getBasedir());\n\n if (f != null && f.exists() && f.isFile()) {\n getLog().info(\"Copying the Icon File\");\n try {\n FileUtils.copyFileToDirectory(f, resourcesDir);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying file \" + iconFile + \" to \" + resourcesDir, ex);\n }\n } else {\n throw new MojoExecutionException(String.format(\"Could not locate iconFile '%s'\", iconFile));\n }\n }\n\n // 4. Resolve and copy in all dependencies from the pom\n getLog().info(\"Copying dependencies\");\n List<String> files = copyDependencies(javaDirectory);\n if (additionalBundledClasspathResources != null && !additionalBundledClasspathResources.isEmpty()) {\n files.addAll(copyAdditionalBundledClasspathResources(javaDirectory, \"lib\", additionalBundledClasspathResources));\n }\n\n // 5. Check if JRE should be embedded. Check JRE path. Copy JRE\n if (jrePath != null) {\n File f = new File(jrePath);\n if (f.exists() && f.isDirectory()) {\n // Check if the source folder is a jdk-home\n File pluginsDirectory = new File(contentsDir, \"PlugIns/JRE/Contents/Home/jre\");\n pluginsDirectory.mkdirs();\n\n File sourceFolder = new File(jrePath, \"Contents/Home\");\n if (new File(jrePath, \"Contents/Home/jre\").exists()) {\n sourceFolder = new File(jrePath, \"Contents/Home/jre\");\n }\n\n try {\n getLog().info(\"Copying the JRE Folder from : [\" + sourceFolder + \"] to PlugIn folder: [\" + pluginsDirectory + \"]\");\n FileUtils.copyDirectoryStructure(sourceFolder, pluginsDirectory);\n File binFolder = new File(pluginsDirectory, \"bin\");\n //Setting execute permissions on executables in JRE\n for (String filename : binFolder.list()) {\n new File(binFolder, filename).setExecutable(true, false);\n }\n\n new File (pluginsDirectory, \"lib/jspawnhelper\").setExecutable(true,false);\n embeddJre = true;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying folder \" + f + \" to \" + pluginsDirectory, ex);\n }\n } else {\n getLog().warn(\"JRE not found check jrePath setting in pom.xml\");\n }\n } else if (jreFullPath != null){\n getLog().info(\"JRE Full path is used [\" + jreFullPath + \"]\");\n embeddJre = true;\n }\n\n // 6. Create and write the Info.plist file\n getLog().info(\"Writing the Info.plist file\");\n File infoPlist = new File(bundleDir, \"Contents\" + File.separator + \"Info.plist\");\n this.writeInfoPlist(infoPlist, files);\n\n // 7. Copy specified additional resources into the top level directory\n getLog().info(\"Copying additional resources\");\n if (additionalResources != null && !additionalResources.isEmpty()) {\n this.copyResources(buildDirectory, additionalResources);\n }\n\n // 7. Make the stub executable\n if (!SystemUtils.IS_OS_WINDOWS) {\n getLog().info(\"Making stub executable\");\n Commandline chmod = new Commandline();\n try {\n chmod.setExecutable(\"chmod\");\n chmod.createArgument().setValue(\"755\");\n chmod.createArgument().setValue(launcher.getAbsolutePath());\n\n chmod.execute();\n } catch (CommandLineException e) {\n throw new MojoExecutionException(\"Error executing \" + chmod + \" \", e);\n }\n } else {\n getLog().warn(\"The stub was created without executable file permissions for UNIX systems\");\n }\n\n // 8. Create the DMG file\n if (generateDiskImageFile) {\n if (SystemUtils.IS_OS_MAC_OSX || SystemUtils.IS_OS_MAC) {\n getLog().info(\"Generating the Disk Image file\");\n Commandline dmg = new Commandline();\n try {\n // user wants /Applications symlink in the resulting disk image\n if (includeApplicationsSymlink) {\n createApplicationsSymlink();\n }\n dmg.setExecutable(\"hdiutil\");\n dmg.createArgument().setValue(\"create\");\n dmg.createArgument().setValue(\"-srcfolder\");\n dmg.createArgument().setValue(buildDirectory.getAbsolutePath());\n dmg.createArgument().setValue(diskImageFile.getAbsolutePath());\n\n try {\n dmg.execute().waitFor();\n } catch (InterruptedException ex) {\n throw new MojoExecutionException(\"Thread was interrupted while creating DMG \" + diskImageFile, ex);\n } finally {\n if (includeApplicationsSymlink) {\n removeApplicationsSymlink();\n }\n }\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error creating disk image \" + diskImageFile, ex);\n }\n\n if (diskImageInternetEnable) {\n getLog().info(\"Enabling the Disk Image file for internet\");\n try {\n Commandline internetEnableCommand = new Commandline();\n\n internetEnableCommand.setExecutable(\"hdiutil\");\n internetEnableCommand.createArgument().setValue(\"internet-enable\");\n internetEnableCommand.createArgument().setValue(\"-yes\");\n internetEnableCommand.createArgument().setValue(diskImageFile.getAbsolutePath());\n\n internetEnableCommand.execute();\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error internet enabling disk image: \" + diskImageFile, ex);\n }\n }\n projectHelper.attachArtifact(project, \"dmg\", null, diskImageFile);\n }\n if (SystemUtils.IS_OS_LINUX) {\n getLog().info(\"Generating the Disk Image file\");\n Commandline linux_dmg = new Commandline();\n try {\n linux_dmg.setExecutable(\"genisoimage\");\n linux_dmg.createArgument().setValue(\"-V\");\n linux_dmg.createArgument().setValue(bundleName);\n linux_dmg.createArgument().setValue(\"-D\");\n linux_dmg.createArgument().setValue(\"-R\");\n linux_dmg.createArgument().setValue(\"-apple\");\n linux_dmg.createArgument().setValue(\"-no-pad\");\n linux_dmg.createArgument().setValue(\"-o\");\n linux_dmg.createArgument().setValue(diskImageFile.getAbsolutePath());\n linux_dmg.createArgument().setValue(buildDirectory.getAbsolutePath());\n\n try {\n linux_dmg.execute().waitFor();\n } catch (InterruptedException ex) {\n throw new MojoExecutionException(\"Thread was interrupted while creating DMG \" + diskImageFile,\n ex);\n }\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error creating disk image \" + diskImageFile + \" genisoimage probably missing\", ex);\n }\n projectHelper.attachArtifact(project, \"dmg\", null, diskImageFile);\n\n } else {\n getLog().warn(\"Disk Image file cannot be generated in non Mac OS X and Linux environments\");\n }\n }\n\n getLog().info(\"App Bundle generation finished\");\n }",
"public PackageServer() {\n\t\t\n\t\t// Create the release folder\n\t\tLOGGER.debug(\"Creating directory: {}\", RELEASE_FOLDER);\n\t\tif (PackageUtils.createDirectory(RELEASE_FOLDER)) {\n\t\t\tLOGGER.debug(\"Created: {}\", RELEASE_FOLDER);\n\t\t} else {\n\t\t\tLOGGER.debug(\"Failed creating: {}\", RELEASE_FOLDER);\n\t\t}\n\t}",
"public T getMain() {\n\t\treturn this.main;\n\t}",
"public Main() {\n\t\tsuper();\n\t}",
"public static Result index() {\n\n String root = com.domain.root.Main.someString();\n String foo = com.domain.foo.Main.someString();\n String bar = com.domain.bar.Main.someString();\n String zee = com.domain.zee.Main.someString();\n\n return ok(index.render(\"Your new application is ready.\"));\n }",
"public Builder mainJar(Path mainJar) {\n this.mainJar = assertFile(mainJar);\n return this;\n }",
"public Main() {\n \n \n }",
"@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }",
"public static Main getInstance() {\n return instance;\n }",
"protected NodeFigure createMainFigure() {\n\t\tNodeFigure figure = createNodePlate();\n\t\tfigure.setLayoutManager(new StackLayout());\n\t\tIFigure shape = createNodeShape();\n\t\tfigure.add(shape);\n\t\tcontentPane = setupContentPane(shape);\n\t\treturn figure;\n\t}",
"private MavenModuleSet createMavenProject() throws IOException {\n MavenModuleSet mavenModuleSet = j.jenkins.createProject(MavenModuleSet.class, \"test\"+j.jenkins.getItems().size());\n mavenModuleSet.setRunHeadless(true);\n return mavenModuleSet;\n }",
"private Artifact buildArtifactFromString(ArrayList<String> pluginOutput, int unusedDependencyIndex) {\n String line = pluginOutput.get(unusedDependencyIndex);\n String[] splitValues = line.split(\":|\\\\s+\");\n String groupId = splitValues[1];\n String artifactId = splitValues[2];\n String type = splitValues[3];\n String version = splitValues[4];\n String scope = splitValues[5];\n return new DefaultArtifact(groupId, artifactId, version, scope, type, null, new DefaultArtifactHandler());\n\n\n }",
"public String getMain() {\n\t\treturn main;\n\t}",
"protected NodeFigure createMainFigure() {\r\n\t\tNodeFigure figure = createNodePlate();\r\n\t\tfigure.setLayoutManager(new StackLayout());\r\n\t\tIFigure shape = createNodeShape();\r\n\t\tfigure.add(shape);\r\n\t\tcontentPane = setupContentPane(shape);\r\n\t\treturn figure;\r\n\t}",
"public static void main(String[] args) {\n\t\textractedMain(JarFolders.SRC_FOLDER);\r\n\t}",
"public static Main getInstance() {\r\n return instance;\r\n }",
"public void execute()\n throws MojoExecutionException\n {\n this.checkOperatingSystem();\n\n final File folderApp =\n new File( this.data.getTargetDirectory(), this.data.getAppName() + \"-\" + this.data.getAppVersion() + \".app\" );\n final File folderContents = new File( folderApp, \"Contents\" );\n final File folderMacOS = new File( folderContents, \"MacOS\" );\n final File folderResources = new File( folderContents, \"Resources\" );\n final File folderJava = new File( folderResources, \"Java\" );\n\n final File targetJavaAppStub = new File( folderMacOS, JAVA_APP_STUB.getName() );\n final File targetInfoPlistFile = new File( folderContents, FILENAME_PLIST_INFO );\n final File targetVersionPlistFile = new File( folderContents, FILENAME_PLIST_VERSION );\n\n if ( folderApp.exists() == true )\n {\n try\n {\n this.logger.info( \"Deleting already existing application folder at '\" + folderApp.getName() + \"' ...\" );\n PtFileUtil.deleteDirectoryRecursive( folderApp );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not delete directory '\" + folderApp.getAbsolutePath() + \"'!\" );\n }\n }\n\n makeFolders( folderApp );\n makeFolders( folderContents );\n makeFolders( folderMacOS );\n makeFolders( folderResources );\n makeFolders( folderJava );\n\n final String jarWithDependsFileName =\n this.data.getAppName() + \"-\" + this.data.getAppVersion() + \"-\" + \"jar-with-dependencies.jar\";\n final File jarWithDependsSource = new File( this.data.getTargetDirectory(), jarWithDependsFileName );\n\n if ( jarWithDependsSource.exists() == false )\n {\n throw new MojoExecutionException(\n \"Jar with dependencies file not existing (try 'mvn assembly:assembly') at: \"\n + jarWithDependsSource.getAbsolutePath() );\n }\n\n if ( this.data.isPlistInfoParamsSet() == true )\n {\n\n final String mainClassFqn = this.data.getPlistInfoParams( PlistInfoParam.MAIN_CLASS );\n this.checkJarWithDependsMainClass( jarWithDependsSource, mainClassFqn );\n\n }\n else\n {\n this.logger.debug( \"Could not check MainClass existence.\" );\n // TODO if Info.plist file is given directly, check for file\n // existence,\n // then parse it (validate!) and retrieve MainClass attribute to\n // check jar with dependencies\n }\n\n this.executeCopyFiles( folderResources, folderJava, targetJavaAppStub, jarWithDependsSource );\n this.executePlistFiles( jarWithDependsFileName, targetInfoPlistFile, targetVersionPlistFile );\n this.executeShellCommands( folderApp, targetJavaAppStub );\n\n }",
"private Element createManifestEntry (String location, URI format,\n\t\tboolean mainEntry)\n\t{\n\t\tElement element = new Element (\"content\", Utils.omexNs);\n\t\telement.setAttribute (\"location\", location);\n\t\telement.setAttribute (\"format\", format.toString ());\n\t\tif (mainEntry)\n\t\t\telement.setAttribute (\"master\", \"\" + mainEntry);\n\t\treturn element;\n\t}",
"private Manifest getManifest( final File artifact ) throws IOException {\n if ( artifact.isDirectory() ) {\n // this is maybe a classes directory, try to read manifest file directly\n final File dir = new File(artifact, \"META-INF\");\n if ( !dir.exists() || !dir.isDirectory() ) {\n return null;\n }\n final File mf = new File(dir, \"MANIFEST.MF\");\n if ( !mf.exists() || !mf.isFile() ) {\n return null;\n }\n final InputStream is = new FileInputStream(mf);\n try {\n return new Manifest(is);\n } finally {\n try { is.close(); } catch (final IOException ignore) { }\n }\n }\n JarFile file = null;\n try {\n file = new JarFile( artifact );\n return file.getManifest();\n } finally {\n if ( file != null ) {\n try { file.close(); } catch ( final IOException ignore ) {}\n }\n }\n }",
"public MainApp() {\r\n\t\tsuper();\r\n\t\tthis.setSize(642, 455);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"Composer createComposer();",
"String getMainClass();",
"@AutoGenerated\r\n\tprivate VerticalLayout buildMainLayout() {\n\t\tmainLayout = new VerticalLayout();\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tsetWidth(\"400px\");\r\n\t\tsetHeight(\"340px\");\r\n\t\t\r\n\t\t// menuBar_1\r\n\t\tmenuBar_1 = new MenuBar();\r\n\t\tmenuBar_1.setWidth(\"100.0%\");\r\n\t\tmenuBar_1.setHeight(\"-1px\");\r\n\t\tmenuBar_1.setImmediate(false);\r\n\t\tmainLayout.addComponent(menuBar_1);\r\n\t\t\r\n\t\t// horizontalLayout_1\r\n\t\thorizontalLayout_1 = buildHorizontalLayout_1();\r\n\t\tmainLayout.addComponent(horizontalLayout_1);\r\n\t\t\r\n\t\t// tabSheet_1\r\n\t\ttabSheet_1 = buildTabSheet_1();\r\n\t\tmainLayout.addComponent(tabSheet_1);\r\n\t\tmainLayout.setExpandRatio(tabSheet_1, 1.0f);\r\n\t\tmainLayout.setComponentAlignment(tabSheet_1, new Alignment(48));\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}",
"abstract public PyCode getMain();",
"EPackage createEPackage();",
"private Main() {}",
"default void buildMainGenerateAPIDocumentation() {\n if (!bach().project().settings().tools().enabled(\"javadoc\")) return;\n say(\"Generate API documentation\");\n var api = bach().folders().workspace(\"documentation\", \"api\");\n bach().run(buildMainJavadoc(api)).requireSuccessful();\n bach().run(buildMainJavadocJar(api)).requireSuccessful();\n }"
]
| [
"0.58545244",
"0.578029",
"0.57397157",
"0.57126456",
"0.5638312",
"0.5638185",
"0.5591621",
"0.5506029",
"0.5450484",
"0.54075897",
"0.5397047",
"0.5312263",
"0.5237798",
"0.523388",
"0.5225067",
"0.51998633",
"0.51938903",
"0.5184621",
"0.5180858",
"0.5177574",
"0.515939",
"0.515939",
"0.515939",
"0.51426226",
"0.5128407",
"0.5122539",
"0.51221156",
"0.5118324",
"0.51172405",
"0.5094526",
"0.5086231",
"0.50797373",
"0.5079068",
"0.50637716",
"0.50599277",
"0.50524515",
"0.5042215",
"0.50154996",
"0.5014519",
"0.5007804",
"0.4997868",
"0.4989604",
"0.4970126",
"0.49587563",
"0.49401614",
"0.49241322",
"0.4922858",
"0.49077344",
"0.48944202",
"0.48912436",
"0.48905957",
"0.48902568",
"0.4879417",
"0.4875715",
"0.48726547",
"0.48713163",
"0.4868164",
"0.4861988",
"0.48614523",
"0.48508918",
"0.48440424",
"0.48435938",
"0.48413312",
"0.482237",
"0.48192108",
"0.48156676",
"0.48126802",
"0.4806543",
"0.4803921",
"0.4800919",
"0.47925177",
"0.47847912",
"0.47824803",
"0.47824565",
"0.47767892",
"0.47748873",
"0.47717062",
"0.4770673",
"0.47641438",
"0.47632828",
"0.47553444",
"0.4744887",
"0.47417685",
"0.4735159",
"0.47312942",
"0.47229427",
"0.47174785",
"0.4714886",
"0.4714602",
"0.47027677",
"0.47006533",
"0.46908087",
"0.46871892",
"0.46817687",
"0.46808952",
"0.46776444",
"0.46719664",
"0.46712458",
"0.46690607",
"0.46662113"
]
| 0.56572276 | 4 |
Creates and returns an artifact, using the given json activity. | public static IArtefact createActivityArtefact(JSONObject activity) {
// System.out.println("DEBUG| createActivityArtefact activity: "+activity);
JSONObject object = activity.getJSONObject(ShindigConnector.ACTIVITY_OBJECT);
switch(object.getString(ShindigConnector.ACTIVITY_OBJECT_OBJECTTYPE)) {
case(ActivityController.TYPE_LIFERAY_BLOG_ENTRY):
// System.out.println("It is a blog entry.");
return new LiferayBlogArtefact(object.getString("id").split(":")[1]); // blog entry id
case(ActivityController.TYPE_LIFERAY_FORUM_ENTRY):
case(ActivityController.TYPE_LIFERAY_FORUM_THREAD):
// System.out.println("It is a forum entry.");
return new LiferayForumArtefact(object.getString("id").split(":")[1]); // message board message id
case(ActivityController.TYPE_LIFERAY_WEB_CONTENT):
// System.out.println("It is a web content.");
return new LiferayWebContentArtefact(object.getString("id").split(":")[1]); // journal article id
case(ActivityController.TYPE_LIFERAY_WIKI_PAGE):
// System.out.println("It is a wiki page.");
return new LiferayWikiArtefact(object.getString("id").split(":")[1]); // wiki page id
case(ActivityController.TYPE_NUXEO_DOCUMENT):
// System.out.println("It is a nuxeo document.");
return new NuxeoDocArtefact(object.getString("id")); // document version series id
case(ActivityController.TYPE_OX_TASK):
break;
case(ActivityController.TYPE_OX_CALENDAR_ENTRY):
break;
case(ActivityController.TYPE_PUBLIC_MESSAGE):
SocialMessageArtefact a = new SocialMessageArtefact(object.getString("id"));
a.setUserId(activity.getJSONObject(ShindigConnector.ACTIVITY_ACTOR).getString(ShindigConnector.ID));
return a;
}
// System.out.println("DEBUG| createActivityArtefact: return null!!!");
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Active_Digital_Artifact createActive_Digital_Artifact();",
"public com.google.cloud.aiplatform.v1.Artifact createArtifact(\n com.google.cloud.aiplatform.v1.CreateArtifactRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateArtifactMethod(), getCallOptions(), request);\n }",
"Digital_Artifact createDigital_Artifact();",
"public void createArtifact(\n com.google.cloud.aiplatform.v1.CreateArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateArtifactMethod(), getCallOptions()),\n request,\n responseObserver);\n }",
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.aiplatform.v1.Artifact>\n createArtifact(com.google.cloud.aiplatform.v1.CreateArtifactRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateArtifactMethod(), getCallOptions()), request);\n }",
"Passive_Digital_Artifact createPassive_Digital_Artifact();",
"default void createArtifact(\n com.google.cloud.aiplatform.v1.CreateArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateArtifactMethod(), responseObserver);\n }",
"CdapArtifact createCdapArtifact();",
"public ResponseContainerAssets createArtifact(String userId, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact)\n\t\t\tthrows PropertyServerException, AnalyticsModelingCheckedException, InvalidParameterException, UserNotAuthorizedException;",
"public JsonObject getArtifact(String wrksName, String artName) throws CartagoException {\n var info = getArtInfo(wrksName, artName);\n\n var artifact = Json.createObjectBuilder()\n .add(\"artifact\", artName)\n .add(\"type\", info.getId().getArtifactType());\n\n\n // Get artifact's properties\n var properties = Json.createArrayBuilder();\n for (ArtifactObsProperty op : info.getObsProperties()) {\n var values = Json.createArrayBuilder();\n for (Object vl : op.getValues()) {\n values.add(\n Json.createValue(vl.toString())\n );\n }\n properties.add(\n Json.createObjectBuilder()\n .add(op.getName(), values)\n );\n }\n artifact.add(\"properties\", properties);\n\n // Get artifact's operations\n var operations = Json.createArrayBuilder();\n info.getOperations().forEach(y -> {\n operations.add(y.getOp().getName());\n });\n artifact.add(\"operations\", operations);\n\n // Get agents that are observing the artifact\n var observers = Json.createArrayBuilder();\n info.getObservers().forEach(y -> {\n // do not print agents_body observation\n if (!info.getId().getArtifactType().equals(AgentBodyArtifact.class.getName())) {\n observers.add(y.getAgentId().getAgentName());\n }\n });\n artifact.add(\"observers\", observers);\n\n // linked artifacts\n /* not used anymore\n var linkedArtifacts = Json.createArrayBuilder();\n info.getLinkedArtifacts().forEach(y -> {\n // linked artifact node already exists if it belongs to this workspace\n linkedArtifacts.add(y.getName());\n });\n artifact.add(\"linkedArtifacts\", linkedArtifacts);*/\n\n return artifact.build();\n }",
"public Asset createAsset(Asset asset) throws IOException {\n try {\n String strBody = null;\n Map<String, String> params = null;\n String correctPath = \"/Assets\";\n UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath);\n String url = uriBuilder.build().toString();\n\n \n strBody = apiClient.getObjectMapper().writeValueAsString(asset);\n\n String response = this.DATA(url, strBody, params, \"POST\");\n TypeReference<Asset> typeRef = new TypeReference<Asset>() {};\n return apiClient.getObjectMapper().readValue(response, typeRef);\n\n } catch (IOException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage());\n } catch (XeroApiException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage(), e.getResponseCode(),JSONUtils.isJSONValid(e.getMessage()));\n }\n }",
"public void createActivity(Activity activity) {\n\t\t\n\t}",
"public void addArtifact(ArtifactModel artifact);",
"@PostMapping(\"/activities\")\n\tpublic Activity createActivity(@RequestBody Activity activity) {\n\t\treturn activityRepository.save(activity);\n\t}",
"Path getArtifact(String identifier);",
"private void createArtifacts(String groupId,\n String artifactId,\n String storageId,\n String repositoryId)\n {\n ArtifactCoordinates coordinates1 = createArtifactCoordinates(groupId, artifactId + \"123\", \"1.2.3\", \"jar\");\n ArtifactCoordinates coordinates2 = createArtifactCoordinates(groupId, artifactId, \"1.2.3\", \"jar\");\n ArtifactCoordinates coordinates3 = createArtifactCoordinates(groupId + \"myId\", artifactId + \"321\", \"1.2.3\",\n \"jar\");\n\n createArtifactEntry(coordinates1, storageId, repositoryId);\n createArtifactEntry(coordinates2, storageId, repositoryId);\n createArtifactEntry(coordinates3, storageId, repositoryId);\n }",
"void create(SportActivity activity);",
"protected abstract Artifact getArtifact(BuildContext buildContext) throws BuildStepException;",
"public CTFArtifact createNewTrackerArtifact(CTFTracker t,\n String status,\n String description,\n AbstractBuild <?, ?> build)\n throws IOException, InterruptedException {\n if (this.cna == null) {\n this.log(\"Cannot call createNewTrackerArtifact, not logged in!\");\n return null;\n }\n CTFFile buildLog = null;\n if (this.getAttachLog()) {\n buildLog = this.uploadBuildLog(build);\n if (buildLog != null) {\n this.log(\"Successfully uploaded build log.\");\n } else {\n this.log(\"Failed to upload build log.\");\n }\n }\n // check assign user validity\n String assignTo = this.getValidAssignUser(t.getProject());\n String title = this.getInterpreted(build, this.getTitle());\n CTFRelease release = CNHudsonUtil.getProjectReleaseId(t.getProject(),this.getRelease());\n try {\n CTFArtifact asd = t.createArtifact(title,\n description, null, null, status,\n null, this.priority, 0, \n assignTo, release!=null?release.getId():null, null,\n build.getLogFile().getName(), \n \"text/plain\", buildLog);\n this.log(\"Created tracker artifact '\" + title + \"' in tracker '\" \n + this.getTracker() + \"' in project '\" + this.getProject()\n + \"' on behalf of '\" + this.getUsername() + \"' at \" \n + asd.getURL() + \".\");\n return asd;\n } catch (RemoteException re) {\n this.log(\"createNewTrackerArtifact\", re);\n return null;\n }\n }",
"ArtifactResult result();",
"@Test\n public void canRepresentAsJson() throws Exception {\n final RtReleaseAsset asset = new RtReleaseAsset(\n new FakeRequest().withBody(\"{\\\"asset\\\":\\\"release\\\"}\"),\n release(),\n 1\n );\n MatcherAssert.assertThat(\n asset.json().getString(\"asset\"),\n Matchers.equalTo(\"release\")\n );\n }",
"@Path (\"copyArtifact\")\n @POST\n @Consumes ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })\n @RedbackAuthorization (noPermission = true)\n ActionStatus copyArtifact( ArtifactTransferRequest artifactTransferRequest )\n throws ArchivaRestServiceException;",
"@Test\n public void addDeploymentArtifactInCompositionScreenTestApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n ResourceGeneralPage.getLeftMenu().moveToCompositionScreen();\n\n ArtifactInfo artifact = new ArtifactInfo(filePath, \"Heat-File.yaml\", \"kuku\", \"artifact3\", \"OTHER\");\n CompositionPage.showDeploymentArtifactTab();\n CompositionPage.clickAddArtifactButton();\n ArtifactUIUtils.fillAndAddNewArtifactParameters(artifact, CompositionPage.artifactPopup());\n\n List<WebElement> actualArtifactList = GeneralUIUtils.getWebElementsListBy(By.className(\"i-sdc-designer-sidebar-section-content-item-artifact\"));\n AssertJUnit.assertEquals(1, actualArtifactList.size());\n }",
"@Post \n public JsonRepresentation createActivity(Representation entity) {\n \tJSONObject jsonReturn = new JSONObject();\n \tlog.info(\"createActivity(@Post) entered ..... \");\n\t\tEntityManager em = EMF.get().createEntityManager();\n\t\t\n\t\tString apiStatus = ApiStatusCode.SUCCESS;\n\t\tthis.setStatus(Status.SUCCESS_CREATED);\n\t\tUser currentUser = null;\n try {\n \t\tcurrentUser = (User)this.getRequest().getAttributes().get(RteamApplication.CURRENT_USER);\n \t\tif(currentUser == null) {\n\t\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n \t\t\tlog.severe(\"user could not be retrieved from Request attributes!!\");\n \t\t}\n \t\t//::BUSINESSRULE:: user must be network authenticated to send a message\n \t\telse if(!currentUser.getIsNetworkAuthenticated()) {\n \t\t\tapiStatus = ApiStatusCode.USER_NOT_NETWORK_AUTHENTICATED;\n \t\t}\n \t\t// teamId is required if this is 'Create a new activity' API\n \t\telse if(this.userVote == null) {\n \t\tif(this.teamId == null || this.teamId.length() == 0) {\n \t\t\t\tapiStatus = ApiStatusCode.TEAM_ID_REQUIRED;\n \t\t} else if(!currentUser.isUserMemberOfTeam(this.teamId)) {\n \t\t\t\tapiStatus = ApiStatusCode.USER_NOT_MEMBER_OF_SPECIFIED_TEAM;\n \t\t\t\tlog.info(apiStatus);\n \t}\n \t\t}\n \t\t\n\t\t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_CREATED)) {\n\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t}\n\t\t\t\n \t\tJsonRepresentation jsonRep = new JsonRepresentation(entity);\n\t\t\tJSONObject json = jsonRep.toJsonObject();\n\n\t\t\t//////////////////////////////////////////\n \t\t// 'Get Status of Activities for User' API\n \t\t//////////////////////////////////////////\n \t\tif(this.userVote != null) {\n \t\t\t// remainder of processing for this API is delegated to another method\n \t\t\tgetStatusOfActivitiesForUser(currentUser, json, jsonReturn);\n \t\t\treturn new JsonRepresentation(jsonReturn);\n \t\t}\n \t\t\n\t\t\tTeam team = (Team)em.createNamedQuery(\"Team.getByKey\")\n\t\t\t\t.setParameter(\"key\", KeyFactory.stringToKey(this.teamId))\n\t\t\t\t.getSingleResult();\n\t\t\tlog.info(\"team retrieved = \" + team.getTeamName());\n\t\t\t\n\t\t\tString statusUpdate = null;\n\t\t\tif(json.has(\"statusUpdate\")) {\n\t\t\t\tstatusUpdate = json.getString(\"statusUpdate\");\n\t\t\t}\n\t\t\t\n\t\t\tString photoBase64 = null;\n\t\t\tif(json.has(\"photo\")) {\n\t\t\t\tphotoBase64 = json.getString(\"photo\");\n\t\t\t}\n\t\t\t\n\t\t\tBoolean isPortrait = null;\n\t\t\tif(json.has(\"isPortrait\")) {\n\t\t\t\tisPortrait = json.getBoolean(\"isPortrait\");\n\t\t\t\tlog.info(\"json isPortrait = \" + isPortrait);\n\t\t\t}\n\n\t\t\tString videoBase64 = null;\n\t\t\tif(json.has(\"video\")) {\n\t\t\t\tvideoBase64 = json.getString(\"video\");\n\t\t\t}\n\t\t\t\n\t\t\t// Enforce Rules\n\t\t\tif((statusUpdate == null || statusUpdate.length() == 0) && (photoBase64 == null || photoBase64.length() == 0)) {\n\t\t\t\tapiStatus = ApiStatusCode.STATUS_UPDATE_OR_PHOTO_REQUIRED;\n\t\t\t\tlog.info(\"required statusUpdate or photo field required\");\n\t\t\t} else if(statusUpdate != null && statusUpdate.length() > TwitterClient.MAX_TWITTER_CHARACTER_COUNT){\n\t\t\t\tapiStatus = ApiStatusCode.INVALID_STATUS_UPDATE_MAX_SIZE_EXCEEDED;\n\t\t\t} else if(videoBase64 != null && photoBase64 == null) {\n\t\t\t\tapiStatus = ApiStatusCode.VIDEO_AND_PHOTO_MUST_BE_SPECIFIED_TOGETHER;\n\t\t\t} else if(photoBase64 != null && isPortrait == null) {\n\t\t\t\tapiStatus = ApiStatusCode.IS_PORTRAIT_AND_PHOTO_MUST_BE_SPECIFIED_TOGETHER;\n\t\t\t}\n \t\t\n\t\t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_CREATED)) {\n\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t}\n\t\t\t\n\t\t\t// No anonymous Activity posts.\n\t\t\t// TODO once twitter API supports the meta data, then user name will not have to be inserted into update\n\t\t\tif(statusUpdate == null || statusUpdate.length() == 0) {\n\t\t\t\tstatusUpdate = currentUser.getFullName() + \" shared a photo fr loc \" + TF.getPassword();\n\t\t\t} else {\n\t\t\t\tstatusUpdate = currentUser.getDisplayName() + \" post: \" + statusUpdate;\n\t\t\t}\n\t\t\t\n\t\t\t///////////////////////////////////////////////////////////////////\n\t\t\t// Cache the activity post whether the team is using Twitter or not\n\t\t\t///////////////////////////////////////////////////////////////////\n\t\t\t// abbreviate only if necessary\n\t\t\tif(statusUpdate.length() > TwitterClient.MAX_TWITTER_CHARACTER_COUNT) {\n\t\t\t\tstatusUpdate = Language.abbreviate(statusUpdate);\n\t\t\t}\n\t\t\t\t\n\t\t\tActivity newActivity = new Activity();\n\t\t\tnewActivity.setText(statusUpdate);\n\t\t\tnewActivity.setCreatedGmtDate(new Date());\n\t\t\tnewActivity.setTeamId(this.teamId);\n\t\t\tnewActivity.setTeamName(team.getTeamName());\n\t\t\t\n\t\t\t// cacheId held in team is the last used.\n\t\t\tLong cacheId = team.getNewestCacheId() + 1;\n\t\t\tnewActivity.setCacheId(cacheId);\n\t\t\tteam.setNewestCacheId(cacheId);\n\t\t\t\n\t\t\t// Only send activity to Twitter if team is using Twitter\n\t\t\ttwitter4j.Status twitterStatus = null;\n\t\t\tif(team.getUseTwitter()) {\n\t\t\t\t// truncate if necessary\n\t\t\t\tif(statusUpdate.length() > TwitterClient.MAX_TWITTER_CHARACTER_COUNT) {\n\t\t\t\t\tstatusUpdate = statusUpdate.substring(0, TwitterClient.MAX_TWITTER_CHARACTER_COUNT - 2) + \"..\";\n\t\t\t\t}\n\n\t\t\t\ttwitterStatus = TwitterClient.updateStatus(statusUpdate, team.getTwitterAccessToken(), team.getTwitterAccessTokenSecret());\n\t\t\t\t\n\t\t\t\t// if Twitter update failed, log error, but continue because activity post will be stored by rTeam\n\t\t\t\tif(twitterStatus == null) {\n\t\t\t\t\tlog.severe(\"Twitter update failed, but continuing on ...\");\n\t\t\t\t\tapiStatus = ApiStatusCode.TWITTER_ERROR;\n\t\t\t\t} else {\n\t\t\t\t\tnewActivity.setTwitterId(twitterStatus.getId());\n\t\t\t\t\t// if posted to twitter, match the exact twitter date\n\t\t\t\t\tnewActivity.setCreatedGmtDate(twitterStatus.getCreatedAt());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tEntityManager emActivity = EMF.get().createEntityManager();\n\t\t\ttry {\n\t\t\t\tif(photoBase64 != null) {\n\t\t\t\t\t// decode the base64 encoding to create the thumb nail\n\t\t\t\t\tbyte[] rawPhoto = Base64.decode(photoBase64);\n\t\t\t\t\tImagesService imagesService = ImagesServiceFactory.getImagesService();\n\t\t\t\t\tImage oldImage = ImagesServiceFactory.makeImage(rawPhoto);\n\t\t\t\t\t\n\t\t\t\t\tint tnWidth = isPortrait == true ? THUMB_NAIL_SHORT_SIDE : THUMB_NAIL_LONG_SIDE;\n\t\t\t\t\tint tnHeight = isPortrait == true ? THUMB_NAIL_LONG_SIDE : THUMB_NAIL_SHORT_SIDE;\n\t\t\t\t\tTransform resize = ImagesServiceFactory.makeResize(tnWidth, tnHeight);\n\t\t\t\t\tImage newImage = imagesService.applyTransform(resize, oldImage);\n\t\t\t\t\tString thumbNailBase64 = Base64.encode(newImage.getImageData());\n\t\t\t\t\tnewActivity.setThumbNailBase64(thumbNailBase64);\n\t\t\t\t\tnewActivity.setPhotoBase64(photoBase64);\n\t\t\t\t\tif(videoBase64 != null) newActivity.setVideoBase64(videoBase64);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\temActivity.persist(newActivity);\n\t\t\t\tlog.info(\"new Activity was successfully persisted\");\n\t\t\t} catch(Exception e) {\n\t\t\t\tlog.severe(\"createActivity() exception = \" + e.getMessage());\n\t\t\t} finally {\n\t\t\t\temActivity.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlog.severe(\"error extracting JSON object from Post\");\n\t\t\te.printStackTrace();\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t} catch (JSONException e) {\n\t\t\tlog.severe(\"error converting json representation into a JSON object\");\n\t\t\te.printStackTrace();\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t} catch (NoResultException e) {\n\t\t\tlog.severe(\"team not found\");\n\t\t\tapiStatus = ApiStatusCode.TEAM_NOT_FOUND;\n\t\t} catch (NonUniqueResultException e) {\n\t\t\tlog.severe(\"should never happen - two or more teams have same team id\");\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t em.close();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t} catch (JSONException e) {\n\t\t\tlog.severe(\"error creating JSON return object\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new JsonRepresentation(jsonReturn);\n }",
"public Asset createMinimalAssetForJSON() throws IllegalArgumentException, IllegalAccessException {\n Asset ass = new Asset();\n for (Field f : Asset.class.getDeclaredFields()) {\n if (f.isAnnotationPresent(JSONIncludeForFile.class)) {\n f.set(ass, f.get(this));\n }\n }\n return ass;\n }",
"CdapLoadArtifactStep createCdapLoadArtifactStep();",
"public static Item createItemFromJSON(final JSONObject itemJson) throws JSONException {\n\t\tif (itemJson.getString(\"type\").equals(\"variable\")) {\n\t\t\treturn Helper.createVariableFromJSON(itemJson);\n\t\t} else {\n\t\t\treturn Helper.createLiteralFromJSON(itemJson);\n\t\t}\n\t}",
"protected abstract JsonObject submitBuildArtifact(CloseableHttpClient httpclient,\n JsonObject jco, String submitUrl)\n throws IOException;",
"@PostMapping(\"/asset\")\n public ResponseEntity<Asset> createAsset(@RequestBody Asset asset){\n Asset newAsset = new Asset();\n newAsset.setName(asset.getName());\n newAsset.setDevices(asset.getDevices());\n assetsService.addAsset(newAsset);\n this.template.convertAndSend(\"/topic/assets\", newAsset);\n return new ResponseEntity<>(newAsset, HttpStatus.OK);\n\n }",
"public RepositoryArtifact createProject(RepositoryConnector connector, String rootFolderId, String projectName, String processDefinitionXml) {\r\n RepositoryArtifact result = null;\r\n try {\r\n ZipInputStream projectTemplateInputStream = new ZipInputStream(getProjectTemplate());\r\n ZipEntry zipEntry = null;\r\n \r\n String rootSubstitution = null;\r\n \r\n while ((zipEntry = projectTemplateInputStream.getNextEntry()) != null) {\r\n String zipName = zipEntry.getName();\r\n if (zipName.endsWith(\"/\")) {\r\n zipName = zipName.substring(0, zipName.length() - 1);\r\n }\r\n String path = \"\";\r\n String name = zipName;\r\n if (zipName.contains(\"/\")) {\r\n path = zipName.substring(0, zipName.lastIndexOf(\"/\"));\r\n name = zipName.substring(zipName.lastIndexOf(\"/\") + 1);\r\n }\r\n if (\"\".equals(path)) {\r\n // root folder is named after the project, not like the\r\n // template\r\n // folder name\r\n rootSubstitution = name;\r\n name = projectName;\r\n } else {\r\n // rename the root folder in all other paths as well\r\n path = path.replace(rootSubstitution, projectName);\r\n }\r\n String absolutePath = rootFolderId + \"/\" + path;\r\n boolean isBpmnModel = false;\r\n if (zipEntry.isDirectory()) {\r\n connector.createFolder(absolutePath, name);\r\n } else {\r\n Content content = new Content();\r\n \r\n if (\"template.bpmn20.xml\".equals(name)) {\r\n // This file shall be replaced with the process\r\n // definition\r\n content.setValue(processDefinitionXml);\r\n name = projectName + \".bpmn20.xml\";\r\n isBpmnModel = true;\r\n log.log(Level.INFO, \"Create processdefinition from Signavio process model \" + projectName);\r\n } else {\r\n byte[] bytes = IoUtil.readInputStream(projectTemplateInputStream, \"ZIP entry '\" + zipName + \"'\");\r\n String txtContent = new String(bytes).replaceAll(REPLACE_STRING, projectName).replaceAll(\"@@ACTIVITI.HOME@@\", ACTIVITI_HOME_PATH);\r\n content.setValue(txtContent);\r\n }\r\n log.log(Level.INFO, \"Create new artifact from zip entry '\" + zipEntry.getName() + \"' in folder '\" + absolutePath + \"' with name '\" + name + \"'\");\r\n RepositoryArtifact artifact = connector.createArtifact(absolutePath, name, null, content);\r\n if (isBpmnModel) {\r\n result = artifact;\r\n }\r\n }\r\n projectTemplateInputStream.closeEntry();\r\n }\r\n projectTemplateInputStream.close();\r\n } catch (IOException ex) {\r\n throw new RepositoryException(\"Couldn't create maven project due to IO errors\", ex);\r\n }\r\n return result;\r\n }",
"protected ExoSocialActivity makeActivity(Identity owner, String activityTitle) {\n ExoSocialActivity activity = new ExoSocialActivityImpl();\n activity.setTitle(activityTitle);\n activity.setUserId(owner.getId());\n activityManager.saveActivityNoReturn(rootIdentity, activity);\n tearDownActivityList.add(activity);\n \n return activity;\n }",
"public static JSONResponse createItem(HttpServletRequest req, InputStream file, String json,\n String origName) {\n try {\n User u = BasicAuthentication.auth(req);\n DefaultItemWithFileTO defaultItemWithFileTO = (DefaultItemWithFileTO) RestProcessUtils\n .buildTOFromJSON(json, DefaultItemWithFileTO.class);\n defaultItemWithFileTO = uploadAndValidateFile(file, defaultItemWithFileTO, origName);\n DefaultItemTO defaultItemTO =\n new DefaultItemService().create((DefaultItemTO) defaultItemWithFileTO, u);\n return RestProcessUtils.buildResponse(Status.CREATED.getStatusCode(), defaultItemTO);\n } catch (Exception e) {\n LOGGER.error(\"Error creating item\", e);\n return RestProcessUtils.localExceptionHandler(e, e.getLocalizedMessage());\n }\n }",
"CdapLoadArtifactWithConfigStep createCdapLoadArtifactWithConfigStep();",
"@Test\n public void addDeploymentArtifactAndVerifyInCompositionScreenApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n ResourceGeneralPage.getLeftMenu().moveToDeploymentArtifactScreen();\n\n ArtifactInfo deploymentArtifact = new ArtifactInfo(filePath, \"asc_heat 0 2.yaml\", \"kuku\", \"artifact1\", \"OTHER\");\n DeploymentArtifactPage.clickAddNewArtifact();\n ArtifactUIUtils.fillAndAddNewArtifactParameters(deploymentArtifact);\n AssertJUnit.assertTrue(DeploymentArtifactPage.checkElementsCountInTable(1));\n\n ResourceGeneralPage.getLeftMenu().moveToCompositionScreen();\n\n CompositionPage.showDeploymentArtifactTab();\n List<WebElement> deploymentArtifactsFromScreen = CompositionPage.getDeploymentArtifacts();\n AssertJUnit.assertTrue(1 == deploymentArtifactsFromScreen.size());\n\n String actualArtifactFileName = deploymentArtifactsFromScreen.get(0).getText();\n AssertJUnit.assertTrue(\"asc_heat-0-2.yaml\".equals(actualArtifactFileName));\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic static<T> T createObjectFromJSON(final JSONObject json) throws JSONException {\n\t\tif(json.has(\"type\")) {\n\t\t\treturn (T) Helper.createItemFromJSON(json);\n\t\t} else if(json.has(\"triple_pattern\")) {\n\t\t\treturn (T) Helper.createTriplePatternFromJSON(json);\n\t\t} else if(json.has(\"histogram\")) {\n\t\t\treturn (T) Helper.createVarBucketFromJSON(json);\n\t\t} else {\n\t\t\tSystem.err.println(\"lupos.distributed.operator.format.Helper.createObjectFromJSON(...): Unknown type stored in JSON object, returning null!\");\n\t\t\treturn null;\n\t\t}\n\t}",
"public Long createWorkflowActivity(WorkflowActivity workflowActivity)\n throws CreateEntityException, SystemException, DuplicateEntityException, RemoteException;",
"@Test\n public void testMultiTenant_CreateArtifact() throws Exception {\n tenantCtx.setContext(tenantId1);\n String artifactId = \"testMultiTenant_CreateArtifact\";\n ContentHandle content = ContentHandle.create(OPENAPI_CONTENT);\n ArtifactMetaDataDto dto = storage().createArtifact(GROUP_ID, artifactId, null, ArtifactType.OPENAPI, content, null);\n Assertions.assertNotNull(dto);\n Assertions.assertEquals(GROUP_ID, dto.getGroupId());\n Assertions.assertEquals(artifactId, dto.getId());\n Assertions.assertEquals(\"Empty API\", dto.getName());\n Assertions.assertEquals(\"An example API design using OpenAPI.\", dto.getDescription());\n Assertions.assertNull(dto.getLabels());\n Assertions.assertNull(dto.getProperties());\n Assertions.assertEquals(ArtifactState.ENABLED, dto.getState());\n Assertions.assertEquals(\"1\", dto.getVersion());\n\n StoredArtifactDto storedArtifact = storage().getArtifact(GROUP_ID, artifactId);\n Assertions.assertNotNull(storedArtifact);\n Assertions.assertEquals(OPENAPI_CONTENT, storedArtifact.getContent().content());\n Assertions.assertEquals(dto.getGlobalId(), storedArtifact.getGlobalId());\n Assertions.assertEquals(dto.getVersion(), storedArtifact.getVersion());\n\n ArtifactMetaDataDto amdDto = storage().getArtifactMetaData(GROUP_ID, artifactId);\n Assertions.assertNotNull(amdDto);\n Assertions.assertEquals(dto.getGlobalId(), amdDto.getGlobalId());\n Assertions.assertEquals(\"Empty API\", amdDto.getName());\n Assertions.assertEquals(\"An example API design using OpenAPI.\", amdDto.getDescription());\n Assertions.assertEquals(ArtifactState.ENABLED, amdDto.getState());\n Assertions.assertEquals(\"1\", amdDto.getVersion());\n Assertions.assertNull(amdDto.getLabels());\n Assertions.assertNull(amdDto.getProperties());\n\n // Switch to tenantId 2 and make sure the GET operations no longer work\n tenantCtx.setContext(tenantId2);\n try {\n storage().getArtifact(GROUP_ID, artifactId);\n Assertions.fail(\"Expected 404 not found for TENANT-2\");\n } catch (ArtifactNotFoundException e) {\n // correct response\n }\n }",
"@POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n @ApiOperation(value = \"This method allows to create a new requirement.\")\n @ApiResponses(value = {\n @ApiResponse(code = HttpURLConnection.HTTP_CREATED, message = \"Returns the created requirement\", response = RequirementEx.class),\n @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = \"Unauthorized\"),\n @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = \"Not found\"),\n @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = \"Internal server problems\")\n })\n public Response createRequirement(@ApiParam(value = \"Requirement entity\", required = true) Requirement requirementToCreate) {\n DALFacade dalFacade = null;\n try {\n UserAgent agent = (UserAgent) Context.getCurrent().getMainAgent();\n long userId = agent.getId();\n String registratorErrors = service.bazaarService.notifyRegistrators(EnumSet.of(BazaarFunction.VALIDATION, BazaarFunction.USER_FIRST_LOGIN_HANDLING));\n if (registratorErrors != null) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, registratorErrors);\n }\n // TODO: check whether the current user may create a new requirement\n dalFacade = service.bazaarService.getDBConnection();\n Gson gson = new Gson();\n Integer internalUserId = dalFacade.getUserIdByLAS2PeerId(userId);\n requirementToCreate.setCreatorId(internalUserId);\n Vtor vtor = service.bazaarService.getValidators();\n vtor.useProfiles(\"create\");\n vtor.validate(requirementToCreate);\n if (vtor.hasViolations()) {\n ExceptionHandler.getInstance().handleViolations(vtor.getViolations());\n }\n vtor.resetProfiles();\n\n // check if all components are in the same project\n for (Component component : requirementToCreate.getComponents()) {\n component = dalFacade.getComponentById(component.getId());\n if (requirementToCreate.getProjectId() != component.getProjectId()) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.VALIDATION, \"Component does not fit with project\");\n }\n }\n boolean authorized = new AuthorizationManager().isAuthorized(internalUserId, PrivilegeEnum.Create_REQUIREMENT, String.valueOf(requirementToCreate.getProjectId()), dalFacade);\n if (!authorized) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.AUTHORIZATION, Localization.getInstance().getResourceBundle().getString(\"error.authorization.requirement.create\"));\n }\n Requirement createdRequirement = dalFacade.createRequirement(requirementToCreate, internalUserId);\n dalFacade.followRequirement(internalUserId, createdRequirement.getId());\n\n // check if attachments are given\n if (requirementToCreate.getAttachments() != null && !requirementToCreate.getAttachments().isEmpty()) {\n for (Attachment attachment : requirementToCreate.getAttachments()) {\n attachment.setCreatorId(internalUserId);\n attachment.setRequirementId(createdRequirement.getId());\n vtor.validate(attachment);\n if (vtor.hasViolations()) {\n ExceptionHandler.getInstance().handleViolations(vtor.getViolations());\n }\n vtor.resetProfiles();\n dalFacade.createAttachment(attachment);\n }\n }\n\n createdRequirement = dalFacade.getRequirementById(createdRequirement.getId(), internalUserId);\n service.bazaarService.getNotificationDispatcher().dispatchNotification(service, createdRequirement.getCreation_time(), Activity.ActivityAction.CREATE, createdRequirement.getId(),\n Activity.DataType.REQUIREMENT, createdRequirement.getComponents().get(0).getId(), Activity.DataType.COMPONENT, internalUserId);\n return Response.status(Response.Status.CREATED).entity(gson.toJson(createdRequirement)).build();\n } catch (BazaarException bex) {\n if (bex.getErrorCode() == ErrorCode.AUTHORIZATION) {\n return Response.status(Response.Status.UNAUTHORIZED).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else {\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n }\n } catch (Exception ex) {\n BazaarException bex = ExceptionHandler.getInstance().convert(ex, ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, \"\");\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } finally {\n service.bazaarService.closeDBConnection(dalFacade);\n }\n }",
"protected WebTestArtifact makeHttpRequest(String resource)\r\n {\r\n return new WebTestArtifact(resource);\r\n }",
"public Resource generated(Resource activity, Resource entity) {\n wasGeneratedBy(entity, activity);\n return createStatement(activity.getURI(),\n ProvOntology.getGeneratedExpandedPropertyFullURI(), entity.getURI());\n }",
"Manifest createManifest();",
"void deployApp(String marathonJson);",
"private Attachment createAttachment(String assetId, String name, Attachment originalAttachmentMetadata, String contentType,\n InputStream attachmentContentStream, UriInfo uriInfo) throws InvalidJsonAssetException, AssetPersistenceException, NonExistentArtefactException {\n try {\n persistenceBean.retrieveAsset(assetId);\n } catch (NonExistentArtefactException e) {\n // The message from the PersistenceLayer is unhelpful in this context, so send back a better one\n throw new NonExistentArtefactException(\"The parent asset for this attachment (id=\"\n + assetId + \") does not exist in the repository.\");\n }\n\n Attachment attachmentMetadata = new Attachment(originalAttachmentMetadata);\n\n // Add necessary fields to the attachment (JSON) metadata\n if (attachmentMetadata.get_id() == null) {\n attachmentMetadata.set_id(persistenceBean.allocateNewId());\n }\n attachmentMetadata.setAssetId(assetId);\n if (contentType != null) {\n attachmentMetadata.setContentType(contentType);\n }\n attachmentMetadata.setName(name);\n attachmentMetadata.setUploadOn(IsoDate.format(new Date()));\n\n // Create the attachment content\n if (attachmentContentStream != null) {\n AttachmentContentMetadata contentMetadata = persistenceBean.createAttachmentContent(name, contentType, attachmentContentStream);\n\n // TODO perhaps we should try to clean up after ourselves and delete the attachmentMetadata\n // TODO seriously, this is one of the places where we reaslise that using a DB that doesn't\n // support transactions means we don't get some of the guarantees that we might be used to.\n\n attachmentMetadata.setGridFSId(contentMetadata.filename);\n attachmentMetadata.setSize(contentMetadata.length);\n }\n\n Attachment returnedAttachment = persistenceBean.createAttachmentMetadata(attachmentMetadata);\n\n computeAttachmentURL(returnedAttachment, uriInfo);\n\n return returnedAttachment;\n }",
"public Artifact read(final UUID artifactUniqueId);",
"ActivityConcept createActivityConcept();",
"public com.google.cloud.aiplatform.v1.Artifact getArtifact(\n com.google.cloud.aiplatform.v1.GetArtifactRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetArtifactMethod(), getCallOptions(), request);\n }",
"@Override\n public InferredOWLOntologyID appendArtifact(final InferredOWLOntologyID ontologyIRI,\n final InputStream partialInputStream, final RDFFormat format) throws PoddClientException\n {\n return null;\n }",
"@Test\n public void testMultiTenant_CreateSameArtifact() throws Exception {\n tenantCtx.setContext(tenantId1);\n String artifactId = \"testMultiTenant_CreateSameArtifact\";\n ContentHandle content = ContentHandle.create(OPENAPI_CONTENT);\n ArtifactMetaDataDto dto = storage().createArtifact(GROUP_ID, artifactId, null, ArtifactType.OPENAPI, content, null);\n Assertions.assertNotNull(dto);\n Assertions.assertEquals(GROUP_ID, dto.getGroupId());\n Assertions.assertEquals(artifactId, dto.getId());\n Assertions.assertEquals(\"Empty API\", dto.getName());\n Assertions.assertEquals(\"An example API design using OpenAPI.\", dto.getDescription());\n Assertions.assertNull(dto.getLabels());\n Assertions.assertNull(dto.getProperties());\n Assertions.assertEquals(ArtifactState.ENABLED, dto.getState());\n Assertions.assertEquals(\"1\", dto.getVersion());\n\n // Switch to tenantId 2 and create the same artifact\n tenantCtx.setContext(tenantId2);\n content = ContentHandle.create(OPENAPI_CONTENT);\n dto = storage().createArtifact(GROUP_ID, artifactId, null, ArtifactType.OPENAPI, content, null);\n Assertions.assertNotNull(dto);\n Assertions.assertEquals(GROUP_ID, dto.getGroupId());\n Assertions.assertEquals(artifactId, dto.getId());\n Assertions.assertEquals(\"Empty API\", dto.getName());\n Assertions.assertEquals(\"An example API design using OpenAPI.\", dto.getDescription());\n Assertions.assertNull(dto.getLabels());\n Assertions.assertNull(dto.getProperties());\n Assertions.assertEquals(ArtifactState.ENABLED, dto.getState());\n Assertions.assertEquals(\"1\", dto.getVersion());\n }",
"protected abstract JSONObject build();",
"public org.eclipse.stardust.engine.api.runtime.RuntimeArtifact\n getRuntimeArtifact(long oid)\n throws org.eclipse.stardust.common.error.WorkflowException;",
"GradleBuild create();",
"Artifact getArtifact(String version) throws ArtifactNotFoundException;",
"CdapDeleteArtifact createCdapDeleteArtifact();",
"public static Asset createAsset(URL url) throws IOException {\n \t\t// Create a temporary file from the downloaded URL\n \t\tFile newFile = File.createTempFile(\"remote\", null, null);\n \t\ttry {\n \t\t\tFileUtils.copyURLToFile(url, newFile);\n\t\t\tif (newFile.exists() && newFile.length() < 20)\n \t\t\t\treturn null;\n \t\t\tAsset temp = new Asset(FileUtil.getNameWithoutExtension(url), FileUtils.readFileToByteArray(newFile));\n \t\t\treturn temp;\n \t\t} finally {\n \t\t\tnewFile.delete();\n \t\t}\n \t}",
"@POST\n @Path(\"/deployments\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response createDeployment(InputStream inputStream, @HeaderParam(\"authorization\") String authString,\n @HeaderParam(\"userid\") String userid) {\n\n logger.info(\"Received request for creating deployment\");\n\n if (!APIHConfig.getInstance().validateUser(authString, userid, \"PUT\")) {\n return Response.status(401).entity(UNAUTHORIZED).build();\n }\n\n String url;\n JSONObject inputJSon;\n JSONObject outputJSON;\n\n StringBuilder check = new StringBuilder();\n String inputLine;\n\n try (BufferedReader in = new BufferedReader(new InputStreamReader(inputStream))) {\n while ((inputLine = in.readLine()) != null) {\n check.append(inputLine);\n }\n inputJSon = new JSONObject(check.toString());\n\n if (inputJSon.optString(DEPLOYMENT_ID, \"\").equals(\"\")) {\n return Response.status(400).entity(\"deployment_id is mandatory in payload\").build();\n }\n String blueprintID = inputJSon.optString(BLUEPRINT_ID, \"\");\n JSONObject parameters = inputJSon.optJSONObject(PARAMETERS);\n\n outputJSON = new JSONObject();\n outputJSON.put(BLUEPRINT_ID, blueprintID);\n outputJSON.put(\"inputs\", parameters);\n url = DEPLOYMENTS + inputJSon.optString(DEPLOYMENT_ID, \"\");\n JSONObject result = CloudifyClient.getInstance().doPUT(url, outputJSON);\n logger.info(\"Handled create deployment API Request\");\n return handleResponse(result);\n } catch (Exception e) {\n logger.error(e.getLocalizedMessage(), e);\n return Response.status(400).entity(RESPONSE_ERROR_MSG).build();\n }\n }",
"static TodoItem fromJsonObject(JsonObject json) {\n TodoItem item = new TodoItem();\n item.setId(json.get(\"id\") == null ? -1 : json.getInt(\"id\"));\n item.setDescription(json.get(\"description\") == null ? null : json.getString(\"description\"));\n item.setCreatedAt(json.get(\"createdAt\") == null ? null : OffsetDateTime.parse(json.getString(\"createdAt\")));\n item.setDone(json.get(\"done\") == null ? false : json.getBoolean(\"done\"));\n LOGGER.fine(()->\"fromJsonObject returns:\"+item);\n return item;\n }",
"private void createObject(JSONObject delivery) {\n\t\t//TODO: create the Object\n\t}",
"private static URL createTempJar(Artifact artifact, Contribution contribution) throws IOException {\n FileOutputStream fileOutputStream = null;\n ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(new File(URI.create(contribution.getLocation()))));\n try {\n ZipEntry zipEntry = zipInputStream.getNextEntry();\n while (zipEntry != null) {\n if (artifact.getLocation().endsWith(zipEntry.getName())) {\n\n String tempName = (\"tmp.\" + artifact.getURI().substring(0, artifact.getURI().length() - 3)).replace('/', '.');\n File tempFile = File.createTempFile(tempName, \".jar\");\n tempFile.deleteOnExit();\n fileOutputStream = new FileOutputStream(tempFile);\n\n byte[] buf = new byte[2048];\n int n;\n while ((n = zipInputStream.read(buf, 0, buf.length)) > -1) {\n fileOutputStream.write(buf, 0, n);\n }\n\n fileOutputStream.close();\n zipInputStream.closeEntry();\n\n return tempFile.toURI().toURL();\n\n }\n zipEntry = zipInputStream.getNextEntry();\n }\n } finally {\n zipInputStream.close();\n if (fileOutputStream != null) {\n fileOutputStream.close();\n }\n }\n \n throw new IllegalStateException();\n }",
"public Response create(UriInfo uriInfo, B bean, String stagingUuid) {\n validate(bean.getUuid(), bean, true);\n BE entity =\n getSerializer().deserializeNew(bean, stagingUuid, RestImportExportHelper.isImport(uriInfo));\n String uuid = entity.getUuid();\n return Response.created(getGetUri(uuid)).build();\n }",
"public void create(MyActivity activity, Bundle bundle){\n super.create(activity, bundle);\n\n if(bundle != null){\n //open bundle to set saved instance states\n openBundle(bundle);\n }\n\n mClientItem = mBoss.getClient();\n\n mStrInfo = mActivity.getString(R.string.client_info);\n mStrSchedule = mActivity.getString(R.string.client_schedule);\n mStrHistory = mActivity.getString(R.string.client_history);\n\n }",
"ManifestCommitter createCommitter(\n TaskAttemptContext context) throws IOException;",
"@PostMapping\n public ResponseEntity<?> addNewActivity(@RequestBody ActivityRequest activity){\n ResponseEntity response;\n try{\n activityServices.saveActivity(mapActivity(activity));\n response = new ResponseEntity<>(HttpStatus.CREATED);\n }catch (ActivityException | ParkException | PlanException ex){\n ex.printStackTrace();\n response = new ResponseEntity<>(HttpStatus.NOT_ACCEPTABLE);\n }\n return response;\n }",
"private Artifact buildArtifactFromString(ArrayList<String> pluginOutput, int unusedDependencyIndex) {\n String line = pluginOutput.get(unusedDependencyIndex);\n String[] splitValues = line.split(\":|\\\\s+\");\n String groupId = splitValues[1];\n String artifactId = splitValues[2];\n String type = splitValues[3];\n String version = splitValues[4];\n String scope = splitValues[5];\n return new DefaultArtifact(groupId, artifactId, version, scope, type, null, new DefaultArtifactHandler());\n\n\n }",
"public void createVersion(final ArtifactVersion version);",
"BPMNActivityConcept createBPMNActivityConcept();",
"private WebTestArtifact(String resource)\r\n {\r\n this(resource, \"GET\");\r\n }",
"public String getArtifact() {\n return artifact;\n }",
"public abstract AbstractTask createTask(String repositoryUrl, String id, String summary);",
"private void saveArtifact(ArtifactDto artifactDto) {\n //start off by removing the existing entry (if present)\n Artifact artifact = this.artifactRepository.findById(artifactDto.getId());\n if (artifact == null) {\n artifact = new Artifact();\n }\n\n artifact.setAbbreviation(artifactDto.getAbbreviation());\n artifact.setDetailedText(artifactDto.getDetailedText());\n artifact.setDocumentTitle(artifactDto.getDocumentTitle());\n artifact.setId(artifactDto.getId());\n artifact.setDocumentName(artifactDto.getDocumentName());\n\n artifact.setLovDocumentType(artifactDto.getDocumentType());\n\n LibraryLevel libraryEntry = this.libraryLevelRepository.findById(artifactDto.getLibraryId());\n\n if (libraryEntry != null) {\n artifact.setLibraryLevel(libraryEntry);\n }\n\n //delete the existing tags/comments\n for (Tag tag : artifact.getTags())\n {\n this.tagRepository.delete(tag.getId());\n }\n for (Annotation annotation : artifact.getAnnotations())\n {\n this.annotationRepository.delete(annotation.getId());\n }\n\n artifact.getTags().clear();\n artifact.getAnnotations().clear();\n\n //add all the incoming tags\n for (TagDto tagDto : artifactDto.getTagDtos()) {\n Lov tagLov = this.lovRepository.findById(tagDto.getLovDto().getId());\n\n Tag tag = new Tag();\n tag.setId(tagDto.getId());\n tag.setTagValue(tagDto.getTagValue());\n tag.setArtifact(artifact);\n tag.setLovTagType(tagLov);\n\n //note - if the tag already exists, it won't be added again\n artifact.addTag(tag);\n }\n\n //add all the incoming annotations\n for (AnnotationDto annotationDto : artifactDto.getAnnotationDtos()) {\n Annotation annotation = new Annotation();\n annotation.setId(annotationDto.getId());\n annotation.setAnnotationText(annotationDto.getAnnotationText());\n\n artifact.addAnnotation(annotation);\n }\n this.artifactRepository.save(artifact);\n\n }",
"public final void mT__141() throws RecognitionException {\n try {\n int _type = T__141;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:141:8: ( 'deploymentArtifact' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:141:10: 'deploymentArtifact'\n {\n match(\"deploymentArtifact\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"protected Asset getAssetFromTask (Task combinedTask) {\n Object returnedObj = \n prepHelper.getIndirectObject(combinedTask, Constants.Preposition.WITH);\n\t\n return (Asset) returnedObj;\n }",
"@Override\n public String build() {\n final Result result = build.getResult();\n\n // Prepare title\n final String title = String.format(\"Job: %s Status: %s\", getJobName(), result != null ? result.toString() : \"None\");\n // Prepare text\n final String text = String.format(\"%s %s %s [View](%s)\", ICON_STATUS.get(build.getResult()), getCause(),\n getTime(), getUrl());\n\n // Prepare message for attachments\n final JsonObject msg = new JsonObject();\n msg.addProperty(\"text\", text);\n msg.addProperty(\"color\", ifSuccess() ? \"#228a00\" : \"#8B0000\");\n msg.addProperty(\"title\", title);\n\n // Prepare attachments\n final JsonArray attachments = new JsonArray();\n attachments.add(msg);\n\n // Prepare final json\n final JsonObject json = new JsonObject();\n json.addProperty(\"username\", \"Jenkins\");\n json.add(\"attachments\", attachments);\n\n return json.toString();\n }",
"protected ManifestCommitter createCommitter(\n Path outputPath,\n TaskAttemptContext context) throws IOException {\n return new ManifestCommitter(outputPath, context);\n }",
"@CustomAnnotation(value = \"INSERT_ACTIVITY\")\n\t@RequestMapping(\n\t\t\tvalue=\"/activity\",\n\t\t\tmethod=RequestMethod.PUT,\n\t\t\tconsumes=MediaType.APPLICATION_JSON_VALUE,\n\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE\n\t\t\t)\n\tpublic ResponseEntity<Activity> createActivity(@RequestBody Activity newActivity, @Context HttpServletRequest request){\n\t\treturn new ResponseEntity<Activity>(activityService.create(newActivity), HttpStatus.OK);\n\t}",
"String getArtifactId();",
"UUID createArgument(ArgumentCreateRequest request);",
"@PostMapping(\"/dependencies\")\n @Timed\n public ResponseEntity<Dependency> createDependency(@Valid @RequestBody Dependency dependency) throws URISyntaxException {\n log.debug(\"REST request to save Dependency : {}\", dependency);\n if (dependency.getId() != null) {\n throw new BadRequestAlertException(\"A new dependency cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Dependency result = dependencyService.save(dependency);\n return ResponseEntity.created(new URI(\"/api/dependencies/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public void updateArtifact(ArtifactModel artifact);",
"@PostMapping(path = \"/api/activity/add\", produces = MediaType.APPLICATION_JSON_VALUE)\n public Response save(@RequestBody ActivityDTO activityDTO) {\n return activityService.saveActivityDTO(activityDTO);\n }",
"public static Action addAction(Activity activity, String name) {\n\t\tAction action = processFactory.createAction();\n\t\taction.setName(name);\n\t\tactivity.getNodes().add(action);\n\t\treturn action;\n\t}",
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.aiplatform.v1.Artifact>\n getArtifact(com.google.cloud.aiplatform.v1.GetArtifactRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getGetArtifactMethod(), getCallOptions()), request);\n }",
"public static Organization createOrganization(JSONObject jsonOrganization) throws JSONException {\n Organization organization = new Organization();\n organization.setId(jsonOrganization.getString(\"id\"));\n organization.setName(jsonOrganization.getString(\"name\"));\n return organization;\n }",
"public static void createOrUpdateKitesProtoArtifact(String name, String description, String kitesprotoartifactid,\r\n\t\t\tString contentid, String type, String url) {\r\n\t\tEntity kitesprotoartifact = getSingleKitesProtoArtifact(name);\r\n\t\tif (kitesprotoartifact == null) {\r\n\t\t\tkitesprotoartifact = new Entity(\"KitesProtoArtifact\");\r\n\t\t\tkitesprotoartifact.setProperty(\"name\", name);\r\n\t\t\tkitesprotoartifact.setProperty(\"description\", description);\r\n\t\t\tkitesprotoartifact.setProperty(\"kitesprotoartifactid\", kitesprotoartifactid);\r\n\t\t\tkitesprotoartifact.setProperty(\"contentid\", contentid);\r\n\t\t\tkitesprotoartifact.setProperty(\"type\", type);\r\n\t\t\tkitesprotoartifact.setProperty(\"url\", url);\r\n\t\t \tlogger.log(Level.INFO, \"Creating the artifact entity\");\r\n\t\t} else {\r\n\t\t\tif (kitesprotoartifactid != null && !\"\".equals(kitesprotoartifactid)) {\r\n\t\t\t\tkitesprotoartifact.setProperty(\"kitesprotoartifactid\", kitesprotoartifactid);\r\n\t\t\t}\r\n\t\t\tif (contentid != null && !\"\".equals(contentid)) {\r\n\t\t\t\tkitesprotoartifact.setProperty(\"contentid\", contentid);\r\n\t\t\t}\r\n\t\t}\r\n\t\tUtil.persistEntity(kitesprotoartifact);\r\n\t}",
"public static Activity createEntity(EntityManager em) {\n Activity activity = new Activity().name(DEFAULT_NAME).logo(DEFAULT_LOGO).logoContentType(DEFAULT_LOGO_CONTENT_TYPE).description(DEFAULT_DESCRIPTION).price(DEFAULT_PRICE)\n .durationMinutes(DEFAULT_DURATION_MINUTES).preDurationMinutes(DEFAULT_PRE_DURATION_MINUTES).postDurationMinutes(DEFAULT_POST_DURATION_MINUTES).isPrivate(DEFAULT_IS_PRIVATE)\n .colorCode(DEFAULT_COLOR_CODE).cancellationTime(DEFAULT_CANCELLATION_TIME);\n return activity;\n }",
"public AnalogArchiveApp() {\n jsonWriter = new JsonWriter(\"./data/saveFile.json\");\n jsonReader = new JsonReader(\"./data/saveFile.json\");\n init();\n }",
"java.lang.String getArtifactId();",
"public Resource addFileGeneration(Resource activity, Resource agent, Resource file) {\n generated(activity, file);\n wasAssociatedWith(activity, agent);\n return file;\n }",
"TaskDependency createTaskDependency();",
"public abstract void createAccount(JSONObject account);",
"private JSONObject getAssetJson(String filename) {\n return new JSONObject(\n resourceHandler.getResourceFileAsString(ResourceHandler.VALORANT_BASE_PATH + \"Data/\" + filename)\n );\n }",
"public Attachment createAttachmentNoContent(String assetId, String name, Attachment attachmentMetadata, UriInfo uriInfo) throws InvalidJsonAssetException,\n AssetPersistenceException, NonExistentArtefactException {\n\n // There is no content, so an external URL must be set, and the link\n // type must be DIRECT or WEB_PAGE\n String url = attachmentMetadata.getUrl();\n if (url == null) {\n throw new InvalidJsonAssetException(\"The URL of the supplied attachment was null\");\n }\n\n String stringType = attachmentMetadata.getLinkType();\n if (stringType == null) {\n throw new InvalidJsonAssetException(\"The link type for the attachment was not set.\");\n }\n\n Attachment.LinkType linkType = Attachment.LinkType.forValue(stringType);\n if (linkType == null || (linkType != Attachment.LinkType.DIRECT && linkType != Attachment.LinkType.WEB_PAGE)) {\n throw new InvalidJsonAssetException(\"The link type for the attachment was set to an invalid value: \" + stringType);\n }\n\n return createAttachment(assetId, name, attachmentMetadata, null, null, uriInfo);\n\n }",
"@Test(groups = { \"wso2.esb\" }, description = \"agilezen {createStory} integration test with mandatory parameters.\", dependsOnMethods = { \"testListProjectsWithMandatoryParameters\" })\n public void testCreateStoryWithMandatoryParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:createStory\");\n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_createStory_mandatory.json\");\n \n final String storyid = esbRestResponse.getBody().getString(\"id\");\n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + storyid;\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getString(\"text\"), apiRestResponse.getBody().getString(\"text\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"color\"), apiRestResponse.getBody().getString(\"color\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"size\"), apiRestResponse.getBody().getString(\"size\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"status\"), apiRestResponse.getBody()\n .getString(\"status\"));\n \n }",
"private static JSONObject buildResourceObject(String type, Resource resource) throws JSONException, IllegalArgumentException {\n if (resource == null) {\n throw new IllegalArgumentException(\"Missing Resource\");\n }\n if (type == null) {\n throw new IllegalArgumentException(\"Missing resource type\");\n }\n if (resource.getId() == null) {\n throw new IllegalArgumentException(\"Missing resource id\");\n }\n\n JSONObject jsonResource = new JSONObject();\n jsonResource.put(KEY_ID, resource.getId());\n jsonResource.put(KEY_TYPE, type);\n jsonResource.put(KEY_ATTRIBUTES, new JSONObject());\n return jsonResource;\n }",
"public void create(MyActivity activity, Bundle bundle){\n super.create(activity, bundle);\n\n }",
"public ActivityType createActivity(String id, String value) {\n\t\tActivityType activity = mappingFactory.createActivityType();\n\t\tactivity.setId(id);\n\t\tactivity.setValue(value);\n\t\treturn activity;\n\t}",
"protected ManifestCommitter createCommitter(\n TaskAttemptContext context) throws IOException {\n return createCommitter(getOutputDir(), context);\n }",
"public static void packageIntent(Intent intent, String json) {\n\n intent.putExtra(JSON, json);\n\n }",
"public Activity mapActivity(final ActivityRequest activityRequest) {\n Activity activity = Activity.builder().id(UUID.randomUUID().toString())\n .description(activityRequest.getDescription())\n .feedback(activityRequest.getFeedback())\n .name(activityRequest.getName())\n .prices(activityRequest.getPrices())\n .tags(activityRequest.getTags())\n .parkName(activityRequest.getParkName())\n .planName(activityRequest.getPlanName())\n .build();\n return activity;\n }",
"AlertDto createAlert(AlertDto alert);",
"public ActorModel buildActorModel(JSONObject jsonObject){\n try{\n ActorModel actorModel = new ActorModel();\n actorModel.setId(jsonObject.getString(\"id\"));\n actorModel.setName(jsonObject.getString(\"name\"));\n actorModel.setImage(context.getString(R.string.master_url) + context.getString(R.string.cast_image_url) + jsonObject.getString(\"id\") + \".jpg\");\n actorModel.setRating(Float.parseFloat(jsonObject.getString(\"m_rating\")));\n actorModel.setAverageRating(Float.parseFloat(jsonObject.getString(\"rating\")));\n actorModel.setType(jsonObject.getString(\"type\"));\n actorModel.setTotalMovies(Integer.parseInt(jsonObject.getString(\"total_movies\")));\n return actorModel;\n }catch (Exception e){\n EmailHelper emailHelper = new EmailHelper(context, EmailHelper.TECH_SUPPORT, \"Error: ModelHelper\", e.getMessage() + \"\\n\" + StringHelper.convertStackTrace(e));\n emailHelper.sendEmail();\n }\n return new ActorModel();\n }"
]
| [
"0.6644305",
"0.6333385",
"0.63255",
"0.6009147",
"0.5978221",
"0.5884619",
"0.58354896",
"0.58029014",
"0.57167536",
"0.5683555",
"0.5606495",
"0.55606896",
"0.5443966",
"0.5443858",
"0.5314685",
"0.528979",
"0.52120495",
"0.5173278",
"0.5168742",
"0.51239705",
"0.5118768",
"0.5085274",
"0.50310206",
"0.50250846",
"0.49850425",
"0.4977352",
"0.49720022",
"0.49658573",
"0.49607125",
"0.4959393",
"0.4955635",
"0.4946545",
"0.49249965",
"0.48730922",
"0.48724705",
"0.48663983",
"0.4845005",
"0.48443565",
"0.48389396",
"0.4830583",
"0.48303503",
"0.4822977",
"0.47643274",
"0.47597972",
"0.4755454",
"0.47361672",
"0.4730944",
"0.47201523",
"0.4698356",
"0.46935368",
"0.46900877",
"0.46869645",
"0.4685119",
"0.46794128",
"0.46777895",
"0.4670205",
"0.46683502",
"0.4666466",
"0.4645876",
"0.4645815",
"0.4639209",
"0.46344116",
"0.46174896",
"0.46112233",
"0.46076763",
"0.46057212",
"0.460191",
"0.46005043",
"0.45915663",
"0.4586519",
"0.45792624",
"0.45552447",
"0.4550691",
"0.4530285",
"0.45244876",
"0.45222127",
"0.4508598",
"0.4499364",
"0.44959497",
"0.44913223",
"0.44893044",
"0.44847518",
"0.44815657",
"0.4468638",
"0.44644597",
"0.44532195",
"0.4450884",
"0.444803",
"0.44267693",
"0.44258916",
"0.4422183",
"0.44075897",
"0.44051152",
"0.4402512",
"0.43906692",
"0.43904585",
"0.43826684",
"0.43776223",
"0.43608886",
"0.43494973"
]
| 0.58308643 | 7 |
Creates and returns a mail artifact, using the given json object. The json object has to contain a ElasticSearchConnector.SOURCE object. | public static MailArtefact createMailArtefact(JSONObject searchMailObject) {
JSONObject mailSource = searchMailObject.getJSONObject(ElasticSearchConnector.SOURCE);
MailArtefact art = new MailArtefact( String.valueOf(mailSource.getInt(ElasticSearchConnector.ID)) );
art.setSubject(mailSource.getString(ElasticSearchConnector.SUBJECT));
art.setContent(mailSource.getString(ElasticSearchConnector.TEXTCONTENT));
return art;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MailMessage(JsonObject json) {\n Objects.requireNonNull(json);\n bounceAddress = json.getString(\"bounceAddress\");\n from = json.getString(\"from\");\n to = getKeyAsStringOrList(json, \"to\");\n cc = getKeyAsStringOrList(json, \"cc\");\n bcc = getKeyAsStringOrList(json, \"bcc\");\n subject = json.getString(\"subject\");\n text = json.getString(\"text\");\n html = json.getString(\"html\");\n if (json.containsKey(\"attachment\")) {\n List<MailAttachment> list;\n Object object = json.getValue(\"attachment\");\n if (object instanceof JsonObject) {\n list = Collections.singletonList(new MailAttachment((JsonObject) object));\n } else if (object instanceof JsonArray) {\n list = new ArrayList<>();\n for (Object attach : (JsonArray) object) {\n list.add(new MailAttachment((JsonObject) attach));\n }\n } else {\n throw new IllegalArgumentException(\"invalid attachment type\");\n }\n attachment = list;\n }\n if (json.containsKey(\"headers\")) {\n headers = jsonToMultiMap(json);\n }\n }",
"@Override\n public String build() {\n final Result result = build.getResult();\n\n // Prepare title\n final String title = String.format(\"Job: %s Status: %s\", getJobName(), result != null ? result.toString() : \"None\");\n // Prepare text\n final String text = String.format(\"%s %s %s [View](%s)\", ICON_STATUS.get(build.getResult()), getCause(),\n getTime(), getUrl());\n\n // Prepare message for attachments\n final JsonObject msg = new JsonObject();\n msg.addProperty(\"text\", text);\n msg.addProperty(\"color\", ifSuccess() ? \"#228a00\" : \"#8B0000\");\n msg.addProperty(\"title\", title);\n\n // Prepare attachments\n final JsonArray attachments = new JsonArray();\n attachments.add(msg);\n\n // Prepare final json\n final JsonObject json = new JsonObject();\n json.addProperty(\"username\", \"Jenkins\");\n json.add(\"attachments\", attachments);\n\n return json.toString();\n }",
"private void createObject(JSONObject delivery) {\n\t\t//TODO: create the Object\n\t}",
"void sendTemplateMessage (EmailObject object) throws Exception;",
"void sendMessageWithAttachment (EmailObject object, String pathToAttachment) throws Exception;",
"public static String sendEmail(String fromId,String toId, String subject, String emailBody) {\n\t\tSystem.out.println(\"Test\");\r\n\t\tCloseableHttpClient httpClient=null;\r\n\t\tBase64.Encoder encoder = Base64.getEncoder();\r\n\t\tString attachmentStr = encoder.encodeToString(subject.getBytes()); \r\n\t\ttry{\r\n\t\t\thttpClient = HttpClients.createDefault();\r\n\t\t\tHttpPost httpPost = new HttpPost(\"https://api.sendgrid.com/v3/mail/send\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\thttpPost.setHeader(\"content-type\", \"application/json\");\r\n\t\t\t//httpPost.setHeader(\"accept\", \"application/json\");\r\n\t\t\thttpPost.setHeader(\"YOUR_API_KEY\", \"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\");\r\n\t\t\thttpPost.setHeader(\"Authorization\", \"Bearer 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\");\r\n\t\t\tString jsonStr=\"{\\r\\n\" + \r\n\t\t\t\t\t\" \\\"personalizations\\\": [\\r\\n\" + \r\n\t\t\t\t\t\" {\\r\\n\" + \r\n\t\t\t\t\t\" \\\"to\\\": [\\r\\n\" + \r\n\t\t\t\t\t\" {\\r\\n\" + \r\n\t\t\t\t\t\" \\\"email\\\": \\\"\"+toId+\"\\\"\\r\\n\" + \r\n\t\t\t\t\t\" }\\r\\n\" + \r\n\t\t\t\t\t\" ],\\r\\n\" + \r\n\t\t\t\t\t\" \\\"subject\\\": \\\"\"+subject+\"\\\"\\r\\n\" + \r\n\t\t\t\t\t\" }\\r\\n\" + \r\n\t\t\t\t\t\" ],\\r\\n\" + \r\n\t\t\t\t\t\" \\\"from\\\": {\\r\\n\" + \r\n\t\t\t\t\t\" \\\"email\\\": \\\"\"+fromId+\"\\\"\\r\\n\" + \r\n\t\t\t\t\t\" },\\r\\n\" + \r\n\t\t\t\t\t\" \\\"content\\\": [\\r\\n\" + \r\n\t\t\t\t\t\" {\\r\\n\" + \r\n\t\t\t\t\t\" \\\"type\\\": \\\"text/plain\\\",\\r\\n\" + \r\n\t\t\t\t\t\" \\\"value\\\": \\\"\"+emailBody+\"\\\"\\r\\n\" + \r\n\t\t\t\t\t\" }\\r\\n\" + \r\n\t\t\t\t\t\" ],\\r\\n\" + \r\n\t\t\t\t\t\"\\\"attachments\\\":[ {\\\"content\\\":\\\"\"+attachmentStr+\"\\\", \\\"filename\\\":\\\"attachment.txt\\\", \\\"disposition\\\":\\\"attachment\\\"} ]\"+\r\n\t\t\t\t\t\"}\";\r\n\t\t\tStringEntity jsonString =new StringEntity(jsonStr);\r\n\t\t\thttpPost.setEntity(jsonString);\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t HttpResponse response = httpClient.execute(httpPost);\r\n\t\t BufferedReader br = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\r\n\t\t\tString inputLine = null;\r\n\t\t\twhile ((inputLine = br.readLine()) != null) {\r\n\t\t\t\tsb.append(inputLine);\r\n\t\t\t}\r\n\t\t\thttpClient.close();\r\n\t\t\tSystem.out.println(sb.toString());\r\n\t\t\t\r\n\t\t\t//return sb.toString();\r\n\t\t}catch(Exception e){\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn \"1\";\r\n\t}",
"public void notifySlackOnCreation(Map<String, String> data, String channel) throws IOException {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n this.getClass().getClassLoader().getResourceAsStream(TemplatePaths.DEMO_SCHEDULED).transferTo(outputStream);\n\n String template = outputStream.toString(StandardCharsets.UTF_8);\n\n /* Compile Template */\n String payload = Mustache.compiler().compile(template).execute(data);\n String secret = slackWebhookUrlConfiguration.getSecrets().get(channel);\n\n ClientResponse clientResponse = webClient.post()\n .uri(secret)\n .body(BodyInserters.fromValue(payload))\n .exchange()\n .block();\n }",
"private JSONObject constructJsonNotification( MassNotificationTaskConfig config, HtmlTemplate html, ResourceExtenderHistory resourceExtenderHistory, Map<String, Object> model )\n {\n Map<String, Object> map = new HashMap< >( );\n \n map.put( FormsExtendConstants.JSON_OBJECT, AppTemplateService.getTemplateFromStringFtl( config.getSubjectForDashboard( ), null, model ).getHtml( ) );\n map.put( FormsExtendConstants.JSON_SENDER, config.getSenderForDashboard( ) );\n map.put( FormsExtendConstants.JSON_MESSAGE, html.getHtml( ) );\n map.put( FormsExtendConstants.JSON_ID_USER, resourceExtenderHistory.getUserGuid( ) );\n\n return new JSONObject( map );\n }",
"@VisibleForTesting\n protected String buildBody(Download download, String bodyTemplate) throws IOException, TemplateException {\n StringWriter contentBuffer = new StringWriter();\n Template template = freemarker.getTemplate(bodyTemplate);\n template.process(new EmailModel(download, portalUrl, getHumanQuery(download)), contentBuffer);\n return contentBuffer.toString();\n }",
"protected abstract JsonObject submitBuildArtifact(CloseableHttpClient httpclient,\n JsonObject jco, String submitUrl)\n throws IOException;",
"ExchangePlanContent createExchangePlanContent();",
"public Message createMessageFromJson(JSONObject messageJson){\n\n try {\n this.setBody( messageJson.get(\"body\").toString());\n\n //recupèrer l'objet contact\n JSONObject contactObject = (JSONObject) messageJson.get(\"contact\");\n this.getContact().setName(contactObject.get(\"name\").toString());\n this.getContact().setNumber( contactObject.get(\"number\").toString());\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return this;\n }",
"Active_Digital_Artifact createActive_Digital_Artifact();",
"public RepositoryArtifact createProject(RepositoryConnector connector, String rootFolderId, String projectName, String processDefinitionXml) {\r\n RepositoryArtifact result = null;\r\n try {\r\n ZipInputStream projectTemplateInputStream = new ZipInputStream(getProjectTemplate());\r\n ZipEntry zipEntry = null;\r\n \r\n String rootSubstitution = null;\r\n \r\n while ((zipEntry = projectTemplateInputStream.getNextEntry()) != null) {\r\n String zipName = zipEntry.getName();\r\n if (zipName.endsWith(\"/\")) {\r\n zipName = zipName.substring(0, zipName.length() - 1);\r\n }\r\n String path = \"\";\r\n String name = zipName;\r\n if (zipName.contains(\"/\")) {\r\n path = zipName.substring(0, zipName.lastIndexOf(\"/\"));\r\n name = zipName.substring(zipName.lastIndexOf(\"/\") + 1);\r\n }\r\n if (\"\".equals(path)) {\r\n // root folder is named after the project, not like the\r\n // template\r\n // folder name\r\n rootSubstitution = name;\r\n name = projectName;\r\n } else {\r\n // rename the root folder in all other paths as well\r\n path = path.replace(rootSubstitution, projectName);\r\n }\r\n String absolutePath = rootFolderId + \"/\" + path;\r\n boolean isBpmnModel = false;\r\n if (zipEntry.isDirectory()) {\r\n connector.createFolder(absolutePath, name);\r\n } else {\r\n Content content = new Content();\r\n \r\n if (\"template.bpmn20.xml\".equals(name)) {\r\n // This file shall be replaced with the process\r\n // definition\r\n content.setValue(processDefinitionXml);\r\n name = projectName + \".bpmn20.xml\";\r\n isBpmnModel = true;\r\n log.log(Level.INFO, \"Create processdefinition from Signavio process model \" + projectName);\r\n } else {\r\n byte[] bytes = IoUtil.readInputStream(projectTemplateInputStream, \"ZIP entry '\" + zipName + \"'\");\r\n String txtContent = new String(bytes).replaceAll(REPLACE_STRING, projectName).replaceAll(\"@@ACTIVITI.HOME@@\", ACTIVITI_HOME_PATH);\r\n content.setValue(txtContent);\r\n }\r\n log.log(Level.INFO, \"Create new artifact from zip entry '\" + zipEntry.getName() + \"' in folder '\" + absolutePath + \"' with name '\" + name + \"'\");\r\n RepositoryArtifact artifact = connector.createArtifact(absolutePath, name, null, content);\r\n if (isBpmnModel) {\r\n result = artifact;\r\n }\r\n }\r\n projectTemplateInputStream.closeEntry();\r\n }\r\n projectTemplateInputStream.close();\r\n } catch (IOException ex) {\r\n throw new RepositoryException(\"Couldn't create maven project due to IO errors\", ex);\r\n }\r\n return result;\r\n }",
"public void testSendEmail3()\n throws Exception\n {\n Gitana gitana = new Gitana();\n\n // authenticate\n Platform platform = gitana.authenticate(\"admin\", \"admin\");\n\n // create a domain and a principal\n Domain domain = platform.createDomain();\n DomainUser user = domain.createUser(\"test-\" + System.currentTimeMillis(), TestConstants.TEST_PASSWORD);\n user.setEmail(\"[email protected]\");\n user.update();\n\n // create a repository\n Repository repository = platform.createRepository();\n Branch branch = repository.readBranch(\"master\");\n\n // create a node with a text attachment that serves as the email body\n Node node = (Node) branch.createNode();\n byte[] bytes = ClasspathUtil.bytesFromClasspath(\"org/gitana/platform/client/email1.html\");\n node.uploadAttachment(bytes, MimeTypeMap.TEXT_HTML);\n\n // create an application\n Application application = platform.createApplication();\n\n // create an email provider\n EmailProvider emailProvider = application.createEmailProvider(\n JSONBuilder.start(EmailProvider.FIELD_HOST).is(\"smtp.gmail.com\")\n .and(EmailProvider.FIELD_USERNAME).is(\"[email protected]\")\n .and(EmailProvider.FIELD_PASSWORD).is(\"buildt@st11\")\n .and(EmailProvider.FIELD_SMTP_ENABLED).is(true)\n .and(EmailProvider.FIELD_SMTP_IS_SECURE).is(true)\n .and(EmailProvider.FIELD_SMTP_REQUIRES_AUTH).is(true)\n .and(EmailProvider.FIELD_SMTP_STARTTLS_ENABLED).is(true)\n .get()\n );\n\n // create an email\n Email email = application.createEmail(\n JSONBuilder.start(Email.FIELD_BODY).is(\"Here is a test body\")\n .and(Email.FIELD_FROM).is(\"[email protected]\")\n .get()\n );\n email.setToDomainUser(user);\n email.update();\n\n // send the email\n emailProvider.send(email);\n\n // check to ensure was marked as sent, along with some data\n email.reload();\n assertTrue(email.getSent());\n assertNotNull(email.dateSent());\n assertNotNull(email.getSentBy());\n }",
"private Attachment createAttachment(String assetId, String name, Attachment originalAttachmentMetadata, String contentType,\n InputStream attachmentContentStream, UriInfo uriInfo) throws InvalidJsonAssetException, AssetPersistenceException, NonExistentArtefactException {\n try {\n persistenceBean.retrieveAsset(assetId);\n } catch (NonExistentArtefactException e) {\n // The message from the PersistenceLayer is unhelpful in this context, so send back a better one\n throw new NonExistentArtefactException(\"The parent asset for this attachment (id=\"\n + assetId + \") does not exist in the repository.\");\n }\n\n Attachment attachmentMetadata = new Attachment(originalAttachmentMetadata);\n\n // Add necessary fields to the attachment (JSON) metadata\n if (attachmentMetadata.get_id() == null) {\n attachmentMetadata.set_id(persistenceBean.allocateNewId());\n }\n attachmentMetadata.setAssetId(assetId);\n if (contentType != null) {\n attachmentMetadata.setContentType(contentType);\n }\n attachmentMetadata.setName(name);\n attachmentMetadata.setUploadOn(IsoDate.format(new Date()));\n\n // Create the attachment content\n if (attachmentContentStream != null) {\n AttachmentContentMetadata contentMetadata = persistenceBean.createAttachmentContent(name, contentType, attachmentContentStream);\n\n // TODO perhaps we should try to clean up after ourselves and delete the attachmentMetadata\n // TODO seriously, this is one of the places where we reaslise that using a DB that doesn't\n // support transactions means we don't get some of the guarantees that we might be used to.\n\n attachmentMetadata.setGridFSId(contentMetadata.filename);\n attachmentMetadata.setSize(contentMetadata.length);\n }\n\n Attachment returnedAttachment = persistenceBean.createAttachmentMetadata(attachmentMetadata);\n\n computeAttachmentURL(returnedAttachment, uriInfo);\n\n return returnedAttachment;\n }",
"public ActorModel buildActorModel(JSONObject jsonObject){\n try{\n ActorModel actorModel = new ActorModel();\n actorModel.setId(jsonObject.getString(\"id\"));\n actorModel.setName(jsonObject.getString(\"name\"));\n actorModel.setImage(context.getString(R.string.master_url) + context.getString(R.string.cast_image_url) + jsonObject.getString(\"id\") + \".jpg\");\n actorModel.setRating(Float.parseFloat(jsonObject.getString(\"m_rating\")));\n actorModel.setAverageRating(Float.parseFloat(jsonObject.getString(\"rating\")));\n actorModel.setType(jsonObject.getString(\"type\"));\n actorModel.setTotalMovies(Integer.parseInt(jsonObject.getString(\"total_movies\")));\n return actorModel;\n }catch (Exception e){\n EmailHelper emailHelper = new EmailHelper(context, EmailHelper.TECH_SUPPORT, \"Error: ModelHelper\", e.getMessage() + \"\\n\" + StringHelper.convertStackTrace(e));\n emailHelper.sendEmail();\n }\n return new ActorModel();\n }",
"SendEmailResponse sendEmail(String templateId, String emailAddress, Map<String, String> personalisation, String reference) throws NotificationClientException;",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\t@Override\r\n\tpublic ResponseDto create(String controllerJson) {\n\t\tMap<String, Object> data = new HashMap<>();\r\n\t\t\r\n\t\tResponseDto response = new ResponseDto();\r\n\t\t\r\n\t\tMap<Object, Object> inputDataMap = new LinkedHashMap<>();\r\n\t\tinputDataMap.put(\"inputString\", controllerJson);\r\n\r\n\t\tGson gson = new Gson();\r\n\t\tContainerDTO dto = gson.fromJson(controllerJson.toString(), ContainerDTO.class);\r\n\t\tList<ContainerDetailsDTO> list = new ArrayList<>();\r\n\t\t// System.out.println(dto.getDELIVERY().getITEM());\r\n\t\tif (dto.getDELIVERY().getITEM() instanceof LinkedTreeMap) {\r\n\t\t\tLinkedTreeMap<String, String> item2 = (LinkedTreeMap) dto.getDELIVERY().getITEM();\r\n\t\t\tContainerDetailsDTO d = getLinkedTreeMapToContainerDetailsDto(item2);\r\n\t\t\tlist.add(d);\r\n\t\t\t// System.out.println(d.getAREACODE());\r\n\t\t} else if (dto.getDELIVERY().getITEM() instanceof ArrayList) {\r\n\t\t\tList<LinkedTreeMap> item2 = (List<LinkedTreeMap>) dto.getDELIVERY().getITEM();\r\n\t\t\tfor (LinkedTreeMap i : item2) {\r\n\t\t\t\tContainerDetailsDTO d = getLinkedTreeMapToContainerDetailsDto(i);\r\n\t\t\t\tlist.add(d);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdto.getDELIVERY().setITEM(list);\r\n\t\tinputDataMap.put(\"processObject\", dto);\r\n\t\t// LOGGER.error(\"INSIDE CREATE CONTAINER SERVIE WITH REQUEST PAYLOAD =>\r\n\t\t// \" + dto);\r\n\t\tif (!ServicesUtil.isEmpty(dto) && !ServicesUtil.isEmpty(dto.getDELIVERY())) {\r\n\t\t\tList<ContainerDetailsDTO> containerDetailsDTOs = (List<ContainerDetailsDTO>) dto.getDELIVERY().getITEM();\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tlong timeStamp = System.currentTimeMillis();\r\n\t\t\t\tString jobIdentity = \"DnProcessJob\" + timeStamp;\r\n\t\t\t\tString group = \"group\" + timeStamp;\r\n\t\t\t\tString triggerName = \"DnProcessTrigger\" + timeStamp;\r\n\t\t\t\tString jobName = \"Job\" + timeStamp;\r\n\t\t\t\tDate currdate = new Date();\r\n\r\n\t\t\t\tJobDetail job = JobBuilder.newJob(ContainerToDeliveryNoteProcessingJob.class)\r\n\t\t\t\t\t\t.withIdentity(jobIdentity, group).build();\r\n\r\n\t\t\t\tSimpleTrigger trigger = (SimpleTrigger) TriggerBuilder.newTrigger().withIdentity(triggerName, group)\r\n\t\t\t\t\t\t.startNow().build();\r\n\t\t\t\tScheduler scheduler = new StdSchedulerFactory().getScheduler();\r\n\r\n\t\t\t\tContainerRecordsDo recordsDo = new ContainerRecordsDo();\r\n\t\t\t\trecordsDo.setPayload(controllerJson.trim());\r\n\t\t\t\trecordsDo.setCreatedAt(currdate);\r\n\r\n\t\t\t\t// containerRecordService.create(recordsDo);\r\n\r\n\t\t\t\tcontainerRecordsDAO.getSession().persist(recordsDo);\r\n\r\n\t\t\t\tcontainerRecordsDAO.getSession().flush();\r\n\t\t\t\tcontainerRecordsDAO.getSession().clear();\r\n\t\t\t\tcontainerRecordsDAO.getSession().getTransaction().commit();\r\n\t\t\t\t\r\n\t\t\t\t// adding data to scheduler context\r\n\t\t\t\tdata.put(\"data\", dto);\r\n\t\t\t\tdata.put(\"timeStamp\", currdate);\r\n\t\t\t\tdata.put(\"containerRecordId\", recordsDo.getId());\r\n\t\t\t\tdata.put(\"jobName\", jobName);\r\n\r\n\t\t\t\tcomp.backgroudDnProcessing(data);\r\n\t\t\t\t\r\n\t\t\t\t// adding data to scheduler context\r\n\t\t\t\tscheduler.getContext().put(\"data\", dto);\r\n\t\t\t\tscheduler.getContext().put(\"timeStamp\", currdate);\r\n\t\t\t\tscheduler.getContext().put(\"containerRecordId\", recordsDo.getId());\r\n\t\t\t\tscheduler.getContext().put(\"jobName\", jobName);\r\n\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\t * int i=1; for (ContainerDetailsDTO d : containerDetailsDTOs) {\r\n\t\t\t\t * containerDao.create(d, new ContainerDetailsDo());\r\n\t\t\t\t * \r\n\t\t\t\t * if(i % BATCH_SIZE ==0) { containerDao.getSession().flush();\r\n\t\t\t\t * containerDao.getSession().clear(); }\r\n\t\t\t\t * \r\n\t\t\t\t * i++;\r\n\t\t\t\t * \r\n\t\t\t\t * }\r\n\t\t\t\t * \r\n\t\t\t\t * // flushing the session data\r\n\t\t\t\t * containerDao.getSession().flush();\r\n\t\t\t\t * containerDao.getSession().clear();\r\n\t\t\t\t */\r\n\r\n\t\t\t\t/*scheduler.start();\r\n\t\t\t\tscheduler.scheduleJob(job, trigger);*/\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t} catch (InterruptedException 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\r\n\t\t\t\tLOGGER.error(\"INSIDE CREATE CONTAINER SERVICE : JOB STARTED ID [ \"+jobName+\" ]\");\r\n\t\t\t\t\r\n\t\t\t\t//scheduler.standby();\r\n\t\t\t\t// scheduler.shutdown(true);\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Object data = createEntryInDeliveryHeader(dto); LOGGER.\r\n\t\t\t\t * error(\"INSIDE CREATE CONTAINER SERVIE WITH RESPONSE PAYLOAD <= \"\r\n\t\t\t\t * + data);\r\n\t\t\t\t */\r\n\t\t\t\tresponse.setStatus(true);\r\n\t\t\t\tresponse.setCode(HttpStatus.SC_OK);\r\n\t\t\t\tresponse.setMessage(Message.SUCCESS + \"\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tresponse.setStatus(false);\r\n\t\t\t\tresponse.setCode(HttpStatus.SC_INTERNAL_SERVER_ERROR);\r\n\t\t\t\tresponse.setMessage(Message.FAILED + \" : \" + e.toString());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tresponse.setStatus(true);\r\n\t\t\tresponse.setMessage(Message.SUCCESS.getValue());\r\n\t\t\tresponse.setCode(HttpStatus.SC_OK);\r\n\t\t}\r\n\r\n\t\treturn response;\r\n\t}",
"@Test\n public void sendXMLMail() throws Exception {\n // Generate XML email\n Variable valueVariable = new Variable().setId(\"value\").setName(\"value\").setType(\"STRING\");\n Variable valuesVariable = new Variable().setId(\"value2\").setName(\"value2\").setType(\"STRING\");\n Variable labelVariable = new Variable().setId(\"label\").setName(\"label\").setType(\"STRING\");\n Variable testVariable = new Variable().setId(\"test\").setName(\"test\").setType(\"STRING\");\n Email email = new Email();\n email\n .setId(\"TestEmail\")\n .setFrom((EmailItem) new EmailItem().setValue(\"value\").setLabel(\"label\"))\n .setToList(Arrays.asList((EmailItem) new EmailItem().setValue(\"value\").setLabel(\"label\"), (EmailItem) new EmailItem().setValue(\"value\").setLabel(\"label\")))\n .setCcList(singletonList((EmailItem) new EmailItem().setValue(\"value2\").setLabel(\"value2\")))\n .setCcoList(singletonList((EmailItem) new EmailItem().setValue(\"value\").setLabel(\"label\")))\n .setSubjectList(singletonList(new EmailMessage().setValue(\"test\")))\n .setBodyList(Arrays.asList(new EmailMessage().setType(\"HTML\").setValue(\"test\"),\n new EmailMessage().setType(\"Text\").setValue(\"test\")))\n .setVariableList(Arrays.asList(valueVariable, valuesVariable, labelVariable));\n\n ArrayNode values = JsonNodeFactory.instance.arrayNode();\n values.add(\"[email protected]\");\n values.add(\"[email protected]\");\n\n ObjectNode parameters = JsonNodeFactory.instance.objectNode();\n parameters.set(\"value\", values);\n parameters.set(\"label\", values);\n\n given(aweElements.getEmail(anyString())).willReturn(email);\n given(queryUtil.getParameter(eq(valueVariable), any(ObjectNode.class))).willReturn(JsonNodeFactory.instance.textNode(\"[email protected]\"));\n given(queryUtil.getParameter(eq(valuesVariable), any(ObjectNode.class))).willReturn(values);\n given(queryUtil.getParameter(eq(labelVariable), any(ObjectNode.class))).willReturn(JsonNodeFactory.instance.textNode(\"[email protected]\"));\n given(queryUtil.getParameter(eq(testVariable), any(ObjectNode.class))).willReturn(JsonNodeFactory.instance.textNode(\"test of subject and body\"));\n\n // Build message\n ParsedEmail parsedEmail = emailBuilder\n .setEmail(email)\n .setParameters(parameters)\n .parseEmail()\n .build();\n\n assertThat(parsedEmail.getTo().size()).isEqualTo(2);\n assertThat(parsedEmail.getCc().size()).isEqualTo(2);\n assertThat(parsedEmail.getCco().size()).isEqualTo(1);\n }",
"public String generateFromContext(Map<String, Object> mailContext, String template);",
"@Test\n public void sendMail() throws Exception {\n emailService.setApplicationContext(context);\n doReturn(aweElements).when(context).getBean(any(Class.class));\n given(mailSender.createMimeMessage()).willReturn(mimeMessage);\n given(aweElements.getLanguage()).willReturn(\"ES\");\n given(aweElements.getLocaleWithLanguage(anyString(), anyString())).willReturn(\"LOCALE\");\n ParsedEmail email = new ParsedEmail()\n .setFrom(new InternetAddress(\"[email protected]\"))\n .setTo(singletonList(new InternetAddress(\"[email protected]\")))\n .setReplyTo(singletonList(new InternetAddress(\"[email protected]\")))\n .setCc(singletonList(new InternetAddress(\"[email protected]\")))\n .setCco(singletonList(new InternetAddress(\"[email protected]\")))\n .setSubject(\"Test message\")\n .setBody(\"<div style='background-color:red;'>Test div message</div>\")\n .addAttachment(\"FileName.test\", new File(\"C:\\\\Users\\\\test\\\\Pictures\\\\Saved Pictures\\\\test.jpg\"));\n emailService.sendEmail(email);\n verify(mailSender).send(mimeMessage);\n }",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void execute(JobExecutionContext context)\n\t\t\tthrows JobExecutionException {\n\t\tJobDataMap map = context.getJobDetail().getJobDataMap();\n\t\tString json = map.getString(getArg());\n\t\tif(json==null){\n\t\t\techo(\"json is null\");\n\t\t\treturn ;\n\t\t}\n\t\tMsg = JSON.parseObject(json, Map.class);\n\t\t\t\t\n\t\tSendEmail();\n\t}",
"private static MimeMessage createEmailWithAttachment(String from, String fromName, String subject,\n String bodyPlainText, String bodyHtmlText, String fileDir, String filename, String contentType, Date dateSent, String... to) throws IOException, MessagingException {\n final Properties props = new Properties();\n final Session session = Session.getDefaultInstance(props, null);\n\n final MimeMessage email = new MimeMessage(session);\n\n final InternetAddress fAddress = new InternetAddress(from, fromName);\n email.setFrom(fAddress);\n\n for(String toString : to) {\n final InternetAddress tAddress = new InternetAddress(toString);\n email.addRecipient(javax.mail.Message.RecipientType.TO, tAddress);\n }\n\n email.setSubject(subject);\n email.setSentDate(dateSent);\n\n final Multipart multipartMixed = new MimeMultipart(\"mixed\");\n\n final MimeBodyPart mixedPart = new MimeBodyPart();\n Multipart multipart = new MimeMultipart(\"alternative\");\n mixedPart.setContent(multipart);\n\n // Plain text message\n MimeBodyPart mimeBodyPart = new MimeBodyPart();\n mimeBodyPart.setContent(bodyPlainText, \"text/plain\");\n mimeBodyPart.setHeader(\"Content-Type\", \"text/plain; charset=UTF-8\");\n multipart.addBodyPart(mimeBodyPart);\n\n // HTML message\n mimeBodyPart = new MimeBodyPart();\n mimeBodyPart.setContent(bodyHtmlText, \"text/html\");\n mimeBodyPart.setHeader(\"Content-Type\", \"text/html; charset=UTF-8\");\n multipart.addBodyPart(mimeBodyPart);\n\n multipartMixed.addBodyPart(mixedPart);\n\n if(fileDir != null && filename != null) {\n // Attachment\n mimeBodyPart = new MimeBodyPart();\n DataSource source = new FileDataSource(fileDir + \"/\" + filename);\n mimeBodyPart.setDataHandler(new DataHandler(source));\n mimeBodyPart.setFileName(filename);\n mimeBodyPart.setHeader(\"Content-Type\", contentType + \"; name=\\\"\" + filename + \"\\\"\");\n mimeBodyPart.setHeader(\"Content-Transfer-Encoding\", \"binary\");\n multipartMixed.addBodyPart(mimeBodyPart);\n }\n\n email.setContent(multipartMixed);\n\n return email;\n }",
"@Override\n public AmqpNotifyMessageStructure<JSONObject> apply(JSONObject jsonObject) {\n return AmqpNotifyMessageStructureBuilder.converter(jsonObject);\n }",
"void send(String emailName, Map model);",
"AlertDto createAlert(AlertDto alert);",
"public EmailObj(String to, String from, String subject, String body) {\n this(to, from, subject, body, \"localhost\");\n }",
"Digital_Artifact createDigital_Artifact();",
"public static JSONResponse createItem(HttpServletRequest req, InputStream file, String json,\n String origName) {\n try {\n User u = BasicAuthentication.auth(req);\n DefaultItemWithFileTO defaultItemWithFileTO = (DefaultItemWithFileTO) RestProcessUtils\n .buildTOFromJSON(json, DefaultItemWithFileTO.class);\n defaultItemWithFileTO = uploadAndValidateFile(file, defaultItemWithFileTO, origName);\n DefaultItemTO defaultItemTO =\n new DefaultItemService().create((DefaultItemTO) defaultItemWithFileTO, u);\n return RestProcessUtils.buildResponse(Status.CREATED.getStatusCode(), defaultItemTO);\n } catch (Exception e) {\n LOGGER.error(\"Error creating item\", e);\n return RestProcessUtils.localExceptionHandler(e, e.getLocalizedMessage());\n }\n }",
"public static Message parse(JSONObject json) throws JSONException {\n\t\tString text = json.getString(\"text\");\n\t\tDate createdDate = null;\n\t\tif(json.has(\"created_at\")) createdDate = DateParser.parse(json.getString(\"created_at\"));\n\t\tPerson person = Person.parse(json.getJSONObject(\"person\"));\n\t\tString url = null;\n\t\tif(json.has(\"url\")) url = json.getString(\"url\");\n\t\treturn new Message(text, person, createdDate, url);\n\t}",
"private static void generateDemoWorklistItems()\n throws IllegalStarteventException, DefinitionNotFoundException {\n\n // TODO why not use the getBuilder-method? special reason?\n // Building the ProcessDefintion\n BpmnProcessDefinitionBuilder builder = BpmnProcessDefinitionBuilder.newBuilder();\n\n Node startNode, node1, node2, endNode;\n\n startNode = BpmnCustomNodeFactory.createBpmnNullStartNode(builder);\n\n // Building Node1\n int[] ints = {1, 1};\n node1 = BpmnCustomNodeFactory.createBpmnAddNumbersAndStoreNode(builder, \"result\", ints);\n\n // Building Node2\n node2 = BpmnCustomNodeFactory.createBpmnPrintingVariableNode(builder, \"result\");\n\n endNode = BpmnNodeFactory.createBpmnEndEventNode(builder);\n\n BpmnNodeFactory.createControlFlowFromTo(builder, startNode, node1);\n BpmnNodeFactory.createControlFlowFromTo(builder, node1, node2);\n BpmnNodeFactory.createControlFlowFromTo(builder, node2, endNode);\n\n builder.setDescription(\"description\").setName(\"Demoprocess with Email start event\");\n\n BpmnProcessDefinitionModifier.decorateWithDefaultBpmnInstantiationPattern(builder);\n ProcessDefinition def = builder.buildDefinition();\n DeploymentBuilder deploymentBuilder = ServiceFactory.getRepositoryService().getDeploymentBuilder();\n deploymentBuilder.addProcessDefinition(def);\n\n Deployment deployment = deploymentBuilder.buildDeployment();\n ServiceFactory.getRepositoryService().deployInNewScope(deployment);\n \n // Create a mail adapater event here.\n EventCondition subjectCondition = null;\n try {\n subjectCondition = new MethodInvokingEventCondition(MailAdapterEvent.class, \"getMessageTopic\", \"Hallo\");\n\n builder.createStartTrigger(new ImapEmailProcessStartEvent(subjectCondition, null), node1);\n\n ServiceFactory.getRepositoryService().activateProcessDefinition(def.getID());\n } catch (JodaEngineRuntimeException e) {\n LOGGER.error(e.getMessage(), e);\n }\n }",
"public static Message fromJSON(JSONArray json){\n\t\t\n\t\tString message = (String) json.get(0);\n\t\tlong creationTime = (long) json.get(1);\n\t\tlong visibleTime = (long) json.get(2);\n\t\tlong id = (long) json.get(3);\n\t\t\n\t\treturn new Message(message, visibleTime, creationTime, id);\n\t}",
"private Message createMessage(final JSONObject jsonMessageSet) {\n\n final JSONArray messages = (JSONArray) jsonMessageSet.get(\"message\");\n final JSONObject jsonMessage = getRandomJsonObject(messages);\n\n final Message message = new Message();\n message.setMessageId((Integer) jsonMessage.get(\"messageId\"));\n message.setText((String) jsonMessage.get(\"text\"));\n\n final Integer tipSetId = (Integer) jsonMessage.get(\"tipSetId\");\n if (tipSetId != null) {\n message.setTipSetId(tipSetId);\n }\n\n return message;\n }",
"public Attachment createAttachmentNoContent(String assetId, String name, Attachment attachmentMetadata, UriInfo uriInfo) throws InvalidJsonAssetException,\n AssetPersistenceException, NonExistentArtefactException {\n\n // There is no content, so an external URL must be set, and the link\n // type must be DIRECT or WEB_PAGE\n String url = attachmentMetadata.getUrl();\n if (url == null) {\n throw new InvalidJsonAssetException(\"The URL of the supplied attachment was null\");\n }\n\n String stringType = attachmentMetadata.getLinkType();\n if (stringType == null) {\n throw new InvalidJsonAssetException(\"The link type for the attachment was not set.\");\n }\n\n Attachment.LinkType linkType = Attachment.LinkType.forValue(stringType);\n if (linkType == null || (linkType != Attachment.LinkType.DIRECT && linkType != Attachment.LinkType.WEB_PAGE)) {\n throw new InvalidJsonAssetException(\"The link type for the attachment was set to an invalid value: \" + stringType);\n }\n\n return createAttachment(assetId, name, attachmentMetadata, null, null, uriInfo);\n\n }",
"public JSONObject createJsonFromMessage(){\n\n JSONObject messageJson = new JSONObject();\n JSONObject contactJson = new JSONObject();\n try {\n messageJson.put(\"body\", this.getBody());\n contactJson.put(\"name\", this.getContact().getName());\n contactJson.put(\"number\", this.getContact().getNumber());\n messageJson.put(\"contact\", contactJson);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return messageJson;\n }",
"Object toExternal (Object entity, Settings settings);",
"public MimeMessage build() throws MessagingException, IOException {\n\n if (attachments != null && !attachments.isEmpty()) {\n MimeMultipart multipart = new MimeMultipart();\n MimeBodyPart body = new MimeBodyPart();\n setMessageContent(body);\n multipart.addBodyPart(body);\n String[] attachFiles = attachments.split(\",\");\n for (String filePath : attachFiles) {\n addAttachment(multipart, filePath);\n }\n message.setContent(multipart, MULTIPART_TYPE);\n } else {\n setMessageContent(message);\n }\n return message;\n }",
"void sendEmail(Task task, String taskTypeName, String plantName);",
"ShipmentItem createShipmentItem();",
"private JSONMessageFactory(){}",
"public void sendEmailToclient(String content) throws TemplateNotFoundException, MalformedTemplateNameException, ParseException, IOException, TemplateException;",
"ByteArrayOutputStream createPDF(String templateName, Map<String, Object> params,\n String companyId, String notificationType);",
"public final void event(final JSONObject builddata) {\n logger.fine(\"Sending event\");\n\n // Gather data\n JSONObject payload = new JSONObject();\n String hostname = nullSafeGetString(builddata, \"hostname\");\n String number = nullSafeGetString(builddata, \"number\");\n String buildurl = nullSafeGetString(builddata, \"buildurl\");\n String job = nullSafeGetString(builddata, \"job\");\n long timestamp = builddata.getLong(\"timestamp\");\n String message = \"\";\n\n // Setting source_type_name here, to allow modification based on type of event\n payload.put(\"source_type_name\", \"jenkins\");\n\n // Build title\n StringBuilder title = new StringBuilder();\n title.append(job).append(\" build #\").append(number);\n if ( \"SUCCESS\".equals( builddata.get(\"result\") ) ) {\n title.append(\" succeeded\");\n payload.put(\"alert_type\", \"success\");\n message = \"%%% \\n [See results for build #\" + number + \"](\" + buildurl + \") \";\n } else if ( builddata.get(\"result\") != null ) {\n title.append(\" failed\");\n payload.put(\"alert_type\", \"failure\");\n message = \"%%% \\n [See results for build #\" + number + \"](\" + buildurl + \") \";\n } else {\n title.append(\" started\");\n payload.put(\"alert_type\", \"info\");\n message = \"%%% \\n [Follow build #\" + number + \" progress](\" + buildurl + \") \";\n // Remove source_type_name to keep started events from being rolled up\n payload.remove(\"source_type_name\");\n }\n title.append(\" on \").append(hostname);\n\n // Add duration\n if ( builddata.get(\"duration\") != null ) {\n message = message + durationToString(builddata.getDouble(\"duration\"));\n }\n\n // Close markdown\n message = message + \" \\n %%%\";\n\n // Build payload\n payload.put(\"title\", title.toString());\n payload.put(\"text\", message);\n payload.put(\"date_happened\", timestamp);\n payload.put(\"event_type\", builddata.get(\"event_type\"));\n payload.put(\"host\", hostname);\n payload.put(\"result\", builddata.get(\"result\"));\n payload.put(\"tags\", assembleTags(builddata));\n payload.put(\"aggregation_key\", job); // Used for job name in event rollups\n\n post(payload, this.EVENT);\n }",
"public MJEasyEmail email() {\n return new MJEasyEmail(this, new MailjetRequest(Email.resource));\n }",
"public SentMail(String date, String to, String subject/*,String body*/) {\n this.date = new SimpleStringProperty(date);\n this.to = new SimpleStringProperty(to);\n this.Subject = new SimpleStringProperty(subject);\n //this.body = new SimpleStringProperty(body);\n }",
"public void sendEmail(Author authorObject);",
"private static Message createMessageWithEmail(MimeMessage emailContent)\n throws MessagingException, IOException {\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n emailContent.writeTo(buffer);\n byte[] bytes = buffer.toByteArray();\n String encodedEmail = Base64.encodeBase64URLSafeString(bytes);\n Message message = new Message();\n message.setRaw(encodedEmail);\n return message;\n }",
"@Override\n\tpublic void createDigestEmail() {\n\n\t}",
"ShipmentPackageContent createShipmentPackageContent();",
"private void storeJsonInPayload(JsonObject dataJson, JsonObject metaJson,\r\n DigitalObject object) throws HarvesterException {\r\n \r\n Payload payload = null;\r\n JsonSimple json = new JsonSimple();\r\n try {\r\n // New payloads\r\n payload = object.getPayload(payloadId);\r\n //log.debug(\"Updating existing payload: '{}' => '{}'\",\r\n // object.getId(), payloadId);\r\n \r\n // Get the old JSON to merge\r\n try {\r\n json = new JsonSimple(payload.open());\r\n } catch (IOException ex) {\r\n log.error(\"Error parsing existing JSON: '{}' => '{}'\",\r\n object.getId(), payloadId);\r\n throw new HarvesterException(\r\n \"Error parsing existing JSON: \", ex);\r\n } finally {\r\n payload.close();\r\n }\r\n \r\n // Update storage\r\n try {\r\n InputStream in = streamMergedJson(dataJson, metaJson, json);\r\n object.updatePayload(payloadId, in);\r\n \r\n } catch (IOException ex2) {\r\n throw new HarvesterException(\r\n \"Error processing JSON data: \", ex2);\r\n } catch (StorageException ex2) {\r\n throw new HarvesterException(\r\n \"Error updating payload: \", ex2);\r\n }\r\n \r\n } catch (StorageException ex) {\r\n // Create a new Payload\r\n try {\r\n //log.debug(\"Creating new payload: '{}' => '{}'\",\r\n // object.getId(), payloadId);\r\n InputStream in = streamMergedJson(dataJson, metaJson, json);\r\n payload = object.createStoredPayload(payloadId, in);\r\n \r\n } catch (IOException ex2) {\r\n throw new HarvesterException(\r\n \"Error parsing JSON encoding: \", ex2);\r\n } catch (StorageException ex2) {\r\n throw new HarvesterException(\r\n \"Error creating new payload: \", ex2);\r\n }\r\n }\r\n \r\n // Tidy up before we finish\r\n if (payload != null) {\r\n try {\r\n payload.setContentType(\"application/json\");\r\n payload.close();\r\n } catch (Exception ex) {\r\n log.error(\"Error setting Payload MIME type and closing: \", ex);\r\n }\r\n }\r\n }",
"public JsonObject getArtifact(String wrksName, String artName) throws CartagoException {\n var info = getArtInfo(wrksName, artName);\n\n var artifact = Json.createObjectBuilder()\n .add(\"artifact\", artName)\n .add(\"type\", info.getId().getArtifactType());\n\n\n // Get artifact's properties\n var properties = Json.createArrayBuilder();\n for (ArtifactObsProperty op : info.getObsProperties()) {\n var values = Json.createArrayBuilder();\n for (Object vl : op.getValues()) {\n values.add(\n Json.createValue(vl.toString())\n );\n }\n properties.add(\n Json.createObjectBuilder()\n .add(op.getName(), values)\n );\n }\n artifact.add(\"properties\", properties);\n\n // Get artifact's operations\n var operations = Json.createArrayBuilder();\n info.getOperations().forEach(y -> {\n operations.add(y.getOp().getName());\n });\n artifact.add(\"operations\", operations);\n\n // Get agents that are observing the artifact\n var observers = Json.createArrayBuilder();\n info.getObservers().forEach(y -> {\n // do not print agents_body observation\n if (!info.getId().getArtifactType().equals(AgentBodyArtifact.class.getName())) {\n observers.add(y.getAgentId().getAgentName());\n }\n });\n artifact.add(\"observers\", observers);\n\n // linked artifacts\n /* not used anymore\n var linkedArtifacts = Json.createArrayBuilder();\n info.getLinkedArtifacts().forEach(y -> {\n // linked artifact node already exists if it belongs to this workspace\n linkedArtifacts.add(y.getName());\n });\n artifact.add(\"linkedArtifacts\", linkedArtifacts);*/\n\n return artifact.build();\n }",
"public void sendEmailWithAttachment(String email) throws MessagingException, IOException{\n MimeMessage msg = javaMailSender.createMimeMessage();\n\n MimeMessageHelper helper = new MimeMessageHelper(msg, true);\n\n helper.setTo(email);\n\n helper.setSubject(\"My traveling reservation\");\n\n helper.setText(\"<h1>Thank you for making your reservation!<h1>\", true);\n\n helper.addAttachment(\"my_travel.jpeg\", new PathResource(\"../tourist-agency-back/src/main/resources/travel.jpg\"));\n\n javaMailSender.send(msg);\n }",
"@RequestMapping(value=\"/create\", \n\t\t\tmethod=RequestMethod.POST, \n\t\t\theaders=\"Accept=application/json\")\n\t@ResponseBody\n\tpublic ResponseEntity<String> create(final @RequestBody String messageJson) {\n\t\t\n\t\tfinal LogMessage messageToSave = LogMessage.fromJsonToLogMessage(messageJson);\n\t\t\n\t\t//save the message\n\t\tfinal PersistedResult<LogMessage> result = logMessageService.save(messageToSave);\n\t\t\n\t\t//if does not save return bad request to client\n\t\tif(result.getPresistingErrorMessages().size()>0)\n\t\t\treturn new ResponseEntity<String>(HttpStatus.BAD_REQUEST);\n\t\t\n\t\t//otherwise return success\n\t\treturn new ResponseEntity<String>(HttpStatus.CREATED);\n\t}",
"public static void sendSuccessMail(FormStackInfo info, ServletContext context) throws JSONException, IOException {\n\t\tString title = \"\";\n\t\t\n\t\tif(info.getCourseTitle() != null)\n\t\t\ttitle = \" de <b>\" + info.getCourseTitle() + \"</b>\";\n\t\t\n\t\tSendGrid sendGrid = new SendGrid(\"user\", \"password\");\n\t\tEmail email = new Email();\n\t\t\n\t\tString fileEmails = \"/WEB-INF/emails.txt\";\n\t\tInputStream resourceEmail = context.getResourceAsStream(fileEmails);\n\t\tif(resourceEmail != null)\n\t\t\taddToCompanyEmails(email, resourceEmail);\n\t\temail.addTo(info.getEmail());\n\t\temail.setFrom(\"[email protected]\");\n\t\temail.setFromName(\"Your_Name\");\n\t\temail.setReplyTo(\"[email protected]\");\n\t\temail.setSubject(\"[email protected]\");\n\t\t\n\t\tString fileText = \"/WEB-INF/textemail.txt\";\n\t\tInputStream resourceText = context.getResourceAsStream(fileText);\n\t\tif(resourceText != null){\n\t\t\tString fulltext = extractTextFromFile(resourceText, info, info.getPassword(), title);\n\t\t\temail.setHtml(fulltext);\n\t\t} else {\n\t\t\temail.setHtml(\"<h1>My Message</h1>\");\n\t\t}\n\t\ttry{\n\t\t\tsendGrid.send(email);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static SendGridRequest fillContent(Email email, SendGridRequest request) {\n SendGridRequest.Content content = new SendGridRequest.Content();\n content.setType(ContentType.TEXT_PLAIN.getMimeType());\n content.setValue(email.getBody());\n request.setContent(new SendGridRequest.Content[] {content});\n return request;\n }",
"private static void addToCompanyEmails(Email email, InputStream resourceEmail) throws IOException, JSONException {\n\t\tInputStreamReader isr = new InputStreamReader(resourceEmail);\n\t\tBufferedReader reader = new BufferedReader(isr);\n\t\tString lineEmail = \"\";\n\t\t\n\t\t// We read the file line by line\n\t\twhile ((lineEmail = reader.readLine()) != null) {\n\t\t\temail.addTo(lineEmail); //Adds the email to where it will be sent\n\t\t}\n\t\t\n\t}",
"private Message createMessageWithEmail(MimeMessage email) throws MessagingException, IOException {\n\t\tByteArrayOutputStream bytes = new ByteArrayOutputStream();\n\t\temail.writeTo(bytes);\n\t\tString encodedEmail = Base64.encodeBase64URLSafeString(bytes.toByteArray());\n\t\tMessage message = new Message();\n\t\tmessage.setRaw(encodedEmail);\n\t\treturn message;\n\n\t}",
"@Override\n\tpublic MimeMessage createEmailWithAttachment(String to, String from, String subject, String bodyText,\n\t\t\tFile attachment,String mimeType) throws Exception {\n\t\tProperties props = new Properties();\n\t\tSession session = Session.getDefaultInstance(props, null);\n\n\t\tMimeMessage email = new MimeMessage(session);\n\t\tInternetAddress tAddress = new InternetAddress(to);\n\t\tInternetAddress fAddress = new InternetAddress(from);\n\n\t\temail.setFrom(fAddress);\n\t\temail.addRecipient(javax.mail.Message.RecipientType.TO, tAddress);\n\t\temail.setSubject(subject);\n\n\t\tMimeBodyPart mimeBodyPart = new MimeBodyPart();\n\t\tmimeBodyPart.setContent(bodyText, \"text/plain\");\n\t\tmimeBodyPart.setHeader(\"Content-Type\", \"text/plain; charset=\\\"UTF-8\\\"\");\n\n\t\tMultipart multipart = new MimeMultipart();\n\t\tmultipart.addBodyPart(mimeBodyPart);\n\n\t\tmimeBodyPart = new MimeBodyPart();\n\n\t\tDataSource source = new FileDataSource (attachment);\n\t\tDataHandler dh = new DataHandler(source);\n\t\t\n\t\tmimeBodyPart.setDataHandler(dh);\n\t\tmimeBodyPart.setFileName(attachment.getName());\n\n\t\tmimeBodyPart.setHeader(\"Content-Type\", mimeType + \"; name=\\\"\" + attachment.getName() + \"\\\"\");\n\t\tmimeBodyPart.setHeader(\"Content-Transfer-Encoding\", \"base64\");\n\n\t\tmultipart.addBodyPart(mimeBodyPart);\n\n\t\temail.setContent(multipart);\n\n\t\treturn email;\n\t}",
"public void testSendEmail1()\n throws Exception\n {\n Gitana gitana = new Gitana();\n\n // authenticate\n Platform platform = gitana.authenticate(\"admin\", \"admin\");\n\n // create an application\n Application application = platform.createApplication();\n\n // create an email provider\n EmailProvider emailProvider = application.createEmailProvider(\n JSONBuilder.start(EmailProvider.FIELD_HOST).is(\"smtp.gmail.com\")\n .and(EmailProvider.FIELD_USERNAME).is(\"[email protected]\")\n .and(EmailProvider.FIELD_PASSWORD).is(\"buildt@st11\")\n .and(EmailProvider.FIELD_SMTP_ENABLED).is(true)\n .and(EmailProvider.FIELD_SMTP_IS_SECURE).is(true)\n .and(EmailProvider.FIELD_SMTP_REQUIRES_AUTH).is(true)\n .and(EmailProvider.FIELD_SMTP_STARTTLS_ENABLED).is(true)\n .get()\n );\n \n // create an email\n Email email = application.createEmail(\n JSONBuilder.start(Email.FIELD_TO).is(\"[email protected]\")\n .and(Email.FIELD_BODY).is(\"Here is a test body\")\n .and(Email.FIELD_FROM).is(\"[email protected]\")\n .get()\n );\n \n // send the email\n emailProvider.send(email);\n\n // check to ensure was marked as sent, along with some data\n email.reload();\n assertTrue(email.getSent());\n assertNotNull(email.dateSent());\n assertNotNull(email.getSentBy());\n\n // create a few additional emails for query\n\n // 1\n Email email1 = application.createEmail(\n JSONBuilder.start(Email.FIELD_TO).is(\"[email protected]\")\n .and(Email.FIELD_BODY).is(\"Here is a test body\")\n .and(Email.FIELD_FROM).is(\"[email protected]\")\n .get()\n );\n\n // 2\n Email email2 = application.createEmail(\n JSONBuilder.start(Email.FIELD_TO).is(\"[email protected]\")\n .and(Email.FIELD_BODY).is(\"Here is a test body\")\n .and(Email.FIELD_FROM).is(\"[email protected]\")\n .get()\n );\n\n // query\n assertEquals(2, application.queryEmails(QueryBuilder.start(Email.FIELD_TO).is(\"[email protected]\").get()).size());\n assertEquals(1, application.queryEmails(QueryBuilder.start(Email.FIELD_FROM).is(\"[email protected]\").get()).size());\n assertEquals(0, application.queryEmails(QueryBuilder.start(Email.FIELD_FROM).is(\"[email protected]\").get()).size());\n assertEquals(3, application.listEmails().size());\n\n // delete\n email2.delete();\n\n // query\n assertEquals(2, application.listEmails().size());\n }",
"private void sendEcr(JSONObject ecrJson) \n\t\tthrows Exception {\n\t\t\n\t\tTimestamp timestamp = new Timestamp(System.currentTimeMillis());\n\t\tLong id_num = (Long) (timestamp.getTime()/10000);\n\t\tecrJson.put(\"id\", id_num.toString());\n\t\t\n\t\tLOGGER.debug(\"Sending to \"+getControllerApiUrl()+\": \"+ecrJson.toString());\n\t\tClient client = Client.create();\n\t\tWebResource webResource = client.resource(getControllerApiUrl());\n\t\t\n\t\tClientResponse response = webResource.type(\"application/json\").post(ClientResponse.class, ecrJson.toString());\n\t\tif (response.getStatus() != 201 && response.getStatus() != 200) {\n\t\t\t// Failed to write ECR. We should put this in the queue and retry.\n\t\t\tLOGGER.error(\"Failed to talk to PHCR controller (\"+getControllerApiUrl()+\") for ECR Resport:\\n\"+ecrJson.toString());\n\t\t\tSystem.out.println(\"Failed to talk to PHCR controller (\"+getControllerApiUrl()+\"):\"+ecrJson.toString());\n\t\t\tgetQueueFile().add(ecrJson.toString().getBytes());\n\t\t\tthrow new RuntimeException(\"Failed: HTTP error code : \"+response.getStatus());\n\t\t} else {\n\t\t\tLOGGER.info(\"ECR Report submitted:\"+ecrJson.toString());\n\t\t\tSystem.out.println(\"ECR Report submitted:\"+ecrJson.toString());\n\t\t}\n\t}",
"void send(String emailName, Map model, EmailPreparator emailPreparator);",
"@POST\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n @Description(\"Creates an alert.\")\n public AlertDto createAlert(@Context HttpServletRequest req, AlertDto alertDto) {\n if (alertDto == null) {\n throw new WebApplicationException(\"Null alert object cannot be created.\", Status.BAD_REQUEST);\n }\n\n PrincipalUser owner = validateAndGetOwner(req, alertDto.getOwnerName());\n Alert alert = new Alert(getRemoteUser(req), owner, alertDto.getName(), alertDto.getExpression(), alertDto.getCronEntry());\n\n copyProperties(alert, alertDto);\n return AlertDto.transformToDto(alertService.updateAlert(alert));\n }",
"public String build() {\n this.message_string = \"{\";\n\n if (this.recipient_id != null) {\n this.message_string += \"\\\"recipient\\\": {\\\"id\\\": \\\"\" + this.recipient_id + \"\\\"},\";\n }\n\n if ((this.message_text != null)\n && !(this.message_text.equals(\"\"))\n && !(this.buttons.isEmpty())) {\n this.message_string += \"\\\"message\\\": {\";\n this.message_string += \"\\\"attachment\\\": {\";\n this.message_string += \"\\\"type\\\": \\\"template\\\",\";\n this.message_string += \"\\\"payload\\\": {\";\n this.message_string += \"\\\"template_type\\\": \\\"button\\\",\";\n this.message_string += \"\\\"text\\\": \\\"\" + this.message_text + \"\\\",\";\n this.message_string += \"\\\"buttons\\\":[\";\n for (int j = 0; j < this.buttons.size(); j++) {\n HashMap<String, String> button = this.buttons.get(j);\n this.message_string += \"{\";\n if (!button.get(\"type\").equals(\"\")) {\n this.message_string += \"\\\"type\\\":\\\"\" + button.get(\"type\") + \"\\\",\";\n }\n if (!button.get(\"title\").equals(\"\")) {\n this.message_string += \"\\\"title\\\":\\\"\" + button.get(\"title\") + \"\\\",\";\n }\n if (!button.get(\"url\").equals(\"\")) {\n this.message_string += \"\\\"url\\\":\\\"\" + button.get(\"url\") + \"\\\",\";\n }\n if (!button.get(\"payload\").equals(\"\")) {\n this.message_string += \"\\\"payload\\\":\\\"\" + button.get(\"payload\") + \"\\\",\";\n }\n if (!button.get(\"webview_height_ratio\").equals(\"\")) {\n this.message_string +=\n \"\\\"webview_height_ratio\\\":\\\"\"\n + button.get(\"webview_height_ratio\")\n + \"\\\",\";\n }\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n this.message_string += \"},\";\n }\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n this.message_string += \"]\";\n this.message_string += \"}\";\n this.message_string += \"}\";\n this.message_string += \"}\";\n }\n\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n\n this.message_string += \"}\";\n\n return this.message_string;\n }",
"private static String generateSmsSendAPIBody(String smsSendAPIBodyTemplate, SMSSenderAdd smsSenderAdd) {\n\n String inlineBody = smsSendAPIBodyTemplate;\n Map<String, String> inlineBodyProperties = new HashMap<>();\n /*\n key, secret, sender inputs or any property defined with key value starting from \"body.\" are considered\n when generating the inline body of SMS publisher.\n */\n if (StringUtils.isNotEmpty(smsSenderAdd.getKey())) {\n inlineBodyProperties.put(KEY, smsSenderAdd.getKey());\n }\n if (StringUtils.isNotEmpty(smsSenderAdd.getSecret())) {\n inlineBodyProperties.put(SECRET, smsSenderAdd.getSecret());\n }\n if (StringUtils.isNotEmpty(smsSenderAdd.getSender())) {\n inlineBodyProperties.put(SENDER, smsSenderAdd.getSender());\n }\n if (CollectionUtils.isNotEmpty(smsSenderAdd.getProperties())) {\n smsSenderAdd.getProperties().stream()\n .filter(property -> property.getKey().startsWith(INLINE_BODY_PARAM_PREFIX))\n .forEach(property -> inlineBodyProperties.put(property.getKey(), property.getValue()));\n }\n for (Map.Entry property : inlineBodyProperties.entrySet()) {\n inlineBody =\n inlineBody.replace(PLACEHOLDER_IDENTIFIER + property.getKey(), (CharSequence) property.getValue());\n }\n return inlineBody;\n }",
"public static void main(String[] args) {\n ConnectionFactory connectionFactory = new ConnectionFactory();\n connectionFactory.setHost(\"localhost\");\n\n try {\n Connection connection = connectionFactory.newConnection();\n Channel channel = connection.createChannel();\n channel.basicQos(3);\n\n channel.exchangeDeclare(EXCHANGE_NAME, EXCHANGE_TYPE);\n // создаем временную очередь со случайным названием\n String queue = channel.queueDeclare().getQueue();\n\n // привязали очередь к EXCHANGE_NAME\n channel.queueBind(queue, EXCHANGE_NAME, \"\");\n\n DeliverCallback deliverCallback = (consumerTag, message) -> {\n System.out.println(\"Creating deduction file for \" + new String(message.getBody()));\n String[] info = new String(message.getBody()).split(\" \");\n try {\n String fileName = DEST_FOLDER + info[0] + \" \" + info[1] + \".pdf\";\n File file = new File(fileName);\n file.getParentFile().getParentFile().mkdirs();\n\n PdfReader pdfReader = new PdfReader(SRC);\n PdfWriter pdfWriter = new PdfWriter(fileName);\n PdfDocument doc = new PdfDocument(pdfReader, pdfWriter);\n PdfAcroForm form = PdfAcroForm.getAcroForm(doc, true);\n Map<String, PdfFormField> fields = form.getFormFields();\n fields.get(\"name\").setValue(info[0]);\n fields.get(\"surname\").setValue(info[1]);\n fields.get(\"age\").setValue(info[4]);\n fields.get(\"passport\").setValue(info[2] + \" \" + info[3]);\n fields.get(\"given\").setValue(info[5]);\n\n doc.close();\n channel.basicAck(message.getEnvelope().getDeliveryTag(), false);\n } catch (IOException e) {\n System.err.println(\"FAILED\");\n channel.basicReject(message.getEnvelope().getDeliveryTag(), false);\n }\n };\n\n channel.basicConsume(queue, false, deliverCallback, consumerTag -> {\n });\n } catch (IOException | TimeoutException e) {\n throw new IllegalArgumentException(e);\n }\n }",
"public static TemplateDataSource fromJSON(JSONObject jsonObj) throws IllegalArgumentException {\n try {\n if (!jsonObj.optString(\"_type\", \"TemplateDataSource\").equals(\"TemplateDataSource\")) {\n throw new IllegalArgumentException(\"jsonObj does not represent a TemplateDataSource.\");\n }\n \n TemplateDataSource output = new TemplateDataSource();\n \n @SuppressWarnings(\"unchecked\")\n Set<String> keySet = jsonObj.keySet();\n keySet.stream()\n .filter( key -> !key.equals(\"_type\") && !key.equals(\"parentTemplate\") )\n .forEach( key -> {\n try {\n output.put(key, Path.fromJSON(jsonObj.get(key)));\n } catch (IllegalArgumentException | JSONException e) {\n // silently ignore exceptions, but log the exception\n e.printStackTrace();\n }\n });\n return output;\n } catch (JSONException e) {\n throw new IllegalArgumentException(\"Could not parse JSON as a TemplateDataSource.\", e);\n }\n }",
"public DocumentItem addAttachment(DocumentItemType type, Date date, String title, String mimeType, String body, String href) {\n final WindowViewer w = Platform.getWindowViewer();\n RenderableDataItem row = w.createRow(5, true);\n\n row.get(0).setValue(type.toString().toLowerCase(Locale.US));\n row.get(1).setValue(title);\n\n RenderableDataItem item = row.get(2);\n\n item.setType(RenderableDataItem.TYPE_DATETIME);\n item.setValue(date);\n row.get(3).setValue(\"false\");\n row.get(4).setValue(href);\n\n DocumentItem di = new DocumentItem(body, mimeType, type);\n\n di.rowData = row;\n\n if (docAttachments == null) {\n docAttachments = new ArrayList<Document.DocumentItem>(5);\n }\n\n docAttachments.add(di);\n return di;\n }",
"public static void Producer(String json) {\n\t\tConnection connection = null;\n\t\tConnectionFactory connectionFactory = new ActiveMQConnectionFactory(\"tcp://localhost:61616\");\n\t\ttry {\n\t\t\tconnection = connectionFactory.createConnection();\n\t\t\tSession session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\n\t\t\tQueue queue = session.createQueue(\"customerMaildetails\");\n\t\t\tMessageProducer producer = session.createProducer(queue);\n\t\t\tString payload = json;\n\t\t\tMessage message = session.createTextMessage(payload);\n\t\t\tSystem.out.println(\"Sending text '\" + payload + \"'\");\n\t\t\tproducer.send(message);\n\t\t\tsession.close();\n\t\t} catch (JMSException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (JMSException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"private MqttMessage messageFromJSON(JSONObject jsMsg) {\n\t\tMqttMessage result = null;\n\t\ttry {\n\t\t\t// There seems no good way to turn a JSONArray (of number)\n\t\t\t// into a Java byte array, so use brute force\n\t\t\tJSONArray jsPayload = jsMsg.getJSONArray(PAYLOAD);\n\t\t\tbyte[] payload = new byte[jsPayload.length()];\n\t\t\tfor (int i = 0; i < jsPayload.length(); i++) {\n\t\t\t\tpayload[i] = (byte) jsPayload.getInt(i);\n\t\t\t}\n\t\t\tresult = new MqttMessage(payload);\n\t\t\tresult.setQos(jsMsg.optInt(QOS, 0));\n\t\t\tresult.setRetained(jsMsg.optBoolean(RETAINED, false));\n\t\t} catch (JSONException e) {\n\t\t\ttraceException(TAG, \"messageFromJSON\", e);\n\t\t}\n\n\t\treturn result;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic static<T> T createObjectFromJSON(final JSONObject json) throws JSONException {\n\t\tif(json.has(\"type\")) {\n\t\t\treturn (T) Helper.createItemFromJSON(json);\n\t\t} else if(json.has(\"triple_pattern\")) {\n\t\t\treturn (T) Helper.createTriplePatternFromJSON(json);\n\t\t} else if(json.has(\"histogram\")) {\n\t\t\treturn (T) Helper.createVarBucketFromJSON(json);\n\t\t} else {\n\t\t\tSystem.err.println(\"lupos.distributed.operator.format.Helper.createObjectFromJSON(...): Unknown type stored in JSON object, returning null!\");\n\t\t\treturn null;\n\t\t}\n\t}",
"protected abstract JsonObject submitBuild(CloseableHttpClient httpclient,\n File archive, String buildName, String originator) throws IOException;",
"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 }",
"@ApiMethod(name = \"sendEmail\", path = \"sendEmail\", httpMethod = HttpMethod.POST)\npublic EmailForm sendEmail(final EmailForm emailForm)\n throws UnauthorizedException, ConflictException {\n\n\tif(emailForm.getEmailAddress() == null){\n throw new ConflictException(\"You must enter an email address\");\n }\n\tif(emailForm.getMessage() == null){\n throw new ConflictException(\"You must enter a message\");\n\t}\n\tif(emailForm.getName() == null){\n throw new ConflictException(\"You must enter a name\");\n\t}\t\n\tif(emailForm.getSubject() == null){\n throw new ConflictException(\"You must enter an email subject\");\n\t} \n\t\n\tfinal Queue queue = QueueFactory.getDefaultQueue();\n \n\n // Start transactions\n EmailForm email = ofy().transact(new Work<EmailForm>(){\n \t@Override\n \tpublic EmailForm run(){\n \n queue.add(ofy().getTransaction(),\n \t\tTaskOptions.Builder.withUrl(\"/tasks/send_email\")\n \t\t.param(\"emailAddress\", emailForm.getEmailAddress())\n \t\t.param(\"message\", emailForm.getMessage())\n \t\t.param(\"subject\", emailForm.getSubject())\n \t\t.param(\"name\", emailForm.getName()));\n return emailForm;\n \t}\n }); \n return email;\n}",
"public Message createEventMessage() throws JMSException\n {\n TextMessage msg = _session.createTextMessage();\n msg.setText(_payload);\n msg.setStringProperty(Statics.FILENAME_PROPERTY, new File(_filename).getName());\n\n return msg;\n }",
"Message create(MessageInvoice invoice);",
"private String prepareEmailBody() {\n\t\tString s1 = \"Layout Name: \" + layout_name + \"\\n\";\n\t\tString s2 = \"Number of categories: \" + buttonCount + \"\\n\";\n\t\tString s3 = \"Starting time: \" + startCountTime + \"\\n\";\n\t\tDate nowTime = new Timestamp(System.currentTimeMillis());\n\t\tString s4 = \"Sending time: \" + nowTime + \"\\n\\n\";\n\t\tString s5 = \"\";\n\t\tfor (int i = 0; i < buttonCount; i++) {\n\t\t\ts5 += \"Category \" + (i+1) + \": \" + textArray.get(i) + \"\\n\";\n\t\t\ts5 += \" Count: \" + catCounters.get(i) + \"\\n\";\n\t\t}\n\t\t\n\t\t// JSON version\n\t\tString s10 = \"\\n/* ***************\\n * JSON String\\n */\\n\";\n\t\tString s20 = \"{\\n\";\n\t\tString s21 = \" \\\"layoutName\\\" : \\\"\" + layout_name + \"\\\",\\n\";\n\t\tString s22 = \" \\\"categoryCount\\\" : \" + buttonCount + \",\\n\";\n\t\tString s23 = \" \\\"startTimestamp\\\" : \\\"\" + startCountTime + \"\\\",\\n\";\n\t\tString s24 = \" \\\"sendTimestamp\\\" : \\\"\" + nowTime + \"\\\",\\n\";\n\t\tString s25 = \" \\\"data\\\" : [\\n\";\n\t\tString s30 = \"\";\n\t\tfor (int i = 0; i < buttonCount; i++) {\n\t\t\ts30 += \" {\\n\";\n\t\t\ts30 += \" \\\"categoryNumber\\\" : \" + (i+1) + \",\\n\";\n\t\t\ts30 += \" \\\"categoryName\\\" : \\\"\" + textArray.get(i) + \"\\\",\\n\";\n\t\t\ts30 += \" \\\"categoryCount\\\" : \" + catCounters.get(i) + \"\\n\";\n\t\t\tif (i < (buttonCount - 1)) {\n\t\t\t\ts30 += \" },\\n\";\n\t\t\t} else {\n\t\t\t\ts30 += \" }\\n\";\n\t\t\t}\n\t\t}\n\t\tString s32 = \" ]\\n\";\n\t\tString s33 = \"}\\n\";\n\t\tString s40 = \"/* ***************\\n * end JSON String\\n */\";\n\t\t\n\t\treturn s1 + s2 +s3 + s4 + s5 + s10 + s20 + s21 + s22 + s23 + s24 + s25 + s30 + s32 + s33 + s40;\n\t}",
"void send(String emailName, Map model, Locale locale);",
"static TodoItem fromJsonObject(JsonObject json) {\n TodoItem item = new TodoItem();\n item.setId(json.get(\"id\") == null ? -1 : json.getInt(\"id\"));\n item.setDescription(json.get(\"description\") == null ? null : json.getString(\"description\"));\n item.setCreatedAt(json.get(\"createdAt\") == null ? null : OffsetDateTime.parse(json.getString(\"createdAt\")));\n item.setDone(json.get(\"done\") == null ? false : json.getBoolean(\"done\"));\n LOGGER.fine(()->\"fromJsonObject returns:\"+item);\n return item;\n }",
"private XContentBuilder createMappingObject() throws IOException {\n return XContentFactory.jsonBuilder()\n .startObject()\n .startObject(type)\n .startObject(ES_PROPERTIES)\n .startObject(\"externalId\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"sourceUri\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"kind\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"name\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"fields\")\n .field(ES_TYPE, ES_TYPE_NESTED)\n .startObject(ES_PROPERTIES)\n .startObject(\"name\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"value\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .endObject()\n .endObject()\n .endObject()\n .endObject()\n .endObject();\n }",
"private static MimeMessage createEmail(String to,\n String from,\n FormattedOutput formattedTeacherOutput) throws MessagingException {\n Properties props = new Properties();\n Session session = Session.getDefaultInstance(props, null);\n\n MimeMessage email = new MimeMessage(session);\n email.setFrom(new InternetAddress(from));\n email.addRecipient(javax.mail.Message.RecipientType.TO,\n new InternetAddress(to));\n email.setSubject(formattedTeacherOutput.subject());\n email.setContent(formattedTeacherOutput.entireHtml(), \"text/html\");\n return email;\n }",
"protected abstract Message createMessage(Object object, MessageProperties messageProperties);",
"java.lang.Object setupBuild(java.util.Map properties) throws org.apache.ant.common.util.ExecutionException;",
"public Attachment createAttachmentWithContent(String assetId, String name, Attachment attachmentMetadata, String contentType,\n InputStream attachmentContentStream, UriInfo uriInfo) throws InvalidJsonAssetException, AssetPersistenceException, NonExistentArtefactException {\n\n String url = attachmentMetadata.getUrl();\n if (url != null) {\n throw new InvalidJsonAssetException(\"An attachment should not have the URL set if it is created with content\");\n }\n\n String stringType = attachmentMetadata.getLinkType();\n if (stringType != null) {\n throw new InvalidJsonAssetException(\"The link type must not be set for an attachment with content\");\n }\n\n return createAttachment(assetId, name, attachmentMetadata, contentType, attachmentContentStream, uriInfo);\n }",
"public static ClientResponse sendSimpleMail(String from, String[] to, String subject, String body) throws Exception{\n\t\t\n\t if(from == null || from == \"\"){\n\t\t throw new Exception(\"Please set email sender properly.\");\n\t }\n\t \n\t if(to == null || to.length == 0){\n\t\t throw new Exception(\"Please set email recipients properly.\");\n\t }\n\t \n Client client = Client.create();\n client.addFilter(new HTTPBasicAuthFilter(\"api\",\n \"key-1xigy8-dpzbuy6euywdr2se-6yiu88d3\"));\n WebResource webResource =\n client.resource(\"https://api.mailgun.net/v2/tchat.mailgun.org/messages\");\n MultivaluedMapImpl formData = new MultivaluedMapImpl();\n // Set email sender\n formData.add(\"from\", from);\n // Set email recipients.\n for(int i = 0; i < to.length; i ++){\n \t formData.add(\"to\", to[i]);\n }\n // Set email subject\n formData.add(\"subject\", subject);\n // Set email body\n formData.add(\"text\", body);\n return webResource.type(MediaType.APPLICATION_FORM_URLENCODED).post(ClientResponse.class, formData);\n\t}",
"@GetMapping(\"/publishJson\")\n\tpublic String publishMessage() {\n\t\n\t\tfinal String uri = \"http://localhost:8080/getBooks\";\n\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tResponseEntity<Object> responseEntity = restTemplate.getForEntity(uri, Object.class);\n \n\t\t// We have changed the Kafka publisher config to handle serialization\n\t\t// TODO: handle deserialising both string and Json together\n\t\t\n\t\tkafkaTemplate.send(topic, responseEntity.getBody() );\n\t\treturn \"Json Data published\";\n\t}",
"public String autocreateJSON(String filePath, JSONObject jsonObject) throws ExistException, UnderlyingStorageException, UnimplementedException {\n \t\ttry {\n \t\t\tDocument doc=cspace266Hack_munge(jxj.json2xml(jsonObject));\n \t\t\tSystem.err.println(\"153 got \"+doc.asXML());\n \t\t\tReturnedURL url = conn.getURL(RequestMethod.POST,\"collectionobjects/\",doc);\n \t\t\tif(url.getStatus()>299 || url.getStatus()<200)\n \t\t\t\tthrow new UnderlyingStorageException(\"Bad response \"+url.getStatus());\n \t\t\treturn url.getURLTail();\n \t\t} catch (BadRequestException e) {\n \t\t\tthrow new UnderlyingStorageException(\"Service layer exception\",e);\n \t\t} catch (InvalidXTmplException e) {\n \t\t\tthrow new UnimplementedException(\"Error in template\",e);\n \t\t}\n \t}",
"public void sendMail(String to, String templateName, Object... parameters);",
"@Override\n\tpublic ReceiveMessageAction translateToAction(JSONObject json)\n\t{\n\t\t\n\t\tJSONValue jsonObject = json.get(\"success\");\n\t\tJSONObject userObject = jsonObject.isArray().get(0).isObject();\n\t\t\n\t\tInteger id = JSONHelper.getIntValue(userObject, JSONHelper.convertKeyName(ReceiveMessageKeys.ID));\n\t\tString authorUserName = JSONHelper.getStringValue(userObject, JSONHelper.convertKeyName(ReceiveMessageKeys.AUTHOR_USER_NAME));\n\t\tString message = JSONHelper.getStringValue(userObject, JSONHelper.convertKeyName(ReceiveMessageKeys.MESSAGE));\n\t\tLong receivedAt = JSONHelper.getLongValue(userObject, JSONHelper.convertKeyName(ReceiveMessageKeys.RECEIVED_AT));\n\t\t\n\t\t// TODO look into time conversion more\n\t\t// put into JSONHelper?\n\t\t\n\t\tMessage msg= new Message();\n\t\tmsg.setId(id);\n\t\tmsg.setAuthorUserName(authorUserName);\n\t\tmsg.setMessage(message);\n\t\tmsg.setReceivedAt(new Date(receivedAt));\n\t\t\n\t\t\t\t\n\t\t// possibly use builder pattern if it is a lot of data\n\t\tReceiveMessageAction action = new ReceiveMessageAction(msg);\t\n\t\n\t\treturn action;\n\t}",
"private NewIssueDTO createIssueDTO(String title, String content, IssueState state, List<Long> idList, List<Long> attachments) {\n Issue simpleIssue = new Issue();\n simpleIssue.setContent(content);\n simpleIssue.setDate(new Date());\n simpleIssue.setTitle(title);\n simpleIssue.setState(state);\n\n NewIssueDTO issueDto = new NewIssueDTO();\n issueDto.setIssue(simpleIssue);\n issueDto.setLabelIdList(idList);\n issueDto.setAttachments(attachments);\n return issueDto;\n }",
"public AddAPISourceResponse addApiSource(String jsonString) throws ImporterException {\n\n\n HttpHeaders requestHeaders = new HttpHeaders();\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false); //root name of class, same root value of json\n mapper.configure(SerializationFeature.EAGER_SERIALIZER_FETCH, true);\n\n HttpEntity<String> request;\n request = new HttpEntity<>(jsonString ,requestHeaders);\n //String jsonResponse = restTemplate.postForObject(\"http://Import-Service/Import/addApiSource\", request, String.class);\n\n ResponseEntity<?> importResponse = null;\n //importResponse = restTemplate.exchange(\"http://Import-Service/Import/addApiSource\",HttpMethod.POST,request,new ParameterizedTypeReference<ServiceErrorResponse>() {});\n\n if(importResponse != null && importResponse.getBody().getClass() == ServiceErrorResponse.class) {\n ServiceErrorResponse serviceErrorResponse = (ServiceErrorResponse) importResponse.getBody();\n if(serviceErrorResponse.getErrors() != null) {\n String errors = serviceErrorResponse.getErrors().get(0);\n for(int i=1; i < serviceErrorResponse.getErrors().size(); i++){\n errors = \"; \" + errors;\n }\n\n throw new ImporterException(errors);\n }\n }\n\n importResponse = restTemplate.exchange(\"http://Import-Service/Import/addApiSource\",HttpMethod.POST,request,new ParameterizedTypeReference<AddAPISourceResponse>() {});\n return (AddAPISourceResponse) importResponse.getBody();\n }",
"private Boolean sendEmailUpdate(String message) {\n MailjetClient client;\n MailjetRequest request;\n MailjetResponse response;\n\n String api_key = \"INSERT PRIMARY API KEY HERE!\";\n String secret_key = \"INSERT SECRET KEY HERE!\";\n\n ClientOptions clientOptions = ClientOptions.builder().apiKey(api_key).apiSecretKey(secret_key).build();\n\n printLog(\"created the client and stuff, trying to send an email now!\");\n\n client = new MailjetClient(clientOptions);\n\n printLog(\"created the client with the required options\");\n\n String from_email_id = \"[email protected]\";\n String from_email_name = \"Xpense Auditor Group 11\";\n\n String subject = \"XpenseAuditorG11 -> Shared Expense Alert!\";\n String textpart = \"Shared expense notification message\";\n String content = \"<h3>You've been added to an expense!</h3><br />You were added to an expense at \" + shop + \", costing \" + amt + \", for \" + cat;\n String id = \"xpense_auditor_g11_message\";\n\n // try block\n try {\n request = new MailjetRequest(Emailv31.resource)\n .property(Emailv31.MESSAGES, new JSONArray()\n .put(new JSONObject()\n .put(Emailv31.Message.FROM, new JSONObject()\n .put(\"Email\", from_email_id)\n .put(\"Name\", from_email_name))\n .put(Emailv31.Message.TO, new JSONArray()\n .put(new JSONObject()\n .put(\"Email\", email)\n .put(\"Name\", email)))\n .put(Emailv31.Message.SUBJECT, subject)\n .put(Emailv31.Message.TEXTPART, textpart)\n .put(Emailv31.Message.HTMLPART, content)\n .put(Emailv31.Message.CUSTOMID, id)));\n // catching exceptions\n } catch ( JSONException e ) {\n printLog(\"json exception when creating the contents for the email , \" + e.getMessage());\n return false;\n }\n \n printLog(\"created a request with all the contents involved, \" + request.toString());\n \n try {\n response = client.post(request);\n }catch (MailjetException e) {\n printLog(\"exception when sending the email, \" + e.getMessage());\n return false;\n }\n printLog(\"email response status : \" + response.getStatus());\n \n printLog(\"email response data : \" + response.getData());\n \n return true;\n }",
"public void testDynamicMailto() {\r\n Map<String, String> parameters = new HashMap<String, String>();\r\n ConnectionParameters cp = new ConnectionParameters(new MockConnectionEl(parameters,\r\n \"mailto:$address?subject=$subject\"), MockDriverContext.INSTANCE);\r\n final Map<String,String> params = new HashMap<String, String>();\r\n MailConnection mc = new MailConnection(cp) {\r\n @Override\r\n protected void send(MimeMessage message) {\r\n try {\r\n assertEquals(params.get(\"address\"), message.getRecipients(Message.RecipientType.TO)[0].toString());\r\n assertEquals(\"Message. \"+params.get(\"example\"), message.getContent());\r\n assertEquals(params.get(\"subject\"), message.getSubject());\r\n } catch (Exception e) {\r\n throw new IllegalStateException(e);\r\n }\r\n\r\n }\r\n };\r\n params.put(\"address\", \"[email protected]\");\r\n params.put(\"example\", \"*example*\");\r\n params.put(\"subject\", \"Hello1\");\r\n mc.executeScript(new StringResource(\"Message. $example\"), MockParametersCallbacks.fromMap(params));\r\n params.put(\"address\", \"[email protected]\");\r\n params.put(\"subject\", \"Hello2\");\r\n mc.executeScript(new StringResource(\"Message. $example\"), MockParametersCallbacks.fromMap(params));\r\n params.put(\"address\", \"////@\");\r\n try {\r\n mc.executeScript(new StringResource(\"Message. $example\"), MockParametersCallbacks.fromMap(params));\r\n } catch (MailProviderException e) {\r\n assertTrue(\"Invalid address must be reported\", e.getMessage().indexOf(\"////@\")>=0);\r\n }\r\n\r\n\r\n }",
"public void testSendEmail2()\n throws Exception\n {\n Gitana gitana = new Gitana();\n\n // authenticate\n Platform platform = gitana.authenticate(\"admin\", \"admin\");\n\n // create a domain and a principal\n Domain domain = platform.createDomain();\n DomainUser user = domain.createUser(\"test-\" + System.currentTimeMillis(), TestConstants.TEST_PASSWORD);\n user.setEmail(\"[email protected]\");\n user.update();\n\n // create an application\n Application application = platform.createApplication();\n\n // create an email provider\n EmailProvider emailProvider = application.createEmailProvider(\n JSONBuilder.start(EmailProvider.FIELD_HOST).is(\"smtp.gmail.com\")\n .and(EmailProvider.FIELD_USERNAME).is(\"[email protected]\")\n .and(EmailProvider.FIELD_PASSWORD).is(\"buildt@st11\")\n .and(EmailProvider.FIELD_SMTP_ENABLED).is(true)\n .and(EmailProvider.FIELD_SMTP_IS_SECURE).is(true)\n .and(EmailProvider.FIELD_SMTP_REQUIRES_AUTH).is(true)\n .and(EmailProvider.FIELD_SMTP_STARTTLS_ENABLED).is(true)\n .get()\n );\n\n // create an email\n Email email = application.createEmail(\n JSONBuilder.start(Email.FIELD_BODY).is(\"Here is a test body\")\n .and(Email.FIELD_FROM).is(\"[email protected]\")\n .get()\n );\n email.setToDomainUser(user);\n email.update();\n\n // send the email\n emailProvider.send(email);\n\n // check to ensure was marked as sent, along with some data\n email.reload();\n assertTrue(email.getSent());\n assertNotNull(email.dateSent());\n assertNotNull(email.getSentBy()); \n }",
"public static MimeMessage createEmail(String from, String to, String bcc, String subject,\n String bodyText) throws MessagingException {\n\n showLog(\"GmailUtils - createEmail()\");\n\n Properties props = new Properties();\n Session session = Session.getDefaultInstance(props, null);\n MimeMessage email = new MimeMessage(session);\n email.setFrom(new InternetAddress(from));\n email.addRecipient(javax.mail.Message.RecipientType.TO,\n new InternetAddress(to));\n if (!bcc.equals(\"\")) {\n email.addRecipient(javax.mail.Message.RecipientType.BCC,\n new InternetAddress(bcc));\n }\n email.setSubject(subject);\n email.setText(bodyText);\n return email;\n }",
"Delivery createDelivery();",
"private Email transformEmail(Message mess, String uid, String attachId) throws IOException, MessagingException {\n Email email = new Email();\n email.setUserId(getUserId());\n email.setSender(convertAddressToString(mess.getFrom()));\n if (mess.getFolder() != null) {\n email.setFolder(mess.getFolder().getName());\n } else {\n email.setFolder(\"outbox\");\n }\n // Address[] replyadd = mess.getReplyTo();\n email.setReceiver(convertAddressToString(mess.getRecipients(Message.RecipientType.TO)));\n email.setBcc(convertAddressToString(mess.getRecipients(Message.RecipientType.BCC)));\n email.setSentDate(mess.getSentDate());\n email.setEmailUid(uid);\n email.setSubject(decodeMess(mess.getSubject()));\n if (mess.getContent() instanceof Multipart) {\n\n String[] content = getHTMLContentMessage(mess, email.getFolder());\n\n if (content[0] == null) {\n email.setContent(fetchText((Part) mess, true, true));\n email.setAttachmentId(content[1]);\n } else {\n email.setContent(content[0]);\n email.setAttachmentId(content[1]);\n }\n\n } else {\n email.setContent(fetchText((Part) mess, true, true));\n }\n\n if (\"outbox\".equalsIgnoreCase(email.getFolder())) {\n attachId = attachId.replaceAll(\";\", \"; \");\n email.setAttachmentId(attachId);\n }\n email.setRecipients(convertAddressToString(mess.getRecipients(Message.RecipientType.CC)));\n return email;\n }",
"@Override\n public File createFile(String path) throws IOException {\n String pathStr=path+fileSeparator+\"Mail.json\";\n File file = new File(pathStr);\n file.createNewFile();\n return file;\n }",
"public Cause(JSONObject json) {\n\n try {\n this.id = json.getInt(ID_COLUMN);\n this.description = json.getString(DESCRIPTION_COLUMN);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n this.description = Html.fromHtml(this.description, Html.FROM_HTML_MODE_LEGACY).toString();\n } else {\n this.description = Html.fromHtml(this.description).toString();\n }\n this.money = json.getString(MONEY_COLUMN);\n this.votes = json.getString(VOTES_COLUMN);\n\n this.association = new Association(json.getJSONObject(ASSOCIATION_COLUMN));\n this.videos = parseUrlArray(json.getJSONArray(\"videos\"));\n this.documents = parseUrlArray(json.getJSONArray(JSONFields.DOCUMENTS_ARRAY_COLUMN));\n\n initializeYouTubeThumbnailLink();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n }",
"@Override\r\n\tpublic BuilderResponse call() throws Exception {\n\t\tint createsSubmitted = 0;\r\n\t\tint pendingCreates = 0;\r\n\t\t// Walk over the source list\r\n\t\tMap<MigratableObjectType, Set<String>> batchesToCreate = new HashMap<MigratableObjectType, Set<String>>();\r\n\t\tfor(MigratableObjectData source: sourceList){\r\n\t\t\t// Is this entity already in the destination?\r\n\t\t\tif(!destMap.containsKey(source.getId())){\r\n\t\t\t\t// We can only add this entity if its dependencies are in the destination\r\n\t\t\t\tif(JobUtil.dependenciesFulfilled(source, destMap.keySet())) {\r\n\t\t\t\t\tMigratableObjectType objectType = source.getId().getType();\r\n\t\t\t\t\tSet<String> batchToCreate = batchesToCreate.get(objectType);\r\n\t\t\t\t\tif (batchToCreate==null) {\r\n\t\t\t\t\t\tbatchToCreate = new HashSet<String>();\r\n\t\t\t\t\t\tbatchesToCreate.put(objectType, batchToCreate);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbatchToCreate.add(source.getId().getId());\r\n\t\t\t\t\tcreatesSubmitted++;\r\n\t\t\t\t\tif(batchToCreate.size() >= this.batchSize){\r\n\t\t\t\t\t\tJob createJob = new Job(batchToCreate, objectType, Type.CREATE);\r\n\t\t\t\t\t\tthis.queue.add(createJob);\r\n\t\t\t\t\t\tbatchesToCreate.remove(objectType);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// This will get picked up in a future round.\r\n\t\t\t\t\tpendingCreates++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Submit any creates left over\r\n\t\tfor (MigratableObjectType objectType : batchesToCreate.keySet()) {\r\n\t\t\tSet<String> batchToCreate = batchesToCreate.get(objectType);\r\n\t\t\tif(!batchToCreate.isEmpty()){\r\n\t\t\t\tJob createJob = new Job(batchToCreate, objectType, Type.CREATE);\r\n\t\t\t\tthis.queue.add(createJob);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbatchesToCreate.clear();\r\n\t\t// Report the results.\r\n\t\treturn new BuilderResponse(createsSubmitted, pendingCreates);\r\n\t}"
]
| [
"0.58257824",
"0.5426481",
"0.52679276",
"0.51658076",
"0.50887346",
"0.49714112",
"0.4935553",
"0.49311817",
"0.49066758",
"0.48240066",
"0.47932035",
"0.47853845",
"0.47233123",
"0.47159493",
"0.47103474",
"0.47100994",
"0.46855512",
"0.46753275",
"0.46569043",
"0.46377537",
"0.46007165",
"0.4600022",
"0.45940027",
"0.458713",
"0.45493346",
"0.45467675",
"0.45379868",
"0.4521001",
"0.45207363",
"0.4520254",
"0.45078498",
"0.44967708",
"0.44956562",
"0.44866294",
"0.44750834",
"0.44744822",
"0.44565675",
"0.44412705",
"0.4429986",
"0.442754",
"0.44268373",
"0.44151855",
"0.4405639",
"0.43841043",
"0.438406",
"0.43806076",
"0.43672287",
"0.43669543",
"0.436061",
"0.43602377",
"0.43543404",
"0.43530965",
"0.4351431",
"0.4346793",
"0.433986",
"0.43340847",
"0.43291056",
"0.43094468",
"0.4302849",
"0.43027422",
"0.4292976",
"0.42895612",
"0.42894432",
"0.42861822",
"0.42859846",
"0.42854437",
"0.42785883",
"0.42759207",
"0.42699334",
"0.426978",
"0.42558053",
"0.4251638",
"0.42482343",
"0.42480338",
"0.42436764",
"0.42418453",
"0.4238119",
"0.42357677",
"0.4232401",
"0.42202112",
"0.42189854",
"0.42186677",
"0.42055643",
"0.4203845",
"0.42019814",
"0.41946843",
"0.41815287",
"0.41776413",
"0.4177237",
"0.4169342",
"0.4162639",
"0.416249",
"0.41592386",
"0.41578645",
"0.41560853",
"0.41549727",
"0.41481495",
"0.41423947",
"0.41250822",
"0.41235635"
]
| 0.6792821 | 0 |
/ This is the start of the running of commands | @EventHandler
public void onInventoryClick(InventoryClickEvent event) {
//if clicked outside of area, return
if(event.getCurrentItem() == null){
return;
}
//test if this is one of our menus
Menu menu = null;
Boolean ourMenu = false;
for (Menu m : plugin.menuList) {
if (m.getMenuName().equalsIgnoreCase(event.getClickedInventory().getName())){
menu = m;
ourMenu = true;
break;
}
}
if (!ourMenu) {
//not our menu
return;
}
//it is our GUI
//stop moving item straight away
event.setCancelled(true);
Player player = (Player) event.getWhoClicked();
//get item through slot that was clicked
int clickedSlot = event.getSlot();
Item item = menu.getItems().stream().filter((i) -> i.getSlot() == clickedSlot).findFirst().orElse(null);
//if item clicked is null, just do nothing
if (item == null) {
return;
}
//get stored arrays
CommandMemory savedCmds = plugin.cmdMemoryList.stream()
.filter((cm) -> cm.uuid.equalsIgnoreCase(player.getUniqueId().toString()))
.findFirst()
.orElse(null);
//check that we actually have the command saved
if (savedCmds == null) {
//command has not been saved
plugin.console.log("Unable to find saved ARgs");
return;
}
String CommandToRun;//this string will hold every command
//execute console commands
for (String consoleCMD : item.getCommands()) {
CommandToRun = consoleCMD.replace("{player}", player.getName());//puts this player in the command
//add in args
for (Argument a : savedCmds.args) {
CommandToRun = CommandToRun.replace("$arg" + a.getArgNum(), a.getName());
}
//run command
if (CommandToRun.contains("[console]")) {
//run as console
plugin.getServer()
.dispatchCommand(
plugin.getServer().getConsoleSender(),
CommandToRun.replace("[console]", "").trim());
} else if (CommandToRun.contains("[player]")) {
//run as player
player.performCommand(CommandToRun.replace("[player]", "").trim());
} else if (CommandToRun.contains("[message]")) {
//message caller
player.sendMessage(menu.getPrefix()
+ ChatColor.RESET
+ CommandToRun.replace("[message]", "").trim());
} else if (CommandToRun.contains("[close]")) {
//close menu
player.closeInventory();//close invent for player
plugin.cmdMemoryList.remove(savedCmds);
} else if (CommandToRun.contains("[refresh]")) {
//refresh item that was clicked
menu.refreshMenu(event);
} else {
//don't know how to handle.... let console know
plugin.console.log("Unknown command: " + CommandToRun);
//let player know
player.sendMessage(menu.getPrefix() + ChatColor.RED + "There was a problem with running your command. Please report this.");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void command() {\n List<String> commands = new ArrayList<>();\n commands.add(\": start\");\n commands.add(\": exit\");\n commands.add(\": help\");\n commands.add(\": commands\");\n\n for (String command : commands) {\n System.out.println(command);\n }\n System.out.println();\n }",
"private void start() {\n\n\t}",
"public void start() {\n String command = \"\";\n boolean exitCommandIsNotGiven = true;\n System.out.println(\"\\nSorting Algorithms Demonstration\\n\");\n\n while (exitCommandIsNotGiven) {\n command = initialMenu(command);\n exitCommandIsNotGiven = handleStartMenuCommands(command);\n }\n }",
"private void before() {\n\t\tSystem.out.println(\"程序开始执行!\");\n\t}",
"public void intialRun() {\n }",
"public void start()\r\n\t{\n\tSystem.out.println(\"normal start method\");\r\n\t}",
"public void start() {\n\t\t\n\t}",
"public void start() {\n\t\t\n\t}",
"public void start() {\n\n\t}",
"public static void main(String[] args){\n//\t\tnew Selection().start();\n//\t\tnew Selection().start();\n//\t\tnew Insertion().start();\n\t\tnew Insertion().start();\n\t\tnew Insertion().start();\n\t\tnew Insertion().start();\n\t}",
"public void start() {\n System.out.println(\"start\");\n }",
"public void start() {\n io.println(\"Welcome to 2SAT-solver app!\\n\");\n String command = \"\";\n run = true;\n while (run) {\n while (true) {\n io.println(\"\\nType \\\"new\\\" to insert an CNF, \\\"help\\\" for help or \\\"exit\\\" to exit the application\");\n command = io.nextLine();\n if (command.equals(\"new\") || command.equals(\"help\") || command.equals(\"exit\")) {\n break;\n }\n io.println(\"Invalid command. Please try again.\");\n }\n switch (command) {\n case \"new\":\n insertNew();\n break;\n case \"help\":\n displayHelp();\n break;\n case \"exit\":\n io.println(\"Thank you for using this app.\");\n run = false;\n }\n\n }\n }",
"public void startExecuting() {}",
"public void run(){\n\t\t\ttry{\n\t\t\t\twhile(true){\n\t\t\t\t\tScanner keyboard = new Scanner(System.in);\n\t\t\t\t\tString line = keyboard.nextLine();\n\t\t\t\t\tString[] command = line.split(\" \");\n\t\t\t\t\tSystem.out.println(execute(line));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}catch(Exception ex){\n\t\t\t\tSystem.err.println(\"Incorrect command \\\"help\\\" for info\");\n\t\t\t\tex.printStackTrace();\n\t\t\t\trun();\n\t\t\t}\n\t\t\t\n\t\t}",
"public void start() {}",
"public void start() {}",
"@Override\n\tvoid start() {\n\t\tSystem.out.println(\"starts\");\n\t}",
"public void initDefaultCommand() {\n \n }",
"public void beginControl() {\n\t\tCommandInfo curCommand;\n\t\tCommandExecutor curCommandExecuter;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\t//take command from the queue\n\t\t\t\tcurCommand = commandsQueue.take();\n\t\t\t} catch(Exception e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t//execute the command\n\t\t\t\tcurCommandExecuter = this.nameCommandMap.get(curCommand.name);\n\t\t\t\tcurCommandExecuter.execute(curCommand.additionalInfo);\n\t\t\t} catch(NewGameException e) {\n\t\t\t\tSystem.out.println(\"Starting new Game!\");\n\t\t\t\tthis.startCountTime();\n\t\t\t} catch(EndGameException e) {\n\t\t\t\tbreak;\n\t\t\t} catch(Exception ignored) {\n\t\t\t}\n\t\t}\n\t\t//stop time counter thread and stop controller's action .\n\t\tthis.stopCountTime();\n\t\tSystem.exit(0);\n\t}",
"public void startCommandLine() {\r\n Object[] messageArguments = { System.getProperty(\"app.name.display\"), //$NON-NLS-1$\r\n System.getProperty(\"app.version\") }; //$NON-NLS-1$\r\n MessageFormat formatter = new MessageFormat(\"\"); //$NON-NLS-1$\r\n formatter.applyPattern(Messages.MainModel_13.toString());\r\n TransportLogger.getSysAuditLogger().info(\r\n formatter.format(messageArguments));\r\n }",
"public void initDefaultCommand() \n {\n }",
"public void start() {\n\t\tSystem.out.println(\"BMW Slef-----start\");\n\t}",
"public void programStart() {\n System.out.println(\"Type 0 to end the program, type 1 to go to Login/Register.\");\n System.out.println(\"Type RESET to complete erase and reset the database.\");\n }",
"public void start() {\n\t\tSystem.out.println(\"BMW.........start!!!.\");\n\t}",
"private void showCommands() {\n System.out.println(\"\\n Commands:\");\n System.out.println(\"\\t lf: List reference frames\");\n System.out.println(\"\\t af: Add a reference frame\");\n System.out.println(\"\\t rf: Remove a reference frame\");\n System.out.println(\"\\t le: List events\");\n System.out.println(\"\\t ae: Add an event\");\n System.out.println(\"\\t re: Remove an event\");\n System.out.println(\"\\t ve: View all events from a certain frame\");\n System.out.println(\"\\t li: Calculate the Lorentz Invariant of two events\");\n System.out.println(\"\\t s: Save the world to file\");\n System.out.println(\"\\t l: Load the world from file\");\n System.out.println(\"\\t exit: Exit the program\");\n }",
"public void initDefaultCommand() {\n\t}",
"public void run() {\n StringBuffer s = new StringBuffer();\n while (true) { //until they enter exit command\n SysLib.cout(\"Shell[\" + ++commandNumber + \"]% \");\n\n SysLib.cin(s); //read input\n\n while(s.toString().trim().equalsIgnoreCase(\"\")) { //if no input was\n // entered\n SysLib.cout(\"Shell[\" + commandNumber + \"]% \");//reprint command #\n SysLib.cin(s); //ask for input\n }\n\n if(s.toString().equalsIgnoreCase(\"exit\")) //exit case command\n break;\n\n String[] args = SysLib.stringToArgs(s.toString());\n processCommands(args); //spilts and runs the commands\n s.setLength(0);\n }\n SysLib.exit();\n }",
"protected void initDefaultCommand() {\n \t\t\n \t}",
"private CommandLine() {\n\t}",
"public void initDefaultCommand()\n\t{\n\t}",
"public void mainCommands() {\n\t\tint inputId = taskController.getInt(\"Please input the number of your option: \", \"You must input an integer!\");\n\t\tswitch (inputId) {\n\t\tcase 1:\n\t\t\tthis.taskController.showTaskByTime();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tthis.taskController.filterAProject();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tthis.taskController.addTask();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tthis.taskController.EditTask();\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tthis.taskController.removeTask();\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tthis.taskController.saveTaskList();\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Thank you for coming, Bye!\");\n\t\t\tthis.exit = true;\n\t\t\t// save the task list before exit all the time.\n\t\t\tthis.taskController.saveTaskList();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"This is not a valid option, please input 1 ~ 7.\");\n\t\t\tbreak;\n\t\t}\n\n\t}",
"public void start( )\n {\n // Implemented by student.\n }",
"public void initDefaultCommand()\n {\n }",
"private void registerCommands() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"public void initDefaultCommand() {\n }",
"void commandStarted(Command c);",
"@Override\n\tpublic void start() {\n\t\t\tSystem.out.println(\"BMW --- strart\");\n\t}",
"public void run() {\n TasksCounter tc = new TasksCounter(tasks);\n new Window(tc);\n Ui.welcome();\n boolean isExit = false;\n Scanner in = new Scanner(System.in);\n while (!isExit) {\n try {\n String fullCommand = Ui.readLine(in);\n Command c = Parser.commandLine(fullCommand);\n c.execute(tasks, members, storage);\n isExit = c.isExit();\n } catch (DukeException e) {\n Ui.print(e.getMessage());\n }\n }\n }",
"@Override\r\n\tpublic void start() {\n\t\t\r\n\t}",
"public void start() {\n }",
"public void start()\n {\n }",
"public void analyzeCommand(String cmd)\n {\n commandEntered(cmd);\n }",
"@Override\n public void initDefaultCommand() {\n\n }",
"@Override\n public void initDefaultCommand() \n {\n }",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"public void start() {\n\t\tSystem.out.println(\"parent method\");\n\t}",
"private void run()\n {\n searchLexDb(\"^providing_\", true);\n }",
"public void initDefaultCommand() {\n \n }",
"@Override\n\tpublic void start() {\n\n\t}",
"@Override\n protected void start() {\n System.out.println(\"Bike Specific Brake\");\n }",
"public void preExecution() throws CommandListenerException;",
"@Override\r\n\tprotected void initDefaultCommand() {\n\t\t\r\n\t}",
"public void start() {\n\n }",
"@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}",
"@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}",
"@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}",
"public void startExecuting()\n {\n super.startExecuting();\n }",
"public void startup() {\n\t\tstart();\n }",
"public void start()\n {}",
"@Override\n\tprotected void initDefaultCommand() {\n\n\t}",
"@Override\n\tprotected void initDefaultCommand() {\n\n\t}",
"public void startup(){}",
"public void start(){\n return;\n }",
"public void starting();",
"public void start(){\n }",
"public void runProgram()\n\t{\n\t\tintro();\n\t\tfindLength();\n\t\tguessLetter();\n\t\tguessName();\n\t}",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"private void createCommands()\n{\n exitCommand = new Command(\"Exit\", Command.EXIT, 0);\n helpCommand=new Command(\"Help\",Command.HELP, 1);\n backCommand = new Command(\"Back\",Command.BACK, 1);\n}"
]
| [
"0.70910853",
"0.68372494",
"0.67724633",
"0.66008407",
"0.6596015",
"0.657153",
"0.65660226",
"0.65660226",
"0.6536627",
"0.65349555",
"0.6528278",
"0.64412034",
"0.64408684",
"0.64381754",
"0.6416496",
"0.6416496",
"0.6404856",
"0.6396931",
"0.638174",
"0.636838",
"0.636259",
"0.6362446",
"0.63505584",
"0.6350275",
"0.6345889",
"0.63290393",
"0.6324069",
"0.6322616",
"0.63164693",
"0.6294012",
"0.6272026",
"0.6262552",
"0.62578195",
"0.62543654",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.6239079",
"0.62315065",
"0.62286913",
"0.6225913",
"0.62235326",
"0.6220828",
"0.6215962",
"0.6215782",
"0.62065125",
"0.6201377",
"0.61969715",
"0.61969715",
"0.61969715",
"0.61969715",
"0.6195707",
"0.6182493",
"0.6180655",
"0.61722386",
"0.61715734",
"0.6170164",
"0.61682916",
"0.6161561",
"0.6157552",
"0.6157552",
"0.6157552",
"0.615558",
"0.61539173",
"0.61480767",
"0.6132722",
"0.6132722",
"0.61238563",
"0.6117765",
"0.611592",
"0.61144805",
"0.6106031",
"0.61033463",
"0.61033463",
"0.61033463",
"0.61033463",
"0.61033463",
"0.61033463",
"0.61033463",
"0.6099809"
]
| 0.0 | -1 |
Metodo que muestra la informacion | public String Information(int position){
String msg = "";
//ArrayList<String> info = new ArrayList<>();
SQLiteDatabase db = this.getReadableDatabase();
String q = "select * from pedidos where code = " + position;
Cursor reg = db.rawQuery(q,null);
if(reg.moveToFirst()){
do{
msg += "Código: " + reg.getString(0);
msg += "\nTeléfono Cliente: " + reg.getString(2);
msg += "\nDirección Cliente: " + reg.getString(3);
msg += "\nDescripción Cliente: \n" + reg.getString(4);
}while (reg.moveToNext());
}
db.close();
return msg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String getInformacionInstruccion() {\n\treturn \"comando desconocido\";\n }",
"private void mostrarInformacionP(){\n System.out.println(\"Nombre: \"+this.nombre);\n System.out.println(\"Sexo: \"+ this.sexo);\n System.out.println(\"Edad: \" + edad);\n\n }",
"public Informations() {\n initComponents();\n \n Affichage();\n }",
"public abstract String getInfo();",
"public abstract String getInfo();",
"@Override\n public String cualquierMetodo2() {\n return \"Método implementado en la clase hija viaje de incentivo\";\n }",
"Information getInfo();",
"@Override\n\tpublic String info() {\n\t\treturn String.valueOf(super.getDonnee());\n\t}",
"public abstract void displayInfo();",
"String getInfo();",
"public String getInfoString();",
"@Override\n public String getInfo(){\n return info;\n }",
"public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }",
"public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }",
"@Override\r\n\tpublic String getInfo() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getInfo() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic void mostrarinfo(String nombreclase) {\n\t\tsuper.mostrarinfo(nombreclase);\n\t\tSystem.out.println(\"Corte : \" + corte);\n\t\tSystem.out.println(\"Sexo :\" + sexo);\n\t}",
"@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }",
"@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }",
"public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}",
"public String getInfoString() {\n/* 140 */ return this.info;\n/* */ }",
"@Override\n\tpublic String getInfo() {\n\t\treturn null;\n\t}",
"@Override\n public void information() {\n System.out.println(\"\");\n System.out.println(\"Dog :\");\n System.out.println(\"Age : \" + getAge());\n System.out.println(\"Name : \" + getName());\n System.out.println(\"\");\n }",
"@Override\r\n\tpublic void getInfo() {\n\t\tSystem.out.println(\"=== 선생 정보 ===\");\r\n\t\tsuper.getInfo();\r\n\t\tSystem.out.println(\"과목 : \" + text);\r\n\t}",
"public String getInfoText();",
"@Override\r\n\tpublic void getInfo() {\n\t\tSystem.out.println(\"=== 학생 정보 ===\");\r\n\t\tsuper.getInfo();\r\n\t\tSystem.out.println(\"전공 : \" + major); \r\n\t}",
"public String setInfo() {\n\t\treturn \"There is no parameter\";\r\n\t}",
"public void showInformation() {\n\t\tSystem.out.println(\"Title: \" + getTitle());\n\t\tSystem.out.println(\"Time: \" + getTime());\n\t\tSystem.out.println(\"Number: \" + getNumber());\n\t}",
"public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\r\n System.out.printf(\"%-25s\", \"Nama Pasien\");\r\n System.out.println(\": \" + getNama());\r\n System.out.printf(\"%-25s\", \"Tempat, Tanggal Lahir\");\r\n System.out.print(\": \" + getTempatLahir() + \" , \");\r\n getTanggalKelahiran();\r\n System.out.printf(\"%-25s\", \"Alamat\");\r\n System.out.println(\": \" + getAlamat());\r\n System.out.println(\"\");\r\n }",
"public String getInfo() {\n\t\treturn null;\r\n\t}",
"public void startRetriveDataInfo() {\n\t\t\tif (isLog4jEnabled) {\n\t\t\t\n stringBuffer.append(TEXT_2);\n stringBuffer.append(label);\n stringBuffer.append(TEXT_3);\n \n\t\t\t}\n\t\t}",
"@Override\r\n\tpublic void description() {\n\t\tSystem.out.println(\"Seorang yang mengendarai kendaraan dan bekerja\");\r\n\t}",
"public String getInformacion() {\n\t\treturn informacion;\n\t}",
"public static void shoInfo() {\n\t\tSystem.out.println(description);\n\t \n\t}",
"void getInfo() {\n \tSystem.out.println(\"There doesn't seem to be anything here.\");\n }",
"public String info(){\r\n String info =\"\";\r\n info += \"id karyawan : \" + this.idkaryawan + \"\\n\";\r\n info += \"Nama karyawan : \" + this.namakaryawan + \"\\n\";\r\n return info;\r\n }",
"public void majInformation (String typeMessage, String moduleMessage, String corpsMessage) {\n Date date = new Date();\n listMessageInfo.addFirst(dateFormat.format(date)+\" - \"+typeMessage+\" - \"+moduleMessage+\" - \"+corpsMessage);\n }",
"void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}",
"public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }",
"public String getInfo(){\n return \" name: \" + this.name;\n }",
"public String getInfo() {\n return null;\n }",
"private void showInfo() {\n JOptionPane.showMessageDialog(\n this,\n \"Пока что никакой\\nинформации тут нет.\\nДа и вряд ли будет.\",\n \"^^(,oO,)^^\",\n JOptionPane.INFORMATION_MESSAGE);\n }",
"@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }",
"public String getInformation() {\n\t\treturn \"\";\n\t}",
"public String getInformation() {\n\t\treturn \"\";\n\t}",
"public void info()\n {\n System.out.println(toString());\n }",
"public void mostrarInformacion(){\n mostrarInformacionP();\n }",
"public void info(){\r\n System.out.println(\"Title : \" + title);\r\n System.out.println(\"Author . \" + author);\r\n System.out.println(\"Location : \" + location);\r\n if (isAvailable){\r\n System.out.println(\"Available\");\r\n }\r\n else {\r\n System.out.println(\"Not available\");\r\n }\r\n\r\n }",
"public void informarTeclaPressionada( Tecla t );",
"public void printInfo(){\n\t}",
"public void printInfo(){\n\t}",
"@Override\n\tpublic void printInfo() {\n\t\tsuper.printInfo();\n\t\tmessage();\n\t\tdoInternet();\n\t\tmailing();\n\t\tcalling();\n\t\twatchingTV();\n\n\t}",
"protected abstract void info(String msg);",
"public String info() {\n\t\t\tString instrumentsString = \" \";\n\t\t\tfor(Instruments i : Instruments.values()){\n\t\t\t\tinstrumentsString +=i.toString() + \"\\n\";\n\t\t\t}\n\t\t\treturn (\"База данных представляет из себя набор старцев(обьектов Olders),\" +\"\\n\"+\n \"каждый из которых имеет поля :\" +\"\\n\"+\n \"id(уникальный идентификатор)\" +\"\\n\"+\n \"name(имя старца)\" +\"\\n\"+\n \"userid(уникальный идентификатор пользователя, который является его владельцем)\" +\"\\n\"+\n \"dateofinit-дата инициализация старца\");\n\t\t}",
"@Override\n public String getInfo() {\n return this.info;\n }",
"public void reestablecerInfo(){\n panelIngresoControlador.getPanelIngreso().reestablecerInfo();\n }",
"@Override\n public void afficher() {\n super.afficher();\n System.out.println(\"Sexe : \" + getSexe());\n System.out.println(\"Numéro de sécurité sociale : \" + getNumeroSecuriteSociale());\n System.out.println(\"Date de naissance : \" + getDateDeNaissance().format(DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG)));\n System.out.println(\"Commentaires : \" + getCommentaires());\n this.adresse.afficher();\n }",
"@Override\n public String toString() {\n return info();\n }",
"public String infoName();",
"boolean setInfo();",
"@Override\n\tpublic void info(Message msg) {\n\n\t}",
"@Override\n\tpublic void tipoComunicacao() {\n\t\tSystem.out.println(super.getNome() + \" se comunica miando.\");\n\t}",
"public void llenarInformacion(){\n llenarDetalles();\n llenarLogros();\n }",
"public abstract String globalInfo();",
"public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }",
"private InfoCommand()\n\t{\n\t\t\n\t\t\n\t}",
"String getDescripcion();",
"String getDescripcion();",
"public String getInfo()\r\n\t{\r\n\t\treturn theItem.getNote();\r\n\t}",
"@Override\n public String getMailetInfo() {\n return \"Sieve Mailbox Mailet\";\n }",
"@Override\r\n public void info() {\n System.out.println(\"开始介绍\");\r\n }",
"public static String getInfo() {\n/* 327 */ return \"\";\n/* */ }",
"@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\n\t\t\n\t}",
"@Override\n\tpublic void info(Marker marker, Message msg) {\n\n\t}",
"public String getInfo()\n {\n return info;\n }",
"abstract public void printInfo();",
"public static void printInfo(){\n }",
"@Override\n\tpublic void tipoMovimento() {\n\t\tSystem.out.println(super.getNome() + \" anda com 4 patas.\");\n\t}",
"public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t System.out.println(\"Je suis un animal et j'ai \" + this.nombreDePatte + \" pattes\");\n\t }",
"public int getMes();",
"private String formulerMonNom() {\n\t return \"Je m'appelle \" + this.nom; // appel de la propriété nom\n\t }",
"public void updateInfo() {\n\t}",
"void printInfo();",
"@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}",
"private void carregaInformacoes() {\n Pessoa pessoa = (Pessoa) getIntent().getExtras().getSerializable(\"pessoa\");\n edtNome.setText(pessoa.getNome());\n edtEmail.setText(pessoa.getEmail());\n edtTelefone.setText(pessoa.getTelefone());\n edtIdade.setText(pessoa.getIdade());\n edtCPF.setText(pessoa.getCpf());\n }",
"public void getInfo() {\n\t\tSystem.out.println(\"My name is \"+ name+ \" and my last name is \"+ lastName);\n\t\t\n\t\tgetInfo1();// we can access static method within non static \n\t\t\n\t}",
"@Override\r\n\tpublic void setInfo(Object datos) {\n\t\t\r\n\t}",
"@Override\n\tpublic void info(Object message) {\n\n\t}",
"void baInfo(String text);",
"String returnInfo() {\n String info = \n this.toString() +\n \"\\n\\tOn: \" + this.getOnStatus() +\n \"\\n\\tSpeed: \" + this.getSpeed() +\n \"\\n\\tRadius: \" + this.getRadius() +\n \"\\n\\tColor: \" + this.getColor();\n return info;\n }",
"@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}",
"@Override\n\tpublic String getDescription() {\n\t\treturn \"Transfereix vida a l'enemic\";\n\t}",
"@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}",
"public String getInfo() {\n return this.info;\n }",
"public void info(String string) {\n\t\t\n\t}",
"public String getInformation() {\n return information;\n }",
"@Override\n\tpublic void descriere() {\n\t\tSystem.out.println(\"Item: \"+this.numeSectiune);\n\t}",
"@Override\n public String info() {\n return String.format(\"%s. %s\", this.key, this.name);\n }",
"public Object getInfo() {\n // from AddEventHandler\n return new String();\n }",
"public void set_info() {\n System.out.println(\"The name of the donor is \" + donor_name);\n System.out.println(\"The rating of the donor is \" + donor_rating); //display\n }",
"public void infoMsg(String msg) {\n mensagens.add(new MensagemSistema(ConstantsControl.MSG_INFO, msg));\n }"
]
| [
"0.722581",
"0.70610696",
"0.69612414",
"0.69286644",
"0.69286644",
"0.68560296",
"0.67825115",
"0.67517513",
"0.67372733",
"0.67352045",
"0.66976273",
"0.6691265",
"0.66881216",
"0.6661908",
"0.6637555",
"0.6637555",
"0.66368353",
"0.6635165",
"0.6616512",
"0.65986973",
"0.6583769",
"0.65765643",
"0.65744996",
"0.6572342",
"0.65333253",
"0.65248615",
"0.6518221",
"0.65173364",
"0.65116763",
"0.6510546",
"0.6509145",
"0.6487924",
"0.64873993",
"0.6468542",
"0.6462754",
"0.6453199",
"0.644711",
"0.64409995",
"0.6440508",
"0.6438521",
"0.6436805",
"0.6431093",
"0.6419771",
"0.6414048",
"0.6414048",
"0.6410717",
"0.6393995",
"0.6392458",
"0.63905704",
"0.6383878",
"0.6383878",
"0.6382327",
"0.63726264",
"0.63452685",
"0.63441837",
"0.6332057",
"0.6326942",
"0.63091207",
"0.63044226",
"0.6301427",
"0.62980926",
"0.6283054",
"0.6279184",
"0.62766004",
"0.6269566",
"0.62669295",
"0.62578243",
"0.62578243",
"0.6257281",
"0.62439823",
"0.6237439",
"0.6229392",
"0.6228698",
"0.6227798",
"0.6211151",
"0.62011504",
"0.62005275",
"0.6171034",
"0.61616725",
"0.61601967",
"0.61485046",
"0.6146191",
"0.6143902",
"0.614044",
"0.61363643",
"0.61327684",
"0.6128713",
"0.61248",
"0.61127466",
"0.610576",
"0.61012053",
"0.6100213",
"0.60922426",
"0.6092045",
"0.60880506",
"0.6075708",
"0.6073782",
"0.6071539",
"0.6060348",
"0.6059859",
"0.60577947"
]
| 0.0 | -1 |
Handle navigation view item clicks here. | public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.MARIUS: {
mDrawerLayout.closeDrawers();
break;
}
case R.id.settings: {
goSettings(); mDrawerLayout.closeDrawers();
break;
}
case R.id.abouts : {
goAboutUs(); mDrawerLayout.closeDrawers();
break;
}
}
//close navigation drawer
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }",
"void onDialogNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }",
"@Override\r\n\tpublic boolean onNavigationItemSelected(int itemPosition, long itemId) {\n\t\tLog.d(\"SomeTag\", \"Get click event at position: \" + itemPosition);\r\n\t\tswitch (itemPosition) {\r\n\t\tcase 1:\r\n\t\t\tIntent i = new Intent();\r\n\t\t\ti.setClass(getApplicationContext(), MainActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\tcase 2 :\r\n\t\t\tIntent intent = new Intent(this,WhiteListActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }",
"@Override\n\tpublic void rightNavClick() {\n\t\t\n\t}",
"@Override\n public void OnItemClick(int position) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}",
"@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}",
"@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }",
"@Override\n public void onItemClick(int pos) {\n }",
"@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }",
"private void handleNavClick(View view) {\n final String label = ((TextView) view).getText().toString();\n if (\"Logout\".equals(label)) {\n logout();\n }\n if (\"Profile\".equals(label)) {\n final Intent intent = new Intent(this, ViewProfileActivity.class);\n startActivity(intent);\n }\n if (\"Search\".equals(label)){\n final Intent intent = new Intent(this, SearchActivity.class);\n startActivity(intent);\n }\n if (\"Home\".equals(label)) {\n final Intent intent = new Intent(this, HomeActivity.class);\n startActivity(intent);\n }\n }",
"void onMenuItemClicked();",
"@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.tvSomeText:\n listener.sendDataToActivity(\"MainActivity: TextView clicked\");\n break;\n\n case -1:\n listener.sendDataToActivity(\"MainActivity: ItemView clicked\");\n break;\n }\n }",
"@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\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}",
"@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}",
"@Override\n public void onItemClick(View view, String data) {\n }",
"abstract public void onSingleItemClick(View view);",
"@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }",
"@Override\n public void itemClick(int pos) {\n }",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView textView = (TextView)view;\n switch(textView.getText().toString()){\n case \"NavBar\":\n Intent nav = new Intent(this, NavDrawerActivity.class);\n startActivity(nav);\n break;\n }\n\n //Toast.makeText(MainActivity.this,\"Go to \" + textView.getText().toString() + \" page.\",Toast.LENGTH_LONG).show();\n }",
"@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}",
"@Override\n public void onItemClick(Nson parent, View view, int position) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }",
"@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }",
"@Override\n\t\tpublic void onClick(View view) {\n\t\t\tif (iOnItemClickListener != null) {\n\t\t\t\tiOnItemClickListener.onItemClick(view, null, getAdapterPosition());\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"public void onItemClick(View view, int position);",
"@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}",
"@Override\n public void onItemClick(View view, int position) {\n }",
"@Override\n public void onItemClick(View view, int position) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}",
"@Override\n public void onItemOfListClicked(Object o) {\n UserProfileFragmentDirections.ActionUserProfileFragmentToEventProfileFragment action = UserProfileFragmentDirections.actionUserProfileFragmentToEventProfileFragment((MyEvent) o);\n navController.navigate(action);\n }",
"@Override\n public void onClick(View view) {\n if(mFrom.equals(NetConstants.BOOKMARK_IN_TAB)) {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), NetConstants.G_BOOKMARK_DEFAULT,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n else {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), mFrom,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_ds_note) {\n // Handle the camera action\n } else if (id == R.id.nav_ds_todo) {\n\n } else if (id == R.id.nav_ql_the) {\n\n } else if (id == R.id.nav_tuychinh) {\n Intent intent = new Intent(this, CustomActivity.class);\n startActivity(intent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}",
"@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }",
"@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"void onLinkClicked(@Nullable ContentId itemId);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:\n Intent homeIntent = new Intent(this, MainActivity.class);\n startActivity(homeIntent);\n break;\n case R.id.send_email:\n Intent mailIntent = new Intent(this, ContactActivity.class);\n startActivity(mailIntent);\n break;\n case R.id.send_failure_ticket:\n Intent ticketIntent = new Intent(this, TicketActivity.class);\n startActivity(ticketIntent);\n break;\n case R.id.position:\n Intent positionIntent = new Intent(this, LocationActivity.class);\n startActivity(positionIntent);\n break;\n case R.id.author:\n UrlRedirect urlRed = new UrlRedirect(this.getApplicationContext(),getString(R.string.linkedinDeveloper));\n urlRed.redirect();\n break;\n default:\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout_main_activity);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@SuppressWarnings(\"ConstantConditions\")\n public void onItemClicked(@NonNull Item item) {\n getView().openDetail(item);\n }",
"void onItemClick(View view, int position);",
"@Override\n public void onClick(View v) {\n startNavigation();\n }",
"void onItemClick(int position);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_logs) {\n startActivity(new Intent(this, LogView.class));\n } else if (id == R.id.nav_signOut) {\n signOut();\n }\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onClick(View v) {\n if(listener!=null & getLayoutPosition()!=0)\n listener.onItemClick(itemView, getLayoutPosition());\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}",
"@Override\n public void onClick(View view) {\n listener.onMenuButtonSelected(view.getId());\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tHashMap<String, Object> item = (HashMap<String, Object>) arg0\n\t\t\t\t\t\t.getAdapter().getItem(arg2);\n\n\t\t\t\tIntent intent = new Intent(ViewActivity.this,\n\t\t\t\t\t\tContentActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"_id\", item.get(\"_id\").toString());\n\t\t\t\tbundle.putString(\"_CityEventID\", item.get(\"_CityEventID\")\n\t\t\t\t\t\t.toString());\n\t\t\t\tbundle.putString(\"_type\", String.valueOf(_type));\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }",
"void clickItem(int uid);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_categories) {\n Intent intent = new Intent(getApplicationContext(), CategoryActivity.class);\n startActivity(intent, compat.toBundle());\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"category\");\n\n } else if (id == R.id.nav_top_headlines) {\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"home\");\n Intent intent = new Intent(getApplicationContext(), HomeActivity.class);\n startActivity(intent, compat.toBundle());\n } else if (id == R.id.nav_search) {\n // Do nothing\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(View view, int position) {\n\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_orders) {\n\n Intent orderStatusIntent = new Intent(Home.this , OrderStatus.class);\n startActivity(orderStatusIntent);\n\n } else if (id == R.id.nav_banner) {\n\n Intent bannerIntent = new Intent(Home.this , BannerActivity.class);\n startActivity(bannerIntent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }",
"public void onItemClick(View view, int position) {\n\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}",
"void onClick(View item, View widget, int position, int which);",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n Intent intent;\n switch(item.getItemId()){\n case R.id.nav_home:\n finish();\n intent = new Intent(this, NavigationActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_calendar:\n finish();\n intent = new Intent(this, EventHome.class);\n startActivity(intent);\n return true;\n case R.id.nav_discussion:\n return true;\n case R.id.nav_settings:\n intent = new Intent(this, SettingsActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_app_blocker:\n intent = new Intent(this, AppBlockingActivity.class);\n startActivity(intent);\n return true;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case R.id.nav_home:\n break;\n\n case R.id.nav_favourites:\n\n if (User.getInstance().getUser() == null) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }\n\n Intent intent = new Intent(getApplicationContext(), PlaceItemListActivity.class);\n startActivity(intent);\n\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_camera) {\n // Handle the camera action\n } else if (id == R.id.nav_gallery) {\n Toast.makeText(this, \"gallery is clicked!\", Toast.LENGTH_LONG).show();\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"public void menuClicked(MenuItem menuItemSelected);",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_my_account) {\n startActivity(new Intent(this, MyAccountActivity.class));\n } else if (id == R.id.nav_message_inbox) {\n startActivity(new Intent(this, MessageInboxActivity.class));\n } else if (id == R.id.nav_view_offers) {\n //Do Nothing\n } else if (id == R.id.nav_create_listing) {\n startActivity(new Intent(this, CreateListingActivity.class));\n } else if (id == R.id.nav_view_listings) {\n startActivity(new Intent(this, ViewListingsActivity.class));\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}"
]
| [
"0.7882029",
"0.7235578",
"0.6987005",
"0.69458413",
"0.6917864",
"0.6917864",
"0.6883472",
"0.6875181",
"0.68681556",
"0.6766498",
"0.67418456",
"0.67207",
"0.6716157",
"0.6713947",
"0.6698189",
"0.66980195",
"0.66793925",
"0.66624063",
"0.66595167",
"0.6646381",
"0.6641224",
"0.66243863",
"0.6624042",
"0.66207093",
"0.6602551",
"0.6602231",
"0.6599443",
"0.65987265",
"0.65935796",
"0.6585869",
"0.658491",
"0.65811735",
"0.65765643",
"0.65751576",
"0.65694076",
"0.6561757",
"0.65582377",
"0.65581614",
"0.6552827",
"0.6552827",
"0.6549224",
"0.65389794",
"0.65345114",
"0.65337104",
"0.652419",
"0.652419",
"0.6522521",
"0.652146",
"0.6521068",
"0.6519354",
"0.65165275",
"0.65159816",
"0.65028816",
"0.6498054",
"0.6498054",
"0.64969087",
"0.64937705",
"0.6488544",
"0.64867324",
"0.64866185",
"0.64865905",
"0.6484047",
"0.6481108",
"0.6474686",
"0.64628965",
"0.64551884",
"0.6446893",
"0.64436555",
"0.64436555",
"0.64436555",
"0.64436555",
"0.64436555",
"0.64386237",
"0.643595",
"0.64356565",
"0.64329195",
"0.6432562",
"0.6429554",
"0.64255124",
"0.64255124",
"0.64121485",
"0.64102405",
"0.64095175",
"0.64095175",
"0.64094734",
"0.640727",
"0.64060104",
"0.640229",
"0.6397359",
"0.6392996",
"0.63921124",
"0.63899696",
"0.63885015",
"0.63885015",
"0.63873845",
"0.6368818",
"0.6368818",
"0.63643163",
"0.63643163",
"0.63643163",
"0.6358884"
]
| 0.0 | -1 |
Query untuk ambil semua dosen | public List<Resep> getReseps() {
return sessionFactory.getCurrentSession().createCriteria(Resep.class).list();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Kaiwa selectByPrimaryKey(String maht);",
"public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"public String consultaParametrosEstado(String estado){\n String select =\"SELECT parsadm_parsadm, parsadm_nombre, parsadm_estado, parsadm_valor FROM ad_tparsadm where parsadm_estado = '\"+estado+\"'\";\n \n return select;\n }",
"public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"public List<Dishes> selectLU(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='³²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();",
"List<Kaiwa> selectByExample(KaiwaExample example);",
"@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}",
"protected String createFindBy(String nume) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"SELECT \");\n\t\tsb.append(\" * \");\n\t\tsb.append(\" FROM \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" WHERE \");\n\t\treturn sb.toString();\n\t}",
"public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }",
"String getSelect();",
"String getSelect();",
"List<SPerms> selectByExample(SPermsExample example);",
"@Query(\"SELECT * FROM unit WHERE name = :nama AND sync_delete = 1\")\n public List<Unit> cekNamaUnit(String nama);",
"@Override\n\t\tpublic String queryStudent(int no) throws RemoteException {\n\t\t\treturn queryString(no);\n\t\t}",
"List<Prueba> selectByExample(PruebaExample example);",
"List<Cemetery> search(String query);",
"public void search() {\n listTbagendamentos\n = agendamentoLogic.findAllTbagendamentoByDataAndPacienteAndFuncionario(dataSearch, tbcliente, tbfuncionario);\n }",
"public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }",
"public void isiPilihanDokter() {\n String[] list = new String[]{\"\"};\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(list));\n\n /*Mengambil data pilihan spesialis*/\n String nama = (String) pilihPoliTujuan.getSelectedItem();\n String kodeSpesialis = ss.serviceGetIDSpesialis(nama);\n\n /* Mencari dokter where id_spesialis = pilihSpesialis */\n tmd.setData(ds.serviceGetAllDokterByIdSpesialis(kodeSpesialis));\n int b = tmd.getRowCount();\n\n /* Menampilkan semua nama berdasrkan pilihan sebelumnya */\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(ds.serviceTampilNamaDokter(kodeSpesialis, b)));\n }",
"String getBarcharDataQuery();",
"List<HuoDong> selectByExample(HuoDongExample example);",
"List<TVmManufacturer> selectByExample(TVmManufacturerExample example);",
"public interface OrdineRepository extends JpaRepository<Ordine,Long> {\n\n //Ricerca ordini associati ad un determinato cliente\n @Query(\"select o from Ordine o \" +\n \"where lower(o.cliente.nomeCliente) like lower(concat('%', :searchTerm, '%')) \" )\n List<Ordine> searchForCliente(@Param(\"searchTerm\") String searchTerm);\n}",
"CampusSearchQuery generateQuery();",
"List<Goodexistsingle> selectByExample(GoodexistsingleExample example);",
"List<ActivityHongbaoPrize> selectByExample(ActivityHongbaoPrizeExample example);",
"public interface DirektoratRepository extends JpaRepository<Direktorat,Long> {\n\n @Query(value = \"select d from Direktorat d where d.nama like :cariNama\")\n List<Direktorat> findByNama(@Param(\"cariNama\")String cariNama);\n\n List<Direktorat> findByKode(String kode);\n\n}",
"List<cskaoyan_mall_order_goods> selectByExample(cskaoyan_mall_order_goodsExample example);",
"List selectByExample(DisproductExample example);",
"@Query(\"select p from Pedido p where p.desc =?1\")\n public Pedido buscarPedidoPorDescricao(String desc);",
"List<CmsVoteTitle> selectByExample(CmsVoteTitleExample example);",
"@In String search();",
"private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}",
"private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}",
"private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}",
"private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }",
"List<GoodsPo> selectByExample(GoodsPoExample example);",
"List<DashboardGoods> selectByExample(DashboardGoodsExample example);",
"@Test\n public void sucheSaeleBezT() throws Exception {\n System.out.println(\"sucheSaele nach Bezeichnung\");\n bezeichnung = \"Halle 1\";\n typ = \"\";\n plaetzeMin = null;\n ort = null;\n SaalDAO dao=DAOFactory.getSaalDAO();\n query = \"bezeichnung like '%\" + bezeichnung + \"%' \";\n explist = dao.find(query);\n System.out.println(query);\n List<Saal> result = SaalHelper.sucheSaele(bezeichnung, typ, plaetzeMin, ort);\n assertEquals(explist, result);\n \n }",
"private void selectOperator() {\n String query = \"\";\n System.out.print(\"Issue the Select Query: \");\n query = sc.nextLine();\n query.trim();\n if (query.substring(0, 6).compareToIgnoreCase(\"select\") == 0) {\n sqlMngr.selectOp(query);\n } else {\n System.err.println(\"No select statement provided!\");\n }\n }",
"public void tampil_siswa(){\n try {\n Connection con = conek.GetConnection();\n Statement stt = con.createStatement();\n String sql = \"select id from nilai order by id asc\"; // disini saya menampilkan NIM, anda dapat menampilkan\n ResultSet res = stt.executeQuery(sql); // yang anda ingin kan\n \n while(res.next()){\n Object[] ob = new Object[6];\n ob[0] = res.getString(1);\n \n comboId.addItem(ob[0]); // fungsi ini bertugas menampung isi dari database\n }\n res.close(); stt.close();\n \n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }",
"@Repository\npublic interface QuestionRepository extends CrudRepository<Question,Integer> {\n @Query(value = \"select * from questions_table where skill_text=:skill and level_text=:level\",nativeQuery = true)\n List<Question> findAllBySkillAndLevel(@Param(\"skill\")String skill,@Param(\"level\")String level);\n// @Query(value = \"select * from questions_table where skill_text in:skill\",nativeQuery = true)\n// List<Question> findAllBySkillIn(@Param(\"skills\") String skill);\n @Query(value = \"select distinct (l.leveltext),l.id from levels_table as l, questions_table as q where l.leveltext=q.level_text and q.skill_text=:skill ORDER BY l.id;\",nativeQuery = true)\n List<Level>findDistinctBySkill(@Param(\"skill\") String skill);\n}",
"Disproduct selectByPrimaryKey(String samId);",
"private void combo() {\n cargaCombo(combo_habitacion, \"SELECT hh.descripcion\\n\" +\n \"FROM huespedes h\\n\" +\n \"LEFT JOIN estadia_huespedes eh ON eh.huespedes_id = h.id\\n\" +\n \"LEFT JOIN estadia_habitaciones ehh ON eh.id_estadia = ehh.id_estadia\\n\" +\n \"LEFT JOIN estadia e ON e.id = ehh.id_estadia \\n\" +\n \"LEFT JOIN habitaciones hh ON hh.id = ehh.id_habitacion\\n\" +\n \"WHERE eh.huespedes_id = \"+idd+\" AND e.estado ='A'\\n\" +\n \"ORDER BY descripcion\\n\" +\n \"\",\"hh.descripcion\");\n cargaCombo(combo_empleado, \"SELECT CONCAT(p.nombre, ' ',p.apellido) FROM persona p\\n\" +\n \"RIGHT JOIN empleado e ON e.persona_id = p.id\", \"empleado\");\n cargaCombo(combo_producto, \"SELECT producto FROM productos order by producto\", \"producto\");\n }",
"public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}",
"DashboardGoods selectOneByExample(DashboardGoodsExample example);",
"Jugador consultarGanador();",
"List<Abum> selectByExample(AbumExample example);",
"List<Enfermedad> selectByExample(EnfermedadExample example);",
"public void selecteazaComanda()\n {\n for(String[] comanda : date) {\n if (comanda[0].compareTo(\"insert client\") == 0)\n clientBll.insert(idClient++, comanda[1], comanda[2]);\n else if (comanda[0].compareTo(\"insert product\") == 0)\n {\n Product p = productBll.findProductByName(comanda[1]);\n if(p!=null)//daca produsul exista deja\n productBll.prelucreaza(p.getId(), comanda[1], Float.parseFloat(comanda[2]), Float.parseFloat(comanda[3]));\n else\n productBll.prelucreaza(idProduct++, comanda[1], Float.parseFloat(comanda[2]), Float.parseFloat(comanda[3]));\n\n }\n else if (comanda[0].contains(\"delete client\"))\n clientBll.sterge(comanda[1]);\n else if (comanda[0].contains(\"delete product\"))\n productBll.sterge(comanda[1]);\n else if (comanda[0].compareTo(\"order\")==0)\n order(comanda);\n else if (comanda[0].contains(\"report\"))\n report(comanda[0]);\n }\n }",
"List<SmsCleanBagLine> selectByExample(SmsCleanBagLineExample example);",
"List<Procedimiento> selectByExample(ProcedimientoExample example);",
"private void executeQuery()\n {\n ResultSet rs = null;\n try\n { \n String author = (String) authors.getSelectedItem();\n String publisher = (String) publishers.getSelectedItem();\n if (!author.equals(\"Any\") && !publisher.equals(\"Any\"))\n { \n if (authorPublisherQueryStmt == null)\n authorPublisherQueryStmt = conn.prepareStatement(authorPublisherQuery);\n authorPublisherQueryStmt.setString(1, author);\n authorPublisherQueryStmt.setString(2, publisher);\n rs = authorPublisherQueryStmt.executeQuery();\n }\n else if (!author.equals(\"Any\") && publisher.equals(\"Any\"))\n { \n if (authorQueryStmt == null)\n authorQueryStmt = conn.prepareStatement(authorQuery);\n authorQueryStmt.setString(1, author);\n rs = authorQueryStmt.executeQuery();\n }\n else if (author.equals(\"Any\") && !publisher.equals(\"Any\"))\n { \n if (publisherQueryStmt == null)\n publisherQueryStmt = conn.prepareStatement(publisherQuery);\n publisherQueryStmt.setString(1, publisher);\n rs = publisherQueryStmt.executeQuery();\n }\n else\n { \n if (allQueryStmt == null)\n allQueryStmt = conn.prepareStatement(allQuery);\n rs = allQueryStmt.executeQuery();\n }\n\n result.setText(\"\");\n while (rs.next())\n {\n result.append(rs.getString(1));\n result.append(\", \");\n result.append(rs.getString(2));\n result.append(\"\\n\");\n }\n rs.close();\n }\n catch (SQLException e)\n {\n result.setText(\"\");\n while (e != null)\n {\n result.append(\"\" + e);\n e = e.getNextException();\n }\n }\n }",
"public void select(String komenda) throws Exception {\n komenda = komenda.substring(7);\n char[] zbiorSymboli = komenda.toCharArray();\n\n boolean wystapilaNazwaTablicy = false;\n boolean wystapilFROM = false;\n boolean wystapilWHERE = false;\n boolean wystapilaZmiana = false;\n boolean wystapilyKolumny = false;\n\n String temp = \"\";\n String kolumny = \"\";\n String nazwaTablicy = \"\";\n String warunek = \"\";\n\n // SELECT SYNTAX CHECKER\n for (int i = 0; i < zbiorSymboli.length; i++) {\n // ; - wyjscie\n if (i == zbiorSymboli.length - 1 || zbiorSymboli[i] == ';') {\n if (zbiorSymboli[i] != ';')\n throw new Exception(\"Oczekiwano ';'\");\n else {\n // to średnik ; i jest sens sprawdzac\n if (wystapilFROM == true & wystapilWHERE == true) {\n if (temp.matches(\".*[a-z].*\")) {\n warunek = temp; // bez srednika\n wystapilaZmiana = true;\n break;\n } else\n throw new Exception(\"Wprowadz warunek\");\n }\n if (wystapilyKolumny == true) {\n if (temp.matches(\".*[a-z].*\")) {\n nazwaTablicy = temp; // bez srednika\n wystapilaZmiana = true;\n break;\n } else\n throw new Exception(\"Wprowadz nazwe tablicy\");\n }\n }\n }\n\n if (temp.contains(\" FROM\")) {\n if (wystapilFROM == true)\n throw new Exception(\"Błąd składni, dwukrotne wystąpienie FROM!\");\n wystapilFROM = true;\n kolumny = temp.substring(0, temp.length() - 5);\n if (kolumny.matches(\".*[a-z].*\") || kolumny.contains(\"*\")) {\n wystapilyKolumny = true;\n temp = \"\";\n continue;\n } else\n throw new Exception(\"Kolumny nie zawieraja liter\");\n }\n\n if (temp.contains(\" WHERE\")) {\n if (wystapilWHERE == true)\n throw new Exception(\"Błąd składni, dwukrotne wystąpienie WHERE!\");\n\n wystapilWHERE = true;\n nazwaTablicy = temp.substring(0, temp.length() - 6);\n if (nazwaTablicy.matches(\".*[a-z].*\")) {\n wystapilaNazwaTablicy = true;\n temp = \"\";\n continue;\n } else\n throw new Exception(\"Nazwa tablicy nie zawiera liter\");\n }\n\n temp += zbiorSymboli[i];\n }\n\n if (wystapilaZmiana == false)\n throw new Exception(\"Błąd składni!\");\n\n if (czyIstniejeTabela(nazwaTablicy) == false)\n throw new Exception(\"Nie ma takiej tablicy\");\n\n temp = \"\";\n\n String[] zbiorKolumn = kolumny.replaceAll(\" \", \"\").split(\",\");\n String[] warunekKolumnaWartosc = warunek.replaceAll(\" \", \"\").split(\"=\");\n\n // SELECT co WHERE warunek\n if (wystapilWHERE == true) {\n if (warunek.contains(\"=\") == false)\n throw new Exception(\"Warunek musi skladac się z kolumna = tresc\");\n Tabela tabela = new Tabela();\n tabela = zbiorTabel.get(nazwaTablicy);\n tabela.wypiszKolumnyZTablicyGdzieKolumnaSpelniaWarunek(zbiorKolumn, warunekKolumnaWartosc);\n\n } else {\n // wypisz wszystkie kolumny / wypisz kolumne\n Tabela tabela = new Tabela();\n tabela = zbiorTabel.get(nazwaTablicy);\n\n for (String kolumna : zbiorKolumn) {\n if (kolumna.equals(\"*\")) {\n tabela.wypiszWszystkieKolumnyWrazZZawaroscia();\n break;\n } else\n tabela.wypiszZawartoscKolumny(kolumna);\n }\n }\n }",
"@Query(\"select i from Product i where name=:name\")\r\n public List<Product> findByQuery(@Param(\"name\")String netto);",
"@Query(\"SELECT entity FROM Clientes entity WHERE (:id is null OR entity.id = :id) AND (:nome is null OR entity.nome like concat('%',:nome,'%')) AND (:negocio is null OR entity.negocio like concat('%',:negocio,'%')) AND (:sigla is null OR entity.sigla like concat('%',:sigla,'%')) AND (:status is null OR entity.status like concat('%',:status,'%'))\")\n public Page<Clientes> specificSearch(@Param(value=\"id\") java.lang.Double id, @Param(value=\"nome\") java.lang.String nome, @Param(value=\"negocio\") java.lang.String negocio, @Param(value=\"sigla\") java.lang.String sigla, @Param(value=\"status\") java.lang.String status, Pageable pageable);",
"@Query(\"SELECT DISTINCT o.candidat \"\n\t\t\t+ \"FROM Obtenu o, Candidat c, Diplome_Specialite ds, Diplome d, Specialite s, Postuler p, Filiere f, Annee_Etudes ae \"\n\t\t\t+ \"WHERE o.candidat = c and o.diplome_specialite = ds \"\n\t\t\t+ \"and ds.diplome = d and ds.specialite = s \"\n\t\t\t+ \"and p.candidat = c and p.filiere = f \"\n\t\t\t+ \"and ae.obtenu = o \"\n\t\t\t+ \"and o.mention LIKE ?1 and d.type LIKE ?2 and s.nom LIKE ?3 and f.nom LIKE ?4 and p.priorite = ?5 and ae.moyGeneral >= ?6 \")\t\n\tpublic List<Candidat> selection(String mention, String diplome, String specialite, String filiere, int priorite, float moyenne);",
"private void spellSQL(SQLHelper sh,PosPrice posPrice)\n {\n if(posPrice != null){\n \tif(posPrice.getId()!= null){\n sh.appendSql(\" AND obj.id = ? \");\n sh.insertValue(posPrice.getId());\n }\n if(posPrice.getHotelGroupId()!= null){\n sh.appendSql(\" AND obj.hotelGroupId = ? \");\n sh.insertValue(posPrice.getHotelGroupId());\n }\n if(posPrice.getHotelId()!= null){\n sh.appendSql(\" AND obj.hotelId = ? \");\n sh.insertValue(posPrice.getHotelId());\n }\n if(posPrice.getPluCode()!= null){\n sh.appendSql(\" AND obj.pluCode = ? \");\n sh.insertValue(posPrice.getPluCode());\n }\n if(isNotNull(posPrice.getPccode())){\n sh.appendSql(\" AND obj.pccode = ? \");\n sh.insertValue(posPrice.getPccode().trim());\n }\n if(posPrice.getInumber()!= null){\n sh.appendSql(\" AND obj.inumber = ? \");\n sh.insertValue(posPrice.getInumber());\n }\n if(isNotNull(posPrice.getUnit())){\n sh.appendSql(\" AND obj.unit = ? \");\n sh.insertValue(posPrice.getUnit().trim());\n }\n if(posPrice.getPrice()!= null){\n sh.appendSql(\" AND obj.price = ? \");\n sh.insertValue(posPrice.getPrice());\n }\n if(posPrice.getCost()!= null){\n sh.appendSql(\" AND obj.cost = ? \");\n sh.insertValue(posPrice.getCost());\n }\n if(posPrice.getCostF()!= null){\n sh.appendSql(\" AND obj.costF = ? \");\n sh.insertValue(posPrice.getCostF());\n }\n if(isNotNull(posPrice.getBaseunit())){\n sh.appendSql(\" AND obj.baseunit = ? \");\n sh.insertValue(posPrice.getBaseunit().trim());\n }\n if(posPrice.getBasenumb()!= null){\n sh.appendSql(\" AND obj.basenumb = ? \");\n sh.insertValue(posPrice.getBasenumb());\n }\n if(isNotNull(posPrice.getFlag())){\n sh.appendSql(\" AND obj.flag = ? \");\n sh.insertValue(posPrice.getFlag().trim());\n }\n if(isNotNull(posPrice.getIsHalt())){\n sh.appendSql(\" AND obj.isHalt = ? \");\n sh.insertValue(posPrice.getIsHalt().trim());\n }\n if(posPrice.getListOrder()!= null){\n sh.appendSql(\" AND obj.listOrder = ? \");\n sh.insertValue(posPrice.getListOrder());\n }\n if(isNotNull(posPrice.getCodeType())){\n sh.appendSql(\" AND obj.codeType = ? \");\n sh.insertValue(posPrice.getCodeType().trim());\n }\n if(isNotNull(posPrice.getGroupCode())){\n sh.appendSql(\" AND obj.groupCode = ? \");\n sh.insertValue(posPrice.getGroupCode().trim());\n }\n if(isNotNull(posPrice.getIsGroup())){\n sh.appendSql(\" AND obj.isGroup = ? \");\n sh.insertValue(posPrice.getIsGroup().trim());\n }\n if(isNotNull(posPrice.getCreateUser())){\n sh.appendSql(\" AND obj.createUser = ? \");\n sh.insertValue(posPrice.getCreateUser().trim());\n }\n if(posPrice.getCreateDatetime()!= null){\n sh.appendSql(\" AND obj.createDatetime = ? \");\n sh.insertValue(posPrice.getCreateDatetime());\n }\n if(isNotNull(posPrice.getModifyUser())){\n sh.appendSql(\" AND obj.modifyUser = ? \");\n sh.insertValue(posPrice.getModifyUser().trim());\n }\n if(posPrice.getModifyDatetime()!= null){\n sh.appendSql(\" AND obj.modifyDatetime = ? \");\n sh.insertValue(posPrice.getModifyDatetime());\n }\n }\n }",
"@Query(value = \"SELECT * FROM produtos WHERE prd_nome LIKE %?%\", nativeQuery = true)\r\n public List<ProdutosModel> findAllLike (String pesquisa);",
"private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }",
"public void llenarComboSeccion() {\t\t\n\t\tString respuesta = negocio.llenarComboSeccion(\"\");\n\t\tSystem.out.println(respuesta);\t\t\n\t}",
"@Override\n public boolean SearchSQL() {\n\n /*\n appunto su query.next()\n inizialmente query.next è posto prima della prima riga\n alla prima chiaata si posiziona sulla prima row\n alla seconda chiamata si posiziona sulla seconda row e cosi via\n */\n\n boolean controllo = false;\n\n openConnection();\n\n String sql =\"select user,pass,vol_o_cand from pass where user='\"+userInserito+\"'\";\n ResultSet query = selectQuery(sql);\n\n try {\n\n if(query.next()){\n\n String pass = query.getString(\"pass\");\n\n if(pass.equals(passInserita)) {\n controllo = true;\n volocand = query.getString(\"vol_o_cand\");\n }\n\n }\n\n\n }catch(SQLException se){\n se.printStackTrace();\n }finally{\n closeConnection();\n }\n\n\n return controllo;\n\n }",
"private String idsConstrain(ArrayList <String> uids){\n String query = \"\";\n if(uids.size() > 0){\n query = \" ( \" \n // If uids used are PMC ids, remove PMC part - not recognized by Entrez utilites! \n + uids.get(0).replace(\"PMC\", \"\") \n + \"[UID] \";\n\n for(int i = 1; i < uids.size() ; i++){\n query += \"OR \" \n // If uids used are PMC ids, remove PMC part - not recognized by Entrez utilites! \n + uids.get(i).replace(\"PMC\", \"\") \n + \"[UID] \";\n }\n query += \") \"; \n }\n return query; \n }",
"List<Movimiento> selectByExample(MovimientoExample example);",
"List<Forumpost> selectByExample(ForumpostExample example);",
"List<Lbm83ChohyokanriPkey> selectByExample(Lbm83ChohyokanriPkeyExample example);",
"@Query(\"select o from Ordine o \" +\n \"where lower(o.cliente.nomeCliente) like lower(concat('%', :searchTerm, '%')) \" )\n List<Ordine> searchForCliente(@Param(\"searchTerm\") String searchTerm);",
"@Override\r\n\tpublic Code selectCode(Map<String, String[]> map) throws SQLException {\n\t\t\r\n\t\tJPAQuery query = new JPAQuery(entityManager);\r\n\r\n\t\tQCode code = QCode.code;\r\n\t\tCode codeList = null;\r\n\t\tif(map.get(\"gbn\")[0].equals(\"upr\")) {\r\n\t\t\tcodeList = query.from(code)\r\n\t\t\t .where(code.upr_cd.eq(\"*\").and(code.cd.eq(map.get(\"cd\")[0])))\r\n\t\t\t .singleResult(code);\r\n\t\t} else {\r\n\t\t\tcodeList = query.from(code)\r\n\t\t\t .where(code.upr_cd.eq(map.get(\"upr_cd\")[0]).and(code.cd.eq(map.get(\"cd\")[0])))\r\n\t\t\t .singleResult(code);\r\n\t\t}\r\n\t\t\r\n\t\treturn codeList;\r\n\t}",
"List<UserPonumberGoods> selectByExample(UserPonumberGoodsExample example);",
"public List<String> listSelectedSamithiById(Long id);",
"private Object query(JSONObject jo, String query) {\r\n try {\r\n String[] keys = query.split(\"\\\\.\");\r\n Object r = queryHelper(jo, keys[0]);\r\n for (int i = 1; i < keys.length; i++) {\r\n r = queryHelper(jo.fromObject(r), keys[i]);\r\n }\r\n return r;\r\n } catch (JSONException e) {\r\n return \"\";\r\n }\r\n }",
"private void searchExec(){\r\n\t\tString key=jComboBox1.getSelectedItem().toString();\r\n\t\tkey=NameConverter.convertViewName2PhysicName(\"Discount\", key);\r\n\t\tString valueLike=searchTxtArea.getText();\r\n\t\tList<DiscountBean>searchResult=discountService.searchDiscountByKey(key, valueLike);\r\n\t\tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(searchResult,\"Discount\"));\r\n\t}",
"List selectByExample(BnesBrowsingHisExample example) throws SQLException;",
"ZhuangbeiInfo selectByPrimaryKeySelective(@Param(\"id\") Integer id, @Param(\"selective\") ZhuangbeiInfo.Column ... selective);",
"private void advanceSearch(StringBuilder consult,\r\n\t\t\tList<SelectItem> parameters, ResourceBundle bundle,\r\n\t\t\tStringBuilder unionMessagesSearch) {\r\n\t\tResourceBundle bundleOrg = ControladorContexto\r\n\t\t\t\t.getBundle(\"messageOrganizations\");\r\n\t\tboolean messageAdd = false;\r\n\t\tString comaEspacio = \", \";\r\n\r\n\t\tconsult.append(\"WHERE ppe.person.id=:idPerson \");\r\n\t\tSelectItem itemPer = new SelectItem(person.getId(), \"idPerson\");\r\n\t\tparameters.add(itemPer);\r\n\r\n\t\tif (Constantes.NOT.equals(vigencia)) {\r\n\t\t\tconsult.append(\"AND (ppe.dateEndValidity IS NOT NULL \");\r\n\t\t\tconsult.append(\"AND ppe.dateEndValidity <= :actualDate) \");\r\n\t\t} else if (Constantes.SI.equals(vigencia)) {\r\n\t\t\tconsult.append(\"AND (ppe.dateEndValidity IS NULL \");\r\n\t\t\tconsult.append(\"OR ppe.dateEndValidity > :actualDate) \");\r\n\t\t}\r\n\t\tSelectItem itemVig = new SelectItem(new Date(), \"actualDate\");\r\n\t\tparameters.add(itemVig);\r\n\r\n\t\tif (idSearchBranchOffice != 0) {\r\n\t\t\tSelectItem item = new SelectItem(idSearchBranchOffice,\r\n\t\t\t\t\t\"idSearchBranchOffice\");\r\n\t\t\tconsult.append(\"AND ppe.sucursal.id=:idSearchBranchOffice \");\r\n\t\t\tparameters.add(item);\r\n\t\t\tString branchOfficeName = (String) ValidacionesAction.getLabel(\r\n\t\t\t\t\titemsBranchOffices, idSearchBranchOffice);\r\n\t\t\tunionMessagesSearch.append(bundleOrg.getString(\"branch_label\")\r\n\t\t\t\t\t+ \": \" + '\"' + branchOfficeName + '\"');\r\n\t\t\tmessageAdd = true;\r\n\t\t}\r\n\t\tif (idFarmSearch != 0) {\r\n\t\t\tSelectItem item = new SelectItem(idFarmSearch, \"idFarm\");\r\n\t\t\tconsult.append(\"AND ppe.farm.idFarm=:idFarm \");\r\n\t\t\tparameters.add(item);\r\n\t\t\tString farmName = (String) ValidacionesAction.getLabel(itemsFarms,\r\n\t\t\t\t\tidFarmSearch);\r\n\t\t\tunionMessagesSearch.append((messageAdd ? comaEspacio : \"\")\r\n\t\t\t\t\t+ bundleOrg.getString(\"farm_label\") + \": \" + '\"' + farmName\r\n\t\t\t\t\t+ '\"');\r\n\t\t\tmessageAdd = true;\r\n\t\t}\r\n\t\tif (this.searchCompanyManage != null\r\n\t\t\t\t&& !\"\".equals(this.searchCompanyManage)) {\r\n\t\t\tSelectItem item = new SelectItem(\"%\" + searchCompanyManage + \"%\",\r\n\t\t\t\t\t\"keyword\");\r\n\t\t\tconsult.append(\"AND UPPER(ppe.business.name) LIKE UPPER(:keyword) \");\r\n\t\t\tparameters.add(item);\r\n\t\t\tunionMessagesSearch.append((messageAdd ? comaEspacio : \"\")\r\n\t\t\t\t\t+ bundle.getString(\"label_name\") + \": \" + '\"'\r\n\t\t\t\t\t+ this.searchCompanyManage + '\"');\r\n\t\t}\r\n\t}",
"void defSelect(Variable var){\r\n \t//if (isSelectAll()){\r\n \t\taddSelect(var);\r\n \t//}\r\n }",
"List selectByExample(Mi004Example example);",
"private String getQuerySelecaoBonusPulaPula()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" ID_CODIGO_NACIONAL, \" +\n\t\t\t\" VLR_BONUS_MINUTO, \" +\n\t\t\t\" VLR_BONUS_MINUTO_FF \" +\n\t\t\t\"FROM \" +\n\t\t\t\" TBL_GER_BONUS_PULA_PULA \";\n\t\t\n\t\treturn result;\n\t}",
"List<NjProductTaticsRelation> selectByExample(NjProductTaticsRelationExample example);",
"ZhuangbeiInfo selectOneByExample(ZhuangbeiInfoExample example);",
"List<Assist_table> selectByExample(Assist_tableExample example);",
"List<Dish> selectByExample(DishExample example);",
"@Repository\n@Transactional\npublic interface CatalogRepository extends CrudRepository<Catalog, Long> {\n Catalog findCatalogByCatalogCode(String code);\n\n @Query(value = \"select * from catalog where code like %:query% or name like %:query% \", nativeQuery = true)\n Set<Catalog> find(@Param(value = \"query\") String query);\n}",
"public void obtenerPosicionesSolicitud(Solicitud solicitud)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerPosicionesSolicitud(Solici\"\n +\"tud solicitud):Entrada\");\n\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n //jrivas 20/7/2006 (indDevolucion) DBLG5000974 / DBLG5000981 / DBLG5001011\n //jrivas 1/8/2006 (indAnulacion) DBLG50001003\n if (!solicitud.getIndDevolucion() && !solicitud.getIndAnulacion()) {\n query.append(\" SELECT OID_SOLI_POSI, \");\n query.append(\" ESPO_OID_ESTA_POSI, \");\n //jrivas 27/04/2006 INC DBLG50000354\n //query.append(\" VAL_PREC_CATA_TOTA_LOCA_UNID, \");\n query.append(\" NUM_UNID_POR_ATEN, \");\n query.append(\" NUM_UNID_COMPR, \");\n query.append(\" VAL_PREC_CATA_UNIT_LOCA, \");\n //jrivas 27/04/2006 INC DBLG50000354\n //query.append(\" VAL_PREC_CONT_UNIT_LOCA, \");\n query.append(\" IND_CTRL_STOC, \");\n query.append(\" IND_CTRL_LIQU, \");\n query.append(\" IND_LIMI_VENT, \");\n query.append(\" NUM_UNID_DEMA_REAL, \");\n query.append(\" MAPR_OID_MARC_PROD, \");\n query.append(\" UNEG_OID_UNID_NEGO, \");\n query.append(\" NEGO_OID_NEGO, \");\n query.append(\" GENE_OID_GENE, \");\n query.append(\" SGEN_OID_SUPE_GENE, \");\n query.append(\" TOFE_OID_TIPO_OFER, \");\n query.append(\" CIVI_OID_CICLO_VIDA, \");\n query.append(\" SP.NUM_UNID_DEMA, \");\n query.append(\" PR.OID_PROD, \");\n query.append(\" VAL_PREC_FACT_UNIT_LOCA, \");\n query.append(\" VAL_PREC_NETO_UNIT_LOCA \");\n \n // sapaza -- COL-SiCC-2013-0030 -- 28/11/2013 \n query.append(\" ,OFDE_OID_DETA_OFER \");\n \n query.append(\" FROM PED_SOLIC_POSIC SP, \");\n query.append(\" MAE_PRODU PR, \");\n query.append(\" PRE_OFERT_DETAL OD \");\n query.append(\" WHERE SP.PROD_OID_PROD = PR.OID_PROD \");\n query.append(\" AND SP.OFDE_OID_DETA_OFER = OD.OID_DETA_OFER(+) \");\n query.append(\" AND SP.SOCA_OID_SOLI_CABE = \").append(solicitud.getOidSolicitud());\n } else {\n query.append(\" SELECT OID_SOLI_POSI, ESPO_OID_ESTA_POSI, NUM_UNID_POR_ATEN, NUM_UNID_COMPR, \");\n query.append(\" VAL_PREC_CATA_UNIT_LOCA, IND_CTRL_STOC, IND_CTRL_LIQU, IND_LIMI_VENT, \");\n query.append(\" NUM_UNID_DEMA_REAL, MAPR_OID_MARC_PROD, UNEG_OID_UNID_NEGO, \");\n query.append(\" NEGO_OID_NEGO, GENE_OID_GENE, SGEN_OID_SUPE_GENE, \");\n query.append(\" A.CIVI_OID_CICLO_VIDA, A.TOFE_OID_TIPO_OFER, SP.NUM_UNID_DEMA, \");\n query.append(\" PR.OID_PROD, VAL_PREC_FACT_UNIT_LOCA, VAL_PREC_NETO_UNIT_LOCA \");\n \n // sapaza -- COL-SiCC-2013-0030 -- 28/11/2013 \n query.append(\" ,OFDE_OID_DETA_OFER \");\n \n // sapaza -- PER-SiCC-2011-0279 -- 07/06/2011\n if(solicitud.isValidaReemplazo()) {\n query.append(\" ,(SELECT COUNT(1) FROM pre_matri_factu mf, PRE_MATRI_REEMP mr \");\n query.append(\" WHERE mf.OID_MATR_FACT = mr.MAFA_OID_COD_REEM \"); \n query.append(\" AND mf.ofde_oid_deta_ofer = SP.OFDE_OID_DETA_OFER) COD_REEM \");\n }\n \n query.append(\" FROM PED_SOLIC_POSIC SP, \");\n query.append(\" MAE_PRODU PR, \");\n query.append(\" (SELECT DISTINCT OD.CIVI_OID_CICLO_VIDA, OD.TOFE_OID_TIPO_OFER, \");\n query.append(\" OD.PROD_OID_PROD \");\n query.append(\" FROM PRE_OFERT_DETAL OD, \");\n query.append(\" PRE_OFERT O, \");\n query.append(\" PRE_MATRI_FACTU_CABEC MFC \");\n query.append(\" WHERE OD.OFER_OID_OFER = O.OID_OFER \");\n query.append(\" AND O.MFCA_OID_CABE = MFC.OID_CABE \");\n query.append(\" AND MFC.PERD_OID_PERI = \");\n query.append(\" (SELECT DISTINCT SC3.PERD_OID_PERI \");\n query.append(\" FROM PED_SOLIC_POSIC SP, \");\n query.append(\" PED_SOLIC_CABEC SC, \");\n query.append(\" PED_SOLIC_CABEC SC2, \");\n query.append(\" PED_SOLIC_CABEC SC3 \");\n query.append(\" WHERE SC.OID_SOLI_CABE = \").append(solicitud.getOidSolicitud());\n query.append(\" AND SP.SOCA_OID_SOLI_CABE = SC.OID_SOLI_CABE \");\n query.append(\" AND SC.SOCA_OID_DOCU_REFE = SC2.OID_SOLI_CABE \");\n query.append(\" AND SC3.SOCA_OID_SOLI_CABE = SC2.OID_SOLI_CABE \");\n query.append(\" AND OD.VAL_CODI_VENT = SP.VAL_CODI_VENT \");\n query.append(\" AND OD.PROD_OID_PROD = SP.PROD_OID_PROD)) A \");\n query.append(\" WHERE SP.PROD_OID_PROD = PR.OID_PROD \");\n query.append(\" AND SP.SOCA_OID_SOLI_CABE = \").append(solicitud.getOidSolicitud());\n query.append(\" AND A.PROD_OID_PROD = SP.PROD_OID_PROD \");\n }\n\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* Posiciones \" + respuesta); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n solicitud.setPosiciones(new Posicion[0]);\n } else {\n Posicion[] posiciones = new Posicion[respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n posiciones[i] = new Posicion();\n posiciones[i].setSolicitud(solicitud);\n posiciones[i].setOidPosicion(new Long(((BigDecimal) \n respuesta.getValueAt(i, \"OID_SOLI_POSI\")).longValue()));\n\n {\n BigDecimal oidPosicion = (BigDecimal) respuesta\n .getValueAt(i, \"ESPO_OID_ESTA_POSI\");\n posiciones[i].setEstado((oidPosicion != null) ? new Long(\n oidPosicion.longValue()) : null);\n }\n\n //jrivas 27/04/2006 INC DBLG50000354\n /*{\n BigDecimal precio1 = (BigDecimal) respuesta\n .getValueAt(i, \"VAL_PREC_CATA_TOTA_LOCA_UNID\");\n posiciones[i].setPrecioCatalogTotalUniDemandaReal(\n (precio1 != null) ? precio1 : new BigDecimal(0));\n }*/\n\n {\n BigDecimal unidadesPorAtender = (BigDecimal) respuesta\n .getValueAt(i, \"NUM_UNID_POR_ATEN\");\n posiciones[i].setUnidadesPorAtender(\n (unidadesPorAtender != null) ? new Long(\n unidadesPorAtender.longValue()) : new Long(0));\n }\n\n {\n BigDecimal unidadesComprometidas = (BigDecimal) respuesta\n .getValueAt(i, \"NUM_UNID_COMPR\");\n posiciones[i].setUnidadesComprometidas(\n (unidadesComprometidas != null) ? new Long(\n unidadesComprometidas.longValue()) : new Long(0));\n }\n\n {\n BigDecimal precio2 = (BigDecimal) respuesta\n .getValueAt(i, \"VAL_PREC_CATA_UNIT_LOCA\");\n posiciones[i].setPrecioCatalogoUnitarioLocal(\n (precio2 != null) ? precio2 : new BigDecimal(0));\n }\n\n //jrivas 27/04/2006 INC DBLG50000354\n /* BigDecimal precio3 = (BigDecimal) respuesta\n .getValueAt(i, \"VAL_PREC_CONT_UNIT_LOCA\");\n posiciones[i].setPrecioContableUnitarioLocal(\n (precio3 != null) ? precio3 : new BigDecimal(0));*/\n\n\n {\n BigDecimal controlStock = (BigDecimal) respuesta\n .getValueAt(i, \"IND_CTRL_STOC\");\n\n if (controlStock == null) {\n posiciones[i].setControlStock(false);\n } else {\n if (controlStock.intValue() == 1) {\n posiciones[i].setControlStock(true);\n } else {\n posiciones[i].setControlStock(false);\n }\n }\n }\n\n {\n BigDecimal controlLiquidacion = (BigDecimal) respuesta\n .getValueAt(i, \"IND_CTRL_LIQU\");\n\n if (controlLiquidacion == null) {\n posiciones[i].setControlLiquidacion(false);\n } else {\n if (controlLiquidacion.intValue() == 1) {\n posiciones[i].setControlLiquidacion(true);\n } else {\n posiciones[i].setControlLiquidacion(false);\n }\n }\n }\n\n {\n BigDecimal limiteVenta = (BigDecimal) respuesta\n .getValueAt(i, \"IND_LIMI_VENT\");\n\n if (limiteVenta == null) {\n posiciones[i].setLimiteVenta(false);\n } else {\n if (limiteVenta.intValue() == 1) {\n posiciones[i].setLimiteVenta(true);\n } else {\n posiciones[i].setLimiteVenta(false);\n }\n }\n }\n\n {\n BigDecimal unidades = (BigDecimal) respuesta\n .getValueAt(i, \"NUM_UNID_DEMA_REAL\");\n posiciones[i].setUnidadesDemandaReal((unidades != null) \n ? new Long(unidades.longValue()) : new Long(0));\n }\n\n {\n BigDecimal oidMarcaProducto = (BigDecimal) respuesta\n .getValueAt(i, \"MAPR_OID_MARC_PROD\");\n posiciones[i].setOidMarcaProducto(\n (oidMarcaProducto != null) ? new Long(oidMarcaProducto\n .longValue()) : null);\n }\n\n {\n BigDecimal oidUnidadNegocio = (BigDecimal) respuesta\n .getValueAt(i, \"UNEG_OID_UNID_NEGO\");\n posiciones[i].setOidUnidadNegocio(\n (oidUnidadNegocio != null) ? new Long(oidUnidadNegocio\n .longValue()) : null);\n }\n\n {\n BigDecimal oidNegocio = (BigDecimal) respuesta\n .getValueAt(i, \"NEGO_OID_NEGO\");\n posiciones[i].setOidNegocio((oidNegocio != null) \n ? new Long(oidNegocio.longValue()) : null);\n }\n\n {\n BigDecimal oidGenerico = (BigDecimal) respuesta\n .getValueAt(i, \"GENE_OID_GENE\");\n posiciones[i].setOidGenerico((oidGenerico != null) \n ? new Long(oidGenerico.longValue()) : null);\n }\n\n {\n BigDecimal oidSuperGenerico = (BigDecimal) respuesta \n .getValueAt(i, \"SGEN_OID_SUPE_GENE\");\n posiciones[i].setOidSuperGenerico(\n (oidSuperGenerico != null) ? new Long(oidSuperGenerico\n .longValue()) : null);\n }\n\n BigDecimal uniDemandadas = (BigDecimal) respuesta\n .getValueAt(i, \"NUM_UNID_DEMA\");\n posiciones[i].setUnidadesDemandadas((uniDemandadas != null) \n ? new Long(uniDemandadas.longValue()) : new Long(0));\n\n posiciones[i].setOidProducto(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"OID_PROD\")).longValue()));\n \n BigDecimal oidTipoOferta = (BigDecimal) respuesta \n .getValueAt(i, \"TOFE_OID_TIPO_OFER\"); \n posiciones[i].setOidTipoOferta(\n (oidTipoOferta != null) ? new Long(oidTipoOferta\n .longValue()) : null);\n \n BigDecimal oidCicloVida = (BigDecimal) respuesta \n .getValueAt(i, \"CIVI_OID_CICLO_VIDA\"); \n posiciones[i].setOidCicloVida(\n (oidCicloVida != null) ? new Long(oidCicloVida\n .longValue()) : null);\n \n posiciones[i].setPrecioFacturaUnitarioLocal((BigDecimal) respuesta\n .getValueAt(i, \"VAL_PREC_FACT_UNIT_LOCA\"));\n \n posiciones[i].setPrecioNetoUnitarioLocal((BigDecimal) respuesta\n .getValueAt(i, \"VAL_PREC_NETO_UNIT_LOCA\"));\n \n // sapaza -- PER-SiCC-2011-0279 -- 07/06/2011\n if (solicitud.getIndDevolucion() && solicitud.isValidaReemplazo()) { \n BigDecimal codigoReemplazo = (BigDecimal) respuesta.getValueAt(i, \"COD_REEM\");\n \n if (codigoReemplazo == null) {\n posiciones[i].setProductoReemplazo(false);\n } else {\n if (codigoReemplazo.intValue() > 0) {\n posiciones[i].setProductoReemplazo(true);\n } else {\n posiciones[i].setProductoReemplazo(false);\n }\n }\n } else \n posiciones[i].setProductoReemplazo(false);\n \n // sapaza -- COL-SiCC-2013-0030 -- 28/11/2013 \n BigDecimal oidDetalleOferta = (BigDecimal) respuesta \n .getValueAt(i, \"OFDE_OID_DETA_OFER\"); \n posiciones[i].setOidDetalleOferta(\n (oidDetalleOferta != null) ? new Long(oidDetalleOferta.longValue()) : null); \n \n } // posiciones\n\n solicitud.setPosiciones(posiciones);\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerPosicionesSolicitud(Solici\"\n +\"tud solicitud):Salida\");\n }",
"List<Drug_OutWarehouse> selectByExample(Drug_OutWarehouseExample example);",
"public List listaCarneMensalidadesAgrupado(String id_pessoa, String datas) {\n String and = \"\";\n\n if (id_pessoa != null) {\n and = \" AND func_titular_da_pessoa(M.id_beneficiario) IN (\" + id_pessoa + \") \\n \";\n }\n\n// String text\n// = \" -- CarneMensalidadesDao->listaCarneMensalidadesAgrupado(new Pessoa(), new Date()) \\n\\n\"\n// + \" SELECT P.ds_nome AS titular, \\n \"\n// + \" S.matricula, \\n \"\n// + \" S.categoria, \\n \"\n// + \" M.id_pessoa AS id_responsavel, \\n \"\n// + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor, \\n\"\n// + \" M.dt_vencimento AS vencimento \\n\"\n// + \" FROM fin_movimento AS M \\n\"\n// + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n// + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n// + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n// + \" WHERE is_ativo = true \\n\"\n// + \" AND id_baixa IS NULL \\n\"\n// + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \")\\n\"\n// + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n// + \" FROM fin_servico_rotina \\n\"\n// + \" WHERE id_rotina = 4 \\n\"\n// + \") \\n\"\n// + and\n// + \" GROUP BY P.ds_nome, \\n\"\n// + \" S.matricula, \\n\"\n// + \" S.categoria, \\n\"\n// + \" M.id_pessoa, \\n\"\n// + \" M.dt_vencimento \\n\"\n// + \" ORDER BY P.ds_nome, \\n\"\n// + \" M.id_pessoa\";\n String queryString = \"\"\n + \"( \\n\"\n + \" -- CarneMensalidadesDao->listaCarneMensalidadesAgrupado(new Pessoa(), new Date()) \\n\"\n + \" \\n\"\n + \" SELECT P.ds_nome AS titular, \\n\"\n + \" S.matricula AS matricula, \\n\"\n + \" S.categoria AS categoria, \\n\"\n + \" M.id_pessoa AS id_responsavel, \\n\"\n + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor, \\n\"\n + \" M.dt_vencimento AS vencimento, \\n\"\n + \" '' AS servico , \\n\"\n + \" 0 AS quantidade \\n\"\n + \" FROM fin_movimento AS M \\n\"\n + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n + \" WHERE is_ativo = true \\n\"\n + \" AND id_baixa IS NULL \\n\"\n + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \") \\n\"\n + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n + \" FROM fin_servico_rotina \\n\"\n + \" WHERE id_rotina = 4 \\n\"\n + \") \\n\"\n + and\n + \" GROUP BY P.ds_nome, \\n\"\n + \" S.matricula, \\n\"\n + \" S.categoria, \\n\"\n + \" M.id_pessoa, \\n\"\n + \" M.dt_vencimento \\n\"\n + \") \\n\"\n + \" \\n\"\n + \" \\n\"\n + \"UNION \\n\"\n + \" \\n\"\n + \" \\n\"\n + \" \\n\"\n + \"( \\n\"\n + \" SELECT P.ds_nome AS titular, \\n\"\n + \" S.matricula AS matricula, \\n\"\n + \" S.categoria AS categoria, \\n\"\n + \" M.id_pessoa AS id_responsavel, \\n\"\n + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor,\\n\"\n + \" '01/01/1900' AS vencimento, \\n\"\n + \" SE.ds_descricao AS servico, \\n\"\n + \" count(*) AS quantidade \\n\"\n + \" FROM fin_movimento AS M \\n\"\n + \" INNER JOIN fin_servicos AS SE ON SE.id = M.id_servicos \\n\"\n + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n + \" WHERE is_ativo = true \\n\"\n + \" AND id_baixa IS NULL \\n\"\n + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \")\\n\"\n + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n + \" FROM fin_servico_rotina \\n\"\n + \" WHERE id_rotina = 4 \\n\"\n + \") \\n\"\n + and\n + \" GROUP BY P.ds_nome, \\n\"\n + \" S.matricula, \\n\"\n + \" S.categoria, \\n\"\n + \" M.id_pessoa, \\n\"\n + \" SE.ds_descricao\\n\"\n + \") \\n\"\n + \" ORDER BY 1,4,6\";\n try {\n Query query = getEntityManager().createNativeQuery(queryString);\n return query.getResultList();\n } catch (Exception e) {\n e.getMessage();\n }\n return new ArrayList();\n }",
"@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}",
"List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);",
"@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);",
"List<SpecialCircumstance> selectByExample(SpecialCircumstanceExample example);",
"public void jpqlFiltri() {\n em.getTransaction().begin();\n Query q = em.createQuery(\"SELECT c FROM Customer c WHERE c.customer_id between 340 and 345\");\n\n List<Customer> listF = q.getResultList();\n\n System.out.println(\"I Customer con id tra 340 e 345 sono:\");\n\n for (Customer c : listF) {\n System.out.println(c.getCustomerId() + c.getFirstName() + c.getLastName());\n\n }\n\n Query q1 = em.createQuery(\"SELECT c FROM Customer c WHERE c.first_name like 'S%'\");\n\n List<Customer> listF2 = q1.getResultList();\n\n System.out.println(\"I Customer con nome che inizia per la lettera S sono:\");\n\n for (Customer c : listF2) {\n System.out.println(c.getCustomerId() + c.getFirstName() + c.getLastName());\n\n }\n\n em.getTransaction().commit();\n em.close();\n emf.close();\n }",
"List<Yqbd> selectByExample(YqbdExample example);",
"static ResultSet dataOphalen(String querry) {\n //declaratie anders kan er niks worden gereturnt\n ResultSet rs = null;\n try {\n Statement stmt = connectieMaken().createStatement(); //\n rs = stmt.executeQuery(querry);\n } catch (SQLException se) {\n se.printStackTrace();\n }\n return rs;\n }",
"@Repository\npublic interface StudentRepository extends PagingAndSortingRepository<MasterMahasiswa,Long> {\n @Query(\"SELECT p FROM MasterMahasiswa p WHERE LOWER(p.npm) = LOWER(:npm)\")\n public MasterMahasiswa findByNPM(@Param(\"npm\") String npm);\n\n}",
"public void treatmentSearch(){\r\n searchcb.getItems().addAll(\"treatmentID\",\"treatmentName\",\"medicineID\", \"departmentID\", \"diseaseID\");\r\n searchcb.setValue(\"treatmentID\");;\r\n }",
"String query();"
]
| [
"0.5886127",
"0.5803776",
"0.57911396",
"0.5790887",
"0.5746158",
"0.573357",
"0.5694085",
"0.55928755",
"0.5567762",
"0.55388355",
"0.5496752",
"0.54803187",
"0.5465449",
"0.54338664",
"0.5423693",
"0.5423693",
"0.5400778",
"0.53812236",
"0.53240246",
"0.52787566",
"0.5276337",
"0.52683234",
"0.52618426",
"0.5226905",
"0.520569",
"0.52016515",
"0.51960987",
"0.5195194",
"0.51827973",
"0.5168969",
"0.51672673",
"0.51671034",
"0.5165753",
"0.5159706",
"0.5159145",
"0.51556766",
"0.5140889",
"0.5127285",
"0.5121445",
"0.51120204",
"0.51110077",
"0.51095796",
"0.51085633",
"0.5098211",
"0.50962216",
"0.50912035",
"0.50898826",
"0.50875896",
"0.50794315",
"0.5073285",
"0.5072699",
"0.5066724",
"0.50503653",
"0.504773",
"0.50451225",
"0.5045023",
"0.50395113",
"0.50386876",
"0.50344825",
"0.5034017",
"0.50337595",
"0.50296164",
"0.50260186",
"0.502113",
"0.50208503",
"0.5012418",
"0.5006171",
"0.5004219",
"0.5002429",
"0.49923712",
"0.49915984",
"0.49907252",
"0.49894527",
"0.49884278",
"0.49852216",
"0.49793413",
"0.49725237",
"0.49714422",
"0.4970998",
"0.49707675",
"0.49699822",
"0.49662334",
"0.4966197",
"0.49660668",
"0.49623862",
"0.49599096",
"0.49561384",
"0.4954958",
"0.49489164",
"0.4947215",
"0.4939921",
"0.49383014",
"0.49350312",
"0.4934845",
"0.49331442",
"0.49316612",
"0.4931046",
"0.49265996",
"0.4925596",
"0.49245954",
"0.4924184"
]
| 0.0 | -1 |
end setUp() / (nonJavadoc) | @Override
protected void tearDown() throws Exception
{
super.tearDown();
chronometer.stop();
logger.info("Total Time = " + chronometer);
PipeBlockingQueueService.destroyAllQueue();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}",
"@Override\n public void setUp() {\n }",
"@Override\r\n protected void setUp() {\r\n // nothing yet\r\n }",
"protected void setUp() {\n\t}",
"public void setUp() {\n\n\t}",
"@Override\r\n\tpublic void setUp() {\n\r\n\t}",
"protected void setUp()\n {\n }",
"protected void setUp()\n {\n }",
"@Before\n\t public void setUp() {\n\t }",
"public void setUp()\r\n {\r\n //empty on purpose\r\n }",
"protected void setUp() {\n\n }",
"@Override\r\n protected void setUp()\r\n throws Exception\r\n {\r\n // Included only for Javadoc purposes--implementation adds nothing.\r\n super.setUp();\r\n }",
"@Before public void setUp() { }",
"protected void setUp()\r\n {\r\n /* Add any necessary initialization code here (e.g., open a socket). */\r\n }",
"@Override\n public void setUp() throws Exception {}",
"protected void setUp()\n {\n /* Add any necessary initialization code here (e.g., open a socket). */\n }",
"@Before\r\n\t public void setUp(){\n\t }",
"@Before\n\tpublic void setUp() {\n\t}",
"@Before\r\n\tpublic void setUp() {\n\t}",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@Before\r\n public void setUp()\r\n {\r\n }",
"protected void setUp() throws Exception {\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp () {\n }",
"protected void setUp() throws Exception {\n \n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"protected void setup() {\r\n }",
"@Override\n protected void setup() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\r\n\tpublic void setup() {\r\n\t}",
"protected void setUp() throws Exception {\n }",
"public void setUp() {\n _notifier = new EventNotifier();\n _doc = new DefinitionsDocument(_notifier);\n }",
"@Before\n\tpublic void setup() \n\t{\n\t\tsuper.setup();\n\t\t\n }",
"abstract void setUp() throws Exception;",
"@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}",
"public void setUp() {\n burr = new Song(\"Hannibal Burress\", \"rap\", 2018, \"Morpheus Rap\");\n }",
"@Before\n public void setup() {\n }",
"@Before\n public void setup() {\n }",
"@Before\n public void setup() {\n }",
"@Override\n @Before\n protected void setUp() {\n lexicon = new XMLLexicon();\n this.phraseFactory = new NLGFactory(this.lexicon);\n this.realiser = new Realiser();\n }",
"@BeforeClass\n\t public void setUp() {\n\t }",
"@Override\n @Before\n public void setUp() throws IOException {\n }",
"@Before\n public void setUp()\n throws Exception\n {\n super.setUp();\n }",
"protected void setUp() throws Exception {\n super.setUp();\n }",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}",
"protected void setUp() {\n config = new ContestConfig();\n }",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}",
"@Before\n\tpublic void setUp() throws Exception {\n\t\t\n\t}",
"@Before\n public void setUp() throws Exception {\n }",
"@Before\n public void setUp() throws Exception {\n }",
"@Before\n public void setUp() {\n }",
"protected void setUp() {\n //Clear all namespace in the ConfigManager\n TestHelper.resetConfig();\n }",
"@Override\n public void setUp() {\n System.out.println(\"######## \" + getName() + \" #######\");\n // Close help window if any - it should not stay open between test cases.\n // Otherwise it can break next tests.\n closeHelpWindow();\n }",
"@Before\n\tpublic void setUp() throws Exception {\n\t}",
"@Before\n\tpublic void setUp() throws Exception {\n\t}",
"@Before\n public void setup() {\n }",
"protected void setUp() {\n multiplicity = new MultiplicityImpl();\n owner = new StereotypeImpl();\n typedValue = new TaggedValueImpl();\n instance = new TagDefinitionImpl();\n }",
"@Override\n public void setup() {\n }",
"@Override\n public void setup() {\n }",
"@Before\n\tpublic void setUp() throws Exception\n\t{\n\t}",
"protected abstract void setup();",
"@Before\n\tpublic void setUp() {\n\t\tm=new MoteurRPN();\n\t}",
"@Override\n public void setUp() throws Exception {\n super.setUp();\n _xmlFactory = new XmlFactory();\n }",
"@Override\r\n public void setUp() {\r\n list = new DLList<String>();\r\n iter = list.iterator();\r\n }",
"@Override\r\n\tprotected final void setup() {\r\n \tsuper.setup();\r\n\r\n \tdoSetup();\r\n }",
"@Override\n\tpublic void setUp() throws Exception\n\t{\n\t\tsuper.setUp();\n\t}",
"@Override\n\tpublic void setUp() throws Exception\n\t{\n\t\tsuper.setUp();\n\t}",
"@Override\n\tpublic void setUp() throws Exception\n\t{\n\t\tsuper.setUp();\n\t}",
"@Before\n public final void setUp() throws Exception\n {\n // Empty\n }",
"public void setup() {\n }",
"public void setUp()\n {\n empl = new SalariedEmployee(\"romeo\", 25.0);\n }",
"@Before\n public void setUp() throws Exception {\n\n }"
]
| [
"0.8627094",
"0.8495488",
"0.8415323",
"0.8382428",
"0.83727354",
"0.83608395",
"0.83567864",
"0.83567864",
"0.8274831",
"0.8218038",
"0.8217749",
"0.80852854",
"0.80007887",
"0.7984933",
"0.79697794",
"0.7900881",
"0.7891058",
"0.78568596",
"0.7842771",
"0.7813228",
"0.7813228",
"0.7813228",
"0.7813228",
"0.7752133",
"0.77467054",
"0.77467054",
"0.77467054",
"0.77467054",
"0.77467054",
"0.7703306",
"0.7703306",
"0.7703306",
"0.7703306",
"0.7703306",
"0.7694456",
"0.7684214",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.7681828",
"0.76053274",
"0.75896776",
"0.75492215",
"0.7538366",
"0.7518995",
"0.75147504",
"0.7484239",
"0.74545556",
"0.74200064",
"0.7416032",
"0.74140126",
"0.74140126",
"0.74140126",
"0.74105453",
"0.74029166",
"0.7402033",
"0.73952425",
"0.73739713",
"0.7371414",
"0.7371414",
"0.7370915",
"0.73513794",
"0.73483753",
"0.7347012",
"0.7347012",
"0.7332888",
"0.7328877",
"0.7300261",
"0.72872925",
"0.72872925",
"0.72749394",
"0.7269988",
"0.72674483",
"0.72674483",
"0.7256159",
"0.724308",
"0.72415143",
"0.72335356",
"0.7228609",
"0.72273225",
"0.7208622",
"0.7208622",
"0.7208622",
"0.7205928",
"0.71988106",
"0.71899104",
"0.71846145"
]
| 0.0 | -1 |
Created by tshiamotaukobong on 15/05/19. | public interface CountryService {
List<City> getCitiesByRegion(int rig_id);
List<Region> getRegionsByCountry(int con_id);
List<Country> getCountries();
List<CityData> searchCities(String name, int limit, int pageNo);
CityData addCityData(PostCityData postCityData);
} | {
"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}",
"public final void mo51373a() {\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\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\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 dormir() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"private void poetries() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void getExras() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n protected void initialize() \n {\n \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\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"private void init() {\n\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n 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\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 ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void nghe() {\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\r\n\tprotected void initialize() {\r\n\t\t\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 protected void init() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo6081a() {\n }",
"private void m50366E() {\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tpublic void init() {}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public void mo55254a() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public void mo12930a() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public void mo12628c() {\n }",
"protected void mo6255a() {\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"private void init() {\n\n\n\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}"
]
| [
"0.62216586",
"0.60339427",
"0.6007887",
"0.60004425",
"0.60004425",
"0.5982004",
"0.5949695",
"0.59150493",
"0.58772206",
"0.5876246",
"0.5851109",
"0.5824229",
"0.58200955",
"0.5802304",
"0.5785279",
"0.5783684",
"0.57784694",
"0.5776255",
"0.5769802",
"0.57493424",
"0.57313347",
"0.57110876",
"0.5710944",
"0.5708142",
"0.5699826",
"0.56975186",
"0.56912905",
"0.56912905",
"0.56912905",
"0.56912905",
"0.56912905",
"0.5685572",
"0.5683859",
"0.56818295",
"0.56654334",
"0.5631778",
"0.5631778",
"0.5631778",
"0.5631778",
"0.5631778",
"0.5631778",
"0.5631778",
"0.56140244",
"0.5611443",
"0.5611443",
"0.56004333",
"0.56004333",
"0.55990356",
"0.559714",
"0.5590942",
"0.55903316",
"0.55863017",
"0.55863017",
"0.55863017",
"0.5584281",
"0.5584281",
"0.5584281",
"0.558416",
"0.55795467",
"0.55748075",
"0.55748075",
"0.55748075",
"0.55748075",
"0.55748075",
"0.55748075",
"0.55563796",
"0.55554354",
"0.55554354",
"0.55554354",
"0.5551645",
"0.554963",
"0.554963",
"0.5546127",
"0.5537812",
"0.55376273",
"0.5533496",
"0.5522999",
"0.55129755",
"0.5504454",
"0.55034095",
"0.54994774",
"0.5498626",
"0.5496573",
"0.5490052",
"0.5485084",
"0.5477807",
"0.546631",
"0.5466024",
"0.546385",
"0.5452516",
"0.5452202",
"0.54498565",
"0.54420066",
"0.54415536",
"0.543538",
"0.5431289",
"0.5429546",
"0.5427407",
"0.5427285",
"0.541962",
"0.541962"
]
| 0.0 | -1 |
Attempt to detect the vehicle position. | public void detect(Frame input) {
// Isolate the blue color from the image.
input.isolateRange(this.frame,
Config.Colors.blueLower,
Config.Colors.blueUpper
);
// Find largest triangle and return out if missing.
MatOfPoint2f triangle = this.findTriangle(this.frame);
if (triangle == null) return;
// Get list of points from triangle.
this.points = triangle.toArray();
// Find frame width and height.
double width = this.frame.getSource().cols();
double height = this.frame.getSource().rows();
// Transform the found points.
this.projector.transformPosition(this.points, width, height);
this.triangle = new MatOfPoint2f(this.points);
// Find the front point in the triangle.
this.front = this.findFront(this.points);
// Find the back point in the triangle.
this.back = this.findBack(this.points);
// Find the center point of the triangle.
this.center = this.findCenter(this.triangle);
// Find the rotation of the triangle.
this.rotation = this.findRotation(this.front, this.back);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}",
"@Override\n public double getPosition()\n {\n final String funcName = \"getPosition\";\n double pos = getMotorPosition() - zeroPosition;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", pos);\n }\n\n return pos;\n }",
"public void findRobotPosition(){\n targetVisible = false;\n for (VuforiaTrackable trackable : allTrackables) {\n if (((VuforiaTrackableDefaultListener)trackable.getListener()).isVisible()) {\n telemetry.addData(\"Visible Target\", trackable.getName());\n targetVisible = true;\n\n // Get the position of the visible target and put the X & Y position in visTgtX and visTgtY\n // We will use these for determining bearing and range to the visible target\n OpenGLMatrix tgtLocation = trackable.getLocation();\n VectorF tgtTranslation = tgtLocation.getTranslation();\n visTgtX = tgtTranslation.get(0) / mmPerInch;\n visTgtY = tgtTranslation.get(1) / mmPerInch;\n //telemetry.addData(\"Tgt X & Y\", \"{X, Y} = %.1f, %.1f\", visTgtX, visTgtY);\n\n // getUpdatedRobotLocation() will return null if no new information is available since\n // the last time that call was made, or if the trackable is not currently visible.\n OpenGLMatrix robotLocationTransform = ((VuforiaTrackableDefaultListener)trackable.getListener()).getUpdatedRobotLocation();\n if (robotLocationTransform != null) {\n lastLocation = robotLocationTransform;\n }\n break;\n }\n }\n\n // Provide feedback as to where the robot is located (if we know).\n if (targetVisible) {\n // express position (translation) of robot in inches.\n VectorF translation = lastLocation.getTranslation();\n //telemetry.addData(\"Pos (in)\", \"{X, Y, Z} = %.1f, %.1f, %.1f\",\n // translation.get(0) / mmPerInch, translation.get(1) / mmPerInch, translation.get(2) / mmPerInch);\n\n // express the rotation of the robot in degrees.\n Orientation rotation = Orientation.getOrientation(lastLocation, EXTRINSIC, XYZ, DEGREES);\n //telemetry.addData(\"Rot (deg)\", \"{Roll, Pitch, Heading} = %.0f, %.0f, %.0f\", rotation.firstAngle, rotation.secondAngle, rotation.thirdAngle);\n\n // Robot position is defined by the standard Matrix translation (x and y)\n robotX = translation.get(0)/ mmPerInch;\n robotY = translation.get(1)/ mmPerInch;\n\n // Robot bearing (in +vc CCW cartesian system) is defined by the standard Matrix z rotation\n robotBearing = rotation.thirdAngle;\n\n // target range is based on distance from robot position to the visible target\n // Pythagorean Theorum\n targetRange = Math.sqrt((Math.pow(visTgtX - robotX, 2) + Math.pow(visTgtY - robotY, 2)));\n\n // target bearing is based on angle formed between the X axis to the target range line\n // Always use \"Head minus Tail\" when working with vectors\n targetBearing = Math.toDegrees(Math.atan((visTgtY - robotY)/(visTgtX - robotX)));\n\n // Target relative bearing is the target Heading relative to the direction the robot is pointing.\n // This can be used as an error signal to have the robot point the target\n relativeBearing = targetBearing - robotBearing;\n // Display the current visible target name, robot info, target info, and required robot action.\n\n telemetry.addData(\"Robot\", \"[X]:[Y] (Heading) [%5.0fin]:[%5.0fin] (%4.0f°)\",\n robotX, robotY, robotBearing);\n telemetry.addData(\"Target\", \"[TgtRange] (TgtBearing):(RelB) [%5.0fin] (%4.0f°):(%4.0f°)\",\n targetRange, targetBearing, relativeBearing);\n }\n else {\n telemetry.addData(\"Visible Target\", \"none\");\n }\n }",
"public void VehiclePositionIsFinal() {\n\t\tInteger idVehicle ;\n\t\tdouble lat;\n\t\tdouble lon;\n\t\tVehicle vehicle;\n\ttry {\n\t\tVehicleIntervention vehicleIntervention = VehicleIntervention.getInstance();\n\t\tif( ! vehicleIntervention.listIntervention.isEmpty()) {\n\t\t\t//parcourir toutes les interventions\n\t\t\t for( InterventionDto intervention: vehicleIntervention.listIntervention) {\n\t\t\t\t idVehicle = intervention.getVehicle().getId();\n\t\t\t\t lat = intervention.getFireLat();\n\t\t\t\t lon = intervention.getFireLon();\n\t\t\t\t vehicle = getVehicleById(idVehicle);\nSystem.out.println(\"vehicle:\" +vehicle.getId()+ \" at \"+vehicle.getLat() +\":\"+vehicle.getLon());\n \n\t\t\t\t //si le vehicule arrive a proximite et l'intensite du fire est nulle \n\t\t\t\t if( Math.abs(vehicle.getLat() - lat)<1e-3 \n\t\t\t\t\t\t && Math.abs(vehicle.getLon() - lon)<1e-3\n\t\t\t\t\t\t &&isFireOut(lat,lon) ) {\n\t\t\t\t\t //supprimer le vehicule de la liste\n\t\t\t\t\t vehicleIntervention.listIntervention.remove(intervention);\n\t\t\t\t\t //changer l'etat du vehicule\n\t\t\t\t\t Vehicle getvehicle = vRepository.findById(idVehicle).get();\n\t\t\t\t\t getvehicle.setIntervention(false);\n\t\t\t\t\t vRepository.save(getvehicle);\n\t\t\t\t\t \nSystem.out.println(\"Fire:\" + \" at \"+lat +\":\"+lon+\" is out thanks to vehicle: \"+idVehicle+\" Intervention:\"+getvehicle.isIntervention());\n\t\t\t\t }\n\t\t\t \t}\n\t\t }\n\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"public void checkPosition(){\n int absPos = mArm.getSensorCollection().getPulseWidthPosition();\n // mArm.configSelectedFeedbackSensor(FeedbackDevice.QuadEncoder);\n mArm.setSelectedSensorPosition(absPos - offset);\n }",
"public synchronized void follow(Vehicle vehicle){\n \n distance = distance - (float)((float)vehicle.getCurrentSpeed()*1000f/3600f)/100f;\n \n //System.out.println(\"Distance to drive: \" + distance);\n if (distance <= 0){\n \n Settings.messageLog.AddMessage(\"Reached end of path\");\n //System.out.println(\"weg.size() == \" + weg.size());\n try{\n vehicle.setPosition(weg.get(weg.size()-1));\n }\n catch(Exception e){vehicle.setPosition(new Vector3f(10.3f, 5.5f, 156.2f));}\n vehicle.stopDriving();\n if (destinationPlatform == null && destinationParkingSpot == null){}\n else if (destinationParkingSpot == null){\n //motionpath from waypoint to platform\n //platform sign in\n vehicle.setCurrentPlatform(destinationPlatform);\n \n } //meldt aan voor platform nieuwe route\n else {\n \n //motionpath from waypoint to parkingspot\n if (destinationPlatform == null)\n {\n try\n {\n this.destinationParkingSpot.ParkVehicle(vehicle);\n vehicle.setPosition(this.destinationParkingSpot.getPosition());\n Settings.messageLog.AddMessage(\"Park vehicle\");\n }\n catch(Exception e)\n {\n \n ErrorLog.logMsg(e.getMessage());\n }\n \n }\n \n //hier kraan geparkeerd ... ga unload\n try\n {\n this.destinationParkingSpot.ParkVehicle(vehicle);\n vehicle.setPosition(this.destinationParkingSpot.getPosition());\n }\n catch(InvalidVehicleException ie)\n {\n System.out.println(ie.getMessage());\n \n }\n\n }\n \n }\n }",
"godot.wire.Wire.Vector3 getPosition();",
"@Override\n public boolean detect() {\n \t slowDown();\n final MoveResult move = CurrentData.CALCULATED.tetromino.move;\n\t\t\t\t\t\tif (move.hasMove()) {\n final Tetromino moveTetromino = move.tetromino;\n final int y = QQRobot.findTetromino(moveTetromino, 3 + missingTetromino * 2);\n if (y == -1) {\n missingTetromino++;\n if (missingTetromino == 3) {\n // System.out.println(\"没找到块\" + nr + \"!\" + CurrentData.CALCULATED.tetromino.move + \", \"\n // + CurrentData.CALCULATED.tetromino + \", \"\n // + CurrentData.CALCULATED.tetromino.move.tetromino);\n // QQDebug.save(QQRobot.getScreen(), \"qqtetris_\" + nr);\n // nr++;\n throw new NoTetrominoFoundException(\"没找到块!\");\n // CurrentData.CALCULATED.tetromino.move.doMove();\n }\n } else {\n \t final int fallen = y - moveTetromino.y;\n if (fallen > 0) {\n // System.out.println(\"掉落:\" + fallen);\n moveTetromino.y = y;\n } \t \n \t if (move.clever) {\n \t \t if (firstScan) {\n \t \t firstScan = false;\n \t \t } else if (fallen > 0) {\n\t\t\t move.doMove(); \t \t \t \n \t \t }\n \t } else {\n\t\t move.doMove();\n \t }\n }\n }\n if (move.hasMove()) {\n return false;\n } else {\n // QQDebug.printBoard(CurrentData.CALCULATED.board);\n return true;\n }\n }",
"public Point getRobotLocation();",
"public Point getDrivePuckPosition(Point current_position) {\n\n Point drive_coord = new Point(current_position);\n Rect bounds = this.wheel.getBounds();\n\n drive_coord.x = drive_coord.x - bounds.left;\n drive_coord.y = drive_coord.y - bounds.top;\n\n if (drive_coord.x < 0) {\n drive_coord.x = 0;\n } else if (drive_coord.x > bounds.width()) {\n drive_coord.x = bounds.width();\n }\n\n if (drive_coord.y < 0) {\n drive_coord.y = 0;\n } else if (drive_coord.y > bounds.height()) {\n drive_coord.y = bounds.height();\n }\n\n return drive_coord;\n }",
"protected void execute() {\t\n \ttarget = Robot.trackingCamera.getTargetPosition();\n \t\n \tSmartDashboard.putNumber(\"targetX\", target[0]);\n \tSmartDashboard.putNumber(\"targetY\", target[1]);\n \t\n \tif(target[0] == TrackingCamera.NOTFOUND || lastDistance < 28){\n \t\tsuper.execute();\n \t\treturn;\n \t}\n \t\n \ttargetX = target[0];\n \ttargetY = target[1];\n \t\n \tsuper.execute();\n \t//System.out.println(distance);\n }",
"@Override\n public PosDeg getPosition() {\n return tracker.getPosition();\n }",
"private Point getValidPuckPosition(Point current_position) {\n\n Point pointer = new Point(current_position);\n Point wheel_center = this.wheel.getPosition();\n Point adj_pointer = new Point(pointer);\n\n //Set the puck position to within the bounds of the wheel\n if (pointer.x != wheel_center.x || pointer.y != wheel_center.y) {\n\n //reset the drive coords to be the zeroed pointer coords\n adj_pointer.set(pointer.x, pointer.y);\n\n //Use the wheel center to zero the pointer coords\n adj_pointer.x = adj_pointer.x - wheel_center.x;\n adj_pointer.y = adj_pointer.y - wheel_center.y;\n\n double a = Math.abs(adj_pointer.y);\n double b = Math.abs(adj_pointer.x);\n\n double hyp = Math.hypot(a, b);\n\n final double radius = (wheel_radius - (puck_radius - puck_edge_overlap));\n\n if (hyp > radius) {\n final double factor = radius / hyp;\n\n pointer.x = (int) (adj_pointer.x * factor) + wheel_center.x;\n pointer.y = (int) (adj_pointer.y * factor) + wheel_center.y;\n }\n }\n\n return pointer;\n }",
"public Position getRobotPadPosition();",
"public List<Float> getRobotPosition() throws CallError, InterruptedException {\n return (List<Float>)service.call(\"getRobotPosition\").get();\n }",
"godot.wire.Wire.Vector2 getPosition();",
"public Point getCarLocation() {\r\n\r\n SQLiteQueryBuilder builder = new SQLiteQueryBuilder();\r\n builder.setTables(FTS_VIRTUAL_TABLE_CAR);\r\n builder.setProjectionMap(mColumnMapCar);\r\n\r\n Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(),\r\n null, null, null, null, null, null);\r\n\r\n if (cursor == null) {\r\n return null;\r\n } else if (!cursor.moveToFirst()) {\r\n cursor.close();\r\n return null;\r\n }\r\n\r\n String point_str = cursor.getString(1);\r\n\r\n point_str = point_str.trim();\r\n String[] coordinates = point_str.split(\",\");\r\n String lon = coordinates[0];\r\n String lat = coordinates[1];\r\n\r\n double flon = Float.valueOf(lon);\r\n double flat = Float.valueOf(lat);\r\n\r\n return (new Point(flon, flat));\r\n }",
"@Override\n public boolean detect() {\n QQRobot.checkBoardExists(RGB_MY_SPACE);\n if (!BoardUtils.isSameBoard(CurrentData.REAL.board, CurrentData.CALCULATED.board)) {\n this.boardChangeDetected++;\n if (this.boardChangeDetected == 3) {\n throw new UnexpectedBoardChangeException(\"找到变动!\");\n }\n }\n CurrentData.REAL.reset();\n QQRobot.findTetromino(RGB_MY_SPACE, CurrentData.REAL.tetromino, CurrentData.REAL.nextBlocks, 5);\n QQRobot.findFutures(RGB_MY_SPACE, CurrentData.REAL.nextBlocks);\n boolean valid = false;\n if (CurrentData.REAL.tetromino.isValid()) {\n if (CurrentData.REAL.nextBlocks[1] == null) {\n this.missingFutures++;\n if (this.missingFutures == 3) {\n throw new NoFuturesFoundException(\"没找到预知块!\");\n }\n } else {\n valid = true;\n }\n } else {\n this.missingTetromino++;\n if (this.missingTetromino == 2000 / this.delayMillis) {\n throw new NoTetrominoFoundException(\"没找到游戏块!\");\n }\n }\n if (valid) {\n return true;\n } else {\n return false;\n }\n }",
"private void findPosition() throws Exception {\n \tLocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n\n \t// Define a listener that responds to location updates\n \tLocationListener locationListener = new LocationListener() {\n \t public void onLocationChanged(Location location) {\n \t // Called when a new location is found by the network location provider.\n \t \n \t }\n\n \t public void onStatusChanged(String provider, int status, Bundle extras) {}\n\n \t public void onProviderEnabled(String provider) {}\n\n \t public void onProviderDisabled(String provider) {}\n \t };\n\n \t// Register the listener with the Location Manager to receive location updates\n \ttry {\n \t\tlocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n \tLocation loc = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n \tlatitude = (int)(loc.getLatitude()*1E6);\n \tlongitude = (int)(loc.getLongitude()*1E6);\n\t\t} catch (Exception e) {\n\t\t\tlocationManager.requestLocationUpdates(LocationManager.PASSIVE_PROVIDER, 0, 0, locationListener);\n\t \tLocation loc = locationManager.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER);\n\t \tlatitude = (int)(loc.getLatitude()*1E6);\n\t \tlongitude = (int)(loc.getLongitude()*1E6);\n\t\t}\n \t//locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n \t//Location loc = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n \t\n \t\n \t\n\t\t\n\t}",
"public DevicePosition getCurrentPosition() {\n if (!isReady())\n return null;\n\n if (isFaceUp()) {\n return (DevicePosition.FACE_UP);\n } else if (isFaceDown()) {\n return (DevicePosition.FACE_DOWN);\n } else if (isDark() && isCloseProximity()\n && (!isFaceDown()) && (!isFaceUp())) {\n return (DevicePosition.IN_POCKET);\n }\n return DevicePosition.UNKNOWN;\n }",
"public void locateParkedCar() {\n\t\tthis.generalRequest(LocalRequestType.LOCATE);\n\t}",
"@Override\n\t\t\tpublic Vector getPosition() {\n\t\t\t\treturn new Vector(-2709.487, -4281.02, 3861.564); //-4409.0, 2102.0, -4651.0);\n\t\t\t}",
"public PVector getRawPosition(){\n\t\treturn this.leap.convert(this.arm.center());\n\t}",
"protected void execute() {\n\t\tdouble error = -1;\n\t\tdouble proportion = 1;\n\t\tdouble coefficient = 1;\n\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartDepth)) { error = Robot.depth_.get_degrees_x(); }\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartCubeSearch)) { error = Robot.cube_.get_degrees_x(); }\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartRFT)) { error = Robot.rft_.get_degrees_x(); }\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.PlatformBlueSearch) || \n\t\t\t\tvision.equalsIgnoreCase(SocketVisionSender.PlatformRedSearch)) { error = Robot.platform_.get_degrees_x(); }\n\t\t\n\t\tif(error == -1) {\n\t\t\tproportion = Drivetrain.kPGyroConstant * (Robot.drivetrain.getGyroHeading() - initHeading);\n\n\t\t} else {\n\t\t\tproportion = error * kP;\n\t\t\t//drive vision\n\t\t\tif(error == 0) initHeading = Robot.drivetrain.getGyroHeading();\n\t\t}\n\n\t\tcoefficient = (initDistance - Robot.drivetrain.getRightEncoderPos(0)) / initDistance;\n\t\tcoefficient = Robot.drivetrain.thresholdVBus(coefficient);\n\n\t\tRobot.drivetrain.tankDrive(coefficient * (vBus - proportion), -coefficient * (vBus + proportion));\n\n\t}",
"public double GetPositionRaw()\n {\n double position = GetPosition();\n\n if (position == -1)\n {\n double CurrentDistance = GetDistance();\n\n // we aren't close to a position, so get the range\n for (int i = 1; i < (Positions.length); i++)\n {\n if (Utilities.isBetween(CurrentDistance, Positions[i - 1],\n Positions[i]))\n {\n // scale the position from inches to the ratio between\n // positions\n position = Utilities.scaleToRange(CurrentDistance,\n Positions[i - 1], Positions[i], i - 1, i);\n break;\n }\n\n }\n }\n\n return position;\n }",
"private void resolveCamPos(CamPos in){\r\n\t\tcurCamPos = in;\r\n\t\t\r\n\t\tswitch(in){\r\n\t\tcase DRIVE_FWD:\r\n\t\t\tcur_pan_angle = DRIVE_FWD_PAN_ANGLE;\r\n\t\t\tcur_tilt_angle = DRIVE_FWD_TILT_ANGLE;\r\n\t\t\tbreak;\r\n\t\tcase DRIVE_REV:\r\n\t\t\tcur_pan_angle = DRIVE_REV_PAN_ANGLE;\r\n\t\t\tcur_tilt_angle = DRIVE_REV_TILT_ANGLE;\r\n\t\t\tbreak;\t\t\t\r\n\t\tcase SHOOT:\r\n\t\t\tcur_pan_angle = SHOOT_PAN_ANGLE;\r\n\t\t\tcur_tilt_angle = SHOOT_TILT_ANGLE;\r\n\t\t\tbreak;\r\n\t\tcase CLIMB:\r\n\t\t\tcur_pan_angle = CLIMB_PAN_ANGLE;\r\n\t\t\tcur_tilt_angle = CLIMB_TILT_ANGLE;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Warning - commanded camera position \" + in.name() + \" is not recognized!\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t}",
"private Vec2 calculatePos() {\n\t\tNetTransformComponent transform = actor.getEntity().getNetTransform();\n\t\tif (transform != null) {\n\t\t\tVec2 screenPos = scene.getCamera()\n\t\t\t\t\t.getScreenCoordinates(Vec3.add(transform.getPosition(), new Vec3(-2.0f, 3.25f, 0.0f)));\n\t\t\tVec2 result = new Vec2(screenPos.getX(), screenPos.getY());\n\t\t\treturn result;\n\t\t}\n\n\t\treturn new Vec2(0.0f, 0.0f);\n\t}",
"godot.wire.Wire.Vector3OrBuilder getPositionOrBuilder();",
"Point getPosition();",
"Point getPosition();",
"org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.CameraLocation getAuvLoc();",
"public int GetPosition()\n {\n int position = -1;\n\n double CurrentDistance = GetDistance();\n\n for (int i = 0; i < Positions.length; i++)\n {\n // first get the distance from current to the test point\n double DistanceFromPosition = Math.abs(CurrentDistance\n - Positions[i]);\n\n // then see if that distance is close enough using the threshold\n if (DistanceFromPosition < PositionThreshold)\n {\n position = i;\n break;\n }\n }\n\n return position;\n }",
"@DISPID(5) //= 0x5. The runtime will prefer the VTID if present\r\n @VTID(11)\r\n @ReturnValue(type=NativeType.VARIANT)\r\n java.lang.Object currentDevicePosition();",
"public Point getPacmanPosition() {\n throw new RuntimeException(\"Not Implemented\");\n }",
"private Vector3f calcPosition() {\r\n float y = (float) (distance * Math.sin(Math.toRadians(pitch)));\r\n float xzDistance = (float) (distance * Math.cos(Math.toRadians(pitch)));\r\n float x = (float) (xzDistance * Math.sin(Math.toRadians(rotation)));\r\n float z = (float) (xzDistance * Math.cos(Math.toRadians(rotation)));\r\n return new Vector3f(x + center.x, y + center.y, z + center.z);\r\n }",
"protected RobotCoordinates getRobotCoordinates() { return currentPos; }",
"private void detectParkingSlot()\r\n\t{\t\t\r\n\t\tPoint PosS = new Point(0,0);\r\n\t\tPoint PosE = new Point(0,0);\r\n\t\t\r\n\t\tdouble sum_F = 0;\r\n\t\tdouble sum_B = 0;\r\n\t\t\r\n\t\tdouble distance_F = 0;\r\n\t\tdouble distance_B = 0;\r\n\t\t\r\n\t\tint SlotID = Pk_counter;\r\n\t\tINavigation.ParkingSlot.ParkingSlotStatus SlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\r\n\t\tshort axe = getHeadingAxe();\r\n\t\t\r\n\t\tfor (int i = 1; i <= 4; i++)\r\n\t\t{\r\n\t\t\tPk_DIST_FS[i] = Pk_DIST_FS[i-1];\r\n\t\t\tsum_F = Pk_DIST_FS[i] + sum_F;\r\n\t\t\t\r\n\t\t\tPk_DIST_BS[i] = Pk_DIST_BS[i-1];\r\n\t\t\tsum_B = Pk_DIST_BS[i] + sum_B;\r\n\t\t}\r\n\t\t\r\n\t\tPk_DIST_FS[0] = frontSensorDistance;\r\n\t\t//distance_F = (sum_F + Pk_DIST_FS[0])/5;\r\n\t\tdistance_F = frontSensorDistance;\r\n\t\t\r\n\t\tPk_DIST_BS[0] = backSideSensorDistance;\r\n\t\t//distance_B = (sum_B + Pk_DIST_BS[0])/5;\r\n\t\tdistance_B = backSideSensorDistance;\r\n\t\t\r\n\t\t//LCD.drawString(\"Dist_F: \" + (distance_F), 0, 6);\r\n\t\t//LCD.drawString(\"Dist_B: \" + (distance_B), 0, 7);\r\n\t\t\r\n\t\t// Saving the begin point of the PS\r\n\t\tif ((distance_F <= TRSH_SG) && (Pk_burstFS == 0))\r\n\t\t{\r\n\t\t\tPk_PosF1.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstFS = 1;\r\n\t\t\tPk_burstFE = 0;\r\n\t\t\t//Sound.beep();\r\n\t\t}\r\n\t\t\r\n\t\tif ((distance_B <= TRSH_SG) && (Pk_burstRS == 0))\r\n\t\t{\r\n\t\t\tPk_PosR1.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstRS = 1;\r\n\t\t\tPk_burstRE = 0;\r\n\t\t\t//Sound.twoBeeps();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// Saving the end point of the PS\r\n\t\tif ((distance_F >= TRSH_SG) && (Pk_burstFE == 0))\r\n\t\t{\r\n\t\t\tPk_PosF2.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstFS = 0;\r\n\t\t\tPk_burstFE = 1;\r\n\t\t\t//Sound.beep();\r\n\t\t}\r\n\t\t\r\n\t\tif ((distance_B >= TRSH_SG) && (Pk_burstRE == 0))\r\n\t\t{\r\n\t\t\tPk_PosR2.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstRS = 0;\r\n\t\t\t//burstRE = 1;\r\n\t\t\t//Sound.twoBeeps();\r\n\t\t}\r\n\t\t\r\n\t\tif (Po_RoundF == 0)\t\t\t// Saving new parking slots\r\n\t\t{\t\r\n\t\t\tif ((Pk_burstRS == 0) && (Pk_burstRE == 0) && (Pk_counter < 10))\r\n\t\t\t{\r\n\t\t\t\tPosS.setLocation(((Pk_PosF1.getX() + Pk_PosR1.getX())/2), ((Pk_PosF1.getY() + Pk_PosR1.getY())/2));\r\n\t\t\t\tPosE.setLocation(((Pk_PosF2.getX() + Pk_PosR2.getX())/2), ((Pk_PosF2.getY() + Pk_PosR2.getY())/2));\r\n\t\t\t\t\r\n\t\t\t\t// Evaluation of the slot\r\n\t\t\t\tif (axe == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getX() - PosS.getX()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\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{\r\n\t\t\t\t\tif ((PosE.getY() - PosS.getY()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_slotList[Pk_counter] = new INavigation.ParkingSlot(SlotID, PosE, PosS, SlotStatus, 0);\r\n\t\t\t\tPk_counter ++;\r\n\t\t\t\t\r\n\t\t\t\tPk_burstRE = 1;\r\n\t\t\t\t\r\n\t\t\t\tSound.beepSequence();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\t\t\t\t\t// Updating the old slots\r\n\t\t{\r\n\t\t\tif ((Pk_burstRS == 0) && (Pk_burstRE == 0) && (Pk_update <= Pk_counter))\r\n\t\t\t{\r\n\t\t\t\tPosS.setLocation(((Pk_PosF1.getX() + Pk_PosR1.getX())/2), ((Pk_PosF1.getY() + Pk_PosR1.getY())/2));\r\n\t\t\t\tPosE.setLocation(((Pk_PosF2.getX() + Pk_PosR2.getX())/2), ((Pk_PosF2.getY() + Pk_PosR2.getY())/2));\r\n\t\t\t\t\r\n\t\t\t\t// Evaluation of the slot\r\n\t\t\t\tif (axe == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getX() - PosS.getX()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\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{\r\n\t\t\t\t\tif ((PosE.getY() - PosS.getY()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_slotList[Pk_update] = new INavigation.ParkingSlot(SlotID, PosE, PosS, SlotStatus, 0);\r\n\t\t\t\t\r\n\t\t\t\tif (Pk_update < Pk_counter)\r\n\t\t\t\t{\r\n\t\t\t\t\tPk_update ++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tPk_update = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_burstRE = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn; // data are saved in the shared variable\r\n\t}",
"public PointF get_position() { return _position; }",
"public PVector getPosition() { return position; }",
"public void testPositionNumerically() {\n double endtime = racetrack.getPerimeter() / racetrack.getVelocity();\n double epsilon = 0.000000000001;\n integrateVelocity(racetrack, 0, endtime, n, epsilon);\n }",
"private static void processGroundCal()\n\t{\n\t\tif (testMotor != null) {\n\t\t\tSystem.out.println(\"Calibrating arm to floor position\");\n\t\t\ttestMotor.setPosition(SOFT_ENCODER_LIMIT_FLOOR);\n\t\t}\n\t}",
"public void testVelocityNumerically() {\n // crud, I don't know, how much can we expect velocity and finite differences to agree?\n double bound = dt*dt*velocity*velocity; // sure, let's go with that. Keep in mind this changes with sampling rates, velocity, the order of the function, etc.\n double endtime = racetrack.getPerimeter() / racetrack.getVelocity();\n differentiatePosition(racetrack, 0.0, endtime, dt, bound);\n }",
"public Vector3D getCurrentPosition() throws ManipulatorException;",
"public int getCurrentPlayerRealPosition();",
"@Override\n public void execute() {\n double forwardSpeed;\n double rotationSpeed;\n\n // Vision-alignment mode\n // Query the latest result from PhotonVision\n double target = RobotContainer.m_Drive.Get_tv();\n\n if (target != 0.0f) {\n // First calculate range\n double range =\n PhotonUtils.calculateDistanceToTargetMeters(\n CAMERA_HEIGHT_METERS,\n TARGET_HEIGHT_METERS,\n CAMERA_PITCH_RADIANS,\n Units.degreesToRadians(RobotContainer.m_Drive.Get_ty()));\n SmartDashboard.putNumber(\"range\", range);\n // Use this range as the measurement we give to the PID controller.\n // -1.0 required to ensure positive PID controller effort _increases_ range\n if(RobotContainer.m_Drive.Get_ty()<-1){\n forwardSpeed = 1.0 * forwardController.calculate(range, GOAL_RANGE_METERS);;\n }\n else if(RobotContainer.m_Drive.Get_ty() > 1){\n forwardSpeed = -1.0 * forwardController.calculate(range, GOAL_RANGE_METERS);\n }\n else{\n forwardSpeed = 0;\n }\n\n\n // Also calculate angular power\n // -1.0 required to ensure positive PID controller effort _increases_ yaw\n rotationSpeed = -1.0 * turnController.calculate(RobotContainer.m_Drive.Get_tx(), 0);\n } else {\n // If we have no targets, stay still.\n forwardSpeed = 0;\n rotationSpeed = 0;\n } \n // Use our forward/turn speeds to control the drivetrain\n Robot.hardware.m_diffDrive.arcadeDrive(forwardSpeed,rotationSpeed);\n }",
"public void differentiatePosition(Racetrack path, double t0, double t1, double dt, double bound) {\n if (verbose) System.out.println(\"t\\tP(t)\\tV(t)\\t|dP-dt*V|\");\n\n // incrementally sample motion\n Vector3 p0 = new TVector( path.getPosition(t0) );\n for (double t=dt; t<t1; t+=dt) {\n\n // compute finite difference as an estimate for velocity\n Vector3 p1 = new TVector( path.getPosition(t) );\n Vector3 dp = new Vector3(p1).subtract(p0);\n // might consider interpolating from more points for better bounds...\n\n // use analytic velocity at endpoint as your truth\n Vector3 v = new TVector( path.getVelocity(t) );\n\n // find the error\n Vector3 e = new Vector3(v).multiply(dt).subtract(dp);\n double error = e.getAbs();\n\n if (verbose) System.out.println(t+\"\\t\"+p1+\"\\t\"+v+\"\\t\"+error);\n assertTrue(\n \"finite differences varied more than |e|=\"+bound+\n \" from analytic velocity at t=\"+t+\", e=\"+e.toTupleString(),\n (error<bound)\n );\n p0 = p1;\n// v = new Vector3( path.getVelocityVector(t) );\n }\n }",
"public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}",
"godot.wire.Wire.Vector2OrBuilder getPositionOrBuilder();",
"@java.lang.Override\n public godot.wire.Wire.Vector3OrBuilder getPositionOrBuilder() {\n return getPosition();\n }",
"MazePoint getExpectedMovementPosition(MazePoint point, Direction dir);",
"static float calculateNewPosition(float a, float deltaTime, float v, float x0) {\n return x0\n + (a * deltaTime * deltaTime / 2 + v * deltaTime)\n * (Utility.sensorType == Sensor.TYPE_GYROSCOPE ? GYROSCOPE_MOVEMENT_COEFF : GRAVITY_MOVEMENT_COEFF);\n }",
"@Override\n public Position getPosition() {\n return Position.UNKNOWN;\n }",
"public Coordinates getProcedurePosition() {\r\n\t\tif (position == null) {\r\n\t\t\tCoordinates coord = this.getSensorCoordinates();\r\n\t\t\tposition = coord;\r\n\t\t}\r\n\t\treturn position;\r\n\t}",
"@Override\n public boolean detect() {\n QQRobot.findWindowLocation(RGB_SCREEN);\n if (QQTetris.QQCoord.x != -1) {\n return true;\n } else {\n return false;\n }\n }",
"Position getPosition();",
"Position getPosition();",
"public float[] findXY(){\n //Initialize the xy coordinates and the array\n int x = -1;\n int y = -1;\n float[] location = new float[2];\n\n //Find the blank card\n for(int i = 0; i < cardArray.length; i++){\n for(int j = 0; j < cardArray.length; j++){\n if(cardArray[i][j].getCardNum() == 16){\n x = i;\n y = j;\n }\n }\n }\n\n /* For each of the following cases, find the neighbors of the\n blank card. Select only neighbors that are in the incorrect spot so that\n the computer player does not mess up the game. If both are in the correct spot\n choose one to move\n */\n //Case 1: it is in the top left corner, find a neighbor\n if((x == 0) && (y == 0)){\n if(cardArray[x+1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 2: it is in the top right corner, find a neighbor\n if((x == 0) && (y == cardArray.length - 1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 3: It is in the bottom left corner, find a neighbor\n if((x == cardArray.length - 1) && (y == 0)){\n if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 4: It is in the bottom right corner, find a neighbor\n if((x == cardArray.length - 1) && (y == cardArray.length - 1)){\n if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 5: It is in the top row, find a neighbor\n if((x == 0) && (y > 0) && ( y < cardArray.length - 1)){\n if(cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else if(cardArray[x][y - 1].getColor() == 255){\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n else{\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n }\n\n //Case 6: It is on the bottom row, find a neighbor\n if((x == cardArray.length - 1) && (y > 0) && (y < cardArray.length- 1)){\n if (cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else if (cardArray[x][y - 1].getColor() == 255){\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n else{\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n }\n\n //Case 7: It is on the left column, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y == 0)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 8: It is on the right column, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y == cardArray.length - 1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 9: It is not an edge or corner, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y > 0) && (y < cardArray.length -1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else if(cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Return the array containing the xy coordinates of the blank square's neighbor\n return location;\n }",
"@Override\n public boolean detect() {\n QQRobot.checkBoardExists(RGB_MY_SPACE);\n CurrentData.REAL.reset();\n QQRobot.findBoard(RGB_MY_SPACE, CurrentData.REAL.board);\n QQRobot.findAndCleanBoard(CurrentData.REAL.board, CurrentData.REAL.tetromino, CurrentData.REAL.nextBlocks);\n QQRobot.findFutures(RGB_MY_SPACE, CurrentData.REAL.nextBlocks);\n\n if (CurrentData.REAL.tetromino.isValid()) {\n return true;\n } else {\n return false;\n }\n }",
"public static void trackCheck() {\n\t\t// reset the motor\n\t\tfor (EV3LargeRegulatedMotor motor : new EV3LargeRegulatedMotor[] { leftMotor, rightMotor }) {\n\t\t\tmotor.stop();\n\t\t\tmotor.setAcceleration(3000);\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(200);\n\t\t} catch (InterruptedException e) {\n\t\t\t// There is nothing to be done here\n\t\t}\n\t\t\n\t\t//move the robot forward until the Y asis is detected\n\t\tleftMotor.setSpeed(400);\n\t\trightMotor.setSpeed(400);\n\t\tleftMotor.rotate(Navigation_Test.convertAngle(Project_Test.WHEEL_RAD, Project_Test.TRACK, 720), true);\n\t\trightMotor.rotate(-Navigation_Test.convertAngle(Project_Test.WHEEL_RAD, Project_Test.TRACK, 720), false);\n\t}",
"@java.lang.Override\n public godot.wire.Wire.Vector3 getPosition() {\n return position_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : position_;\n }",
"public MineralLocation getMineralLocation(RobotOrientation orientation){\n MineralLocation absoluteLocation = MineralLocation.Center;\n //if tfod failed to init, just return center\n //otherwise, continue with detection\n if(!error) {\n List<Recognition> updatedRecognitions = tfod.getRecognitions();\n List<Recognition> filteredList = new ArrayList<Recognition>();\n\n /*for(Recognition recognition : updatedRecognitions){\n if(recognition.getHeight() < recognition.getImageHeight() * 3 / 11){\n filteredList.add(recognition);\n }\n }*/\n //Variabes to store two mins\n Recognition min1 = null;\n Recognition min2 = null;\n //Iterate through all minerals\n for(Recognition recognition : updatedRecognitions){\n double height = recognition.getHeight();\n if (min1 == null){\n min1 = recognition;\n }\n else if(min2 == null){\n min2 = recognition;\n }\n else if(height < min1.getHeight()){\n min1 = recognition;\n }\n else if(height < min2.getHeight()){\n min2 = recognition;\n }\n if (min1 != null && min2 != null){\n if(min1.getHeight() > min2.getHeight()){\n Recognition temp = min1;\n min1 = min2;\n min2 = temp;\n }\n }\n }\n filteredList.add(min1);\n filteredList.add(min2);\n int goldMineralX = -1;\n int silverMineral1X = -1;\n int silverMineral2X = -1;\n //Three Mineral Algorithm\n if(orientation == RobotOrientation.Center){\n for (Recognition recognition : filteredList) {\n if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) {\n goldMineralX = (int) recognition.getLeft();\n } else if (silverMineral1X == -1) {\n silverMineral1X = (int) recognition.getLeft();\n } else {\n silverMineral2X = (int) recognition.getLeft();\n }\n }\n if (goldMineralX != -1 && silverMineral1X != -1 && silverMineral2X != -1) {\n if (goldMineralX < silverMineral1X && goldMineralX < silverMineral2X) {\n return MineralLocation.Left;\n } else if (goldMineralX > silverMineral1X && goldMineralX > silverMineral2X) {\n return MineralLocation.Right;\n } else {\n return MineralLocation.Center;\n }\n }\n }\n else{//Two Mineral Algorithm\n //looks at each detected object, obtains \"the most\" gold and silver mineral\n float goldMineralConfidence = 0;\n float silverMineralConfidence = 0;\n for (Recognition recognition : updatedRecognitions) {\n String label = recognition.getLabel();\n float confidence = recognition.getConfidence();\n int location = (int) recognition.getLeft();\n if (label.equals(LABEL_GOLD_MINERAL)\n && confidence > goldMineralConfidence) {\n goldMineralX = location;\n goldMineralConfidence = confidence;\n } else if (label.equals(LABEL_SILVER_MINERAL)\n && confidence > silverMineralConfidence) {\n silverMineral1X = location;\n silverMineralConfidence = confidence;\n }\n }\n //using the two gold and silver object x locations,\n //obtains whether the gold mineral is on the relative left or the right\n boolean goldRelativeLeft;\n if (goldMineralX != -1 && silverMineral1X != -1) {\n if (goldMineralX < silverMineral1X) {\n goldRelativeLeft = true;\n } else {\n goldRelativeLeft = false;\n }\n // telemetry.addData(\"Relative\", goldRelativeLeft);\n //translates the relative location to an absolute location based off the orientation\n if (orientation == RobotOrientation.Left) {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Left;\n } else {\n absoluteLocation = MineralLocation.Center;\n }\n //telemetry.addData(\"orientation\",absoluteLocation);\n } else {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Center;\n } else {\n absoluteLocation = MineralLocation.Right;\n }\n // telemetry.addData(\"orientation\",\"fail\");\n }\n } //sees at least one silver (so not a reading from the wrong position, but no gold seen)\n else if(silverMineral1X != -1 && goldMineralX == -1){\n if(orientation == RobotOrientation.Left){\n absoluteLocation = MineralLocation.Right;\n }else if(orientation == RobotOrientation.Right){\n absoluteLocation = MineralLocation.Left;\n }\n }\n }\n\n }\n return absoluteLocation;\n }",
"public Point2D.Double guessPosition(long when) {\r\n\t\tdouble diff = when - ctime;\r\n\t\tdouble newY = y + Math.cos(heading) * speed * diff;\r\n\t\tdouble newX = x + Math.sin(heading) * speed * diff;\r\n\r\n\t\treturn new Point2D.Double(newX, newY);\r\n\t}",
"Vector2 getPosition();",
"double find_cg_xpos () { // vertical ref point is fuse level (at ref_point_xpos)\n double lift = foil_lift();\n double drag = total_drag();\n\n double driving_force = drag; // drag equals driving force - steady equilibrium condition\n\n // driving_arm for rider tranferring the force to the board is subtle:\n // When the riders transfers the driving force from hands/harness into\n // the board, the derived vertical driving arm is at the board deck\n // height. the rider applies the weight there also at certain\n // location. when drive is not through rider's body, then the arm is\n // that plus DRIVING_FORCE_HEIGHT\n double pitch_rad = Math.toRadians(craft_pitch);\n // driving_arm is pitch-corrected vertical distance from the origin. To\n // recap, the origin is chosen, arbitrarily, to be at the top of mast LE.\n double rider_eff_cg_pos_arm = (Math.cos(pitch_rad)*(strut.span + BOARD_THICKNESS) + \n -dash.cg_pos * // remember that the 'fore' direction is negative and this 'extends the arm'\n Math.sin(pitch_rad) );\n double driving_arm = \n craft_type != EFOIL \n ? rider_eff_cg_pos_arm\n : (Math.cos(pitch_rad)*DRIVING_FORCE_HEIGHT);\n double rider_air_resistance_arm = rider_eff_cg_pos_arm + RIDER_CG_HEIGHT;\n\n // strut_drag_arm\n double strut_drag_arm = // TODO angle correction\n (1- alt_val/100) * strut.span * // this is the length of water immersed section fo the strut.\n 0.5; // drag center is at the center of the immersed section\n\n // the moments caused by the drag of the wings and the fuse (but not the\n // strut) can be for now ignored thanks to the ref point chosen; more\n // accurate calc shoud include (a) craft AoA and (b) Z offsetts to calc\n // that. double wing_drag_moment = 0, stab_drag_moment = 0,\n // fuse_drag_moment = 0;\n \n // board weight arm is board weight location length minus mast LE to transom\n // TODO angle correction \n double board_arm = // tangential arm at 90 degrees to gravity\n BOARD_CG_K * BOARD_LENGTH - MAST_LE_TO_TRANSOM;\n\n double rig_arm = WS_MASTBASE_MAST_LE/2; // approx // TODO angle correction\n\n // drive_moment: for kite or sail it is always CCW (we look from the\n // left side). for EFOIL driving_arm is a negative value, so effectively\n // drive_moment becomes CW-rotating, and as the result would cause more\n // pronounced displacementof the driver body forward as the speed\n // increses, augmented by the wind drag on the body.\n double drive_moment = \n in.opts.ignore_drive_moment ? 0 : driving_force * driving_arm;\n double rider_air_resistance_moment = rider_air_resistance_arm * rider.drag;\n double board_drag_moment = (rider_eff_cg_pos_arm - BOARD_THICKNESS/2) // aprrox\n * board.drag;\n\n double strut_drag_moment = in.opts.ignore_drag_moments ? 0 : strut.drag * strut_drag_arm;\n double board_vert_moment = BOARD_WEIGHT * board_arm;\n double rig_moment = RIG_WEIGHT * rig_arm;\n double foils_Cm_moments = // all same sign because all rotate 'in plane'\n convert_moments_to_AC_offset \n ? 0\n : (wing.moment +\n stab.moment + \n fuse.moment);\n\n // Suppose rider_moment is +CW, it is with the arm towards the transom from mast bottom LE.\n // rider_moment + CW_moments = CCW_moments ==>\n // rider_arm = (CCW_moments - CW_moments) / load\n // where load is not rider's weigth but the load value (from the load slider)\n //\n // \n double load = FoilBoard.this.load; \n\n // non-flying motion\n boolean non_flying = load > lift;\n\n if (non_flying) { \n // load = lift; // Ok idea but not ideal\n // here is better idea: when non_flying, the board provides the remaining lift\n double board_lift_arm = // tangential arm at 90 degrees to gravity\n BOARD_HYDRO_LIFT_LOC * BOARD_LENGTH - MAST_LE_TO_TRANSOM;\n \n board_vert_moment = (BOARD_WEIGHT - (load - lift)) * board_lift_arm;\n }\n\n // this was named mast_le_xpos when ref point was mast le, which is strut.xpos.\n double ref_point_xpos = strut.xpos; \n \n double CW_moments = // +CW ClockWise rotation \n (in.opts.ignore_aux_weight_moments ? 0 : board.drag * (strut.span + BOARD_THICKNESS/2)) +\n rider.drag * (strut.span + BOARD_THICKNESS + RIDER_CG_HEIGHT) + // aprox center of body aero drag\n strut_drag_moment + \n foils_Cm_moments + // any positive Cm pitches nose up therefore CW in this 'view'\n wing.lift * - (wing.xpos + wing.chord_xoffs \n + wing.compute_lift_pos()\n - ref_point_xpos) + // TODO angle correction\n fuse.lift * - (/*fuse.xpos is 0*/ + fuse.compute_lift_pos() - ref_point_xpos); // TODO angle correction\n\n double CCW_moments = // CCW means CounterClockWise rotation, it is -CW\n drive_moment +\n stab.lift * (stab.xpos + stab.chord_xoffs + stab.compute_lift_pos() - ref_point_xpos) + // TODO angle correction\n (in.opts.ignore_aux_weight_moments \n || non_flying // this help to keep the rider over the board and not behind when drive is very light\n ? 0 \n : board_vert_moment + rig_moment);\n\n // if we decide to include prorated rider-mast calcs here \n // load = load*(1-load_distribution_to_mast_loc)\n //\n // what is rider_arm?? this is the horisontal offset in space from the\n // reference point, which is where mast LE meets fuse, where the rider\n // shoudl apply teh gravity weight. this (a) does not translate to\n // where mast LE meets the board because soem masts are not\n // perpendicular (b) even for perpendicular mast/board, this is different at board level unless AoA is zero. \n double rider_arm = (CCW_moments - CW_moments) / load;\n\n // March 2021: warning: I forgot what it is and how non_flying affects this.\n // note that as of now, it is not used in simulation... \n dash.cg_pos_of_rider_at_drive_height = ((CCW_moments + driving_force*DRIVING_FORCE_HEIGHT) // adjust for drive height\n - CW_moments) / load;\n\n return rider_arm;\n \n }",
"Vector getPos();",
"public Direction getCorrectRobotDirection();",
"public void lightPosition() throws Exception {\n\t\tGlobal.colorSensorSwitch = true;\n\t\tGlobal.secondLine = \"light positionning\";\n\t\tThread.sleep(Global.THREAD_SLEEP_TIME); // wait color sensor to get its values\n\n\t\t// reset X\n\t\t// move until sensor sees black line\n\t\tmove(Global.KEEP_MOVING, true);\n\t\twhile (!Global.BlackLineDetected) {\n\n\t\t}\n\t\t// move back to black line\n\t\tmove(0 - Global.ROBOT_LENGTH, false);\n\t\tThread.sleep(250);\n\n\t\t// reset angle\n\t\t// turn until color sensor sees a black line then turn to 90 degree\n\t\tturn(0 - Global.KEEP_MOVING, true);\n\t\twhile (!Global.BlackLineDetected) {\n\n\t\t}\n\t\tturn(Global.COLOR_SENSOR_OFFSET_ANGLE, false);\n\n\t\t// reset Y\n\t\t// move until sensor sees black line\n\t\tmove(Global.KEEP_MOVING, true);\n\t\twhile (!Global.BlackLineDetected) {\n\n\t\t}\n\t\t// move back to black line\n\t\tmove(0 - Global.ROBOT_LENGTH, false);\n\t\tThread.sleep(250);\n\n\t\tturn(Global.KEEP_MOVING, true);\n\t\twhile (!Global.BlackLineDetected) {}\n\t\tturn(Global.COLOR_SENSOR_OFFSET_ANGLE_SMALL, false);\n\n\t\t// turn off color sensor\n\t\tGlobal.colorSensorSwitch = false;\n\n\t\t// wait color sensor is turned off\n\t\tThread.sleep(200);\n\n\t\t// rjeset coordinates\n\t\tGlobal.angle = 0;\n\t\tGlobal.X = -1;\n\t\tGlobal.Y = -1;\n\t\t\n\t\tGlobal.secondLine = \"\";\n\t}",
"public DoubleSolenoid.Value getPosition() {\n return m_ballholder.get();\n }",
"public Point getPosition();",
"@Override\r\n public int run() {\n if (robot.rightDrive.isBusy() && robot.leftDrive.isBusy()) {\r\n robot.leftDrive.setPower(leftSpeed);\r\n robot.rightDrive.setPower(rightSpeed);\r\n\r\n /*telemetry.addData(\"MoveByEncoder To\", \"Left: (%2f), Right (%2f)\",\r\n leftTarget, rightTarget);\r\n telemetry.addData(\"MoveByEncoder At\", \"Left: (%2f), Right (%2f)\",\r\n robot.leftDrive.getCurrentPosition(), robot.rightDrive.getCurrentPosition());\r\n telemetry.update();*/\r\n\r\n telemetry.addData(\"Left Pos\", robot.leftDrive.getCurrentPosition());\r\n telemetry.addData(\"Right Pos\", robot.rightDrive.getCurrentPosition());\r\n telemetry.update();\r\n\r\n return 0;\r\n\r\n }\r\n\r\n return nextPos;\r\n }",
"int getPosition();",
"private void report() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n System.out.println(currentPosition.getX() + \", \"\n + currentPosition.getY() + \", \"\n + currentPosition.getDirection());\n }",
"@Override\n public Optional<Position> getPosition() {\n return this.pos;\n }",
"static Vector getEntityPosition(Entity entity, Object nmsEntity) {\n if(entity instanceof Hanging) {\n Object blockPosition = ReflectUtils.getField(nmsEntity, \"blockPosition\");\n return MathUtils.moveToCenterOfBlock(ReflectUtils.blockPositionToVector(blockPosition));\n } else {\n return entity.getLocation().toVector();\n }\n }",
"public Optional<Integer> getPosition() {\n return this.placement.getAlleles().stream()\n .map(p -> p.getAllele().getSpdi().getPosition())\n .findFirst();\n }",
"Object getPosition();",
"DVector3C getPosition();",
"@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"Position trouverPositionVide(Position pos, int distance);",
"public TargetPointReport getTargetPoint(Translation robot) {\n TargetPointReport rv = new TargetPointReport();\n PathSegment currentSegment = segments.get(0);\n rv.closest_point = currentSegment.getClosestPoint(robot);\n rv.closest_point_distance = new Translation(robot, rv.closest_point).norm();\n rv.remaining_segment_distance = currentSegment.getRemainingDistance(rv.closest_point);\n rv.remaining_path_distance = rv.remaining_segment_distance;\n for (int i = 1; i < segments.size(); ++i) {\n rv.remaining_path_distance += segments.get(i).getLength();\n }\n rv.closest_point_speed = currentSegment\n .getSpeedByDistance(currentSegment.getLength() - rv.remaining_segment_distance);\n double lookahead_distance = getLookaheadForSpeed(rv.closest_point_speed) + rv.closest_point_distance;\n if (rv.remaining_segment_distance < lookahead_distance && segments.size() > 1) {\n lookahead_distance -= rv.remaining_segment_distance;\n for (int i = 1; i < segments.size(); ++i) {\n currentSegment = segments.get(i);\n final double length = currentSegment.getLength();\n if (length < lookahead_distance && i < segments.size() - 1) {\n lookahead_distance -= length;\n } else {\n break;\n }\n }\n } else {\n lookahead_distance += (currentSegment.getLength() - rv.remaining_segment_distance);\n }\n rv.max_speed = currentSegment.getMaxSpeed();\n rv.lookahead_point = currentSegment.getPointByDistance(lookahead_distance);\n rv.lookahead_point_speed = currentSegment.getSpeedByDistance(lookahead_distance);\n checkSegmentDone(rv.closest_point);\n return rv;\n }",
"public PointF getPosition()\n {\n return getMazeSprite().getPosition();\n }",
"public abstract Position getPosition();",
"public int v (board current, int x, int y,int position,int player)\r\n {\r\n y=y+position;\r\n \r\n if (x>18||x<0||y>18||y<0)\r\n {\r\n return 0;\r\n }\r\n \r\n if (current.board[y][x] == 0)\r\n {\r\n return 0;\r\n }\r\n else if (current.board[y][x] == player)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return -1;\r\n }\r\n }",
"public void adjustInitialPosition() {\n\n //TelemetryWrapper.setLine(1,\"landFromLatch...\");\n runtime.reset();\n double maxLRMovingDist = 200.0; //millimeters\n double increamentalDist = 50.0;\n while ( runtime.milliseconds() < 5000 ) {\n int loops0 = 0;\n while ((loops0 < 10) && ( mR.getNumM() == 0 )) {\n mR.update();\n loops0 ++;\n }\n if (mR.getNumM() <= 1) {\n int loops = 0;\n while ( mR.getNumM() <= 1 )\n driveTrainEnc.moveLeftRightEnc(increamentalDist, 2000);\n continue;\n } else if ( mR.getHAlignSlope() > 2.0 ) {\n driveTrainEnc.spinEnc(AUTO_DRIVE_SPEED,Math.atan(mR.getHAlignSlope()),2000);\n continue;\n } else if (! mR.isGoldFound()) {\n\n driveTrainEnc.moveLeftRightEnc(increamentalDist,2000);\n continue;\n } else if ( mR.getFirstGoldAngle() > 1.5 ) {\n driveTrainEnc.spinEnc(AUTO_DRIVE_SPEED, mR.getFirstGoldAngle(),2000);\n continue;\n }\n }\n driveTrainEnc.stop();\n }",
"@Test\n public void testGetPosition() {\n assertEquals(r1.getPosition(), new Position2D(50, 75));\n assertEquals(r2.getPosition(), new Position2D(-50, 75));\n assertEquals(r3.getPosition(), new Position2D(50, -75));\n assertEquals(r4.getPosition(), new Position2D(-50, -75));\n }",
"public Position(TrackSession trackSession, String positionBody) {\r\n final String DELIMITER_TOKEN = \",\";\r\n\r\n // Parse positionBody\r\n String aux;\r\n StringTokenizer tk = new StringTokenizer(positionBody, DELIMITER_TOKEN);\r\n aux = tk.nextToken();\r\n String ltStr = aux.substring(0, aux.length() - 1);\r\n char cardinal = aux.charAt(aux.length() - 1);\r\n int factorLt = (cardinal == 'N' ? 1 : -1);\r\n double lt = Double.parseDouble(ltStr);\r\n int ltInt = (int) (lt / 100);\r\n double ltMinutes = lt % 100;\r\n double ltDegrees = ltInt + ltMinutes / 60;\r\n ltDegrees = ltDegrees * factorLt;\r\n aux = tk.nextToken();\r\n String lgStr = aux.substring(0, aux.length() - 1);\r\n cardinal = aux.charAt(aux.length() - 1);\r\n int factorLg = (cardinal == 'E' ? 1 : -1);\r\n double lg = Double.parseDouble(lgStr);\r\n int lgInt = (int) (lg / 100);\r\n double lgMinutes = lg % 100;\r\n double lgDegrees = lgInt + lgMinutes / 60;\r\n lgDegrees = lgDegrees * factorLg;\r\n String timeStr = tk.nextToken();\r\n int hour = Character.digit(timeStr.charAt(0), 10);\r\n hour = hour * 10 + Character.digit(timeStr.charAt(1), 10);\r\n int minute = Character.digit(timeStr.charAt(2), 10);\r\n minute = minute * 10 + Character.digit(timeStr.charAt(3), 10);\r\n int second = Character.digit(timeStr.charAt(4), 10);\r\n second = second * 10 + Character.digit(timeStr.charAt(5), 10);\r\n int secondsOfDay = hour * 60 * 60 + minute * 60 + second;\r\n Date time = new Date(secondsOfDay * 1000);\r\n //String dummy = tk.nextToken(); // Not used\r\n String altStr = tk.nextToken();\r\n double alt = Double.parseDouble(altStr);\r\n //String velStr = tk.nextToken(); // Not used\r\n String satStr = tk.nextToken();\r\n int nSat = Integer.parseInt(satStr);\r\n String hDopStr = tk.nextToken();\r\n double hDop = Double.parseDouble(hDopStr);\r\n String fixedStr = tk.nextToken();\r\n int fixed = Integer.parseInt(fixedStr);\r\n\r\n // Initialize object fields.\r\n mTrackSession = trackSession;\r\n if (mTrackSession != null)\r\n mTrackSessionId = trackSession.get_id();\r\n mLatitude = ltDegrees;\r\n mLongitude = lgDegrees;\r\n mTime = time;\r\n mAltitude = alt;\r\n mSat = nSat;\r\n mHdop = hDop;\r\n mFixed = fixed;\r\n\r\n// A inserção na base de dados é realizada fora do constructor.\r\n// // Add new Object into database\r\n// // Read GuardTracker database helper\r\n// GuardTrackerDbHelper dbHelper = new GuardTrackerDbHelper(context);\r\n// // Initialize database for write\r\n// final SQLiteDatabase db = dbHelper.getWritableDatabase();\r\n// // Prepare values to write to database\r\n// int latRaw = (int) (mLatitude * GPS_DEGREES_PRECISION);\r\n// int lngRaw = (int) (mLongitude * GPS_DEGREES_PRECISION);\r\n// int altRaw = (int) (mAltitude * GPS_ALTITUDE_PRECISION);\r\n// int hDopRaw = (int) (mHdop * GPS_HDOP_PRECISION);\r\n// int timeRaw = (int) time.getTime();\r\n// ContentValues contentValues = new ContentValues();\r\n// contentValues.put(GuardTrackerContract.PositionTable.COLUMN_NAME_SESSION, mTrackSessionId == 0 ? null : mTrackSessionId);\r\n// contentValues.put(GuardTrackerContract.PositionTable.COLUMN_NAME_LT, latRaw);\r\n// contentValues.put(GuardTrackerContract.PositionTable.COLUMN_NAME_LG, lngRaw);\r\n// contentValues.put(GuardTrackerContract.PositionTable.COLUMN_NAME_TIME, timeRaw);\r\n// contentValues.put(GuardTrackerContract.PositionTable.COLUMN_NAME_ALTITUDE, altRaw);\r\n// contentValues.put(GuardTrackerContract.PositionTable.COLUMN_NAME_NSAT, mSat);\r\n// contentValues.put(GuardTrackerContract.PositionTable.COLUMN_NAME_HDOP, hDopRaw);\r\n// contentValues.put(GuardTrackerContract.PositionTable.COLUMN_NAME_FIXED, mFixed);\r\n// long pkId = db.insertOrThrow(GuardTrackerContract.PositionTable.TABLE_NAME, null, contentValues);\r\n//\r\n// _id = (int) pkId;\r\n//\r\n// db.close();\r\n\r\n }",
"protected void execute() {\n \tRobot.logger.log(\"Gear Detected?\", (int)Robot.gearX);\n \tturn = Robot.gearX - 173; //centered is 160\n \tturn*= .0215; //.05\n \tif(Math.abs(turn)>.6 && turn <0) //.51 omni\n \t\tturn = -.6; //.61\n \tif(Math.abs(turn)>.6 && turn >0)\n \t\tturn = .6;\n \tif(Math.abs(turn)<.575 && turn >0) //.5 traction\n \t\tturn = .575; //.55\n \tif(Math.abs(turn)<.575 && turn <0)\n \t\tturn = -.575;\n \tRobot.drivetrain.tankDrive(turn, -turn);\n }",
"protected void execute() {\n \n \t\n \t \n \t\n \n System.out.println((Timer.getFPGATimestamp()- starttime ) + \",\" + (RobotMap.motorLeftTwo.getEncPosition()) + \",\"\n + (RobotMap.motorLeftTwo.getEncVelocity()*600)/-4096 + \",\" + RobotMap.motorRightTwo.getEncPosition() + \",\" + (RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n /*if(endpoint > 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft+ angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight - angleorientation.getResult());\n }\n if(endpoint <= 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft- angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight + angleorientation.getResult());\n }*/\n System.out.println(this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition() + \"l\");\n System.out.println(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition() + \"r\");\n \n \n \t if(RobotMap.motorLeftTwo.getEncVelocity()!= velocityLeft)\n velocityLeft = RobotMap.motorLeftTwo.getEncVelocity(); \n velocityRight = RobotMap.motorRightTwo.getEncVelocity();\n SmartDashboard.putNumber(\"LeftWheelError\", (this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition()));\n SmartDashboard.putNumber(\"RightWheelError\",(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition()));\n SmartDashboard.putNumber(\"LeftWheelVelocity\", (RobotMap.motorLeftTwo.getEncVelocity())*600/4096);\n SmartDashboard.putNumber(\"RightWheelVelocity\",(RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n \n count++;\n \tangleorientation.updatePID(RobotMap.navx.getAngle());\n }",
"protected void myCarTrack(AutoCar car, double outerBox) {\n if(car.xpos >= outerBox || car.xpos <= (100-outerBox) || car.ypos >= outerBox || car.ypos <= (100-outerBox))\n {\n camera.turn(180);\n myCar.rotateBy(180, 0, 0, 1);\n } \n }",
"public Vector2 getPosition();",
"public PVector getPosition(){\n\t\treturn position;\n\t}",
"@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}",
"public double getTrajectoryPosition() {\n return leftMotor.getActiveTrajectoryPosition();\n }",
"public double getPosition()\n {\n return position * FPS;\n }",
"public void setVisionTargetPosition(double position){\n visionTargetPosition = position;\n }",
"public List<Float> getRobotPosition(Boolean param1) throws CallError, InterruptedException {\n return (List<Float>)service.call(\"getRobotPosition\", param1).get();\n }",
"@Override\r\n public Point getRelatedSceneLocation() {\r\n return getLocationPoint(locationRatio);\r\n }",
"private static final double getCurrentLatitudeGpsValid() {\n if (mLocationGps == null) {\n return ZERO;\n } else {\n return mLocationGps.getLatitude();\n }\n }",
"public Coordinates getAccuratePayloadPosition() {\r\n\t\tSkylightVehicleConfigurationMessage svc = repositoryService.getSkylightVehicleConfiguration();\r\n\t\t//rotate relative camera position \r\n\t\tdouble rx = getEoIrPayload().getPositionXRelativeToAV() - svc.getGpsAntennaPositionX();\r\n\t\tdouble ry = getEoIrPayload().getPositionYRelativeToAV() - svc.getGpsAntennaPositionY();\r\n\t\tdouble mr = Math.sqrt(rx*rx + ry*ry);\r\n\t\tdouble yaw = CoordinatesHelper.headingToMathReference(instrumentsService.getYaw());\r\n\t\tdouble rz = getEoIrPayload().getPositionZRelativeToAV() - svc.getGpsAntennaPositionZ();\r\n\t\t//calculate corrected position\r\n\t\tCoordinatesHelper.calculateCoordinatesFromRelativePosition(accuratePosition, gpsService.getPosition(), mr*Math.cos(yaw), mr*Math.sin(yaw));\r\n//\t\taccuratePosition.setAltitude(advancedInstrumentsService.getAltitude(AltitudeType.AGL)-(float)rz);//RIGHT VERSION\r\n\t\taccuratePosition.setAltitude(advancedInstrumentsService.getAltitude(AltitudeType.WGS84)-(float)rz);//TESTS\r\n\t\treturn accuratePosition;\r\n\t}",
"public Position getPosition();",
"public Position getPosition();"
]
| [
"0.6335042",
"0.6151744",
"0.6068907",
"0.5892641",
"0.5802249",
"0.57902575",
"0.5711092",
"0.563783",
"0.56327707",
"0.5624959",
"0.5618833",
"0.56183887",
"0.5611449",
"0.56011033",
"0.5591737",
"0.5571529",
"0.5567766",
"0.55658835",
"0.5539122",
"0.5497883",
"0.545237",
"0.544962",
"0.54435843",
"0.5406222",
"0.54055095",
"0.5402752",
"0.53942",
"0.537848",
"0.53767276",
"0.53767276",
"0.5354198",
"0.53541183",
"0.5352084",
"0.5351097",
"0.5346568",
"0.53425485",
"0.53380865",
"0.5315313",
"0.53138065",
"0.53045136",
"0.5284161",
"0.5282776",
"0.52759254",
"0.5269958",
"0.52663773",
"0.52576953",
"0.525341",
"0.52529395",
"0.52436876",
"0.5242249",
"0.523797",
"0.5237103",
"0.52362573",
"0.522404",
"0.52152675",
"0.52152675",
"0.5214607",
"0.5211353",
"0.52079",
"0.5196142",
"0.5195425",
"0.51924306",
"0.5189221",
"0.5188244",
"0.5160375",
"0.51580346",
"0.515192",
"0.5146101",
"0.5145435",
"0.5139674",
"0.5137973",
"0.51372755",
"0.51314396",
"0.51301163",
"0.5117896",
"0.511712",
"0.51130915",
"0.5104791",
"0.5103902",
"0.5100213",
"0.50952375",
"0.50923157",
"0.5090799",
"0.50874174",
"0.5085269",
"0.5081743",
"0.50639075",
"0.5061053",
"0.5057723",
"0.5054444",
"0.5053842",
"0.50460774",
"0.50454164",
"0.5036519",
"0.50335443",
"0.5017623",
"0.5008404",
"0.5007504",
"0.50029606",
"0.4998494",
"0.4998494"
]
| 0.0 | -1 |
Draw the vehicle points on the screen. | public void draw(Frame frame) {
// Draw vehicle corner points.
if (this.points != null) {
for (int i = 0; i < 3; i++) {
if (this.points[i] == null) continue;
Imgproc.circle(frame.getSource(), this.points[i], 3, new Scalar(0, 0, 255));
}
}
// Draw the vehicles back point.
if (this.back != null) {
Imgproc.circle(frame.getSource(), this.back, 3, new Scalar(0, 0, 255));
}
// Draw the vehicles front point.
if (this.front != null) {
Imgproc.circle(frame.getSource(), this.front, 6, new Scalar(0, 0, 255));
}
// Draw the vehicles center point.
if (this.center != null) {
Imgproc.circle(frame.getSource(), this.center, 3, new Scalar(255, 0, 0), Imgproc.FILLED);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\r\n /* DO NOT MODIFY */\r\n StdDraw.point(x, y);\r\n }",
"public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(0.01);\n for (Point2D point : points) {\n StdDraw.point(point.x(), point.y());\n }\n StdDraw.setPenRadius();\n }",
"public void draw() {\n for (Point2D p: mPoints) {\n StdDraw.filledCircle(p.x(), p.y(), 0.002);\n }\n }",
"private void drawPoints(Graphics2D g2d) {\n for(int i = 0; i < controlPoints.length; i++) {\n int x = (int)controlPoints[i].x;\n int y = (int)controlPoints[i].y;\n drawFatPoint(x, y, g2d);\n }\n }",
"@Override\r\n\tpublic void draw() {\n\t\tPoint p = this.getP();\r\n\t\tint start_point = p.getX();\r\n\t\tint end_point = p.getY();\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tSystem.out.println(\"�l�p�`��`�� �_(\" + start_point +\",\"+ end_point + \")����Ƃ��āA��\"+ width +\"����\"+ height +\"�̎l�p�`\");\r\n\t}",
"public void draw() {\n for (Point2D point : pointSet) {\n point.draw();\n }\n }",
"void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}",
"protected void drawPlot()\n\t{\n \t\tfill(255);\n \t\tbeginShape();\n \t\tvertex(m_ViewCoords[0] - 1, m_ViewCoords[1] - 1);\n \t\tvertex(m_ViewCoords[2] + 1, m_ViewCoords[1] - 1);\n \t\tvertex(m_ViewCoords[2] + 1, m_ViewCoords[3] + 1);\n \t\tvertex(m_ViewCoords[0] - 1, m_ViewCoords[3] + 1);\n \t\tendShape(CLOSE);\n\t}",
"public void draw() {\n \n // TODO\n }",
"public void draw() {\n for (Point2D i : pointsSet)\n i.draw();\n }",
"static void draw()\n {\n for (Viewport viewport : viewports)\n viewport.draw(renderers);\n }",
"private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }",
"public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(.01);\n for (Point2D p : s) {\n p.draw();\n }\n }",
"public void draw() {\n\t\tSystem.out.println(getMessageSource().getMessage(\"greeting2\", null, null));\r\n\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.circle\", null, null));\r\n\t\tSystem.out.println(\"Center's Coordinates: (\" + getCenter().getX() + \", \" + getCenter().getY() + \")\");\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.center\",\r\n\t\t\t\tnew Object[] { getCenter().getX(), getCenter().getY() }, \"Default point coordinates msg\", null));\r\n\t}",
"@Override\n public void draw() {\n /** preparacion de la ventana **/\n background(255);\n lights();\n directionalLight(40, 90, 100, 1, 40, 40);\n\n translate(origin.x,origin.y);\n scale(zoom);\n\n\n /** entrada del usuario **/\n userInput();\n /** ejes X Y Z **/\n drawAxes();\n /** aplicar ik **/\n writePos();\n\n /** escala de los objetos**/\n scale(-1.2f);\n\n /** esfera que muestra la posicion en coord X Y Z\n *\n * X -> coord[0]\n * Y -> coord[1]\n * Z -> coord[2]\n *\n * **/\n pushMatrix();\n noStroke();\n fill(250, 100, 1);\n translate(-coord_cartesian[1] ,-coord_cartesian[2] -11,-coord_cartesian[0] );\n sphere(2);\n popMatrix();\n\n\n /**\n * Dibuja el brazo\n */\n pushMatrix();\n arm.drawArm();\n popMatrix();\n }",
"public void drawPoint(DrawPanelModel drawPanelModel);",
"public void draw(Object... params) {\n Camera cam = (Camera) params[1];\n \n Vector u = cam.getTransform().transformVector(transform.transformVector(A));\n Vector v = cam.getTransform().transformVector(transform.transformVector(B));\n \n if(u.Y <= 0 && v.Y <= 0)\n return;\n else if(v.Y <= 0) {\n double error = -v.Y + 0.0625;\n Vector diff = u.sub(v);\n diff = diff.mul(error / diff.Y);\n v = u.add(diff);\n } else if(u.Y <= 0) {\n double error = -u.Y + 0.0625;\n Vector diff = v.sub(u);\n diff = diff.mul(error / diff.Y);\n v = v.add(diff);\n }\n\n Point2D a = cam.simpleProject(u);\n Point2D b = cam.simpleProject(v);\n \n if(a.X < 0 || a.X >= 2*cam.getCenterPoint().X\n || a.Y < 0 || a.Y >= 2*cam.getCenterPoint().Y\n || b.X < 0 || b.X >= 2*cam.getCenterPoint().X\n || b.Y < 0 || b.Y >= 2*cam.getCenterPoint().Y)\n return;\n \n //Draw line from a to b on the screen.\n Graphics2D g2 = (Graphics2D) params[0];\n g2.drawLine((int) a.X, (int) a.Y, (int) b.X, (int) b.Y);\n }",
"public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}",
"public GLGraphics drawPoints(Iterable<Vec2f> points) {\n\t\treturn render(GL.GL_POINTS, points);\n\t}",
"public void draw(Point location) {\n\t}",
"public void draw() {\r\n\t\tfor(int i=0; i<2; i++) {\r\n\t\t\trenderer[i].setView(camera[i]);\r\n\t\t\trenderer[i].render();\r\n\t\t}\r\n\t}",
"void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}",
"private void drawPoint(float X, float Y, Paint p, int velocity) {\r\n if (_brushType == BrushType.Square) {\r\n /* Draw square thing */\r\n _offScreenCanvas.drawRect(X-5,Y+5,X+5,Y-5,_paint);\r\n } else if (_brushType == BrushType.Point) {\r\n /* Draw a pixel, maybe draw a sized rectangle */\r\n _offScreenCanvas.drawPoint(X,Y,_paint);\r\n } else if (_brushType == BrushType.Circle) {\r\n _offScreenCanvas.drawCircle(X, Y, _defaultRadius + velocity, _paint);\r\n } else if (_brushType == BrushType.SprayPaint) {\r\n /* Draw a random point in the radius */\r\n float x = genX(X);\r\n _offScreenCanvas.drawPoint(X + x,Y + genY(x),_paint);\r\n } else {\r\n /* Draw generic pixel? */\r\n _offScreenCanvas.drawPoint(X,Y,_paint);\r\n }\r\n }",
"public void draw()\n {\n drawLine(x1, y1, x2, y2);\n }",
"private void drawWaypoints() {\r\n\t\tint x1 = (width - SIZE_X) / 2;\r\n\t\tint y1 = (height - SIZE_Y) / 2;\r\n\r\n\t\tfloat scissorFactor = (float) _resolutionResolver.getScaleFactor() / 2.0f;\r\n\r\n\t\tint glLeft = (int) ((x1 + 10) * 2.0f * scissorFactor);\r\n\t\tint glWidth = (int) ((SIZE_X - (10 + 25)) * 2.0f * scissorFactor);\r\n\t\tint gluBottom = (int) ((this.height - y1 - SIZE_Y) * 2.0f * scissorFactor);\r\n\t\tint glHeight = (int) ((SIZE_Y) * 2.0f * scissorFactor);\r\n\r\n\t\tGL11.glEnable(GL11.GL_SCISSOR_TEST);\r\n\t\tGL11.glScissor(glLeft, gluBottom, glWidth, glHeight);\r\n\r\n\t\tGL11.glPushMatrix();\r\n\t\tGL11.glScalef(_textScale, _textScale, _textScale);\r\n\r\n\t\t_startCell = getStartCell();\r\n\t\t_cellStartX = (int) (((float) x1 + (float) 13) / _textScale);\r\n\t\t_cellStartY = (int) (((float) y1 + (float) 22) / _textScale);\r\n\r\n\t\tint x2 = _cellStartX;\r\n\t\tint y2 = _cellStartY + (int) ((float) 0 * (float) CELL_SIZE_Y / _textScale);\r\n\r\n\t\tImmutableList<UltraTeleportWaypoint> list = UltraTeleportWaypoint.getWaypoints();\r\n\t\tfor (int i = 0; i < 2; ++i) {\r\n \t\tfor (int j = 0; j < list.size() && j < MAX_CELL_COUNT; ++j) {\r\n\r\n \t\t\tint x = _cellStartX;\r\n \t\t\tint y = _cellStartY + (int) ((float) j * (float) CELL_SIZE_Y / _textScale);\r\n\r\n \t\t\tdouble posX = list.get(j + _startCell).getPos().getX();\r\n \t\t\tdouble posY = list.get(j + _startCell).getPos().getY();\r\n \t\t\tdouble posZ = list.get(j + _startCell).getPos().getZ();\r\n\r\n \t\t\tString strX = String.format(\"x: %4.1f\", posX);\r\n \t\t\tString strY = String.format(\"y: %4.1f\", posY);\r\n \t\t\tString strZ = String.format(\"z: %4.1f\", posZ);\r\n \t\t\tString text = strX + \" \" + strY + \" \" + strZ;\r\n\r\n \t\t\tif (i == 0) {\r\n \t\t\t this.fontRendererObj.drawStringWithShadow(text, x + 18, y, list.get(j).getColor());\r\n\r\n \t\t\t boolean selected = j + _startCell < _selectedList.size() ? _selectedList.get(j + _startCell) : false;\r\n\r\n \t\t\t GL11.glPushMatrix();\r\n GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);\r\n \t\t\t this.mc.renderEngine.bindTexture(selected ? BUTTON_ON_RESOURCE : BUTTON_OFF_RESOURCE);\r\n \t\t\t HubbyUtils.drawTexturedRectHelper(0, x + CELL_SIZE_X + 18, y - 3, 16, 16, 0, 0, 256, 256);\r\n \t\t\t GL11.glPopMatrix();\r\n \t\t\t}\r\n \t\t\telse if (i == 1) {\r\n \t\t\t\tBlockPos pos = new BlockPos((int)posX, (int)posY - 1, (int)posZ);\r\n \t\t\t Block block = Minecraft.getMinecraft().theWorld.getBlockState(pos).getBlock();\r\n \t\t\tif (block != null) {\r\n \t\t\t Item itemToRender = Item.getItemFromBlock(block);\r\n \t\t\t itemToRender = itemToRender != null ? itemToRender : Item.getItemFromBlock((Block)Block.blockRegistry.getObjectById(3));\r\n \t\t\t ItemStack is = new ItemStack(itemToRender, 1, 0);\r\n \t\t\t _itemRender.renderItemAndEffectIntoGUI(is, x - 1, y - 3);\r\n \t _itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, is, x - 1, y - 3, \"\"); // TODO: is the last param correct?\r\n \t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t}\r\n\r\n\t\tGL11.glPopMatrix();\r\n\t\tGL11.glDisable(GL11.GL_SCISSOR_TEST);\r\n\t}",
"public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}",
"private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }",
"public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}",
"public void draw()\n\t{\t\t\n\t\tArrayList<Segment> seg = new ArrayList<Segment>();\n\t\tfor(int i = 0; i < hullVertices.length - 1; i++)\n\t\t{\n\t\t\tSegment s = new Segment(hullVertices[i], hullVertices[i+1]);\n\t\t\tseg.add(s);\n\t\t}\n\t\tSegment s1 = new Segment(hullVertices[hullVertices.length-1], hullVertices[0]);\n\t\tseg.add(s1);\n\t\t// Based on Section 4.1, generate the line segments to draw for display of the convex hull.\n\t\t// Assign their number to numSegs, and store them in segments[] in the order.\n\t\tSegment[] segments = new Segment[seg.size()];\n\t\tfor(int i = 0; i < seg.size(); i++)\n\t\t{\n\t\t\tsegments[i] = seg.get(i);\n\t\t}\n\t\t// The following statement creates a window to display the convex hull.\n\t\tPlot.myFrame(pointsNoDuplicate, segments, getClass().getName());\n\t}",
"public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}",
"public void draw() {\r\n\t\t// Draw the triangle making up the mountain\r\n\t\tTriangle mountain = new Triangle(this.x, 100,\r\n\t\t\t\tthis.x + mountainSize / 2, 100, this.x + mountainSize / 4,\r\n\t\t\t\t100 - this.y / 4, Color.DARK_GRAY, true);\r\n\t\t// Draw the triangle making up the snow cap\r\n\t\tthis.snow = new Triangle(side1, bottom - this.y / 8, side2, bottom\r\n\t\t\t\t- this.y / 8, this.x + mountainSize / 4, 100 - this.y / 4,\r\n\t\t\t\tColor.WHITE, true);\r\n\t\tthis.window.add(mountain);\r\n\t\tthis.window.add(snow);\r\n\t}",
"public void startDraw(Vector2 point){\n path.add(point);\n }",
"public void draw() {\r\n if(isVisible()) {\r\n Canvas canvas = Canvas.getCanvas();\r\n canvas.draw(this,getColor(),\r\n new Rectangle(\r\n (int)round(getXposition()),\r\n (int)round(getYposition()),\r\n (int)round(size),\r\n (int)round(size)));\r\n canvas.wait(10);\r\n }\r\n }",
"@Override\n public void render() {\n // Set the background color to opaque black\n Gdx.gl.glClearColor(0, 0, 0, 1);\n // Actually tell OpenGL to clear the screen\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n // First we begin a batch of points\n shapeRenderer.begin(ShapeType.Point);\n // Then we draw a point\n shapeRenderer.point(100, 100, 0);\n // And make sure we end the batch\n shapeRenderer.end();\n }",
"public void draw()\r\n {\r\n\tfinal GraphicsLibrary g = GraphicsLibrary.getInstance();\r\n\t_level.draw(g);\r\n\t_printText.draw(\"x\" + Mario.getTotalCoins(), 30, _height - 36, false);\r\n\t_printText.draw(\"C 000\", _width - 120, _height - 36, false);\r\n\t_printText.draw(Mario.getLives() + \"UP\", 240, _height - 36, false);\r\n\t_printText.draw(Mario.getPoints() + \"\", 400, _height - 36, false);\r\n\t_coin.draw();\r\n\t_1UP.draw();\r\n }",
"@Override\n\tpublic void draw(Graphics2D g) {\n\n\t\t\n\t\tg.setColor(new Color(36, 36, 36));\n\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\n\t\tg.setColor(new Color(87, 87, 87));\n\t\tSceneManager.sm.currSector.drawBasicGrid(g, 1000000, (int) (100 * (1 / Math.sqrt((Camera.scale)))), 2);\n\n\t\tif (target != null) {\n\t\t\tg.setPaint(new Color(255, 0, 0, 200));\n\t\t\tg.setStroke(new BasicStroke((int) (3 * Camera.scale)));\n\t\t\tCamera.toScreen(target.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tSceneManager.sm.currSector.draw(g);\n\n\t\tg.setColor(Color.BLACK);\n\n\t\tg.drawImage(ui, 0, 0, 1920, 1010, null);\n\n\t\t// draw player scrap amt\n\t\tg.setFont(Misc.arialBig);\n\t\tg.setColor(Color.white);\n\t\tg.drawString(\"\" + Driver.playerScrap, 1733, 72);\n\n\t\t// draw speed\n\t\tg.setColor(new Color(0, 119, 166));\n\t\tg.fillRect(1872, (int) (113 + 564 - 564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))), 33,\n\t\t\t\t(int) (564 * ((p.vel.getMagnitude() * 20)\n\t\t\t\t\t\t/ (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))));\n\t\tg.setFont(Misc.font);\n\t\tg.setColor(Color.LIGHT_GRAY);\n\t\tg.drawString((int) (p.vel.getMagnitude() * 20) + \" mph\", 1760, 564 - (int) (564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag))))\n\t\t\t\t+ 120);\n\n\t\t// show selected ship\n\t\tif (selected != null && !selected.destroyed) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tCamera.toScreen(selected.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tfor (Ship s : SceneManager.sm.currSector.ships) {\n\t\t\tfor (Part p : s.parts) {\n\t\t\t\tif (p.health < p.baseHealth && Camera.scale > .5) {\n\t\t\t\t\tg.rotate(s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t\tdrawPartHealth(g, p,\n\t\t\t\t\t\t\tCamera.toScreen(new Point(s.pos.x + p.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\t\t\ts.pos.y + p.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t\t\t(int) (40 * Camera.scale), (int) (15 * Camera.scale), p.health, p.baseHealth);\n\t\t\t\t\tg.rotate(-s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (partTarget != null) {\n\t\t\tg.rotate(target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t\tg.setColor(Color.red);\n\t\t\toutlinePart(g,\n\t\t\t\t\tCamera.toScreen(new Point(target.pos.x + partTarget.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\ttarget.pos.y + partTarget.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t(int) (partTarget.width * Part.SQUARE_WIDTH * Camera.scale),\n\t\t\t\t\t(int) (partTarget.height * Part.SQUARE_WIDTH * Camera.scale));\n\t\t\tg.rotate(-target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t}\n\n\t\t// shipYard.draw(g);\n\t\t// starMap.draw(g);\n\n\t\tif (target != null) {\n\t\t\tPoint avg = Camera.toScreen(target.cm.avg(p.cm));\n\t\t\tPoint mapAvg = target.cm.avg(p.cm);\n\t\t\teyeLoc.setXY(mapAvg.x, mapAvg.y);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, eyeFocused ? .1f : .3f));\n\t\t\tg.drawImage(eye, (int)(avg.x - eye.getWidth() * Camera.scale / 2), (int)(avg.y - eye.getHeight() * Camera.scale / 2),\n\t\t\t\t\t(int)(eye.getWidth() * Camera.scale), (int)(eye.getHeight() * Camera.scale), null);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));\n\t\t\t\n\t\t}\n\n\t\tminimap.mc.focus(Camera.toMap(Driver.screenWidth / 2, Driver.screenHeight / 2));\n\t\tminimap.draw(g, SceneManager.sm.currSector.ships);\n\n\t\tif (!running) {\n\t\t\tg.setPaint(new Color(0, 0, 0, 128));\n\t\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.setFont(Misc.arialSmall);\n\t\t\tg.drawString(\"Paused - [p] to resume\", 900, 50);\n\t\t\tg.setColor(Color.cyan);\n\t\t\tg.drawString(\n\t\t\t\t\t\"Protect your reactor, destroy enemies to collect scrap, build up your ship, and make your way to the end of the galaxy!\",\n\t\t\t\t\tDriver.screenWidth / 2 - 920, Driver.screenHeight / 2 - 400);\n\t\t\tg.setColor(Color.WHITE);\n\t\t\tg.drawString(\"CONTROL BASICS:\", Driver.screenWidth / 2 - 940, Driver.screenHeight / 2 - 350);\n\t\t\t\n\t\t\tg.drawString(\"MOVEMENT: Rotation = Q and E, Translation = WASD\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 300);\n\t\t\tg.drawString(\"COMBAT: Right Click on enemy = set as a target: lasers will shoot target when in range\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 250);\n\t\t\tg.drawString(\"CAMERA: Middle Mouse Click on ship = set the camera to that ship\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 200);\n\t\t\tg.drawString(\"Scroll Wheel = zoom\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 150);\n\t\t\tg.drawString(\"Arrow Keys = pan\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 100);\n\t\t\t\n\t\t\tg.drawString(\"GAMEPLAY + STRATEGY:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - 0);\n\t\t\tg.setColor(new Color(217, 52, 52));\n\t\t\tg.drawString(\"If you just started, your ship is weak! Upgrade it before entering combat!\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -50);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.drawString(\"Cannot jump to the next sector if current sector is not clear\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -100);\n\t\t\tg.drawString(\"Enemies will attack you when in range & can't edit ship if in enemy range\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -150);\n\t\t\t\n\t\t\t\n\t\t\t//advanced\n\t\t\tg.drawString(\"ADVANCED:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - -200);\n\t\t\tg.drawImage(eye, Driver.screenWidth / 2 - 340, Driver.screenHeight / 2 + 225, eye.getWidth()/4, eye.getHeight()/4, null);\n\t\t\tg.drawString(\"Middle Click the icon: set the camera to focus on the center of battle\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -250);\n\t\t\tg.drawString(\"Spacebar = recenter camera on player\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -300);\n\t\t}\n\n\t}",
"private void drawFlights(){\n if(counter%180 == 0){ //To not execute the SQL request every frame.\n internCounter = 0;\n origins.clear();\n destinations.clear();\n internCounter = 0 ;\n ArrayList<String> answer = GameScreen.database.readDatas(\"SELECT Origin, Destination FROM Flights\");\n for(String s : answer){\n internCounter++;\n String[] parts = s.split(\" \");\n String xyOrigin, xyDestination;\n try{\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[0]+\"' ;\").get(0);\n } catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[0]+\"' ;\");\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n origins.add(new Vector2(Float.parseFloat(xyOrigin.split(\" \")[0]), Float.parseFloat(xyOrigin.split(\" \")[1])));\n\n try{\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[1]+\"' ;\").get(0);\n }catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[1]+\"' ;\");\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n destinations.add(new Vector2(Float.parseFloat(xyDestination.split(\" \")[0]), Float.parseFloat(xyDestination.split(\" \")[1])));\n }\n }\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.setColor(Color.WHITE);\n renderer.circle(600, 380, 4);\n for(int i = 0; i<internCounter; i++){\n renderer.line(origins.get(i), destinations.get(i));\n renderer.setColor(Color.RED);\n renderer.circle(origins.get(i).x, origins.get(i).y, 3);\n renderer.setColor(Color.GREEN);\n renderer.circle(destinations.get(i).x, destinations.get(i).y, 3);\n }\n renderer.end();\n }",
"public void draw() {\n // añadimos el programa al entorno de opengl\n GLES20.glUseProgram(mProgram);\n\n // obtenemos el identificador de los sombreados del los vertices a vPosition\n positionHandle = GLES20.glGetAttribLocation(mProgram, \"vPosition\");\n\n // habilitamos el manejo de los vertices del triangulo\n GLES20.glEnableVertexAttribArray(positionHandle);\n\n // Preparamos los datos de las coordenadas del triangulo\n GLES20.glVertexAttribPointer(positionHandle, COORDS_PER_VERTEX,\n GLES20.GL_FLOAT, false,\n vertexStride, vertexBuffer);\n\n // Obtenemos el identificador del color del sombreado de los fragmentos\n colorHandle = GLES20.glGetUniformLocation(mProgram, \"vColor\");\n\n // Establecemos el color para el dibujo del triangulo\n GLES20.glUniform4fv(colorHandle, 1, color, 0);\n\n // SE dibuja el triangulo\n GLES20.glDrawArrays(GLES20.GL_LINE_LOOP, 0, vertexCount);\n\n // Deshabilitamos el arreglo de los vertices (que dibuje una sola vez)\n GLES20.glDisableVertexAttribArray(positionHandle);\n }",
"public void Display() \n {\n float theta = velocity.heading() + PI/2;\n fill(175);\n stroke(0);\n pushMatrix();\n translate(pos.x,pos.y);\n rotate(theta);\n beginShape();\n vertex(0, -birdSize*2);\n vertex(-birdSize, birdSize*2);\n vertex(birdSize, birdSize*2);\n endShape(CLOSE);\n popMatrix();\n }",
"public void display() {\n PVector d = location.get();\n float diam = d.y/height;\n println(diam);\n\n stroke(0);\n fill(255,0,0);\n ellipse (location.x, location.y, diameter, diameter);\n }",
"public void draw() {\n \n }",
"public void draw() {\r\n\t\tbackground(255); // Clear the screen with a white background\r\n\r\n\t\ttextSize(12);\r\n\t\tfill(0);\r\n\r\n\t\tstroke(0);\r\n\t\tcurve.draw(this);\r\n\t}",
"void draw() {\n canvas.drawColor(Color.BLACK);\n insertSort(vstar);\n for( int i=0; i<NUMSTARS; i++){\n vstar[i].draw();\n }\n }",
"public void draw(){\n\t\t/* Stamps a copy of the planet at the position. the file of the planet image is under folder of \"images\".\n\t\t * a mistake easily to be ignored here..*/\n\t\tString imageToDraw = \"images/\" + imgFileName;\n\t\tStdDraw.picture(xxPos, yyPos, imageToDraw);\n\n\t}",
"public void drawVector(PVector v, PVector loc, float scayl) {\n pushMatrix();\n float arrowsize = 4;\n // Translate to location to render vector\n translate(loc.x,loc.y);\n stroke(0);\n // Call vector heading function to get direction (note that pointing up is a heading of 0) and rotate\n rotate(v.heading2D());\n // Calculate length of vector & scale it to be bigger or smaller if necessary\n float len = v.mag()*scayl;\n // Draw three lines to make an arrow (draw pointing up since we've rotate to the proper direction)\n line(0,0,len,0);\n line(len,0,len-arrowsize,+arrowsize/2);\n line(len,0,len-arrowsize,-arrowsize/2);\n popMatrix();\n}",
"public void draw();",
"public void draw();",
"public void draw();",
"void render() {\n\t\tif (!dragLock)\n\t\t\tfucusLocks();\n\n\t\t// display help information\n\t\tString selected = isSelected ? \" [selected]\" : \"\";\n\t\tmyParent.text(id + selected, anchor.x + 10, anchor.y);\n\n\t\t// display points and lines with their colourings\n\t\tfor (int i = 0; i < amount; i++) {\n\n\t\t\tpoint[i].render();\n\n\t\t\tif (state == State.DRAG_AREA)\n\t\t\t\tmyParent.stroke(255, 255, 0);\n\n\t\t\tline[i].draw();\n\n\t\t}\n\n\t\t// display rotation ellipse in anchor position\n\t\tif (state == State.ROTATE && isSelected) {\n\t\t\tmyParent.noFill();\n\t\t\tif (!dragLock)\n\t\t\t\tmyParent.stroke(255, 255, 0);\n\t\t\telse\n\t\t\t\tmyParent.stroke(0, 255, 0);\n\t\t\tmyParent.ellipse(anchor.x, anchor.y, 15, 15);\n\t\t}\n\n\t\t// display drag area rectangle in anchor position\n\t\tif (state == State.DRAG_AREA) {\n\t\t\tmyParent.noFill();\n\t\t\tif (!dragLock)\n\t\t\t\tmyParent.stroke(255, 255, 0);\n\t\t\telse\n\t\t\t\tmyParent.stroke(0, 255, 0);\n\t\t\tmyParent.rect(anchor.x, anchor.y, 15, 15);\n\t\t}\n\n\t\t// display anchor point\n\t\tmyParent.rect(anchor.x, anchor.y, 5, 5);\n\n\t\t// display line centres\n\t\tmyParent.noFill();\n\t\tmyParent.stroke(150);\n\t\tmyParent.rectMode(PConstants.CENTER);\n\t\tmyParent.rect(X.x, X.y, 5, 5);\n\t\tmyParent.rect(Y.x, Y.y, 5, 5);\n\t\tmyParent.rect(Z.x, Z.y, 5, 5);\n\t\tmyParent.rect(Q.x, Q.y, 5, 5);\n\t}",
"public void draw(){\n\t\tcomponent.draw();\r\n\t}",
"public void render () {\n\t\tcam.update();\n\t\tbatch.setProjectionMatrix(cam.combined);\n\t\trenderBackground();\n\t\t/*shapeRender.setProjectionMatrix(cam.combined);\n\t\tshapeRender.begin(ShapeRenderer.ShapeType.Line);\n\t\tshapeRender.ellipse(world.trout.hitBox.x, world.trout.hitBox.y, world.trout.hitBox.width, world.trout.hitBox.height);\n\t\tshapeRender.circle(world.hook.circleBounds.x, world.hook.circleBounds.y, world.hook.circleBounds.radius);\n\t\tshapeRender.point(world.trout.position.x, world.trout.position.y, 0f);*/\n\t\trenderObjects();\n\t\t\n\t}",
"public void drawControlPolygon() {\n\t\t//this.frame.stroke(255, 0, 0);\n\t\tfor(int i=0;i<points.length;i++) {\n\t\t\tfor(int j=0;j<points[i].length;j++)\n\t\t\t\tthis.frame.drawVertex(points[i][j]);\n\t\t}\n\t}",
"public void draw() {\n\t\tapplyColors();\n\n\t\tfloat halfHeight = height / 2,\n\t\t\t\tdiameter = 2 * radius;\n\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\t\t// Draw top of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, -height);\n\t\t// Draw bottom of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\n\t\tRobotRun.getInstance().beginShape(RobotRun.TRIANGLE_STRIP);\n\t\t// Draw a string of triangles around the circumference of the Cylinders top and bottom.\n\t\tfor (int degree = 0; degree <= 360; ++degree) {\n\t\t\tfloat pos_x = RobotRun.cos(RobotRun.DEG_TO_RAD * degree) * radius,\n\t\t\t\t\tpos_y = RobotRun.sin(RobotRun.DEG_TO_RAD * degree) * radius;\n\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, halfHeight);\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, -halfHeight);\n\t\t}\n\n\t\tRobotRun.getInstance().endShape();\n\t}",
"public void draw(){\n StdDraw.picture(this.xCoordinate,this.yCoordinate,this.img);\n }",
"private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}",
"public void drawVector(PVector v, float x, float y, float scayl) {\n pushMatrix();\n float arrowsize = 4;\n // Translate to location to render vector\n translate(x,y);\n stroke(100);\n // Call vector heading function to get direction (note that pointing up is a heading of 0) and rotate\n rotate(v.heading2D());\n // Calculate length of vector & scale it to be bigger or smaller if necessary\n float len = v.mag()*scayl;\n // Draw three lines to make an arrow (draw pointing up since we've rotate to the proper direction)\n line(0,0,len,0);\n line(len,0,len-arrowsize,+arrowsize/2);\n line(len,0,len-arrowsize,-arrowsize/2);\n popMatrix();\n }",
"public static void render(FPoint2 viewPt) {\n V.fillCircle(viewPt, V.getScale() * .4);\n }",
"private void showPoints() {\n if (currentPoints !=0) {\n tVcurrentPoints.setText(getString(R.string.youHaveReached) + currentPoints + getString(R.string.reachedPoints));\n }\n }",
"void draw();",
"public void display(GL2 gl)\r\n {\n\tgl.glColor3f(0,1,0);\r\n\tgl.glBegin(GL2.GL_LINES);\r\n\tPoint2d c = R.getPosition();\r\n\tgl.glVertex2d(c.x, c.y);\r\n\tgl.glVertex2d(x.x, x.y);\r\n\tgl.glEnd();\t\r\n }",
"private void render() {\n if (drawingArea != null) {\n //get graphics of the image where coordinate and function will be drawn\n Graphics g = drawingArea.getGraphics();\n\n //draw the x-axis and y-axis\n g.drawLine(0, originY, width, originY);\n g.drawLine(originX, 0, originX, height);\n\n //print numbers on the x-axis and y-axis, based on the scale\n for (int i = 0; i < lengthX; i++) {\n g.drawString(Integer.toString(i), (int) (originX + (i * scaleX)), originY);\n g.drawString(Integer.toString(-1 * i), (int) (originX + (-i * scaleX)), originY);\n }\n for (int i = 0; i < lengthY; i++) {\n g.drawString(Integer.toString(-1 * i), originX, (int) (originY + (i * scaleY)));\n g.drawString(Integer.toString(i), originX, (int) (originY + (-i * scaleY)));\n }\n\n // draw the lines\n for (int i = 0; i < points1.size() - 1; i++) {\n g.setColor(Color.BLACK);\n g.drawLine((int) (originX + points1.get(i).x * scaleX), (int) (originY - points1.get(i).y * scaleY),\n (int) (originX + points1.get(i + 1).x * scaleX), (int) (originY - points1.get(i + 1).y * scaleY));\n g.setColor(Color.RED);\n g.drawLine((int) (originX + points2.get(i).x * scaleX), (int) (originY - points2.get(i).y * scaleY),\n (int) (originX + points2.get(i + 1).x * scaleX), (int) (originY - points2.get(i + 1).y * scaleY));\n }\n }\n }",
"private void paintCourbePoints() {\n\t\tfloat x, y;\n\t\tint i, j;\n\t\t\n\t\tfor(x=xMin; x<=xMax; x++) {\n\t\t\ty = parent.getY(x);\n\t\t\t\n\t\t\tif(y>yMin && y<yMax) {\n\t\t\t\ti = convertX(x);\n\t\t\t\tj = convertY(y);\n\t\t\t\t\n\t\t\t\t//Utilisation d'un carre/losange pour simuler un point \n\t\t\t\t//de taille superieur a un pixel car celui-ci est peu visible.\n\t\t\t\tpaintPointInColor(i-2, j);\n\t\t\t\tpaintPointInColor(i-1, j-1);\t\t\t\t\n\t\t\t\tpaintPointInColor(i-1, j);\n\t\t\t\tpaintPointInColor(i-1, j+1);\n\t\t\t\tpaintPointInColor(i, j-2);\t//\t *\n\t\t\t\tpaintPointInColor(i, j-1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j);\t//\t* * * * *\n\t\t\t\tpaintPointInColor(i, j+1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j+2);\t//\t *\n\t\t\t\tpaintPointInColor(i+1, j-1);\n\t\t\t\tpaintPointInColor(i+1, j);\n\t\t\t\tpaintPointInColor(i+1, j+1);\n\t\t\t\tpaintPointInColor(i+2, j);\n\t\t\t}\n\t\t}\t\t\n\t}",
"public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}",
"public void drawParticles() {}",
"public void Draw(Graphics g)\n/* */ {\n/* 55 */ g.setColor(this.m_color);\n/* */ \n/* 57 */ Point prevPt = new Point(0, 0);Point currPt = new Point(0, 0);\n/* */ \n/* 59 */ for (double t = 0.0D; t < 1.01D; t += this.m_tValue) {\n/* 60 */ ptFromTVal(t, currPt);\n/* */ \n/* 62 */ if (t == 0.0D) {\n/* 63 */ prevPt.x = currPt.x;\n/* 64 */ prevPt.y = currPt.y;\n/* */ }\n/* */ \n/* 67 */ g.drawLine(prevPt.x, prevPt.y, currPt.x, currPt.y);\n/* */ \n/* 69 */ if (this.m_showTPoints) {\n/* 70 */ g.fillOval(currPt.x - this.PT_RADIUS, currPt.y - this.PT_RADIUS, this.PT_DIAMETER, this.PT_DIAMETER);\n/* */ }\n/* */ \n/* 73 */ prevPt.x = currPt.x;\n/* 74 */ prevPt.y = currPt.y;\n/* */ }\n/* */ }",
"public void render()\n\t{\n\t\tBufferStrategy bs = this.getBufferStrategy();\n\n\t\tif (bs == null)\n\t\t{\n\t\t\tcreateBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\n\t\tGraphics g = bs.getDrawGraphics();\n\t\t//////////////////////////////\n\n\t\tg.setColor(Color.DARK_GRAY);\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\tif (display != null && GeneticSimulator.updateRendering)\n\t\t{\n\t\t\tg.drawImage(display, 0, 0, getWidth(), getHeight(), this);\n\t\t}\n\n\t\tWorld world = GeneticSimulator.world();\n\n\t\tworld.draw((Graphics2D) g, view);\n\n\t\tg.setColor(Color.WHITE);\n\t\tg.drawString(String.format(\"view: [%2.1f, %2.1f, %2.1f, %2.1f, %2.2f]\", view.x, view.y, view.width, view.height, view.PxToWorldScale), (int) 10, (int) 15);\n\n\t\tg.drawString(String.format(\"world: [time: %2.2f pop: %d]\", world.getTime() / 100f, World.popCount), 10, 30);\n\n\t\tg.drawRect(view.pixelX, view.pixelY, view.pixelWidth, view.pixelHeight);\n//\t\tp.render(g);\n//\t\tc.render(g);\n\n\n\t\t//g.drawImage(player,100,100,this);\n\n\t\t//////////////////////////////\n\t\tg.dispose();\n\t\tbs.show();\n\t}",
"@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tgc.setFill(this.color.getColor());\n\t\tgc.fillRect(MyPoint.point[0], MyPoint.point[1], this.width, this.height);\n\t}",
"private void drawDebugInfo(final Graphics2D theGraphics, final Vehicle theVehicle) {\n int x = theVehicle.getX() * SQUARE_SIZE;\n int y = theVehicle.getY() * SQUARE_SIZE;\n\n // draw numbers on each vehicle\n theGraphics.setColor(Color.WHITE);\n theGraphics.drawString(theVehicle.toString(), x, y + SQUARE_SIZE - 1);\n theGraphics.setColor(Color.BLACK);\n theGraphics.drawString(theVehicle.toString(), x + 1, y + SQUARE_SIZE);\n\n // draw arrow on vehicle for its direction\n final Direction dir = theVehicle.getDirection();\n int dx = (SQUARE_SIZE - MARKER_SIZE) / 2;\n int dy = dx;\n\n switch (dir) {\n case WEST:\n dx = 0;\n break;\n\n case EAST:\n dx = SQUARE_SIZE - MARKER_SIZE;\n break;\n\n case NORTH:\n dy = 0;\n break;\n\n case SOUTH:\n dy = SQUARE_SIZE - MARKER_SIZE;\n break;\n\n default:\n }\n\n x = x + dx;\n y = y + dy;\n\n theGraphics.setColor(Color.YELLOW);\n theGraphics.fillOval(x, y, MARKER_SIZE, MARKER_SIZE);\n }",
"public void draw()\n {\n super.draw();\n k = 0;\n traceOK = true;\n\n // Initialize n, x0, and xn in the control panel.\n nText.setText(\" \");\n x0Text.setText(\" \");\n xnText.setText(\" \");\n\n PlotFunction plotFunction = getSelectedPlotFunction();\n\n // Create the fixed-point iteration root finder.\n finder = new FixedPointRootFinder((Function) plotFunction.getFunction());\n }",
"public void drawRoad(int player, int location, Graphics g){\n\t}",
"@Override\r\n\tpublic void display(GLAutoDrawable drawable) {\r\n\t\tGL2 gl = drawable.getGL().getGL2();\r\n\t\tgl.glClear(GL2.GL_COLOR_BUFFER_BIT);\r\n\r\n\t\t//points should be in the same zone\r\n\t\tDrawMPL(gl,0,0,30,25);\r\n\t\tDrawMPL(gl,0,0,-100,0);\r\n\t\tDrawMPL(gl,0,0,0,-100);\r\n\t\tDrawMPL(gl,-70,25,30,25);\r\n\t\tDrawMPL(gl,-70,25,-100,0);\r\n\t\tDrawMPL(gl,-70,25,-70,-75);\r\n\t\tDrawMPL(gl,-100,-100,-100,0);\r\n\t\tDrawMPL(gl,-100,-100,0,-100);\r\n\t\tDrawMPL(gl,-100,-100,-70,-75);\r\n\t\tDrawMPL(gl,-70,-75,30,-75);\r\n\t\tDrawMPL(gl,0,-100,30,-75);\r\n\t\tDrawMPL(gl,30,-75,30,25);\r\n\t}",
"private void definePoints(){\n defineLinePoints(x1, y1, x2, y2);\n defineLinePoints(x1,y1, x3, y3);\n defineLinePoints(x2,y2, x3, y3);\n }",
"public void draw(GL3 gl, CoordFrame2D frame) {\n Point2DBuffer buffer = new Point2DBuffer(points);\n\n int[] names = new int[1];\n gl.glGenBuffers(1, names, 0);\n gl.glBindBuffer(GL.GL_ARRAY_BUFFER, names[0]);\n gl.glBufferData(GL.GL_ARRAY_BUFFER, points.size() * 2 * Float.BYTES,\n buffer.getBuffer(), GL.GL_STATIC_DRAW);\n\n gl.glVertexAttribPointer(Shader.POSITION, 2, GL.GL_FLOAT, false, 0, 0);\n Shader.setModelMatrix(gl, frame.getMatrix());\n gl.glDrawArrays(GL.GL_LINE_STRIP, 0, points.size());\n\n gl.glDeleteBuffers(1, names, 0);\n }",
"public void draw() {\n }",
"private void drawLight() {\n final int pointMVPMatrixHandle = GLES20.glGetUniformLocation(mPointProgramHandle, \"u_MVPMatrix\");\n final int pointPositionHandle = GLES20.glGetAttribLocation(mPointProgramHandle, \"a_Position\");\n\n // Pass in the position.\n GLES20.glVertexAttrib3f(pointPositionHandle, mLightPosInModelSpace[0], mLightPosInModelSpace[1], mLightPosInModelSpace[2]);\n\n // Since we are not using a buffer object, disable vertex arrays for this attribute.\n GLES20.glDisableVertexAttribArray(pointPositionHandle);\n\n // Pass in the transformation matrix.\n Matrix.multiplyMM(mMVPMatrix, 0, mViewMatrix, 0, mLightModelMatrix, 0);\n Matrix.multiplyMM(mTemporaryMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);\n System.arraycopy(mTemporaryMatrix, 0, mMVPMatrix, 0, 16);\n GLES20.glUniformMatrix4fv(pointMVPMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // Draw the point.\n GLES20.glDrawArrays(GLES20.GL_POINTS, 0, 1);\n }",
"public synchronized void draw() {\n // Clear the canvas\n// canvas.setFill(Color.BLACK);\n// canvas.fillRect(0, 0, canvasWidth, canvasHeight);\n canvas.clearRect(0, 0, canvasWidth, canvasHeight);\n\n // Draw a grid\n if (drawGrid) {\n canvas.setStroke(Color.LIGHTGRAY);\n canvas.setLineWidth(1);\n for (int i = 0; i < mapWidth; i++) {\n drawLine(canvas, getPixel(new Point(i - mapWidth / 2, -mapHeight / 2)), getPixel(new Point(i - mapWidth / 2, mapHeight / 2)));\n drawLine(canvas, getPixel(new Point(-mapWidth / 2, i - mapHeight / 2)), getPixel(new Point(mapWidth / 2, i - mapHeight / 2)));\n }\n }\n\n // Draw each player onto the canvas\n int height = 0;\n for (Player p : playerTracking) {\n canvas.setStroke(p.getColor());\n\n drawName(canvas, p.getName(), height, p.getColor());\n height += 30;\n\n canvas.setLineWidth(7);\n\n // Draw each position\n Point last = null;\n int direction = 0;\n for (Point point : p.getPoints()) {\n if (last != null) {\n drawLine(canvas, getPixel(last), getPixel(point));\n\n Point dir = point.substract(last);\n if (dir.X > dir.Y && dir.X > 0) {\n direction = 1;\n } else if (dir.X < dir.Y && dir.X < 0) {\n direction = 3;\n } else if (dir.Y > dir.X && dir.Y > 0) {\n direction = 2;\n } else if (dir.Y < dir.X && dir.Y < 0) {\n direction = 0;\n }\n }\n last = point;\n }\n\n drawSlug(canvas, p.getId() - 1, getPixel(last), direction);\n }\n }",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"Inside draw of Circle ..Point is: \"+center.getX() +\",\"+center.getY());\n\t}",
"public void draw() {\r\n System.out.print(this);\r\n }",
"public void draw(){\n textAlign(CENTER);\n route.update(pp, qq);\n SoundSys();\n fill(0xff31F0FF, 127);\n noStroke();\n ellipse(mouseX, mouseY, 30, 30);\n}",
"public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}",
"public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }",
"public void draw() {\n\t\tfor (int i = 0; i < particleCount; i++) {\r\n\t\t\tif (particles[i] != null) {\r\n\t\t\t\tglBegin(GL_QUADS);\r\n\t\t\t\t{\r\n\t\t\t\t\tparticles[i].draw();\r\n\t\t\t\t}\r\n\t\t\t\tglEnd();\r\n\t\t\t}\r\n\t\t}\r\n\t\tglColor3f(1, 1, 1);\r\n\t}",
"public void draw(float vx, float vy, float tu, float tv, float cr, float cg, float cb, float ca){\n\t\tif(!(currentVertex + 1 < MAX_VERTICES))\n\t\t\tflushToGL();\n\t\t\n\t\tpositions[currentVertex].set(vx, vy);\n\t\ttexcoords[currentVertex].set(tu, tv);\n\t\tcolors[currentVertex].set(cr, cg, cb, ca);\n\t\t++currentVertex;\n\t}",
"private void showPoints() {\n\t\tMarkerOptions options = new MarkerOptions();\n\n\t\tfor (Integer i = 0; i < markerPoints.size(); i++) {\n\t\t\tLatLng point = markerPoints.get(i);\n\n\t\t\t// Setting the position of the marker\n\t\t\toptions.position(point);\n\n\t\t\t// Setting title for the MarkerOptions\n\t\t\toptions.title(names.get(i));\n\t\t\t// Setting snippet for the MarkerOptions\n\t\t\toptions.snippet(\"Latitude:\" + point.latitude + \",Longitude: \"\n\t\t\t\t\t+ point.longitude);\n\n\t\t\tif (statusVal == 0) {\n\n\t\t\t\toptions.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n\n\t\t\t} else {\n\t\t\t\toptions.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n\n\t\t\t}\n\n\t\t\t// Add new marker to the Google Map Android API V2\n\t\t\tgMmap.addMarker(options);\n\n\t\t\t// Creating CameraUpdate object for position\n\t\t\tCameraUpdate updatePosition = CameraUpdateFactory.newLatLngZoom(\n\t\t\t\t\tpoint, 15);\n\n\t\t\t// Applying zoom to the marker position\n\t\t\tgMmap.animateCamera(updatePosition);\n\t\t}\n\n\t}",
"public void show() {\r\n\t\tif ((polygon.npoints > 1)\r\n\t\t\t\t&& ((polygon.xpoints[0] != polygon.xpoints[1]) || (polygon.ypoints[0] != polygon.ypoints[1]))) {\r\n\t\t\tGraphics2D gr = (Graphics2D) graphics;\r\n\t\t\tgr.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\t\tgr.setPaint(colorPar.getDevColor());\r\n\t\t\tgr.setStroke(new BasicStroke((float) lineWidth));\r\n\t\t\tPolygon p = isTransformed ? transformed() : polygon;\r\n\t\t\tGeneralPath gp = new GeneralPath();\r\n\t\t\tgp.moveTo((float) (p.xpoints[0]), (float) (p.ypoints[0]));\r\n\t\t\tfor (int i = 1; i < p.npoints; i++) {\r\n\t\t\t\tgp.lineTo((float) (p.xpoints[i]), (float) (p.ypoints[i]));\r\n\t\t\t}\r\n\t\t\tgr.draw(gp);\r\n\t\t\tif (validBounds) {\r\n\t\t\t\tsetBounds(gp.getBounds());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }",
"@Override\n public void display() {\n EasyViewer.beginOverlay();\n \n glColor4d( 0,1,0,alpha.getValue() );\n glLineWidth(2); \n glBegin( GL_LINE_STRIP );\n for ( int i = 0; i < 10; i++) {\n glVertex2d( 200 + i*10, 100 +i*i );\n }\n glEnd();\n \n glColor4d( 1,0,0,alpha.getValue() );\n glPointSize(5);\n glBegin( GL_POINTS );\n for ( int i = 0; i < 10; i++) {\n glVertex2d( 200 + i*10, 100+i*i );\n } \n glEnd();\n \n \n // lets draw some 2D text\n// glColor4d( 1,1,1,1 ); \n// EasyViewer.printTextLines( \"(100,100)\", 100, 100, 12, GLUT.BITMAP_HELVETICA_10 );\n// glRasterPos2d( 200, 200 );\n// EasyViewer.printTextLines( \"(200,200)\\ncan have a second line of text\", 200, 200, 12, GLUT.BITMAP_HELVETICA_10 );\n \n EasyViewer.endOverlay();\n \n }",
"@Override\n\tpublic void draw(Graphics graphics) {\n\t\tgraphics.setColor(Color.black);\t\t\t\t\t\t\t\t\t//Farbe schwarz\n\t\tgraphics.drawRect(point.getX(),point.getY() , width, height);\t//malt ein leeren Rechteck\n\t}",
"public void recordWaypoints(){\n\t\t\n\t\tfor (int i = 0; i < waypoints.size(); i++) {\n WayPoint wei = waypoints.get(i);\n int x = (int)Math.round((wei.getX() * scale) + width/2);\n int y = (int)Math.round((wei.getY() * scale) + height/2);\n g2d.setColor(Color.blue);\n g2d.fillRect(x,y,4,4);\n\t\t\t\t\t \n //System.out.println(x + \" \" + y);\n }\n\t}",
"void diplayNeighborPoints() {\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tif (point[i].position.dist(P) < 10) {\n\t\t\t\tmyParent.pushStyle();\n\t\t\t\tmyParent.fill(255, 255, 0);\n\t\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5); // draw\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// point\n\t\t\t\tmyParent.text(\"left neighbor\", point[neighbor(i)[0]].x, point[neighbor(i)[0]].y);\n\t\t\t\tmyParent.text(\"right neighbor\", point[neighbor(i)[1]].x, point[neighbor(i)[1]].y);\n\t\t\t\tmyParent.text(\"opposite\", point[neighbor(i)[2]].x, point[neighbor(i)[2]].y);\n\t\t\t\t// neighbor(int sourcePointId)\n\t\t\t\tmyParent.noFill();\n\t\t\t\tmyParent.popStyle();\n\t\t\t}\n\t\t}\n\n\t\tif (state == State.SCALE_PORPORTIONALLY_POINT || state == State.SCALE_FREE_POINT)\n\t\t\tdisplayLineBetweenCurrentAndOppositePoints();\n\t}",
"void renderHotspots() {\n boolean afterCurrent = false;\n boolean hasLastPos = false;\n float lastX = 0.0f;\n float lastY = 0.0f;\n float lastZ = 0.0f;\n \n final float halfWidth = 0.1f / 2;\n final float halfLength = 0.1f / 2;\n final float halfHeight = 0.1f / 2;\n final float eyeHeight = 0.91712f;//1.1f;\n \n // Find pan position offset vector\n if (selectedTimeInterval.getLocationMetadataEntry() == null) {\n return;\n }\n \n if (!dstLocationVectorExists)\n return;\n \n GL11.glLoadIdentity();\n // set up for tracking hotspot screen x,y\n\t\tfloat projectedXYZ[] = new float[3]; \t\t\n\t\tprojectionMatrix.clear();\n\t\tGL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projectionMatrix);\n\t\tgetMatrixAsArray(projectionMatrix, projectionArray);\n\t\tviewportMatrix.clear();\n\t\tGL11.glGetInteger(GL11.GL_VIEWPORT, viewportMatrix);\n\t\tviewportArray[0] = viewportMatrix.get(0);\n\t\tviewportArray[1] = viewportMatrix.get(1);\n\t\tviewportArray[2] = viewportMatrix.get(2);\n\t\tviewportArray[3] = viewportMatrix.get(3);\n //System.out.println(\"\"+viewportArray[0] + \" \"+ viewportArray[1]+\" \"+viewportArray[2]+\" \"+viewportArray[3] ); \n\t\tmodelMatrix.clear();\n\t\tGL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, modelMatrix);\n\t\tgetMatrixAsArray(modelMatrix, modelArray);\n \n GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); // no texture\n \n for (int i=0; i<roverTrackingList.size()-1; i++) {\n \tRoverTrackingListEntry listEntry = (RoverTrackingListEntry) roverTrackingList.get(i);\n\t\t\tlistEntry.screenX = 0.0f;\n\t\t\tlistEntry.screenY = 0.0f;\n \t\n double da = listEntry.locationMetadataEntry.rover_origin_offset_vector_a + listEntry.siteMetadataEntry.offset_vector_a - currentLocationVectorA;\n double db = listEntry.locationMetadataEntry.rover_origin_offset_vector_b + listEntry.siteMetadataEntry.offset_vector_b - currentLocationVectorB;\n double dc = listEntry.locationMetadataEntry.rover_origin_offset_vector_c + listEntry.siteMetadataEntry.offset_vector_c - currentLocationVectorC;\n \n float x = (float) db;\n float y = (-(float)dc) - eyeHeight;\n float z = - (float) da;\n\n // calculate brightness of point based on number of images visible for location\n float brightness = 0.0f;\n \n if (listEntry.locationListEntry != null && listEntry.locationListEntry.getNumEnabledImages() > 2) {\n \t// track screen x, y of hotspot\n \t\t\tGLU.gluProject(x, y, z, modelArray, projectionArray, viewportArray, projectedXYZ);\n \t\t\tif (projectedXYZ[2] < 1.0f) {\n\t \t\t\tlistEntry.screenX = projectedXYZ[0];\n\t \t\t\t// transform y from opengl screen coords to regular screen coords\n\t \t\t\tlistEntry.screenY = viewportArray[3] - projectedXYZ[1];\n \t\t\t}\n \t\n \t// render hotspot\n GL11.glLoadIdentity();\n GL11.glTranslatef(x, y, z);\n //System.out.println(\"\"+listEntry.screenX+\" \"+listEntry.screenY);\n \n brightness = 0.5f + 0.1f * listEntry.locationListEntry.getNumEnabledImages();\n if (brightness > 1.0f) {\n brightness = 1.0f;\n }\n \n GL11.glBegin(GL11.GL_QUADS); // D draw A Quad\n \n if (listEntry.locationListEntry.getStartLocation().equals(selectedTimeInterval.getStartLocation())) {\n GL11.glColor3f(brightness, 0.0f, brightness); \n }\n else if (afterCurrent) {\n GL11.glColor3f(0.0f, 0.0f, brightness);\n }\n else {\n GL11.glColor3f(brightness, 0.0f, 0.0f);\n }\n \n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Top)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Top)\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Bottom Left Of The Quad (Top)\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Bottom Right Of The Quad (Top)\n\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Top Right Of The Quad (Bottom)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Top Left Of The Quad (Bottom)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Bottom)\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Bottom)\n\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Top Right Of The Quad (Front)\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Top Left Of The Quad (Front)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Bottom Left Of The Quad (Front)\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Bottom Right Of The Quad (Front)\n\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Back)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Back)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Back)\n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Back)\n\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Top Right Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Bottom Right Of The Quad (Left)\n\n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Right)\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Top Left Of The Quad (Right)\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Bottom Left Of The Quad (Right)\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Right)\n \n GL11.glEnd(); // Done Drawing The Quads\n\t }\n \n if (hasLastPos && !listEntry.segmentStart) {\n brightness = 0.5f;\n if (afterCurrent) {\n GL11.glColor3f(0.0f, 0.0f, brightness);\n }\n else {\n GL11.glColor3f(brightness, 0.0f, 0.0f);\n } \n GL11.glLoadIdentity();\n GL11.glBegin(GL11.GL_LINES); \n// GL11.glColor3f(1.0f, 0.0f, 0.0f); \n GL11.glVertex3f(lastX, lastY, lastZ);\n GL11.glVertex3f(x, y, z);\n GL11.glEnd();\n }\n \n lastX = x;\n lastY = y;\n lastZ = z;\n hasLastPos = true;\n if (listEntry.locationListEntry != null && listEntry.locationListEntry.getStartLocation().equals(this.selectedTimeInterval.getStartLocation())) {\n afterCurrent = true;\n }\n }\n }",
"public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}",
"private void drawComponents () {\n // Xoa het nhung gi duoc ve truoc do\n mMap.clear();\n // Ve danh sach vi tri cac thanh vien\n drawMembersLocation();\n // Ve danh sach cac marker\n drawMarkers();\n // Ve danh sach cac tuyen duong\n drawRoutes();\n }",
"public void drawPokemon() {\n setAttackText();\n drawImage();\n }",
"public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }",
"public void draw(Canvas canvas) {\n\t\tcanvas.drawPoint((float)getX(), (float)getY(), getPaint());\n\t}"
]
| [
"0.74320936",
"0.74320936",
"0.74320936",
"0.74320936",
"0.74255395",
"0.70603216",
"0.7057083",
"0.67640203",
"0.67378104",
"0.67220104",
"0.6611405",
"0.6588421",
"0.64175296",
"0.6408214",
"0.6339665",
"0.6337346",
"0.633528",
"0.63345003",
"0.63232785",
"0.631705",
"0.63042545",
"0.62995666",
"0.6293943",
"0.62715316",
"0.62583977",
"0.62256914",
"0.6222559",
"0.62051576",
"0.61732304",
"0.6169896",
"0.6152906",
"0.61519253",
"0.61437434",
"0.61418283",
"0.6111009",
"0.60751855",
"0.6072545",
"0.60629946",
"0.6055592",
"0.6050294",
"0.6045215",
"0.6043833",
"0.60361236",
"0.60189044",
"0.6017046",
"0.60035384",
"0.60003173",
"0.5978444",
"0.59764767",
"0.5967725",
"0.5967725",
"0.5967725",
"0.59606373",
"0.59564686",
"0.59532374",
"0.5939679",
"0.59349066",
"0.59329236",
"0.59289795",
"0.59283245",
"0.5925258",
"0.5917049",
"0.59091485",
"0.58947146",
"0.5890456",
"0.5889573",
"0.5882033",
"0.58818865",
"0.5881618",
"0.58813983",
"0.58778906",
"0.58752716",
"0.587411",
"0.58736634",
"0.58712965",
"0.58687675",
"0.58672005",
"0.58667743",
"0.5862771",
"0.58606416",
"0.5858226",
"0.5852823",
"0.5849982",
"0.5844423",
"0.5828713",
"0.582597",
"0.5822038",
"0.5820497",
"0.5804801",
"0.5801425",
"0.57978976",
"0.57956654",
"0.5790767",
"0.57905895",
"0.5780314",
"0.57771933",
"0.57748926",
"0.57655835",
"0.5762997",
"0.5761815"
]
| 0.7104034 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.