repo_name stringlengths 7 104 | file_path stringlengths 13 198 | context stringlengths 67 7.15k | import_statement stringlengths 16 4.43k | code stringlengths 40 6.98k | prompt stringlengths 227 8.27k | next_line stringlengths 8 795 |
|---|---|---|---|---|---|---|
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos1Left.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos1Left extends CommandGroup {
public Auto_Pos1Left() {
this.addParallel(new Auto_LoadBall());
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new EncoderPosDriveCommand(9088, 0.65)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos1Left.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos1Left extends CommandGroup {
public Auto_Pos1Left() {
this.addParallel(new Auto_LoadBall());
this.addSequential(new EncoderPosDriveCommand(9088, 0.65));
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new TurnByAngleCommand(59.4)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/catapult/CatapultShootCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot; | package org.usfirst.frc.team2557.robot.commands.catapult;
public class CatapultShootCommand extends Command {
Timer timer;
public CatapultShootCommand() { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.catapult); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/chassis/SpeedDriveCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.PIDController;
import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot; | package org.usfirst.frc.team2557.robot.commands.chassis;
public class SpeedDriveCommand extends Command {
public static final double MAX_SPEED = 0; // TODO: Find max encoder speed
private final double Kp = 0.25;
private final double Ki = 0.15;
private final double Kd = 0;
private PIDController ... | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.chassis); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/subsystems/Intake.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/RobotMap.java
// public class RobotMap {
//
//
// public static CANTalon driveLeft1;
// public static CANTalon driveLeft2;
// public static CANTalon driveRight1;
// public static CANTalon driveRight2;
// public static CANTalon catapultMo... | import edu.wpi.first.wpilibj.CANTalon;
import edu.wpi.first.wpilibj.command.Subsystem;
import org.usfirst.frc.team2557.robot.RobotMap;
import org.usfirst.frc.team2557.robot.commands.intake.IntakeStopCommand; | package org.usfirst.frc.team2557.robot.subsystems;
public class Intake extends Subsystem {
CANTalon intakeMotor = RobotMap.intakeMotor;
@Override
protected void initDefaultCommand() {
// Stops the intake when there are no other commands
// using the subsystem | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/RobotMap.java
// public class RobotMap {
//
//
// public static CANTalon driveLeft1;
// public static CANTalon driveLeft2;
// public static CANTalon driveRight1;
// public static CANTalon driveRight2;
// public static CANTalon catapultMo... | setDefaultCommand(new IntakeStopCommand()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/intake/IntakeInCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot; | package org.usfirst.frc.team2557.robot.commands.intake;
public class IntakeInCommand extends Command {
public IntakeInCommand() { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.intake); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/chassis/CorrectAngleOffsetCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.PIDController;
import edu.wpi.first.wpilibj.PIDOutput;
import edu.wpi.first.wpilibj.PIDSource;
import edu.wpi.first.wpilibj.PIDSourceType;
import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot; | package org.usfirst.frc.team2557.robot.commands.chassis;
public class CorrectAngleOffsetCommand extends Command {
private PIDController _controller;
private double _degrees;
public CorrectAngleOffsetCommand() {
this._degrees = 0;
// Kp, Ki, Kd, input (gyro), output (chassis)
thi... | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | return Robot.chassis.getGyroAngle(); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/subsystems/Chassis.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/RobotMap.java
// public class RobotMap {
//
//
// public static CANTalon driveLeft1;
// public static CANTalon driveLeft2;
// public static CANTalon driveRight1;
// public static CANTalon driveRight2;
// public static CANTalon catapultMo... | import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.interfaces.Gyro;
import org.usfirst.frc.team2557.robot.RobotMap;
import edu.wpi.first.wpilibj.command.Subsystem;
import org.usfirst.frc.team2557.robot.commands.chassis.DriveCommand; | package org.usfirst.frc.team2557.robot.subsystems;
public class Chassis extends Subsystem {
// CANTalon leftEncTalon = RobotMap.driveLeft2;
// CANTalon rightEncTalon = RobotMap.driveRight1;
// TODO: See whether the comp bot's encoders are switched as well
CANTalon leftEncTalon = RobotMap.driveRight1; ... | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/RobotMap.java
// public class RobotMap {
//
//
// public static CANTalon driveLeft1;
// public static CANTalon driveLeft2;
// public static CANTalon driveRight1;
// public static CANTalon driveRight2;
// public static CANTalon catapultMo... | setDefaultCommand(new DriveCommand()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/macro/MacroPlayCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot;
import java.io.FileNotFoundException; | package org.usfirst.frc.team2557.robot.commands.autonomous.macro;
public class MacroPlayCommand extends Command {
private MacroPlayer _player;
public MacroPlayCommand(String filepath) { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.arm); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/subsystems/Catapult.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/RobotMap.java
// public class RobotMap {
//
//
// public static CANTalon driveLeft1;
// public static CANTalon driveLeft2;
// public static CANTalon driveRight1;
// public static CANTalon driveRight2;
// public static CANTalon catapultMo... | import edu.wpi.first.wpilibj.CANTalon;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.command.Subsystem;
import org.usfirst.frc.team2557.robot.RobotMap;
import org.usfirst.frc.team2557.robot.commands.catapult.CatapultSequence; | package org.usfirst.frc.team2557.robot.subsystems;
public class Catapult extends Subsystem {
CANTalon motor = RobotMap.catapultMotor;
DigitalInput hallEffect = RobotMap.catapultHallEffect;
@Override
protected void initDefaultCommand() { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/RobotMap.java
// public class RobotMap {
//
//
// public static CANTalon driveLeft1;
// public static CANTalon driveLeft2;
// public static CANTalon driveRight1;
// public static CANTalon driveRight2;
// public static CANTalon catapultMo... | setDefaultCommand(new CatapultSequence()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos2Center.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos2Center extends CommandGroup {
public Auto_Pos2Center() {
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addParallel(new Auto_LoadBall()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos2Center.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos2Center extends CommandGroup {
public Auto_Pos2Center() {
this.addParallel(new Auto_LoadBall());
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new TurnByAngleCommand(56.5)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos2Center.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos2Center extends CommandGroup {
public Auto_Pos2Center() {
this.addParallel(new Auto_LoadBall());
this.addSequential(new TurnByAngleCommand(56.5));
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new EncoderPosDriveCommand(6513, 0.7)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/resolvers/PosBatterResolverCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import org.usfirst.frc.team2557.robot.Robot;
import org.usfirst.frc.team2557.robot.commands.autonomous.sequences.*;
| package org.usfirst.frc.team2557.robot.commands.autonomous.resolvers;
public class PosBatterResolverCommand extends Command {
private Command _chosenCommand = null;
@Override
protected void initialize() {
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | switch((int) Robot.instance.posChooser.getSelected()) {
|
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos4Right.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos4Right extends CommandGroup {
public Auto_Pos4Right() {
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addParallel(new Auto_LoadBall()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos4Right.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos4Right extends CommandGroup {
public Auto_Pos4Right() {
this.addParallel(new Auto_LoadBall());
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new TurnByAngleCommand(7)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos4Right.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos4Right extends CommandGroup {
public Auto_Pos4Right() {
this.addParallel(new Auto_LoadBall());
this.addSequential(new TurnByAngleCommand(7));
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new EncoderPosDriveCommand(9295, 0.7)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/subsystems/SecondArm.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/RobotMap.java
// public class RobotMap {
//
//
// public static CANTalon driveLeft1;
// public static CANTalon driveLeft2;
// public static CANTalon driveRight1;
// public static CANTalon driveRight2;
// public static CANTalon catapultMo... | import edu.wpi.first.wpilibj.Servo;
import edu.wpi.first.wpilibj.command.Subsystem;
import org.usfirst.frc.team2557.robot.RobotMap;
import org.usfirst.frc.team2557.robot.commands.secondArm.SecondArmLatchCommand; | package org.usfirst.frc.team2557.robot.subsystems;
public class SecondArm extends Subsystem {
Servo secondArmServo = RobotMap.secondaryArm;
@Override
protected void initDefaultCommand() { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/RobotMap.java
// public class RobotMap {
//
//
// public static CANTalon driveLeft1;
// public static CANTalon driveLeft2;
// public static CANTalon driveRight1;
// public static CANTalon driveRight2;
// public static CANTalon catapultMo... | setDefaultCommand(new SecondArmLatchCommand()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos3Right.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos3Right extends CommandGroup {
public Auto_Pos3Right() {
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addParallel(new Auto_LoadBall()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos3Right.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos3Right extends CommandGroup {
public Auto_Pos3Right() {
this.addParallel(new Auto_LoadBall());
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new TurnByAngleCommand(34.2)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos3Right.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos3Right extends CommandGroup {
public Auto_Pos3Right() {
this.addParallel(new Auto_LoadBall());
this.addSequential(new TurnByAngleCommand(34.2));
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new EncoderPosDriveCommand(12613, 0.9)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos2Left.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos2Left extends CommandGroup {
public Auto_Pos2Left() {
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addParallel(new Auto_LoadBall()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos2Left.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos2Left extends CommandGroup {
public Auto_Pos2Left() {
this.addParallel(new Auto_LoadBall());
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new TurnByAngleCommand(-22.2)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos2Left.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos2Left extends CommandGroup {
public Auto_Pos2Left() {
this.addParallel(new Auto_LoadBall());
this.addSequential(new TurnByAngleCommand(-22.2));
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new EncoderPosDriveCommand(10764, 0.5)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/intake/IntakeDetectBallCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/RobotMap.java
// public class RobotMap {
//
//
// public static CANTalon driveLeft1;
// public static CANTalon driveLeft2;
// public static CANTalon driveRight1;
// public static CANTalon driveRight2;
// public static CANTalon catapultMo... | import org.usfirst.frc.team2557.robot.RobotMap;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; | package org.usfirst.frc.team2557.robot.commands.intake;
public class IntakeDetectBallCommand extends Command{
@Override
protected void initialize() {
// TODO Auto-generated method stub
}
@Override
protected void execute() {
// TODO Auto-generated method stub | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/RobotMap.java
// public class RobotMap {
//
//
// public static CANTalon driveLeft1;
// public static CANTalon driveLeft2;
// public static CANTalon driveRight1;
// public static CANTalon driveRight2;
// public static CANTalon catapultMo... | SmartDashboard.putNumber("Ball Detection", RobotMap.intakeMotor.getOutputVoltage()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/secondArm/SecondArmLatchCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot; | package org.usfirst.frc.team2557.robot.commands.secondArm;
public class SecondArmLatchCommand extends Command {
public SecondArmLatchCommand() { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.secondArm); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos1Center.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos1Center extends CommandGroup {
public Auto_Pos1Center() {
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addParallel(new Auto_LoadBall()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos1Center.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos1Center extends CommandGroup {
public Auto_Pos1Center() {
this.addParallel(new Auto_LoadBall());
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new TurnByAngleCommand(77)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos1Center.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos1Center extends CommandGroup {
public Auto_Pos1Center() {
this.addParallel(new Auto_LoadBall());
this.addSequential(new TurnByAngleCommand(77));
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new EncoderPosDriveCommand(11406, 0.9)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/macro/MacroRecordCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot;
import java.io.IOException; | package org.usfirst.frc.team2557.robot.commands.autonomous.macro;
public class MacroRecordCommand extends Command {
private MacroRecorder _recorder;
public MacroRecordCommand(String filepath) { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.arm); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/arm/TeleopArmCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot; | package org.usfirst.frc.team2557.robot.commands.arm;
public class TeleopArmCommand extends Command {
public TeleopArmCommand() { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.arm); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/lidar/LidarUpdateCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot; | package org.usfirst.frc.team2557.robot.commands.lidar;
public class LidarUpdateCommand extends Command {
public LidarUpdateCommand() {
// This command can run without other commands
// conflicting (requires is not needed).
// This command cannot be interrupted! | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.lidar); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/intake/IntakeOutCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot; | package org.usfirst.frc.team2557.robot.commands.intake;
public class IntakeOutCommand extends Command {
public IntakeOutCommand() { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.intake); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos4Center.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos4Center extends CommandGroup {
public Auto_Pos4Center() {
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addParallel(new Auto_LoadBall()); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos4Center.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos4Center extends CommandGroup {
public Auto_Pos4Center() {
this.addParallel(new Auto_LoadBall());
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new TurnByAngleCommand(-57)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/sequences/Auto_Pos4Center.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall;
import org.usfirst.frc.team2557.robot.commands.chassis.EncoderPosDriveCommand;
import org.usfirst.frc.team2557.robot.commands.chassis.TurnByAngleCommand; | package org.usfirst.frc.team2557.robot.commands.autonomous.sequences;
public class Auto_Pos4Center extends CommandGroup {
public Auto_Pos4Center() {
this.addParallel(new Auto_LoadBall());
this.addSequential(new TurnByAngleCommand(-57));
| // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/automation/Auto_LoadBall.java
// public class Auto_LoadBall extends CommandGroup {
//
// public Auto_LoadBall() {
// // Move the arm to the correct position
// this.addSequential(new MoveArmToAngleCommand(Arm.ARM_LOADBALL));
// ... | this.addSequential(new EncoderPosDriveCommand(9403, 0.8)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/catapult/CatapultSequence.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.Robot;
import org.usfirst.frc.team2557.robot.commands.util.WaitForButtonCommand; | package org.usfirst.frc.team2557.robot.commands.catapult;
public class CatapultSequence extends CommandGroup {
public CatapultSequence() {
this.addSequential(new CatapultRetractCommand()); | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | this.addSequential(new WaitForButtonCommand(Robot.oi.manipulatorStart)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/catapult/CatapultSequence.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2557.robot.Robot;
import org.usfirst.frc.team2557.robot.commands.util.WaitForButtonCommand; | package org.usfirst.frc.team2557.robot.commands.catapult;
public class CatapultSequence extends CommandGroup {
public CatapultSequence() {
this.addSequential(new CatapultRetractCommand()); | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | this.addSequential(new WaitForButtonCommand(Robot.oi.manipulatorStart)); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/intake/IntakeStopCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot; | package org.usfirst.frc.team2557.robot.commands.intake;
public class IntakeStopCommand extends Command {
public IntakeStopCommand() { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.intake); |
FIRST-Team-2557-The-SOTABots/FRC_Robot | Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/chassis/EncoderPosDriveCommand.java | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team2557.robot.Robot; | package org.usfirst.frc.team2557.robot.commands.chassis;
public class EncoderPosDriveCommand extends Command {
private double _speed;
private double _encpos;
public EncoderPosDriveCommand(double encpos, double speed) { | // Path: Robot/src/main/java/org/usfirst/frc/team2557/robot/Robot.java
// public class Robot extends IterativeRobot {
//
// //Subsystem Declarations//
// public static OI oi;
// public static Chassis chassis;
// public static Arm arm;
// public static Intake intake;
// public static Catapult catap... | requires(Robot.chassis); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/domain/Customer.java | // Path: reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/util/TimestampProvider.java
// public class TimestampProvider
// {
// private static final Timestamp INFINITY_DATE = TimestampProvider.create(9999, 11, 1, Calendar.PM, 23, 59, 0, 0);
//
// private TimestampProvider()
// {
// ... | import auditonlybank.util.TimestampProvider;
import java.sql.Timestamp; | /*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | // Path: reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/util/TimestampProvider.java
// public class TimestampProvider
// {
// private static final Timestamp INFINITY_DATE = TimestampProvider.create(9999, 11, 1, Calendar.PM, 23, 59, 0, 0);
//
// private TimestampProvider()
// {
// ... | this(TimestampProvider.getInfinityDate()); |
goldmansachs/reladomo-kata | mini-kata/src/main/java/kata/util/ObjectSequenceObjectFactory.java | // Path: main-kata/src/main/java/kata/domain/ObjectSequence.java
// public class ObjectSequence
// extends ObjectSequenceAbstract
// implements MithraSequence
// {
// public ObjectSequence()
// {
// super();
// }
//
// public void setSequenceName(String sequenceName)
// {
//... | import com.gs.fw.common.mithra.MithraSequence;
import com.gs.fw.common.mithra.MithraSequenceObjectFactory;
import kata.domain.ObjectSequence;
import kata.domain.ObjectSequenceFinder; | /*
Copyright 2017 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/ObjectSequence.java
// public class ObjectSequence
// extends ObjectSequenceAbstract
// implements MithraSequence
// {
// public ObjectSequence()
// {
// super();
// }
//
// public void setSequenceName(String sequenceName)
// {
//... | ObjectSequence objectSequence = ObjectSequenceFinder.findByPrimaryKey(sequenceName); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/web/CustomerResource.java | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | import bitemporalbank.domain.Customer;
import bitemporalbank.domain.CustomerFinder;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.gs.fw.common.mithra.finder.Operation;
import com.gs.fw.common.mithra.util.serializer.SerializationConfig;
import com.gs.fw.common.mithra.util.serializer.Serialized;
i... | /*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | Customer customer = new Customer(businessDateTS); |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesAdvancedFinder.java | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.api.tuple.Twin;
import org.... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | public CustomerAccountList getAccountsByCustomer(Customer customer) |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesAdvancedFinder.java | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.api.tuple.Twin;
import org.... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | public CustomerAccountList getAccountsByCustomer(Customer customer) |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesAdvancedFinder.java | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.api.tuple.Twin;
import org.... | //-------------- Question 4 ------------------------------------------------------
// Find the sum of ages for all Person objects. This is a two stage question:
// 1) Find the sum without using any special Mithra features.
// 2) Find the sum using Mithra's AggregateList feature.
// Note: When done with both questions,... | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | final Person person = new Person(); |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesAdvancedFinder.java | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.api.tuple.Twin;
import org.... | Tuples.pair("JPN", 4),
Tuples.pair("MA", 1)
);
Verify.assertMapsEqual(expectedResult, peopleByCountry);
}
//-------------- Question 8 ------------------------------------------------------
// Fetch People, ordered by their personId.
// For each person, count the numb... | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | public void incrementAges(PersonList people) |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesAdvancedFinder.java | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.api.tuple.Twin;
import org.... | // Given an array of Mithra attributes, and a Mithra object,
// return a list representing the values indicated by the attributes for the object.
// Do not use Reflection.
public MutableList<Object> getAttributeValuesForObjects(
final MithraObject mithraObject,
Attribute... attributes)
... | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | CustomerAccount virtual = CustomerAccountFinder.findOne(CustomerAccountFinder.accountId().eq(600)); |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesAdvancedFinder.java | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.api.tuple.Twin;
import org.... |
@Test
public void testQ17()
{
MutableMap<Integer, Attribute> actualMap = this.getMyIdToAttributeMap();
MutableMap<Integer, Attribute> expectedMap = UnifiedMap.newMapWith(
Tuples.<Integer, Attribute>pair(Integer.valueOf(124), AllTypesFinder.intValue()),
Tuple... | // Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
// public AllTypes()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new cons... | AllTypes allTypes = new AllTypes(); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/web/CustomerResource.java | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | import com.fasterxml.jackson.core.JsonProcessingException;
import com.gs.fw.common.mithra.MithraManager;
import com.gs.fw.common.mithra.util.serializer.SerializationConfig;
import com.gs.fw.common.mithra.util.serializer.Serialized;
import com.gs.fw.common.mithra.util.serializer.SerializedList;
import simplebank.domain.... | /*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | Customer customer = new Customer(); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/web/CustomerResource.java | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | import com.fasterxml.jackson.core.JsonProcessingException;
import com.gs.fw.common.mithra.MithraManager;
import com.gs.fw.common.mithra.util.serializer.SerializationConfig;
import com.gs.fw.common.mithra.util.serializer.Serialized;
import com.gs.fw.common.mithra.util.serializer.SerializedList;
import simplebank.domain.... | .shallowWithDefaultAttributes(CustomerFinder.getFinderInstance());
serializationConfig.withDeepDependents();
}
@POST
public Response createCustomer(
@FormParam("customerId") int customerId,
@FormParam("firstName") String firstName,
@FormParam("las... | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | public SerializedList<Customer, CustomerList> getCustomersByLastName(@QueryParam("lastName") String lastName) |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesAuditOnly.java | // Path: main-kata/src/main/java/kata/domain/Task.java
// public class Task extends TaskAbstract
// {
// public Task(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You... | import org.eclipse.collections.impl.block.factory.Predicates;
import org.eclipse.collections.impl.set.mutable.UnifiedSet;
import org.eclipse.collections.impl.test.Verify;
import kata.domain.Task;
import kata.domain.TaskFinder;
import kata.domain.TaskList;
import org.junit.Assert;
import org.junit.Test;
import java.sql.... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Task.java
// public class Task extends TaskAbstract
// {
// public Task(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You... | public TaskList getActiveTasks() |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesAuditOnly.java | // Path: main-kata/src/main/java/kata/domain/Task.java
// public class Task extends TaskAbstract
// {
// public Task(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You... | import org.eclipse.collections.impl.block.factory.Predicates;
import org.eclipse.collections.impl.set.mutable.UnifiedSet;
import org.eclipse.collections.impl.test.Verify;
import kata.domain.Task;
import kata.domain.TaskFinder;
import kata.domain.TaskList;
import org.junit.Assert;
import org.junit.Test;
import java.sql.... | return null;
}
@Test
public void testQ3()
{
TaskList tasks = this.getTaskHistory(1);
Verify.assertAllSatisfy(tasks, Predicates.attributeEqual(TaskFinder.name(), "Build Bridge"));
Verify.assertSetsEqual(UnifiedSet.newSetWith(
Timestamp.valueOf("1965-01-0... | // Path: main-kata/src/main/java/kata/domain/Task.java
// public class Task extends TaskAbstract
// {
// public Task(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You... | Task damRiver = TaskFinder.findOne(TaskFinder.name().eq("Dam River")); |
goldmansachs/reladomo-kata | mini-kata/src/main/java/kata/domain/Pet.java | // Path: mini-kata/src/main/java/kata/util/TimestampProvider.java
// public class TimestampProvider
// {
// private TimestampProvider()
// {
// throw new UnsupportedOperationException("utility methods only -- not instantiable");
// }
//
// private static final Timestamp INFINITY_DATE = Timestam... | import kata.util.TimestampProvider;
import java.sql.Timestamp; | /*
Copyright 2017 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: mini-kata/src/main/java/kata/util/TimestampProvider.java
// public class TimestampProvider
// {
// private TimestampProvider()
// {
// throw new UnsupportedOperationException("utility methods only -- not instantiable");
// }
//
// private static final Timestamp INFINITY_DATE = Timestam... | this(TimestampProvider.getInfinityDate()); |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesRelationships.java | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.set.primitive.IntSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.impl.factory.primitive.IntS... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | public CustomerAccountList getAccountsForCustomer(Customer customer) |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesRelationships.java | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.set.primitive.IntSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.impl.factory.primitive.IntS... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | public CustomerAccountList getAccountsForCustomer(Customer customer) |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesRelationships.java | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.set.primitive.IntSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.impl.factory.primitive.IntS... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | public CustomerList getCustomersThatHaveAccountType(String accountType) |
goldmansachs/reladomo-kata | mini-kata/src/test/java/kata/test/Exercise1Test.java | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | import com.gs.fw.common.mithra.finder.Operation;
import kata.domain.Person;
import kata.domain.PersonFinder;
import kata.domain.PersonList;
import kata.domain.PetList;
import org.eclipse.collections.impl.test.Verify;
import org.junit.Assert;
import org.junit.Test; | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | PersonList people = null; |
goldmansachs/reladomo-kata | mini-kata/src/test/java/kata/test/Exercise1Test.java | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | import com.gs.fw.common.mithra.finder.Operation;
import kata.domain.Person;
import kata.domain.PersonFinder;
import kata.domain.PersonList;
import kata.domain.PetList;
import org.eclipse.collections.impl.test.Verify;
import org.junit.Assert;
import org.junit.Test; | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | PetList oldPetsOrWuzzy = null; |
goldmansachs/reladomo-kata | mini-kata/src/test/java/kata/test/Exercise1Test.java | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | import com.gs.fw.common.mithra.finder.Operation;
import kata.domain.Person;
import kata.domain.PersonFinder;
import kata.domain.PersonList;
import kata.domain.PetList;
import org.eclipse.collections.impl.test.Verify;
import org.junit.Assert;
import org.junit.Test; |
/**
* There are no {@code Person} objects with {@code firstName} equal to "George".
* Bulk update the {@code firstName} of only those {@code Person} objects with {@code lastName} equal to "Smith".
* Use the appropriate method on {@link PersonFinder} and {@link PersonList}
*/
@Test
publi... | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | Person janeDoe = PersonFinder.findOne(PersonFinder.firstName().eq("Jane").and(PersonFinder.lastName().eq("Doe"))); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/bitemporal-bank/src/test/java/bitemporalbank/api/BitemporalChainingInAction.java | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | import java.nio.file.Files;
import java.nio.file.Path;
import java.sql.Timestamp;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
import bitemporalbank.domain.Customer;
import bitemporalbank.domain.CustomerAccount;
import bitemporalbank.domain.CustomerAccountFinder;
import bitemporalban... | MithraTestResource testResource = new MithraTestResource(testRuntimeConfigXML);
ConnectionManagerForTests connectionManager = ConnectionManagerForTests.getInstance("test_db");
testResource.createSingleDatabase(connectionManager);
testResource.setUp();
}
@Test
public void run... | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | Timestamp jan1 = DateUtils.parse(date); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/bitemporal-bank/src/test/java/bitemporalbank/api/BitemporalChainingInAction.java | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | import java.nio.file.Files;
import java.nio.file.Path;
import java.sql.Timestamp;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
import bitemporalbank.domain.Customer;
import bitemporalbank.domain.CustomerAccount;
import bitemporalbank.domain.CustomerAccountFinder;
import bitemporalban... | @Test
public void run() throws Exception
{
int accountId = 12345;
createAccount("2017-01-01", accountId);
fetchAccountWithBusinessDate("2017-01-01", accountId);
updateBalance("2017-01-20", accountId, 200);
dumpCustomerAccount(accountId);
updateBalance("20... | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | Customer customer = new Customer(jan1); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/bitemporal-bank/src/test/java/bitemporalbank/api/BitemporalChainingInAction.java | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | import java.nio.file.Files;
import java.nio.file.Path;
import java.sql.Timestamp;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
import bitemporalbank.domain.Customer;
import bitemporalbank.domain.CustomerAccount;
import bitemporalbank.domain.CustomerAccountFinder;
import bitemporalban... |
fetchAccountWithBusinessDate("2017-01-01", accountId);
updateBalance("2017-01-20", accountId, 200);
dumpCustomerAccount(accountId);
updateBalance("2017-01-17", "2017-01-25", accountId, 50);
dumpCustomerAccount(accountId);
balanceAsOfJan12_OnJan23(accountId);
... | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | CustomerAccount account = new CustomerAccount(jan1); |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesBasicFinder.java | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | import org.eclipse.collections.impl.list.mutable.FastList;
import org.eclipse.collections.impl.set.mutable.UnifiedSet;
import org.eclipse.collections.impl.test.Verify;
import com.gs.fw.common.mithra.test.MithraRuntimeConfigVerifier;
import kata.domain.Person;
import kata.domain.PersonFinder;
import kata.domain.PersonLi... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | public PersonList getAllPeople() |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesBasicFinder.java | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | import org.eclipse.collections.impl.list.mutable.FastList;
import org.eclipse.collections.impl.set.mutable.UnifiedSet;
import org.eclipse.collections.impl.test.Verify;
import com.gs.fw.common.mithra.test.MithraRuntimeConfigVerifier;
import kata.domain.Person;
import kata.domain.PersonFinder;
import kata.domain.PersonLi... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | public Person getPersonNamed(String name) |
goldmansachs/reladomo-kata | mini-kata/src/test/java/kata/test/AbstractMithraTest.java | // Path: mini-kata/src/main/java/kata/domain/Pet.java
// public class Pet extends PetAbstract
// {
// public Pet(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can... | import com.gs.fw.common.mithra.test.ConnectionManagerForTests;
import com.gs.fw.common.mithra.test.MithraTestResource;
import kata.domain.Pet;
import org.eclipse.collections.api.block.function.Function;
import org.junit.After;
import org.junit.Before; | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: mini-kata/src/main/java/kata/domain/Pet.java
// public class Pet extends PetAbstract
// {
// public Pet(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can... | public static final Function<Pet, String> TO_PET_NAME = Pet::getPetName; |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/web/SimpleBankServer.java | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/serialization/SimpleBankJacksonObjectMapperProvider.java
// public class SimpleBankJacksonObjectMapperProvider implements ContextResolver<ObjectMapper>
// {
// final ObjectMapper defaultObjectMapper;
//
// public SimpleBankJacksonObjectM... | import com.gs.fw.common.mithra.MithraManager;
import com.gs.fw.common.mithra.MithraManagerProvider;
import org.glassfish.grizzly.http.server.HttpServer;
import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.server.Resour... | /*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/serialization/SimpleBankJacksonObjectMapperProvider.java
// public class SimpleBankJacksonObjectMapperProvider implements ContextResolver<ObjectMapper>
// {
// final ObjectMapper defaultObjectMapper;
//
// public SimpleBankJacksonObjectM... | config.register(SimpleBankJacksonObjectMapperProvider.class); |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesDetachedObjects.java | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | import org.eclipse.collections.impl.block.factory.Predicates;
import org.eclipse.collections.impl.test.Verify;
import kata.domain.Person;
import kata.domain.PersonFinder;
import kata.domain.PersonList;
import org.junit.Assert;
import org.junit.Test; | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | Person clarkKent = null; |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesDetachedObjects.java | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | import org.eclipse.collections.impl.block.factory.Predicates;
import org.eclipse.collections.impl.test.Verify;
import kata.domain.Person;
import kata.domain.PersonFinder;
import kata.domain.PersonList;
import org.junit.Assert;
import org.junit.Test; |
private void guiChangesClarkKent(Person person)
{
Assert.assertNotNull(person);
person.setName("Superman");
person.setAge(28);
}
@Test
public void testQ1()
{
this.giveClarkKentToGui();
Person clarkKent = PersonFinder.findOne(PersonFinder.personId().eq(5... | // Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
// extends PersonAbstract
// {
// // Added for ExercisesAdvancedFinder question 9
// public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
// {
// public void value(Person person)
// ... | int peopleBefore = new PersonList(PersonFinder.all()).count(); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/domain/CustomerAccount.java | // Path: reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/util/TimestampProvider.java
// public class TimestampProvider
// {
// private static final Timestamp INFINITY_DATE = TimestampProvider.create(9999, 11, 1, Calendar.PM, 23, 59, 0, 0);
//
// private TimestampProvider()
// {
// ... | import auditonlybank.util.TimestampProvider;
import java.sql.Timestamp; | /*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | // Path: reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/util/TimestampProvider.java
// public class TimestampProvider
// {
// private static final Timestamp INFINITY_DATE = TimestampProvider.create(9999, 11, 1, Calendar.PM, 23, 59, 0, 0);
//
// private TimestampProvider()
// {
// ... | this(TimestampProvider.getInfinityDate()); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/bitemporal-bank/src/test/java/bitemporalbank/api/BitemporalBankAPITest.java | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import bitemporalbank.domain.Customer;
import bitemporalbank.domain.CustomerAccount;
import bitemporalbank.domain.CustomerAccountLis... | /*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | new BitemporalBankServer(testRuntimeConfigXML).start(); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/bitemporal-bank/src/test/java/bitemporalbank/api/BitemporalBankAPITest.java | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import bitemporalbank.domain.Customer;
import bitemporalbank.domain.CustomerAccount;
import bitemporalbank.domain.CustomerAccountLis... | /*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | Serialized<Customer> mickeySerialized = response.readEntity(new GenericType<Serialized<Customer>>() |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/bitemporal-bank/src/test/java/bitemporalbank/api/BitemporalBankAPITest.java | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import bitemporalbank.domain.Customer;
import bitemporalbank.domain.CustomerAccount;
import bitemporalbank.domain.CustomerAccountLis... | ConnectionManagerForTests connectionManager = ConnectionManagerForTests.getInstance("test_db");
testResource.createSingleDatabase(connectionManager, "testconfig/BitemporalBankTestData.txt");
testResource.setUp();
}
private void initializeApp() throws Exception
{
new Bitempor... | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | CustomerAccountList mickeysAccounts = mickey.getAccounts(); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/bitemporal-bank/src/test/java/bitemporalbank/api/BitemporalBankAPITest.java | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import bitemporalbank.domain.Customer;
import bitemporalbank.domain.CustomerAccount;
import bitemporalbank.domain.CustomerAccountLis... | testResource.setUp();
}
private void initializeApp() throws Exception
{
new BitemporalBankServer(testRuntimeConfigXML).start();
}
@Test
public void testGetCustomer()
{
WebTarget target = webTarget("/api/customer/1");
Response response = target
... | // Path: reladomo-tour/tour-examples/bitemporal-bank/src/main/java/bitemporalbank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate);
// // You must not modif... | CustomerAccount clubhouseAccount = mickeysAccounts.get(0); |
goldmansachs/reladomo-kata | main-kata/src/main/java/kata/util/ObjectSequenceObjectFactory.java | // Path: main-kata/src/main/java/kata/domain/ObjectSequence.java
// public class ObjectSequence
// extends ObjectSequenceAbstract
// implements MithraSequence
// {
// public ObjectSequence()
// {
// super();
// }
//
// public void setSequenceName(String sequenceName)
// {
//... | import com.gs.fw.common.mithra.MithraSequence;
import com.gs.fw.common.mithra.MithraSequenceObjectFactory;
import kata.domain.ObjectSequence;
import kata.domain.ObjectSequenceFinder; | /*
Copyright 2017 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/ObjectSequence.java
// public class ObjectSequence
// extends ObjectSequenceAbstract
// implements MithraSequence
// {
// public ObjectSequence()
// {
// super();
// }
//
// public void setSequenceName(String sequenceName)
// {
//... | ObjectSequence objectSequence = ObjectSequenceFinder.findByPrimaryKey(sequenceName); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/simple-bank/src/test/java/simplebank/api/SimpleBankAPITest.java | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import com.gs.fw.common.mithra.test.ConnectionManagerForTests;
import com.gs.fw.common.mithra.test.MithraTestResource;
import com.gs... | /*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | new SimpleBankServer(testRuntimeConfigXML).start(); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/simple-bank/src/test/java/simplebank/api/SimpleBankAPITest.java | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import com.gs.fw.common.mithra.test.ConnectionManagerForTests;
import com.gs.fw.common.mithra.test.MithraTestResource;
import com.gs... | /*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | Serialized<Customer> mickeySerialized = response.readEntity(new GenericType<Serialized<Customer>>() |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/simple-bank/src/test/java/simplebank/api/SimpleBankAPITest.java | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import com.gs.fw.common.mithra.test.ConnectionManagerForTests;
import com.gs.fw.common.mithra.test.MithraTestResource;
import com.gs... | private void intializeReladomoForTest()
{
MithraTestResource testResource = new MithraTestResource(testRuntimeConfigXML);
ConnectionManagerForTests connectionManager = ConnectionManagerForTests.getInstance("test_db");
testResource.createSingleDatabase(connectionManager, "testconfig/Simpl... | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | CustomerAccountList mickeysAccounts = mickey.getAccounts(); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/simple-bank/src/test/java/simplebank/api/SimpleBankAPITest.java | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import com.gs.fw.common.mithra.test.ConnectionManagerForTests;
import com.gs.fw.common.mithra.test.MithraTestResource;
import com.gs... | MithraTestResource testResource = new MithraTestResource(testRuntimeConfigXML);
ConnectionManagerForTests connectionManager = ConnectionManagerForTests.getInstance("test_db");
testResource.createSingleDatabase(connectionManager, "testconfig/SimpleBankTestData.txt");
testResource.setUp();... | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | CustomerAccount clubhouseAccount = mickeysAccounts.get(0); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/simple-bank/src/test/java/simplebank/api/SimpleBankAPITest.java | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import com.gs.fw.common.mithra.test.ConnectionManagerForTests;
import com.gs.fw.common.mithra.test.MithraTestResource;
import com.gs... | @Test
public void testGetCustomer()
{
WebTarget target = webTarget("/api/customer/1");
Response response = target.request(MediaType.APPLICATION_JSON_TYPE).get();
assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());
Serialized<Customer> mickeySerialized = ... | // Path: reladomo-tour/tour-examples/simple-bank/src/main/java/simplebank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this co... | client.register(SimpleBankJacksonObjectMapperProvider.class); |
goldmansachs/reladomo-kata | mini-kata/src/test/java/kata/test/Exercise2Test.java | // Path: main-kata/src/main/java/kata/domain/PersonList.java
// public class PersonList
// extends PersonListAbstract
// {
// public PersonList()
// {
// super();
// }
//
// public PersonList(int initialSize)
// {
// super(initialSize);
// }
//
// public PersonList(Collection c)
// {
// super(c)... | import com.gs.fw.common.mithra.MithraManagerProvider;
import com.gs.fw.finder.Navigation;
import kata.domain.PersonList;
import kata.domain.PetFinder;
import kata.domain.PetList;
import kata.domain.PetType;
import org.eclipse.collections.impl.factory.Lists;
import org.eclipse.collections.impl.factory.Sets;
import org.e... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/PersonList.java
// public class PersonList
// extends PersonListAbstract
// {
// public PersonList()
// {
// super();
// }
//
// public PersonList(int initialSize)
// {
// super(initialSize);
// }
//
// public PersonList(Collection c)
// {
// super(c)... | PetList pets = null; |
goldmansachs/reladomo-kata | mini-kata/src/test/java/kata/test/Exercise2Test.java | // Path: main-kata/src/main/java/kata/domain/PersonList.java
// public class PersonList
// extends PersonListAbstract
// {
// public PersonList()
// {
// super();
// }
//
// public PersonList(int initialSize)
// {
// super(initialSize);
// }
//
// public PersonList(Collection c)
// {
// super(c)... | import com.gs.fw.common.mithra.MithraManagerProvider;
import com.gs.fw.finder.Navigation;
import kata.domain.PersonList;
import kata.domain.PetFinder;
import kata.domain.PetList;
import kata.domain.PetType;
import org.eclipse.collections.impl.factory.Lists;
import org.eclipse.collections.impl.factory.Sets;
import org.e... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/PersonList.java
// public class PersonList
// extends PersonListAbstract
// {
// public PersonList()
// {
// super();
// }
//
// public PersonList(int initialSize)
// {
// super(initialSize);
// }
//
// public PersonList(Collection c)
// {
// super(c)... | PersonList petPeople = null; |
goldmansachs/reladomo-kata | mini-kata/src/test/java/kata/test/Exercise2Test.java | // Path: main-kata/src/main/java/kata/domain/PersonList.java
// public class PersonList
// extends PersonListAbstract
// {
// public PersonList()
// {
// super();
// }
//
// public PersonList(int initialSize)
// {
// super(initialSize);
// }
//
// public PersonList(Collection c)
// {
// super(c)... | import com.gs.fw.common.mithra.MithraManagerProvider;
import com.gs.fw.finder.Navigation;
import kata.domain.PersonList;
import kata.domain.PetFinder;
import kata.domain.PetList;
import kata.domain.PetType;
import org.eclipse.collections.impl.factory.Lists;
import org.eclipse.collections.impl.factory.Sets;
import org.e... | {
PersonList dogLovers = null;
Verify.assertSize(2, dogLovers);
}
/**
* The relationship is one {@link kata.domain.Person} to many {@link kata.domain.Pet}s, many {@link kata.domain.Pet}s to one {@link PetType}.
* Since there are three relationships the minimum database hits are 3.... | // Path: main-kata/src/main/java/kata/domain/PersonList.java
// public class PersonList
// extends PersonListAbstract
// {
// public PersonList()
// {
// super();
// }
//
// public PersonList(int initialSize)
// {
// super(initialSize);
// }
//
// public PersonList(Collection c)
// {
// super(c)... | PetType petType = pets.getPetAt(j).getPetType(); |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesObjectFromScratch.java | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | import kata.domain.Customer;
import kata.domain.CustomerAccountList;
import org.junit.Assert;
import org.junit.Test;
import java.sql.Timestamp; | /*
Copyright 2017 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | public CustomerAccountList getAccountsOverTheLimit(Timestamp businessDate) |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesObjectFromScratch.java | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | import kata.domain.Customer;
import kata.domain.CustomerAccountList;
import org.junit.Assert;
import org.junit.Test;
import java.sql.Timestamp; | /*
Copyright 2017 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | public double getNetBalanceOverLimit(Customer customer, Timestamp businessDate) |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesMTLoader.java | // Path: main-kata/src/main/java/kata/domain/Employee.java
// public class Employee extends EmployeeAbstract
// {
// public Employee(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate
// );
// // You must not modify this constructor. Mithra calls... | import java.sql.Timestamp;
import java.util.List;
import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.impl.list.mutable.FastList;
import org.eclipse.collections.impl.test.Verify;
import com.gs.fw.common.mithra.MithraTransactiona... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Employee.java
// public class Employee extends EmployeeAbstract
// {
// public Employee(Timestamp businessDate, Timestamp processingDate)
// {
// super(businessDate, processingDate
// );
// // You must not modify this constructor. Mithra calls... | private MutableList<Employee> fileList; |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/auditonly-bank/src/test/java/auditonlybank/api/AuditOnlyChainingInAction.java | // Path: reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this in... | import java.nio.file.Path;
import java.sql.Timestamp;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
import auditonlybank.domain.Customer;
import auditonlybank.domain.CustomerAccount;
import auditonlybank.domain.CustomerAccountFinder;
import auditonlybank.util.DateUtils;
import com.gs.... | ConnectionManagerForTests connectionManager = ConnectionManagerForTests.getInstance("test_db");
testResource.createSingleDatabase(connectionManager, "testconfig/AuditOnlyChainingInActionTestData.txt");
testResource.setUp();
}
@Test
public void run() throws Exception
{
in... | // Path: reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this in... | Customer customer = new Customer(); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/auditonly-bank/src/test/java/auditonlybank/api/AuditOnlyChainingInAction.java | // Path: reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this in... | import java.nio.file.Path;
import java.sql.Timestamp;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
import auditonlybank.domain.Customer;
import auditonlybank.domain.CustomerAccount;
import auditonlybank.domain.CustomerAccountFinder;
import auditonlybank.util.DateUtils;
import com.gs.... | public void run() throws Exception
{
int accountId = 12345;
createAccount("2017-01-01", accountId);
fetchLatestAccount(accountId);
updateBalance("2017-01-20", accountId, 200);
dumpCustomerAccount(accountId);
updateBalance("2017-01-25", accountId, 50);
... | // Path: reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this in... | CustomerAccount account = new CustomerAccount(); |
goldmansachs/reladomo-kata | reladomo-tour/tour-examples/auditonly-bank/src/test/java/auditonlybank/api/AuditOnlyChainingInAction.java | // Path: reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this in... | import java.nio.file.Path;
import java.sql.Timestamp;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
import auditonlybank.domain.Customer;
import auditonlybank.domain.CustomerAccount;
import auditonlybank.domain.CustomerAccountFinder;
import auditonlybank.util.DateUtils;
import com.gs.... | private void updateBalance(String date, int accountId, int deposit)
{
MithraManagerProvider.getMithraManager().executeTransactionalCommand(tx ->
{
// We set the processing time to simulate the update opening on a specific date - Do not do this in production
doNotDoThisInP... | // Path: reladomo-tour/tour-examples/auditonly-bank/src/main/java/auditonlybank/domain/Customer.java
// public class Customer extends CustomerAbstract
// {
// public Customer(Timestamp processingDate)
// {
// super(processingDate);
// // You must not modify this constructor. Mithra calls this in... | Timestamp date = DateUtils.parse("2017-01-01"); |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesCrud.java | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.set.primitive.IntSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.impl.factory.primitive.IntSets;
import org.eclipse.collections.impl.list.mutable.FastList;
import org.eclipse.collections.impl.test.... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | public Customer getCustomer(int customerId) |
goldmansachs/reladomo-kata | main-kata/src/test/java/kata/test/ExercisesCrud.java | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.set.primitive.IntSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.impl.factory.primitive.IntSets;
import org.eclipse.collections.impl.list.mutable.FastList;
import org.eclipse.collections.impl.test.... | /*
Copyright 2018 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
sof... | // Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
// extends CustomerAbstract
// {
// public Customer()
// {
// super();
// // You must not modify this constructor. Mithra calls this internally.
// // You can call this constructor. You can also add new constructors.
// ... | public CustomerList getCustomersFrom(String country) |
dkpro/dkpro-c4corpus | dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/statistics/vocabulary/WARCWordDistribution.java | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCInputFormat;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCWritable;
import de.tudarmstadt.ukp.dkpro.c4corpus.warc.io.WARCRecord;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import or... | /*
* Copyright 2016
* Ubiquitous Knowledge Processing (UKP) Lab
* Technische Universität Darmstadt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lice... | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | extends Mapper<LongWritable, WARCWritable, Text, IntWritable> |
dkpro/dkpro-c4corpus | dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/examples/WordCounterExample.java | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCInputFormat;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCWritable;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.statistics.helper.TextLongCountingReducer;
import org.apache.commons.io.IOUtils;
import org.apache.hadoop.conf.Configuration;
import org.ap... | /*
* Copyright 2016
* Ubiquitous Knowledge Processing (UKP) Lab
* Technische Universität Darmstadt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lice... | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | job.setCombinerClass(TextLongCountingReducer.class); |
dkpro/dkpro-c4corpus | dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/examples/WordCounterExample.java | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCInputFormat;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCWritable;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.statistics.helper.TextLongCountingReducer;
import org.apache.commons.io.IOUtils;
import org.apache.hadoop.conf.Configuration;
import org.ap... | job.setOutputKeyClass(Text.class);
job.setOutputValueClass(LongWritable.class);
// combiner + reducer
job.setCombinerClass(TextLongCountingReducer.class);
job.setReducerClass(TextLongCountingReducer.class);
job.setInputFormatClass(WARCInputFormat.class);
job.set... | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | extends Mapper<LongWritable, WARCWritable, Text, LongWritable> |
dkpro/dkpro-c4corpus | dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/statistics/ContentTypeAndSizeDistribution.java | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import java.io.IOException;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCInputFormat;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCWritable;
import de.tudarms... | /*
* Copyright 2016
* Ubiquitous Knowledge Processing (UKP) Lab
* Technische Universität Darmstadt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lice... | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | job.setReducerClass(TextLongCountingReducer.class); |
dkpro/dkpro-c4corpus | dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/statistics/ContentTypeAndSizeDistribution.java | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import java.io.IOException;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCInputFormat;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCWritable;
import de.tudarms... | /*
* Copyright 2016
* Ubiquitous Knowledge Processing (UKP) Lab
* Technische Universität Darmstadt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lice... | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | extends Mapper<LongWritable, WARCWritable, Text, LongWritable> |
dkpro/dkpro-c4corpus | dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/examples/SimpleTextSearch.java | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCInputFormat;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCWritable;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.statistics.helper.TextLongCountingReducer;
import org.apache.commons.io.IOUtils;
import org.apache.hadoop.conf.Configuration;
import org.ap... | /*
* Copyright 2016
* Ubiquitous Knowledge Processing (UKP) Lab
* Technische Universität Darmstadt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lice... | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | job.setCombinerClass(TextLongCountingReducer.class); |
dkpro/dkpro-c4corpus | dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/examples/SimpleTextSearch.java | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCInputFormat;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCWritable;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.statistics.helper.TextLongCountingReducer;
import org.apache.commons.io.IOUtils;
import org.apache.hadoop.conf.Configuration;
import org.ap... | job.setCombinerClass(TextLongCountingReducer.class);
job.setReducerClass(TextLongCountingReducer.class);
job.setInputFormatClass(WARCInputFormat.class);
job.setOutputFormatClass(TextOutputFormat.class);
// paths
String commaSeparatedInputFiles = otherArgs[0];
St... | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | extends Mapper<LongWritable, WARCWritable, Text, LongWritable> |
dkpro/dkpro-c4corpus | dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/statistics/WARCRecordCounter.java | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCInputFormat;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCWritable;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.... | job.setOutputKeyClass(Text.class);
job.setOutputValueClass(IntWritable.class);
// combiner + reducer
job.setCombinerClass(MyReducer.class);
job.setReducerClass(MyReducer.class);
job.setInputFormatClass(WARCInputFormat.class);
job.setOutputFormatClass(TextOutputF... | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | extends Mapper<LongWritable, WARCWritable, Text, IntWritable> |
dkpro/dkpro-c4corpus | dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/statistics/LangLicenseStatistics.java | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.ConfigurationHelper;
import de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.io.WARCWritable;
import de.tudarmstadt.ukp.dkpro.c4corpus.warc.io.WARCRecord;
import org.apache.hadoop.conf.Con... | public int run(String[] args)
throws Exception
{
Job job = Job.getInstance(getConf());
ConfigurationHelper
.configureJob(job, LangLicenseStatistics.class, MapperClass.class,
ReducerClass.class,
args[0], args[1]);
... | // Path: dkpro-c4corpus-hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/hadoop/io/WARCWritable.java
// public class WARCWritable
// implements Writable
// {
//
// private WARCRecord record;
//
// /**
// * Creates an empty writable (with a null record).
// */
// public WARCWritable... | extends Mapper<LongWritable, WARCWritable, Text, MapWritable> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.