当前位置: 首页>>代码示例>>Java>>正文


Java CleanUtils类代码示例

本文整理汇总了Java中org.mtransit.parser.CleanUtils的典型用法代码示例。如果您正苦于以下问题:Java CleanUtils类的具体用法?Java CleanUtils怎么用?Java CleanUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CleanUtils类属于org.mtransit.parser包,在下文中一共展示了CleanUtils类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: cleanStopName

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	if (Utils.isUppercaseOnly(gStopName, true, true)) {
		gStopName = gStopName.toLowerCase(Locale.ENGLISH);
	}
	gStopName = BOUNDS.matcher(gStopName).replaceAll(StringUtils.EMPTY);
	gStopName = ENDS_WITH_STOP_CODE.matcher(gStopName).replaceAll(StringUtils.EMPTY);
	gStopName = HOS.matcher(gStopName).replaceAll(HOS_REPLACEMENT);
	gStopName = CleanUtils.CLEAN_AND.matcher(gStopName).replaceAll(CleanUtils.CLEAN_AND_REPLACEMENT);
	gStopName = CleanUtils.CLEAN_AT.matcher(gStopName).replaceAll(CleanUtils.CLEAN_AT_REPLACEMENT);
	gStopName = CleanUtils.removePoints(gStopName);
	gStopName = CleanUtils.cleanNumbers(gStopName);
	gStopName = CleanUtils.cleanStreetTypes(gStopName);
	gStopName = CleanUtils.cleanStreetTypesFRCA(gStopName);
	return CleanUtils.cleanLabel(gStopName);
}
 
开发者ID:mtransitapps,项目名称:ca-london-transit-bus-parser,代码行数:17,代码来源:LondonTransitBusAgencyTools.java

示例2: cleanStopName

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	gStopName = gStopName.toLowerCase(Locale.ENGLISH);
	gStopName = CleanUtils.CLEAN_AT.matcher(gStopName).replaceAll(CleanUtils.CLEAN_AT_REPLACEMENT);
	gStopName = BOUND.matcher(gStopName).replaceAll(BOUND_REPLACEMENT);
	gStopName = CENTER.matcher(gStopName).replaceAll(CENTER_REPLACEMENT);
	gStopName = PLATFORM.matcher(gStopName).replaceAll(PLATFORM_REPLACEMENT);
	gStopName = STATION.matcher(gStopName).replaceAll(STATION_REPLACEMENT);
	gStopName = SUBWAY.matcher(gStopName).replaceAll(SUBWAY_REPLACEMENT);
	gStopName = TOWARDS.matcher(gStopName).replaceAll(StringUtils.EMPTY);
	if (gStopName.trim().endsWith(DASH)) {
		gStopName = gStopName.substring(0, gStopName.trim().length() - 1);
	}
	gStopName = CleanUtils.removePoints(gStopName);
	gStopName = CleanUtils.cleanStreetTypes(gStopName);
	gStopName = CleanUtils.cleanNumbers(gStopName);
	return CleanUtils.cleanLabel(gStopName);
}
 
开发者ID:mtransitapps,项目名称:ca-toronto-ttc-subway-parser,代码行数:19,代码来源:TorontoTTCSubwayAgencyTools.java

示例3: cleanTripHeadsign

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanTripHeadsign(String tripHeadsign) {
	int indexOfVIA = tripHeadsign.toLowerCase(Locale.ENGLISH).indexOf(VIA);
	if (indexOfVIA >= 0) {
		tripHeadsign = tripHeadsign.substring(indexOfVIA); // remove trip head sign from stop head sign
	}
	tripHeadsign = STARTS_WITH_RSN.matcher(tripHeadsign).replaceAll(StringUtils.EMPTY);
	tripHeadsign = TRANSIT_CENTER.matcher(tripHeadsign).replaceAll(StringUtils.EMPTY);
	tripHeadsign = TOWN_CENTER.matcher(tripHeadsign).replaceAll(TOWN_CENTER_REPLACEMENT);
	tripHeadsign = SUPER_EXPRESS.matcher(tripHeadsign).replaceAll(StringUtils.EMPTY);
	tripHeadsign = EDMONTON.matcher(tripHeadsign).replaceAll(EDMONTON_REPLACEMENT);
	tripHeadsign = N_A_I_T.matcher(tripHeadsign).replaceAll(N_A_I_T_REPLACEMENT);
	tripHeadsign = CleanUtils.cleanStreetTypes(tripHeadsign);
	tripHeadsign = CleanUtils.cleanNumbers(tripHeadsign);
	tripHeadsign = CleanUtils.removePoints(tripHeadsign);
	return CleanUtils.cleanLabel(tripHeadsign);
}
 
开发者ID:mtransitapps,项目名称:ca-edmonton-ets-bus-parser,代码行数:18,代码来源:EdmontonETSBusAgencyTools.java

示例4: cleanTripHeadsign

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanTripHeadsign(String tripHeadsign) {
	tripHeadsign = CleanUtils.CLEAN_AND.matcher(tripHeadsign).replaceAll(CleanUtils.CLEAN_AND_REPLACEMENT);
	tripHeadsign = CLEAN_P1.matcher(tripHeadsign).replaceAll(CLEAN_P1_REPLACEMENT);
	tripHeadsign = CLEAN_P2.matcher(tripHeadsign).replaceAll(CLEAN_P2_REPLACEMENT);
	tripHeadsign = CleanUtils.cleanStreetTypes(tripHeadsign);
	tripHeadsign = CleanUtils.cleanNumbers(tripHeadsign);
	return CleanUtils.cleanLabel(tripHeadsign);
}
 
开发者ID:mtransitapps,项目名称:ca-vernon-transit-system-bus-parser,代码行数:10,代码来源:VernonTransitSystemBusAgencyTools.java

示例5: cleanStopName

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	gStopName = STARTS_WITH_BOUND.matcher(gStopName).replaceAll(StringUtils.EMPTY);
	gStopName = CleanUtils.CLEAN_AT.matcher(gStopName).replaceAll(CleanUtils.CLEAN_AT_REPLACEMENT);
	gStopName = EXCHANGE.matcher(gStopName).replaceAll(EXCHANGE_REPLACEMENT);
	gStopName = CleanUtils.cleanStreetTypes(gStopName);
	gStopName = CleanUtils.cleanNumbers(gStopName);
	return CleanUtils.cleanLabel(gStopName);
}
 
开发者ID:mtransitapps,项目名称:ca-vernon-transit-system-bus-parser,代码行数:10,代码来源:VernonTransitSystemBusAgencyTools.java

示例6: cleanTripHeadsign

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanTripHeadsign(String tripHeadsign) {
	tripHeadsign = CleanUtils.cleanSlashes(tripHeadsign);
	tripHeadsign = CleanUtils.CLEAN_AT.matcher(tripHeadsign).replaceAll(CleanUtils.CLEAN_AT_REPLACEMENT);
	tripHeadsign = CleanUtils.CLEAN_AND.matcher(tripHeadsign).replaceAll(CleanUtils.CLEAN_AND_REPLACEMENT);
	tripHeadsign = CleanUtils.cleanNumbers(tripHeadsign);
	tripHeadsign = CleanUtils.cleanStreetTypes(tripHeadsign);
	return CleanUtils.cleanLabel(tripHeadsign);
}
 
开发者ID:mtransitapps,项目名称:us-everett-transit-bus-parser,代码行数:10,代码来源:EverettTransitBusAgencyTools.java

示例7: cleanStopName

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	gStopName = gStopName.toLowerCase(Locale.ENGLISH);
	gStopName = CleanUtils.SAINT.matcher(gStopName).replaceAll(CleanUtils.SAINT_REPLACEMENT);
	gStopName = CleanUtils.CLEAN_AND.matcher(gStopName).replaceAll(CleanUtils.CLEAN_AND_REPLACEMENT);
	gStopName = CleanUtils.CLEAN_AT.matcher(gStopName).replaceAll(CleanUtils.CLEAN_AT_REPLACEMENT);
	gStopName = CleanUtils.cleanSlashes(gStopName);
	gStopName = CleanUtils.removePoints(gStopName);
	gStopName = CleanUtils.cleanStreetTypes(gStopName);
	return CleanUtils.cleanLabel(gStopName);
}
 
开发者ID:mtransitapps,项目名称:us-everett-transit-bus-parser,代码行数:12,代码来源:EverettTransitBusAgencyTools.java

示例8: getRouteLongName

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String getRouteLongName(GRoute gRoute) {
	String routeLongName = gRoute.getRouteLongName();
	routeLongName = POINT.matcher(routeLongName).replaceAll(POINT_REPLACEMENT);
	routeLongName = POINTS.matcher(routeLongName).replaceAll(POINTS_REPLACEMENT);
	routeLongName = CleanUtils.cleanNumbers(routeLongName);
	routeLongName = CleanUtils.cleanStreetTypes(routeLongName);
	return CleanUtils.cleanLabel(routeLongName);
}
 
开发者ID:mtransitapps,项目名称:ca-welland-transit-bus-parser,代码行数:10,代码来源:WellandTransitBusAgencyTools.java

示例9: cleanStopName

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	gStopName = CLEAN_UNIVERISITY.matcher(gStopName).replaceAll(CLEAN_UNIVERISITY_REPLACEMENT);
	gStopName = CLEAN_UNIVERISITY_FR.matcher(gStopName).replaceAll(CLEAN_UNIVERISITY_FR_REPLACEMENT);
	gStopName = CleanUtils.removePoints(gStopName);
	gStopName = CleanUtils.cleanNumbers(gStopName);
	gStopName = CleanUtils.cleanStreetTypes(gStopName);
	return CleanUtils.cleanLabel(gStopName);
}
 
开发者ID:mtransitapps,项目名称:ca-sudbury-transit-bus-parser,代码行数:10,代码来源:SudburyTransitBusAgencyTools.java

示例10: cleanTripHeadsign

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanTripHeadsign(String tripHeadsign) {
	tripHeadsign = DIRECTION.matcher(tripHeadsign).replaceAll(DIRECTION_REPLACEMENT);
	tripHeadsign = CHEMIN.matcher(tripHeadsign).replaceAll(CHEMIN_REPLACEMENT);
	tripHeadsign = PARCOURS.matcher(tripHeadsign).replaceAll(PARCOURS_REPLACEMENT);
	tripHeadsign = CleanUtils.cleanStreetTypesFRCA(tripHeadsign);
	return CleanUtils.cleanLabelFR(tripHeadsign);
}
 
开发者ID:mtransitapps,项目名称:ca-les-moulins-mrclm-bus-parser,代码行数:9,代码来源:LesMoulinsMRCLMBusAgencyTools.java

示例11: getRouteLongName

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String getRouteLongName(GRoute gRoute) {
	String routeLongName = gRoute.getRouteLongName();
	routeLongName = CleanUtils.removePoints(routeLongName);
	routeLongName = CleanUtils.cleanStreetTypes(routeLongName);
	return CleanUtils.cleanLabel(routeLongName);
}
 
开发者ID:mtransitapps,项目名称:ca-st-catharines-transit-bus-parser,代码行数:8,代码来源:StCatharinesTransitBusAgencyTools.java

示例12: cleanTripHeadsign

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanTripHeadsign(String tripHeadsign) {
	tripHeadsign = STARTS_WITH_RSN_RLN.matcher(tripHeadsign).replaceAll(StringUtils.EMPTY);
	tripHeadsign = CENTR.matcher(tripHeadsign).replaceAll(CENTR_REPLACEMENT);
	tripHeadsign = CleanUtils.removePoints(tripHeadsign);
	tripHeadsign = CleanUtils.cleanStreetTypes(tripHeadsign);
	return CleanUtils.cleanLabel(tripHeadsign);
}
 
开发者ID:mtransitapps,项目名称:ca-st-catharines-transit-bus-parser,代码行数:9,代码来源:StCatharinesTransitBusAgencyTools.java

示例13: cleanStopName

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	gStopName = gStopName.toLowerCase(Locale.ENGLISH);
	gStopName = AND_NOT.matcher(gStopName).replaceAll(AND_NOT_REPLACEMENT); // fix Alex&ra
	gStopName = AND.matcher(gStopName).replaceAll(AND_REPLACEMENT);
	gStopName = AND_SLASH.matcher(gStopName).replaceAll(AND_SLASH_REPLACEMENT);
	gStopName = AT.matcher(gStopName).replaceAll(AT_REPLACEMENT);
	gStopName = CleanUtils.removePoints(gStopName);
	gStopName = CleanUtils.cleanNumbers(gStopName);
	gStopName = CleanUtils.cleanStreetTypes(gStopName);
	gStopName = ENDS_WITH.matcher(gStopName).replaceAll(StringUtils.EMPTY);
	return CleanUtils.cleanLabel(gStopName);
}
 
开发者ID:mtransitapps,项目名称:ca-st-catharines-transit-bus-parser,代码行数:14,代码来源:StCatharinesTransitBusAgencyTools.java

示例14: cleanStopName

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	gStopName = Utils.replaceAll(gStopName, START_WITH_FACES, CleanUtils.SPACE);
	gStopName = Utils.replaceAll(gStopName, SPACE_FACES, CleanUtils.SPACE);
	gStopName = CleanUtils.cleanStreetTypesFRCA(gStopName);
	return CleanUtils.cleanLabelFR(gStopName);
}
 
开发者ID:mtransitapps,项目名称:ca-sorel-varennes-citsv-bus-parser,代码行数:8,代码来源:SorelVarennesCITSVBusAgencyTools.java

示例15: getRouteLongName

import org.mtransit.parser.CleanUtils; //导入依赖的package包/类
@Override
public String getRouteLongName(GRoute gRoute) {
	String routeLongName = gRoute.getRouteLongName();
	routeLongName = CleanUtils.cleanNumbers(routeLongName);
	routeLongName = CleanUtils.cleanStreetTypes(routeLongName);
	return CleanUtils.cleanLabel(routeLongName);
}
 
开发者ID:mtransitapps,项目名称:ca-victoria-regional-transit-system-bus-parser,代码行数:8,代码来源:VictoriaRegionalTransitSystemBusAgencyTools.java


注:本文中的org.mtransit.parser.CleanUtils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。