• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CityGMLClass类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getFeatureTypeSelection

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
private String getFeatureTypeSelection(QueryExpression queryExpression) {
	FeatureClassFilter filter = queryExpression.getFeatureTypeFilter();

	if (filter != null) {
		List<Integer> classIds = new ArrayList<Integer>();
		for (CityGMLClass cityGMLClass : filter.getNotFilterState())
			classIds.add(Util.cityObject2classId(cityGMLClass));

		if (!classIds.isEmpty()) {
			StringBuilder builder = new StringBuilder();
			builder.append(" co.objectclass_id in (").append(Util.collection2string(classIds, ", ")).append(") ");
			return builder.toString();
		}
	}

	return null;
}
 
开发者ID:3dcitydb,项目名称:web-feature-service,代码行数:18,代码来源:QueryBuilder.java


示例2: containsProperty

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public boolean containsProperty(String name, AppSchema schema) {
	if (properties == null && genericAttributes == null)
		return TRUE;

	if (properties != null) {
		for (AbstractProperty property : properties) {
			if (property.getSchema() == schema && property.getPath().equals(name))
				return TRUE;
		}
	}

	if (genericAttributes != null) {
		if (schema.matchesNamespaceURI(GenericsModule.v2_0_0.getNamespaceURI())) {
			for (GenericAttribute genericAttribute : genericAttributes) {					
				if (genericAttribute.getType() == CityGMLClass.UNDEFINED)
					return TRUE;

				String attrName = getGenericAttributeName(genericAttribute.getType());
				if (name.equals(attrName))
					return TRUE;
			}
		}
	}

	return FALSE;
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:27,代码来源:ProjectionFilter.java


示例3: lookupDB

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
private String lookupDB(long id, CityGMLClass type) {
	if (isDraining.get()) {
		final ReentrantLock lock = this.mainLock;
		lock.lock();

		try {
			while (isDraining.get())
				drainingDone.await();
		} catch (InterruptedException ie) {
			//
		} finally {
			lock.unlock();
		}
	}
	
	try {
		return cacheModel.lookupDB(id, type);
	} catch (SQLException sqlEx) {
		return null;
	} 
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-oracle,代码行数:22,代码来源:GmlIdLookupServer.java


示例4: getBalloonTemplateHandler

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
private BalloonTemplateHandlerImpl getBalloonTemplateHandler(CityGMLClass cityObjectType) {
	BalloonTemplateHandlerImpl currentBalloonTemplateHandler = balloonTemplateHandler.get(cityObjectType);

	if (currentBalloonTemplateHandler == null) {
		Balloon balloonSettings = getBalloonSettings(cityObjectType);
		if (balloonSettings != null &&	balloonSettings.isIncludeDescription() &&
				balloonSettings.getBalloonContentMode() != BalloonContentMode.GEN_ATTRIB) {
			String balloonTemplateFilename = balloonSettings.getBalloonContentTemplateFile();
			if (balloonTemplateFilename != null && balloonTemplateFilename.length() > 0) {
				currentBalloonTemplateHandler = new BalloonTemplateHandlerImpl(new File(balloonTemplateFilename), connection);
				balloonTemplateHandler.put(cityObjectType, currentBalloonTemplateHandler);
			}
		}
	}

	return currentBalloonTemplateHandler;
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-oracle,代码行数:18,代码来源:KmlExportWorker.java


示例5: copyTo

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
@Override
public Object copyTo(Object target, CopyBuilder copyBuilder) {
	AbstractBuilding copy = (target == null) ? new BuildingPart() : (AbstractBuilding)target;
	super.copyTo(copy, copyBuilder);

	if (copy.getCityGMLClass() == CityGMLClass.BUILDING_PART) {
		if (isSetGenericApplicationPropertyOfBuildingPart()) {
			for (ADEComponent part : ade) {
				ADEComponent copyPart = (ADEComponent)copyBuilder.copy(part);
				((BuildingPart)copy).addGenericApplicationPropertyOfBuildingPart(copyPart);

				if (part != null && copyPart == part)
					part.setParent(this);
			}
		}
	}

	return copy;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:20,代码来源:BuildingPart.java


示例6: insert

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public boolean insert(DBXlinkDeprecatedMaterial xlink) throws SQLException {
	GmlIdEntry surfaceDataEntry = resolverManager.getDBId(xlink.getGmlId(), CityGMLClass.APPEARANCE);
	if (surfaceDataEntry == null || surfaceDataEntry.getId() == -1)
		return false;

	long newSurfaceDataId = resolverManager.getDBId(DBSequencerEnum.SURFACE_DATA_SEQ);

	psSurfaceData.setLong(1, newSurfaceDataId);
	psSurfaceData.setLong(2, surfaceDataEntry.getId());
	psSurfaceData.addBatch();

	psTextureParam.setLong(1, xlink.getSurfaceGeometryId());
	psTextureParam.setLong(2, newSurfaceDataId);
	psTextureParam.setLong(3, surfaceDataEntry.getId());
	psTextureParam.addBatch();
	
	if (++batchCounter == Internal.ORACLE_MAX_BATCH_SIZE)
		executeBatch();

	return true;
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-oracle,代码行数:22,代码来源:XlinkDeprecatedMaterial.java


示例7: lookupAndPut

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public boolean lookupAndPut(String key, long id, long rootId, boolean reverse, String mapping, CityGMLClass type) {
	boolean lookup = lookupMap(key) != null;
	if (!lookup && backUp)
		lookup = lookupDB(key) != null;

	if (!lookup) {		
		GmlIdEntry entry = getOrCreate(key, id, rootId, reverse, mapping, type);
		if (!entry.getAndSetRegistered(true)) {
			if (entries.incrementAndGet() >= capacity && isDraining.compareAndSet(false, true))
				drainToDB();
		} else
			lookup = true;
	}

	return lookup;
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-oracle,代码行数:17,代码来源:GmlIdLookupServer.java


示例8: readCityGMLFile

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
/**
 * Returns a list for BuildingCallable read by CityGML file
 * 
 * @param pathtocitygmlfile
 * @param options
 * @return List<BuildingCallable>
 * @throws Exception
 */
public List<BuildingCallable> readCityGMLFile(String pathtocitygmlfile, Options options) throws Exception {

	this.options = options;
	
	List<BuildingCallable> buildings = new ArrayList<BuildingCallable>();
	
	CityGMLContext ctx = new CityGMLContext();
	CityGMLBuilder builder = ctx.createCityGMLBuilder();
	CityGMLInputFactory in = builder.createCityGMLInputFactory();
	CityGMLReader reader = in.createCityGMLReader(new File(pathtocitygmlfile));
	
	while (reader.hasNext()) {
		CityGML citygml = reader.nextFeature();
		
		if (citygml.getCityGMLClass() == CityGMLClass.CITY_MODEL) {
			CityModel cityModel = (CityModel)citygml;
			
			for (CityObjectMember cityObjectMember : cityModel.getCityObjectMember()) {
				AbstractCityObject cityObject = cityObjectMember.getCityObject();
				if (cityObject.getCityGMLClass() == CityGMLClass.BUILDING){
					
					Building building = (Building)cityObject;
					String buildingID = building.getId();
					BuildingCallable buildingcallable = new BuildingCallable();
					buildingcallable.setBsp(building.getBoundedBySurface());
					buildingcallable.setBuildingId(buildingID);
					buildingcallable.setOptions(options);
					buildings.add(buildingcallable);
				}	
			}
		}	
	}			
	
	reader.close();
	return buildings;
}
 
开发者ID:SteuerHorst,项目名称:Voluminator,代码行数:45,代码来源:BuildingReader.java


示例9: startQuery

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public void startQuery(HashSet<CityGMLClass> desirableCityObjects) throws SQLException {
	try {
		queryObjects(desirableCityObjects);
	}
	finally {
		if (connection != null) {
			try {
				connection.close();
			}
			catch (SQLException sqlEx) {}

			connection = null;
		}
	}
}
 
开发者ID:3dcitydb,项目名称:plugin-spreadsheet-generator,代码行数:16,代码来源:DBManager.java


示例10: getCityGMLClass

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public CityGMLClass getCityGMLClass(QName featureTypeName) {
	Module module = Modules.getModule(featureTypeName.getNamespaceURI());
	if (module instanceof CityGMLModule) {
		CityGMLModule cityGMLModule = (CityGMLModule)module;
		return CityGMLClass.fromModelClass(cityGMLModule.getFeatureElementClass(featureTypeName.getLocalPart()));
	}

	return CityGMLClass.UNDEFINED;
}
 
开发者ID:3dcitydb,项目名称:web-feature-service,代码行数:10,代码来源:FeatureTypeHandler.java


示例11: isFeatureAlreadyExported

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public boolean isFeatureAlreadyExported(AbstractFeature abstractFeature) {
	if (!abstractFeature.isSetId())
		return false;

	UIDCache server = lookupServerManager.getCache(CityGMLClass.ABSTRACT_CITY_OBJECT);
	return server.get(abstractFeature.getId()) != null;
}
 
开发者ID:3dcitydb,项目名称:web-feature-service,代码行数:8,代码来源:FeatureMemberWriter.java


示例12: getLookupServer

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public GmlIdLookupServer getLookupServer(CityGMLClass type) {
	DBGmlIdLookupServerEnum lookupServer;

	switch (type) {
	case ABSTRACT_GML_GEOMETRY:
		lookupServer = DBGmlIdLookupServerEnum.GEOMETRY;
		break;
	default:
		lookupServer = DBGmlIdLookupServerEnum.FEATURE;
	}

	return serverMap.get(lookupServer);
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-oracle,代码行数:14,代码来源:DBGmlIdLookupServerManager.java


示例13: main

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的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 CityGML file LOD2_Buildings_v100.gml completely into main memory");
	CityGMLInputFactory in = builder.createCityGMLInputFactory();
	CityGMLReader reader = in.createCityGMLReader(new File("datasets/LOD2_Buildings_v100.gml"));
	
	while (reader.hasNext()) {
		CityGML citygml = reader.nextFeature();

		if (citygml.getCityGMLClass() == CityGMLClass.CITY_MODEL) {
			CityModel cityModel = (CityModel)citygml;

			System.out.println(df.format(new Date()) + "Found " + citygml.getCityGMLClass() + " version " + cityModel.getCityGMLModule().getVersion());
			System.out.println(df.format(new Date()) + "going through city model and counting building instances");

			int count = 0;
			for (CityObjectMember cityObjectMember : cityModel.getCityObjectMember()) {
				AbstractCityObject cityObject = cityObjectMember.getCityObject();
				if (cityObject.getCityGMLClass() == CityGMLClass.BUILDING)
					count++;
			}

			System.out.println(df.format(new Date()) + "The city model contains " + count + " building features");
		}	
	}			
	
	reader.close();
	System.out.println(df.format(new Date()) + "sample citygml4j application successfully finished");
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:35,代码来源:SimpleReader.java


示例14: updateFeatureCounter

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public void updateFeatureCounter(CityGMLClass featureType) {
	Long counter = featureCounterMap.get(featureType);
	if (counter == null)
		featureCounterMap.put(featureType, new Long(1));
	else
		featureCounterMap.put(featureType, counter + 1);
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-oracle,代码行数:8,代码来源:DBExporterManager.java


示例15: get

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public String get(long id, CityGMLClass type) {
	String key = lookupMap(id, type);
	if (key == null && backUp)
		key = lookupDB(id, type);

	return key;
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-postgis,代码行数:8,代码来源:GmlIdLookupServer.java


示例16: containsGenericAttribute

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public boolean containsGenericAttribute(String name, CityGMLClass type) {
	for (ProjectionFilter filter : filters) {
		if (filter.containsGenericAttribute(name, type))
			return true;
	}
	
	return false;
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:9,代码来源:CombinedProjectionFilter.java


示例17: getFeatureSignature

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public static String getFeatureSignature(CityGMLClass featureType, String gmlId) {
	StringBuilder sig = new StringBuilder(featureType.toString());

	if (gmlId != null) {
		sig.append(" '");
		sig.append(gmlId);
		sig.append('\'');
	} else
		sig.append(" (unknown gml:id)");

	return sig.toString();	
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-oracle,代码行数:13,代码来源:Util.java


示例18: DBExporterManager

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public DBExporterManager(Connection connection,
		JAXBBuilder jaxbBuilder,
		WorkerPool<SAXEventBuffer> ioWriterPool,
		WorkerPool<DBXlink> xlinkExporterPool,
		DBGmlIdLookupServerManager lookupServerManager,
		CacheManager cacheManager,
		ExportFilter exportFilter,
		Config config,
		EventDispatcher eventDispatcher) throws SAXException {
	this.connection = connection;
	this.jaxbBuilder = jaxbBuilder;
	this.ioWriterPool = ioWriterPool;
	this.xlinkExporterPool = xlinkExporterPool;
	this.lookupServerManager = lookupServerManager;
	this.cacheManager = cacheManager;
	this.exportFilter = exportFilter;
	this.config = config;
	this.eventDispatcher = eventDispatcher;

	dbExporterMap = new EnumMap<DBExporterEnum, DBExporter>(DBExporterEnum.class);
	featureCounterMap = new HashMap<CityGMLClass, Long>();
	geometryCounterMap = new HashMap<GMLClass, Long>();

	CityGMLVersion version = config.getProject().getExporter().getCityGMLVersion().toCityGMLVersion();
	jaxbMarshaller = jaxbBuilder.createJAXBMarshaller(version);
	jaxbUnmarshaller = jaxbBuilder.createJAXBUnmarshaller();
	jaxbUnmarshaller.setThrowMissingADESchema(false);
	jaxbUnmarshaller.setParseSchema(false);
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-oracle,代码行数:30,代码来源:DBExporterManager.java


示例19: put

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public void put(String key, long id, long rootId, boolean reverse, String mapping, CityGMLClass type) {
	GmlIdEntry entry = lookupMap(key);

	if (entry == null) {
		entry = getOrCreate(key, id, rootId, reverse, mapping, type);

		if (!entry.getAndSetRegistered(true)) {
			if (entries.incrementAndGet() >= capacity && isDraining.compareAndSet(false, true)) 
				drainToDB();
		}
	}
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-postgis,代码行数:13,代码来源:GmlIdLookupServer.java


示例20: filter

import org.citygml4j.model.citygml.CityGMLClass; //导入依赖的package包/类
public boolean filter(CityGMLClass type) {
	if (isActive) {
		// do filter job
		switch (type) {
		case BUILDING:
			return featureClassFilter.isSetBuilding();
		case CITY_FURNITURE:
			return featureClassFilter.isSetCityFurniture();
		case LAND_USE:
			return featureClassFilter.isSetLandUse();
		case WATER_BODY:
			return featureClassFilter.isSetWaterBody();
		case PLANT_COVER:
		case SOLITARY_VEGETATION_OBJECT:
			return featureClassFilter.isSetVegetation();
		case TRANSPORTATION_COMPLEX:
		case ROAD:
		case RAILWAY:
		case TRACK:
		case SQUARE:
			return featureClassFilter.isSetTransportation();
		case RELIEF_FEATURE:
			return featureClassFilter.isSetReliefFeature();
		case GENERIC_CITY_OBJECT:
			return featureClassFilter.isSetGenericCityObject();
		case CITY_OBJECT_GROUP:
			return featureClassFilter.isSetCityObjectGroup();
		default:
			return false;
		}
	}

	return false;
}
 
开发者ID:3dcitydb,项目名称:importer-exporter-oracle,代码行数:35,代码来源:FeatureClassFilter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RefreshType类代码示例发布时间:2022-05-23
下一篇:
Java PolicyWSDLGeneratorExtension类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap