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


Java CityGMLBuilder类代码示例

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


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

示例1: DBExportWorkerFactory

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public DBExportWorkerFactory(
		SchemaMapping schemaMapping,
		CityGMLBuilder cityGMLBuilder,
		FeatureWriter featureWriter,
		WorkerPool<DBXlink> xlinkExporterPool,
		UIDCacheManager uidCacheManager,
		CacheTableManager cacheTableManager,
		Query query,
		Config config,
		EventDispatcher eventDispatcher) {
	this.schemaMapping = schemaMapping;
	this.cityGMLBuilder = cityGMLBuilder;
	this.featureWriter = featureWriter;
	this.xlinkExporterPool = xlinkExporterPool;
	this.uidCacheManager = uidCacheManager;
	this.cacheTableManager = cacheTableManager;
	this.query = query;
	this.config = config;
	this.eventDispatcher = eventDispatcher;
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:21,代码来源:DBExportWorkerFactory.java

示例2: DBImportWorkerFactory

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public DBImportWorkerFactory(SchemaMapping schemaMapping,
		CityGMLBuilder cityGMLBuilder,
		WorkerPool<DBXlink> xlinkWorkerPool,
		UIDCacheManager uidCacheManager,
		CityGMLFilter filter,
		AffineTransformer affineTransformer,
		ImportLogger importLogger,
		Config config,
		EventDispatcher eventDispatcher) {
	this.schemaMapping = schemaMapping;
	this.cityGMLBuilder = cityGMLBuilder;
	this.xlinkWorkerPool = xlinkWorkerPool;
	this.uidCacheManager = uidCacheManager;
	this.filter = filter;
	this.affineTransformer = affineTransformer;
	this.importLogger = importLogger;
	this.config = config;
	this.eventDispatcher = eventDispatcher;
	
	connection = null;
	databaseAdapter = null;
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:23,代码来源:DBImportWorkerFactory.java

示例3: DBImportWorker

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public DBImportWorker(SchemaMapping schemaMapping,
		CityGMLBuilder cityGMLBuilder,
		WorkerPool<DBXlink> xlinkPool,
		UIDCacheManager uidCacheManager,
		CityGMLFilter filter,
		AffineTransformer affineTransformer,
		ImportLogger importLogger,
		Config config,
		EventDispatcher eventDispatcher) throws SQLException {
	this.filter = filter;
	this.importLogger = importLogger;
	this.eventDispatcher = eventDispatcher;

	AbstractDatabaseAdapter databaseAdapter = DatabaseConnectionPool.getInstance().getActiveDatabaseAdapter();
	connection = DatabaseConnectionPool.getInstance().getConnection();
	connection.setAutoCommit(false);
	globalTransaction = false;

	// try and change workspace for both connections if needed
	if (databaseAdapter.hasVersioningSupport()) {
		Workspace workspace = config.getProject().getDatabase().getWorkspaces().getImportWorkspace();
		databaseAdapter.getWorkspaceManager().gotoWorkspace(connection, workspace);
	}

	init(databaseAdapter, schemaMapping, cityGMLBuilder, xlinkPool, uidCacheManager, affineTransformer, config);
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:27,代码来源:DBImportWorker.java

示例4: JAXBInputFactory

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public JAXBInputFactory(CityGMLBuilder builder, SchemaHandler schemaHandler) {
	this.builder = builder;
	this.schemaHandler = schemaHandler;

	xmlInputFactory = XMLInputFactory.newInstance();
	xmlInputFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE);

	gmlIdManager = DefaultGMLIdManager.getInstance();
	validationEventHandler = null;
	featureReadMode = FeatureReadMode.NO_SPLIT;
	excludes = new ArrayList<QName>();
	splitAtFeatureProperties = new ArrayList<QName>();
	keepInlineAppearance = true;
	parseSchema = true;
	useValidation = false;
	failOnMissingADESchema = true;
	supportCityGML040 = false;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:19,代码来源:JAXBInputFactory.java

示例5: CityGMLExportManager

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public CityGMLExportManager(Connection connection,
		Query query,
		AbstractDatabaseAdapter databaseAdapter,
		SchemaMapping schemaMapping,
		CityGMLBuilder cityGMLBuilder,
		FeatureWriter featureWriter,
		WorkerPool<DBXlink> xlinkPool,
		UIDCacheManager uidCacheManager,
		CacheTableManager cacheTableManager,
		Config config) throws CityGMLExportException, SQLException {
	this.connection = connection;
	this.query = query;
	this.databaseAdapter = databaseAdapter;
	this.schemaMapping = schemaMapping;
	this.cityGMLBuilder = cityGMLBuilder;
	this.featureWriter = featureWriter;
	this.xlinkPool = xlinkPool;
	this.uidCacheManager = uidCacheManager;
	this.cacheTableManager = cacheTableManager;
	this.config = config;

	adeManager = ADEExtensionManager.getInstance();
	hasADESupport = !adeManager.getEnabledExtensions().isEmpty();

	attributeValueSplitter = new AttributeValueSplitter();
	lodGeometryChecker = new LodGeometryChecker(schemaMapping);
	exportCounter = new ExportCounter(schemaMapping);

	if (config.getProject().getExporter().getAppearances().isSetExportAppearance())
		appearanceRemover = new AppearanceRemover(xlinkPool);

	try {
		jaxbUnmarshaller = cityGMLBuilder.createJAXBUnmarshaller();
		jaxbUnmarshaller.setThrowMissingADESchema(false);
		jaxbUnmarshaller.setParseSchema(false);
	} catch (CityGMLBuilderException e) {
		throw new CityGMLExportException("Failed to build JAXB unmarshaller.", e);
	}
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:40,代码来源:CityGMLExportManager.java

示例6: Exporter

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public Exporter(CityGMLBuilder cityGMLBuilder, 
		SchemaMapping schemaMapping, 
		Config config, 
		EventDispatcher eventDispatcher) {
	this.cityGMLBuilder = cityGMLBuilder;
	this.schemaMapping = schemaMapping;
	this.config = config;
	this.eventDispatcher = eventDispatcher;

	databaseAdapter = DatabaseConnectionPool.getInstance().getActiveDatabaseAdapter();
	objectCounter = new HashMap<>();
	geometryCounter = new EnumMap<>(GMLClass.class);
	totalObjectCounter = new HashMap<>();
	totalGeometryCounter = new EnumMap<>(GMLClass.class);
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:16,代码来源:Exporter.java

示例7: DBExportWorker

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public DBExportWorker(SchemaMapping schemaMapping,
		CityGMLBuilder cityGMLBuilder,
		FeatureWriter featureWriter,
		WorkerPool<DBXlink> xlinkPool,
		UIDCacheManager uidCacheManager,
		CacheTableManager cacheTableManager,
		Query query,
		Config config,
		EventDispatcher eventDispatcher) throws CityGMLExportException, SQLException {		
	this.eventDispatcher = eventDispatcher;
	this.config = config;

	AbstractDatabaseAdapter databaseAdapter = DatabaseConnectionPool.getInstance().getActiveDatabaseAdapter();
	connection = DatabaseConnectionPool.getInstance().getConnection();

	// try and change workspace the connections if needed
	if (databaseAdapter.hasVersioningSupport()) {
		databaseAdapter.getWorkspaceManager().gotoWorkspace(
				connection, 
				config.getProject().getDatabase().getWorkspaces().getExportWorkspace());
	}

	exporter = new CityGMLExportManager(
			connection, 
			query,
			databaseAdapter,
			schemaMapping, 
			cityGMLBuilder,
			featureWriter,
			xlinkPool,
			uidCacheManager,
			cacheTableManager,
			config);

	eventDispatcher.addEventHandler(EventType.INTERRUPT, this);
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:37,代码来源:DBExportWorker.java

示例8: Importer

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public Importer(CityGMLBuilder cityGMLBuilder, 
		SchemaMapping schemaMapping,
		Config config, 
		EventDispatcher eventDispatcher) {
	this.cityGMLBuilder = cityGMLBuilder;
	this.schemaMapping = schemaMapping;
	this.config = config;
	this.eventDispatcher = eventDispatcher;

	databaseAdapter = DatabaseConnectionPool.getInstance().getActiveDatabaseAdapter();
	objectCounter = new HashMap<>();
	geometryCounter = new EnumMap<>(GMLClass.class);
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:14,代码来源:Importer.java

示例9: init

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
private void init(AbstractDatabaseAdapter databaseAdapter, 
		SchemaMapping schemaMapping, 
		CityGMLBuilder cityGMLBuilder,
		WorkerPool<DBXlink> xlinkPool,
		UIDCacheManager uidCacheManager,
		AffineTransformer affineTransformer,
		Config config) throws SQLException {
	importer = new CityGMLImportManager(connection, 
			databaseAdapter,
			schemaMapping,
			cityGMLBuilder,
			xlinkPool,
			uidCacheManager,
			affineTransformer,
			config);

	Integer commitAfterProp = config.getProject().getDatabase().getUpdateBatching().getFeatureBatchValue();
	if (commitAfterProp != null && commitAfterProp > 0)
		commitAfter = commitAfterProp;

	bboxOptions = BoundingBoxOptions.defaults()				
			.useExistingEnvelopes(true)
			.assignResultToFeatures(true)
			.useReferencePointAsFallbackForImplicitGeometries(true);

	eventDispatcher.addEventHandler(EventType.INTERRUPT, this);
}
 
开发者ID:3dcitydb,项目名称:importer-exporter,代码行数:28,代码来源:DBImportWorker.java

示例10: JAXBOutputFactory

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public JAXBOutputFactory(CityGMLBuilder builder, ModuleContext moduleContext, SchemaHandler schemaHandler) {
	this.builder = builder;
	this.schemaHandler = schemaHandler;
	this.moduleContext = moduleContext;

	gmlIdManager = DefaultGMLIdManager.getInstance();
	featureWriteMode = FeatureWriteMode.NO_SPLIT;
	excludes = new HashSet<>();
	keepInlineAppearance = true;
	splitCopy = true;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:12,代码来源:JAXBOutputFactory.java

示例11: JAXBMarshaller

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public JAXBMarshaller(CityGMLBuilder builder, ModuleContext moduleContext) {
	this.builder = builder;
	this.moduleContext = moduleContext;

	citygml = new CityGMLMarshaller(this);
	gml = new GMLMarshaller(this);
	xal = new XALMarshaller();
	ade = new ADEMarshaller(this);
	
	try {
		dataTypeFactory = DatatypeFactory.newInstance();
	} catch (DatatypeConfigurationException e) {
		throw new RuntimeException("Failed to create DatatypeFactory.", e);
	}
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:16,代码来源:JAXBMarshaller.java

示例12: JAXBUnmarshaller

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的package包/类
public JAXBUnmarshaller(CityGMLBuilder builder, SchemaHandler schemaHandler) {
	this.builder = builder;
	this.schemaHandler = schemaHandler;

	citygml = new CityGMLUnmarshaller(this);
	gml = new GMLUnmarshaller(this);
	xal = new XALUnmarshaller();
	ade = new ADEUnmarshaller(this);
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:10,代码来源:JAXBUnmarshaller.java

示例13: main

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的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

示例14: main

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的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

示例15: main

import org.citygml4j.builder.jaxb.CityGMLBuilder; //导入依赖的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 LOD3_Building_v200.gml feature by feature");
	CityGMLInputFactory in = builder.createCityGMLInputFactory();
	in.setProperty(CityGMLInputFactory.FEATURE_READ_MODE, FeatureReadMode.SPLIT_PER_FEATURE);
	in.setProperty(CityGMLInputFactory.EXCLUDE_FROM_SPLITTING, new QName[]{new QName("Door"), new QName("Address")});

	// see difference when setting to true
	in.setProperty(CityGMLInputFactory.KEEP_INLINE_APPEARANCE, false);
	
	CityGMLReader reader = in.createCityGMLReader(new File("datasets/LOD3_Building_v200.gml"));
	
	System.out.println(df.format(new Date()) + "printing feature currently read and its (transitive) parents");
	while (reader.hasNext()) {
		CityGML chunk = reader.nextFeature();	
		System.out.println("found: " + chunk.getCityGMLClass());
		
		if (reader.isSetParentInfo()) {
			ParentInfo parentInfo = reader.getParentInfo();
			System.out.println(" --parent: " + parentInfo.getCityGMLClass());
			
			while ((parentInfo = parentInfo.getParentInfo()) != null)
				System.out.println(" --transitive parent: " + parentInfo.getCityGMLClass());
		}
		
	}

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


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