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


Java Road类代码示例

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


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

示例1: getElementMapper

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
private TypeMapper<JAXBElement<?>> getElementMapper() {
	if (elementMapper == null) {
		lock.lock();
		try {
			if (elementMapper == null) {
				elementMapper = TypeMapper.<JAXBElement<?>>create()
						.with(AuxiliaryTrafficArea.class, this::createAuxiliaryTrafficArea)
						.with(Railway.class, this::createRailway)
						.with(Road.class, this::createRoad)
						.with(Square.class, this::createSquare)
						.with(Track.class, this::createTrack)
						.with(TrafficArea.class, this::createTrafficArea)
						.with(TransportationComplex.class, this::createTransportationComplex);
			}
		} finally {
			lock.unlock();
		}
	}

	return elementMapper;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:22,代码来源:Transportation200Marshaller.java

示例2: getTypeMapper

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
private TypeMapper<Object> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = TypeMapper.create()
						.with(AuxiliaryTrafficArea.class, this::marshalAuxiliaryTrafficArea)
						.with(AuxiliaryTrafficAreaProperty.class, this::marshalAuxiliaryTrafficAreaProperty)
						.with(Railway.class, this::marshalRailway)
						.with(Road.class, this::marshalRoad)
						.with(Square.class, this::marshalSquare)
						.with(Track.class, this::marshalTrack)
						.with(TrafficArea.class, this::marshalTrafficArea)
						.with(TrafficAreaProperty.class, this::marshalTrafficAreaProperty)
						.with(TransportationComplex.class, this::marshalTransportationComplex);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:24,代码来源:Transportation200Marshaller.java

示例3: assignGenericProperty

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public boolean assignGenericProperty(ADEGenericElement genericProperty, QName substitutionGroup, CityGML dest) {
	String name = substitutionGroup.getLocalPart();
	boolean success = true;

	if (dest instanceof AbstractTransportationObject && name.equals("_GenericApplicationPropertyOfTransportationObject"))
		((AbstractTransportationObject)dest).addGenericApplicationPropertyOfTransportationObject(genericProperty);
	else if (dest instanceof AuxiliaryTrafficArea && name.equals("_GenericApplicationPropertyOfAuxiliaryTrafficArea"))
		((AuxiliaryTrafficArea)dest).addGenericApplicationPropertyOfAuxiliaryTrafficArea(genericProperty);
	else if (dest instanceof TransportationComplex && name.equals("_GenericApplicationPropertyOfTransportationComplex"))
		((TransportationComplex)dest).addGenericApplicationPropertyOfTransportationComplex(genericProperty);
	else if (dest instanceof Railway && name.equals("_GenericApplicationPropertyOfRailway"))
		((Railway)dest).addGenericApplicationPropertyOfRailway(genericProperty);
	else if (dest instanceof Road && name.equals("_GenericApplicationPropertyOfRoad"))
		((Road)dest).addGenericApplicationPropertyOfRoad(genericProperty);
	else if (dest instanceof Square && name.equals("_GenericApplicationPropertyOfSquare"))
		((Square)dest).addGenericApplicationPropertyOfSquare(genericProperty);
	else if (dest instanceof Track && name.equals("_GenericApplicationPropertyOfTrack"))
		((Track)dest).addGenericApplicationPropertyOfTrack(genericProperty);
	else if (dest instanceof TrafficArea && name.equals("_GenericApplicationPropertyOfTrafficArea"))
		((TrafficArea)dest).addGenericApplicationPropertyOfTrafficArea(genericProperty);
	else 
		success = false;

	return success;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:26,代码来源:Transportation200Unmarshaller.java

示例4: visit

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public void visit(Road road) {
	visit((TransportationComplex)road);

	if (road.isSetGenericApplicationPropertyOfRoad())
		for (ADEComponent ade : road.getGenericApplicationPropertyOfRoad())
			visit(ade);
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:8,代码来源:ADEPropertyCollector.java

示例5: apply

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public T apply(Road road) {
	T object = apply((TransportationComplex)road);
	if (object != null)
		return object;

	if (road.isSetGenericApplicationPropertyOfRoad()) {
		for (ADEComponent ade : new ArrayList<ADEComponent>(road.getGenericApplicationPropertyOfRoad())) {
			object = apply(ade);
			if (object != null)
				return object;
		}
	}

	return null;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:16,代码来源:GMLFunctionWalker.java

示例6: visit

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public void visit(Road road) {
	visit((TransportationComplex)road);

	if (road.isSetGenericApplicationPropertyOfRoad())
		for (ADEComponent ade : new ArrayList<ADEComponent>(road.getGenericApplicationPropertyOfRoad()))
			visit(ade);
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:8,代码来源:GMLWalker.java

示例7: marshalRoad

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public void marshalRoad(Road src, RoadType dest) {
	marshalTransportationComplex(src, dest);

	if (src.isSetGenericApplicationPropertyOfRoad()) {
		for (ADEComponent adeComponent : src.getGenericApplicationPropertyOfRoad()) {
			JAXBElement<Object> jaxbElement = jaxb.getADEMarshaller().marshalJAXBElement(adeComponent);
			if (jaxbElement != null)
				dest.get_GenericApplicationPropertyOfRoad().add(jaxbElement);
		}
	}
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:12,代码来源:Transportation200Marshaller.java

示例8: unmarshalRoad

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public void unmarshalRoad(RoadType src, Road dest) throws MissingADESchemaException {
	unmarshalTransportationComplex(src, dest);

	if (src.isSet_GenericApplicationPropertyOfRoad()) {
		for (JAXBElement<Object> elem : src.get_GenericApplicationPropertyOfRoad()) {
			ADEModelObject ade = jaxb.getADEUnmarshaller().unmarshal(elem);
			if (ade != null)
				dest.addGenericApplicationPropertyOfRoad(ade);
		}
	}
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:12,代码来源:Transportation200Unmarshaller.java

示例9: TransportationMarshaller

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public TransportationMarshaller(CityGMLMarshaller citygml) {
	this.citygml = citygml;
	json = citygml.getCityJSONMarshaller();

	typeMapper = TypeMapper.<List<AbstractCityObjectType>>create()
			.with(Road.class, this::marshalRoad)
			.with(Railway.class, this::marshalRailway)
			.with(Square.class, this::marshalSquare);
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:10,代码来源:TransportationMarshaller.java

示例10: main

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
	SimpleDateFormat df = new SimpleDateFormat("[HH:mm:ss] "); 

	System.out.println(df.format(new Date()) + "setting up citygml4j context and CityGML builder");
	CityGMLContext ctx = CityGMLContext.getInstance();
	CityGMLBuilder builder = ctx.createCityGMLBuilder();

	System.out.println(df.format(new Date()) + "reading only roads from CityGML file LOD2_CityObjectGroup_v100.gml");
	CityGMLInputFactory in = builder.createCityGMLInputFactory();
	in.setProperty(CityGMLInputFactory.FEATURE_READ_MODE, FeatureReadMode.SPLIT_PER_FEATURE);

	CityGMLReader reader = in.createCityGMLReader(new File("datasets/LOD2_CityObjectGroup_v100.gml"));
	reader = in.createFilteredCityGMLReader(reader, new CityGMLInputFilter() {

		// return true if you want to consume the CityGML feature
		// of the given qualified XML name, false otherwise
		public boolean accept(QName name) {
			return Modules.isModuleNamespace(name.getNamespaceURI(), CityGMLModuleType.TRANSPORTATION)
					&& name.getLocalPart().equals("Road");
		}
		
	});

	System.out.println(df.format(new Date()) + "printing road features");
	while (reader.hasNext()) {
		Road road = (Road)reader.nextFeature();
		System.out.println(df.format(new Date()) + "found Road with gml:id " + road.getId());	
		
		System.out.println(df.format(new Date()) + "\t" + road.getTrafficArea().size() + " traffic area(s)");	
		System.out.println(df.format(new Date()) + "\t" + road.getAuxiliaryTrafficArea().size() + " auxiliary traffic area(s)");	
	}

	reader.close();
	System.out.println(df.format(new Date()) + "sample citygml4j application successfully finished");
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:36,代码来源:FilteredReader.java

示例11: CG_Road

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public CG_Road(Road tO) {
  super(tO);
}
 
开发者ID:IGNF,项目名称:geoxygene,代码行数:4,代码来源:CG_Road.java

示例12: generateTransportationComplex

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public static CG_TransportationComplex generateTransportationComplex(
    TransportationComplex tO) {

  if (tO instanceof Track) {

    return new CG_Track((Track) tO);

  } else if (tO instanceof Road) {

    return new CG_Road((Road) tO);

  } else if (tO instanceof Railway) {
    return new CG_Railway((Railway) tO);

  } else if (tO instanceof Square) {
    return new CG_Square((Square) tO);

  }

  System.out.println("Classe nongérée" + tO.getCityGMLClass());
  return null;

}
 
开发者ID:IGNF,项目名称:geoxygene,代码行数:24,代码来源:CG_TransportationComplex.java

示例13: createRoad

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
private JAXBElement<?> createRoad(Road src) {
	return tran.createRoad(marshalRoad(src));
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:4,代码来源:Transportation200Marshaller.java

示例14: marshalRoad

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public List<AbstractCityObjectType> marshalRoad(Road src) {
	RoadType dest = new RoadType(src.getId());
	marshalTransportationComplex(src, dest);
	
	return Collections.singletonList(dest);
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:7,代码来源:TransportationMarshaller.java

示例15: unmarshalRoad

import org.citygml4j.model.citygml.transportation.Road; //导入依赖的package包/类
public Road unmarshalRoad(RoadType src, CityJSON cityJSON) {
	Road dest = new Road();
	unmarshalTransportationComplex(src, dest);

	return dest;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:7,代码来源:TransportationUnmarshaller.java


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