Package ch.fork.AdHocRailway.domain.locomotives

Examples of ch.fork.AdHocRailway.domain.locomotives.LocomotiveType


        turnoutPersistence.addTurnoutType(defaultType);
        turnoutPersistence.addTurnoutType(doublecrossType);
        turnoutPersistence.addTurnoutType(threewayType);

        LocomotiveType deltaType = new LocomotiveType(0, "DELTA");
        deltaType.setDrivingSteps(14);
        deltaType.setStepping(4);
        deltaType.setFunctionCount(4);
        LocomotiveType digitalType = new LocomotiveType(0, "DIGITAL");
        digitalType.setDrivingSteps(28);
        digitalType.setStepping(2);
        digitalType.setFunctionCount(5);
        locomotivePersistence.addLocomotiveType(deltaType);
        locomotivePersistence.addLocomotiveType(digitalType);

        parseDocument(filename);
    }
View Full Code Here


        String type = attributes.getValue("type");
        int bus = Integer.parseInt(attributes.getValue("bus"));
        int address = Integer.parseInt(attributes.getValue("address"));

        if (type.equals("DeltaLocomotive")) {
            LocomotiveType locomotiveType = locomotivePersistence
                    .getLocomotiveTypeByName("DELTA");
            actualLocomotive = new Locomotive(0, actualLocomotiveGroup,
                    locomotiveType, name, desc, "", address, bus);
            locomotiveType.getLocomotives().add(actualLocomotive);
        } else if (type.equals("DigitalLocomotive")) {
            LocomotiveType locomotiveType = locomotivePersistence
                    .getLocomotiveTypeByName("DIGITAL");
            actualLocomotive = new Locomotive(0, actualLocomotiveGroup,
                    locomotiveType, name, desc, "", address, bus);
            locomotiveType.getLocomotives().add(actualLocomotive);
        }
    }
View Full Code Here

        String desc = attributes.getValue("desc");
        String type = attributes.getValue("type");
        int bus = Integer.parseInt(attributes.getValue("bus"));
        int address = Integer.parseInt(attributes.getValue("address"));
        if (type.toUpperCase().equals("DELTA")) {
            LocomotiveType locomotiveType = locomotivePersistence
                    .getLocomotiveTypeByName("DELTA");
            actualLocomotive = new Locomotive(0, actualLocomotiveGroup,
                    locomotiveType, name, desc, "", address, bus);
            locomotiveType.getLocomotives().add(actualLocomotive);
        } else if (type.toUpperCase().equals("DIGITAL")) {
            LocomotiveType locomotiveType = locomotivePersistence
                    .getLocomotiveTypeByName("DIGITAL");
            actualLocomotive = new Locomotive(0, actualLocomotiveGroup,
                    locomotiveType, name, desc, "", address, bus);
            locomotiveType.getLocomotives().add(actualLocomotive);
        }
    }
View Full Code Here

        turnoutPersistence.addTurnoutType(defaultType);
        turnoutPersistence.addTurnoutType(doublecrossType);
        turnoutPersistence.addTurnoutType(threewayType);

        LocomotiveType deltaType = new LocomotiveType(0, "DELTA");
        deltaType.setDrivingSteps(14);
        deltaType.setStepping(4);
        deltaType.setFunctionCount(4);
        LocomotiveType digitalType = new LocomotiveType(0, "DIGITAL");
        digitalType.setDrivingSteps(28);
        digitalType.setStepping(2);
        digitalType.setFunctionCount(5);
        locomotivePersistence.addLocomotiveType(deltaType);
        locomotivePersistence.addLocomotiveType(digitalType);

        parseDocument(filename);
    }
View Full Code Here

        int bus = Integer.parseInt(attributes.getValue("bus"));
        int address = Integer.parseInt(attributes.getValue("address"));

        if (type.toUpperCase().equals("DELTA")
                || type.toUpperCase().equals("DELTALOCOMOTIVE")) {
            LocomotiveType locomotiveType = locomotivePersistence
                    .getLocomotiveTypeByName("DELTA");
            actualLocomotive = new Locomotive(0, actualLocomotiveGroup,
                    locomotiveType, name, desc, "", address, bus);
            locomotiveType.getLocomotives().add(actualLocomotive);
        } else if (type.toUpperCase().equals("DIGITAL")
                || type.toUpperCase().equals("DIGITALLOCOMOTIVE")) {
            LocomotiveType locomotiveType = locomotivePersistence
                    .getLocomotiveTypeByName("DIGITAL");
            actualLocomotive = new Locomotive(0, actualLocomotiveGroup,
                    locomotiveType, name, desc, "", address, bus);
            locomotiveType.getLocomotives().add(actualLocomotive);
        }
    }
View Full Code Here

TOP

Related Classes of ch.fork.AdHocRailway.domain.locomotives.LocomotiveType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.