本文整理汇总了Java中org.mtransit.parser.mt.data.MRoute类的典型用法代码示例。如果您正苦于以下问题:Java MRoute类的具体用法?Java MRoute怎么用?Java MRoute使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MRoute类属于org.mtransit.parser.mt.data包,在下文中一共展示了MRoute类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return; // split
}
if (mRoute.getId() == 122l) {
if (gTrip.getDirectionId() == 0) {
mTrip.setHeadsignString(PEN_CTR, gTrip.getDirectionId());
return;
} else if (gTrip.getDirectionId() == 1) {
mTrip.setHeadsignString(BROCK_UNIVERSITY, gTrip.getDirectionId());
return;
}
} else if (mRoute.getId() == 124l) {
if (gTrip.getDirectionId() == 0) {
mTrip.setHeadsignString(BROCK_UNIVERSITY, gTrip.getDirectionId());
return;
} else if (gTrip.getDirectionId() == 1) {
mTrip.setHeadsignString(PEN_CTR, gTrip.getDirectionId());
return;
}
}
mTrip.setHeadsignString(cleanTripHeadsign(gTrip.getTripHeadsign()), gTrip.getDirectionId());
}
开发者ID:mtransitapps,项目名称:ca-st-catharines-transit-bus-parser,代码行数:25,代码来源:StCatharinesTransitBusAgencyTools.java
示例2: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return; // split
}
String tripHeadsign = gTrip.getTripHeadsign();
if (StringUtils.isEmpty(tripHeadsign)) {
if (mRoute.getId() == 23l) {
if (gTrip.getDirectionId() == 0) {
tripHeadsign = COUNTER_CLOCKWISE;
}
} else if (mRoute.getId() == 24l) {
if (gTrip.getDirectionId() == 0) {
tripHeadsign = CLOCKWISE;
}
}
}
mTrip.setHeadsignString(cleanTripHeadsign(tripHeadsign), gTrip.getDirectionId());
}
开发者ID:mtransitapps,项目名称:ca-lethbridge-transit-bus-parser,代码行数:20,代码来源:LethbridgeTransitBusAgencyTools.java
示例3: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return; // split
}
if (gTrip.getRouteId().endsWith(RID_ENDS_WITH_N)) {
mTrip.setHeadsignDirection(MDirectionType.NORTH);
return;
} else if (gTrip.getRouteId().endsWith(RID_ENDS_WITH_S)) {
mTrip.setHeadsignDirection(MDirectionType.SOUTH);
return;
}
if (mRoute.getId() == 116l) {
mTrip.setHeadsignDirection(MDirectionType.NORTH);
return;
} else if (mRoute.getId() == 216l) {
mTrip.setHeadsignDirection(MDirectionType.SOUTH);
return;
}
System.out.printf("\n%s: Unexpected trip %s!\n", mRoute.getId(), gTrip);
System.exit(-1);
}
开发者ID:mtransitapps,项目名称:ca-fredericton-transit-bus-parser,代码行数:23,代码来源:FrederictonTransitBusAgencyTools.java
示例4: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return; // split
}
String tripHeadsign = gTrip.getTripHeadsign();
if (StringUtils.isEmpty(tripHeadsign)) {
tripHeadsign = mRoute.getLongName();
}
if (mRoute.getId() == 21l) {
if (OTTAWA_MUSEE_HISTOIRE.equalsIgnoreCase(mTrip.getHeadsignValue())) {
mTrip.setHeadsignString(MUSEE_CANADIEN_HISTOIRE_SHORT, gTrip.getDirectionId());
return;
}
}
mTrip.setHeadsignString(cleanTripHeadsign(tripHeadsign), gTrip.getDirectionId());
}
示例5: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
String gTripHeadsignLC = gTrip.getTripHeadsign().toLowerCase(Locale.ENGLISH);
if (gTripHeadsignLC.endsWith(NORTH) || gTripHeadsignLC.endsWith(NORTHBOUND)) {
mTrip.setHeadsignDirection(MDirectionType.NORTH);
return;
} else if (gTripHeadsignLC.endsWith(SOUTH) || gTripHeadsignLC.endsWith(SOUTHBOUND)) {
mTrip.setHeadsignDirection(MDirectionType.SOUTH);
return;
} else if (gTripHeadsignLC.endsWith(EAST) || gTripHeadsignLC.endsWith(EASTBOUND)) {
mTrip.setHeadsignDirection(MDirectionType.EAST);
return;
} else if (gTripHeadsignLC.endsWith(WEST) || gTripHeadsignLC.endsWith(WESTBOUND)) {
mTrip.setHeadsignDirection(MDirectionType.WEST);
return;
}
mTrip.setHeadsignString(cleanTripHeadsign(gTrip.getTripHeadsign()), gTrip.getDirectionId());
}
开发者ID:mtransitapps,项目名称:ca-mississauga-miway-bus-parser,代码行数:19,代码来源:MississaugaMiWayBusAgencyTools.java
示例6: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return; // split
}
GRoute gRoute = gtfs.getRoute(gTrip.getRouteId());
String rsn = gRoute.getRouteShortName();
String rsn_letter = rsn.substring(rsn.length() - 1, rsn.length());
String tripHeadsign = rsn_letter + " " + getRouteLongName(gRoute);
int directionId;
if (A.equals(rsn_letter)) {
directionId = 0;
} else if (B.equals(rsn_letter)) {
directionId = 1;
} else {
System.out.printf("\nUnexpected trip (unexpected rsn: %s): %s", rsn, gTrip);
System.exit(-1);
directionId = -1;
}
mTrip.setHeadsignString(cleanTripHeadsign(tripHeadsign), directionId);
}
示例7: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return; // split
}
if (mRoute.getId() == 21l) {
String gTripHeadsignLC = gTrip.getTripHeadsign().toLowerCase(Locale.ENGLISH);
if (gTripHeadsignLC.endsWith("mascouche")) {
mTrip.setHeadsignString(MASCOUCHE, 0);
return;
} else if (gTripHeadsignLC.endsWith("terrebonne")) {
mTrip.setHeadsignString(TERREBONNE, 1);
return;
}
System.out.printf("\nUnexpected trip to split %s!\n", gTrip);
System.exit(-1);
return;
}
mTrip.setHeadsignString(cleanTripHeadsign(gTrip.getTripHeadsign()), gTrip.getDirectionId());
}
开发者ID:mtransitapps,项目名称:ca-les-moulins-mrclm-bus-parser,代码行数:21,代码来源:LesMoulinsMRCLMBusAgencyTools.java
示例8: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return; // split
}
if (gTrip.getTripHeadsign().toUpperCase(Locale.ENGLISH).endsWith(AM)) {
mTrip.setHeadsignString(AM, gTrip.getDirectionId());
return;
} else if (gTrip.getTripHeadsign().toUpperCase(Locale.ENGLISH).endsWith(PM)) {
mTrip.setHeadsignString(PM, gTrip.getDirectionId());
return;
}
if (mTrip.getRouteId() == 210l) {
if (gTrip.getDirectionId() == 0) {
mTrip.setHeadsignString(AM, gTrip.getDirectionId());
return;
} else if (gTrip.getDirectionId() == 1) {
mTrip.setHeadsignString(PM, gTrip.getDirectionId());
return;
}
}
mTrip.setHeadsignString(cleanTripHeadsign(gTrip.getTripHeadsign()), gTrip.getDirectionId());
}
开发者ID:mtransitapps,项目名称:ca-roussillon-citrous-bus-parser,代码行数:24,代码来源:RoussillonCITROUSBusAgencyTools.java
示例9: splitTrip
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public ArrayList<MTrip> splitTrip(MRoute mRoute, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return ALL_ROUTE_TRIPS2.get(mRoute.getId()).getAllTrips();
}
return super.splitTrip(mRoute, gTrip, gtfs);
}
开发者ID:mtransitapps,项目名称:ca-vernon-transit-system-bus-parser,代码行数:8,代码来源:VernonTransitSystemBusAgencyTools.java
示例10: splitTripStop
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public Pair<Long[], Integer[]> splitTripStop(MRoute mRoute, GTrip gTrip, GTripStop gTripStop, ArrayList<MTrip> splitTrips, GSpec routeGTFS) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return SplitUtils.splitTripStop(mRoute, gTrip, gTripStop, routeGTFS, ALL_ROUTE_TRIPS2.get(mRoute.getId()));
}
return super.splitTripStop(mRoute, gTrip, gTripStop, splitTrips, routeGTFS);
}
开发者ID:mtransitapps,项目名称:ca-vernon-transit-system-bus-parser,代码行数:8,代码来源:VernonTransitSystemBusAgencyTools.java
示例11: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return; // split
}
mTrip.setHeadsignString(cleanTripHeadsign(gTrip.getTripHeadsign()), gTrip.getDirectionId());
}
开发者ID:mtransitapps,项目名称:ca-vernon-transit-system-bus-parser,代码行数:8,代码来源:VernonTransitSystemBusAgencyTools.java
示例12: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return; // split
}
System.out.printf("\n%s: Unexpected trip %s!\n", mRoute.getId(), gTrip);
System.exit(-1);
}
示例13: setTripHeadsign
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public void setTripHeadsign(MRoute mRoute, MTrip mTrip, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return; // split
}
System.out.printf("\nUnexpected trip %s!\n", gTrip);
System.exit(-1);
}
开发者ID:mtransitapps,项目名称:ca-halifax-transit-ferry-parser,代码行数:9,代码来源:HalifaxTransitFerryAgencyTools.java
示例14: splitTrip
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public ArrayList<MTrip> splitTrip(MRoute mRoute, GTrip gTrip, GSpec gtfs) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return ALL_ROUTE_TRIPS2.get(mRoute.getId()).getAllTrips();
}
System.out.printf("\n%s: Unexpected trip to split %s!\n", mRoute.getId(), gTrip);
System.exit(-1);
return null;
}
开发者ID:mtransitapps,项目名称:ca-welland-transit-bus-parser,代码行数:10,代码来源:WellandTransitBusAgencyTools.java
示例15: splitTripStop
import org.mtransit.parser.mt.data.MRoute; //导入依赖的package包/类
@Override
public Pair<Long[], Integer[]> splitTripStop(MRoute mRoute, GTrip gTrip, GTripStop gTripStop, ArrayList<MTrip> splitTrips, GSpec routeGTFS) {
if (ALL_ROUTE_TRIPS2.containsKey(mRoute.getId())) {
return SplitUtils.splitTripStop(mRoute, gTrip, gTripStop, routeGTFS, ALL_ROUTE_TRIPS2.get(mRoute.getId()));
}
System.out.printf("\n%s: Unexpected trip to split %s!\n", mRoute.getId(), gTrip);
System.exit(-1);
return null;
}
开发者ID:mtransitapps,项目名称:ca-welland-transit-bus-parser,代码行数:10,代码来源:WellandTransitBusAgencyTools.java