Class CityGMLExportManager
- java.lang.Object
-
- org.citydb.citygml.exporter.database.content.CityGMLExportManager
-
- All Implemented Interfaces:
CityGMLExportHelper
public class CityGMLExportManager extends java.lang.Object implements CityGMLExportHelper
-
-
Constructor Summary
Constructors Constructor Description CityGMLExportManager(java.sql.Connection connection, Query query, AbstractDatabaseAdapter databaseAdapter, SchemaMapping schemaMapping, org.citygml4j.builder.jaxb.CityGMLBuilder cityGMLBuilder, FeatureWriter featureWriter, WorkerPool<DBXlink> xlinkPool, IdCacheManager idCacheManager, CacheTableManager cacheTableManager, InternalConfig internalConfig, Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected org.citygml4j.model.citygml.ade.generic.ADEGenericElement
createADEGenericElement(java.lang.String uri, java.lang.String localName)
org.citygml4j.model.citygml.core.ImplicitGeometry
createImplicitGeometry(long id, GeometryObject referencePoint, java.lang.String transformationMatrix)
protected <T extends org.citygml4j.model.gml.base.AbstractGML>
TcreateObject(int objectClassId, java.lang.Class<T> type)
<T extends org.citygml4j.model.gml.base.AbstractGML>
TcreateObject(long objectId, int objectClassId, java.lang.Class<T> type)
protected void
delegateToADEExporter(java.util.List<java.lang.String> adeHookTables, org.citygml4j.model.gml.feature.AbstractFeature parent, long parentId, FeatureType parentType, ProjectionFilter projectionFilter)
protected void
delegateToADEExporter(org.citygml4j.model.gml.base.AbstractGML object, long objectId, AbstractObjectType<?> objectType, ProjectionFilter projectionFilter)
void
executeBatch()
boolean
exportAsGlobalFeature(org.citygml4j.model.gml.feature.AbstractFeature feature)
org.citygml4j.model.citygml.appearance.Appearance
exportGlobalAppearance(long appearanceId)
<T extends org.citygml4j.model.gml.feature.AbstractFeature>
java.util.Collection<T>exportNestedCityGMLObjects(FeatureProperty featureProperty, long parentId, java.lang.Class<T> featureClass)
org.citygml4j.model.gml.base.AbstractGML
exportObject(long objectId, AbstractObjectType<?> objectType)
java.lang.String
generateFeatureGmlId(org.citygml4j.model.gml.feature.AbstractFeature feature)
java.lang.String
generateFeatureGmlId(org.citygml4j.model.gml.feature.AbstractFeature feature, java.lang.String oldGmlId)
java.lang.String
generateGeometryGmlId(java.lang.String oldGmlId)
java.lang.String
generateGeometryGmlId(org.citygml4j.model.gml.geometry.AbstractGeometry geometry)
AbstractObjectType<?>
getAbstractObjectType(int objectClassId)
protected AbstractObjectType<?>
getAbstractObjectType(java.lang.Class<? extends org.citygml4j.model.gml.base.AbstractGML> objectClass)
AbstractObjectType<?>
getAbstractObjectType(org.citygml4j.model.gml.base.AbstractGML object)
protected java.util.Set<java.lang.String>
getADEHookTables(TableEnum table)
java.util.Map<org.citygml4j.model.gml.GMLClass,java.lang.Long>
getAndResetGeometryCounter()
java.util.Map<java.lang.Integer,java.lang.Long>
getAndResetObjectCounter()
AttributeValueSplitter
getAttributeValueSplitter()
org.citygml4j.builder.jaxb.CityGMLBuilder
getCityGMLBuilder()
CombinedProjectionFilter
getCombinedProjectionFilter(java.lang.String tableName)
AbstractDatabaseAdapter
getDatabaseAdapter()
ExportConfig
getExportConfig()
protected <T extends DBExporter>
TgetExporter(java.lang.Class<T> type)
protected int
getFeatureBatchSize()
FeatureType
getFeatureType(int objectClassId)
protected FeatureType
getFeatureType(java.lang.Class<? extends org.citygml4j.model.gml.feature.AbstractFeature> featureClass)
FeatureType
getFeatureType(org.citygml4j.model.gml.feature.AbstractFeature feature)
protected int
getGeometryBatchSize()
java.lang.String
getGeometryColumn(java.lang.String columnName)
java.lang.String
getGeometryColumn(java.lang.String columnName, java.lang.String asName)
org.citydb.sqlbuilder.select.ProjectionToken
getGeometryColumn(org.citydb.sqlbuilder.schema.Column column)
org.citydb.sqlbuilder.select.ProjectionToken
getGeometryColumn(org.citydb.sqlbuilder.schema.Column column, java.lang.String asName)
java.lang.String
getGeometrySignature(org.citygml4j.model.gml.geometry.AbstractGeometry geometry, long id)
java.lang.String
getGeometrySignature(org.citygml4j.model.gml.GMLClass geometryClass, long id)
GMLConverter
getGMLConverter()
InternalConfig
getInternalConfig()
LodFilter
getLodFilter()
java.lang.String
getObjectSignature(int objectClassId, long id)
java.lang.String
getObjectSignature(AbstractObjectType<?> objectType, long id)
ObjectType
getObjectType(int objectClassId)
ObjectType
getObjectType(org.citygml4j.model.gml.base.AbstractGML object)
ProjectionFilter
getProjectionFilter(AbstractObjectType<?> objectType)
protected java.lang.String
getPropertyName(AbstractProperty property)
protected SchemaMapping
getSchemaMapping()
SurfaceGeometryExporter
getSurfaceGeometryExporter()
java.lang.String
getTableNameWithSchema(java.lang.String tableName)
org.citygml4j.model.module.citygml.CityGMLVersion
getTargetCityGMLVersion()
protected boolean
hasADESupport()
boolean
isFailOnError()
boolean
isLazyTextureExport()
void
logOrThrowErrorMessage(java.lang.String message)
boolean
lookupAndPutGeometryId(java.lang.String gmlId, long id, boolean useLocalScope)
boolean
lookupAndPutObjectId(java.lang.String gmlId, long id, int objectClassId)
boolean
lookupGeometryId(java.lang.String gmlId)
boolean
lookupObjectId(java.lang.String gmlId)
void
propagateXlink(DBXlink xlink)
void
putObjectId(java.lang.String gmlId, long id, int objectClassId)
void
setFailOnError(boolean failOnError)
boolean
supportsExportOfGlobalFeatures()
protected java.lang.Object
unmarshal(java.io.Reader reader)
void
updateExportCounter(org.citygml4j.model.gml.feature.AbstractFeature feature)
-
-
-
Constructor Detail
-
CityGMLExportManager
public CityGMLExportManager(java.sql.Connection connection, Query query, AbstractDatabaseAdapter databaseAdapter, SchemaMapping schemaMapping, org.citygml4j.builder.jaxb.CityGMLBuilder cityGMLBuilder, FeatureWriter featureWriter, WorkerPool<DBXlink> xlinkPool, IdCacheManager idCacheManager, CacheTableManager cacheTableManager, InternalConfig internalConfig, Config config) throws CityGMLExportException
- Throws:
CityGMLExportException
-
-
Method Detail
-
exportObject
public org.citygml4j.model.gml.base.AbstractGML exportObject(long objectId, AbstractObjectType<?> objectType) throws CityGMLExportException, java.sql.SQLException
- Throws:
CityGMLExportException
java.sql.SQLException
-
createObject
public <T extends org.citygml4j.model.gml.base.AbstractGML> T createObject(long objectId, int objectClassId, java.lang.Class<T> type) throws CityGMLExportException, java.sql.SQLException
- Specified by:
createObject
in interfaceCityGMLExportHelper
- Throws:
CityGMLExportException
java.sql.SQLException
-
createObject
protected <T extends org.citygml4j.model.gml.base.AbstractGML> T createObject(int objectClassId, java.lang.Class<T> type)
-
exportNestedCityGMLObjects
public <T extends org.citygml4j.model.gml.feature.AbstractFeature> java.util.Collection<T> exportNestedCityGMLObjects(FeatureProperty featureProperty, long parentId, java.lang.Class<T> featureClass) throws CityGMLExportException, java.sql.SQLException
- Specified by:
exportNestedCityGMLObjects
in interfaceCityGMLExportHelper
- Throws:
CityGMLExportException
java.sql.SQLException
-
delegateToADEExporter
protected void delegateToADEExporter(org.citygml4j.model.gml.base.AbstractGML object, long objectId, AbstractObjectType<?> objectType, ProjectionFilter projectionFilter) throws CityGMLExportException, java.sql.SQLException
- Throws:
CityGMLExportException
java.sql.SQLException
-
delegateToADEExporter
protected void delegateToADEExporter(java.util.List<java.lang.String> adeHookTables, org.citygml4j.model.gml.feature.AbstractFeature parent, long parentId, FeatureType parentType, ProjectionFilter projectionFilter) throws CityGMLExportException, java.sql.SQLException
- Throws:
CityGMLExportException
java.sql.SQLException
-
getFeatureBatchSize
protected int getFeatureBatchSize()
-
getGeometryBatchSize
protected int getGeometryBatchSize()
-
executeBatch
public void executeBatch() throws CityGMLExportException, java.sql.SQLException
- Specified by:
executeBatch
in interfaceCityGMLExportHelper
- Throws:
CityGMLExportException
java.sql.SQLException
-
getSurfaceGeometryExporter
public SurfaceGeometryExporter getSurfaceGeometryExporter() throws CityGMLExportException, java.sql.SQLException
- Specified by:
getSurfaceGeometryExporter
in interfaceCityGMLExportHelper
- Throws:
CityGMLExportException
java.sql.SQLException
-
createImplicitGeometry
public org.citygml4j.model.citygml.core.ImplicitGeometry createImplicitGeometry(long id, GeometryObject referencePoint, java.lang.String transformationMatrix) throws CityGMLExportException, java.sql.SQLException
- Specified by:
createImplicitGeometry
in interfaceCityGMLExportHelper
- Throws:
CityGMLExportException
java.sql.SQLException
-
exportGlobalAppearance
public org.citygml4j.model.citygml.appearance.Appearance exportGlobalAppearance(long appearanceId) throws CityGMLExportException, java.sql.SQLException
- Throws:
CityGMLExportException
java.sql.SQLException
-
exportAsGlobalFeature
public boolean exportAsGlobalFeature(org.citygml4j.model.gml.feature.AbstractFeature feature) throws CityGMLExportException, java.sql.SQLException
- Specified by:
exportAsGlobalFeature
in interfaceCityGMLExportHelper
- Throws:
CityGMLExportException
java.sql.SQLException
-
supportsExportOfGlobalFeatures
public boolean supportsExportOfGlobalFeatures()
- Specified by:
supportsExportOfGlobalFeatures
in interfaceCityGMLExportHelper
-
getGMLConverter
public GMLConverter getGMLConverter()
- Specified by:
getGMLConverter
in interfaceCityGMLExportHelper
-
getDatabaseAdapter
public AbstractDatabaseAdapter getDatabaseAdapter()
- Specified by:
getDatabaseAdapter
in interfaceCityGMLExportHelper
-
getTargetCityGMLVersion
public org.citygml4j.model.module.citygml.CityGMLVersion getTargetCityGMLVersion()
- Specified by:
getTargetCityGMLVersion
in interfaceCityGMLExportHelper
-
getProjectionFilter
public ProjectionFilter getProjectionFilter(AbstractObjectType<?> objectType)
- Specified by:
getProjectionFilter
in interfaceCityGMLExportHelper
-
getCombinedProjectionFilter
public CombinedProjectionFilter getCombinedProjectionFilter(java.lang.String tableName)
- Specified by:
getCombinedProjectionFilter
in interfaceCityGMLExportHelper
-
getLodFilter
public LodFilter getLodFilter()
- Specified by:
getLodFilter
in interfaceCityGMLExportHelper
-
getAttributeValueSplitter
public AttributeValueSplitter getAttributeValueSplitter()
- Specified by:
getAttributeValueSplitter
in interfaceCityGMLExportHelper
-
isFailOnError
public boolean isFailOnError()
- Specified by:
isFailOnError
in interfaceCityGMLExportHelper
-
getExportConfig
public ExportConfig getExportConfig()
- Specified by:
getExportConfig
in interfaceCityGMLExportHelper
-
getInternalConfig
public InternalConfig getInternalConfig()
-
getTableNameWithSchema
public java.lang.String getTableNameWithSchema(java.lang.String tableName)
- Specified by:
getTableNameWithSchema
in interfaceCityGMLExportHelper
-
getGeometryColumn
public org.citydb.sqlbuilder.select.ProjectionToken getGeometryColumn(org.citydb.sqlbuilder.schema.Column column)
- Specified by:
getGeometryColumn
in interfaceCityGMLExportHelper
-
getGeometryColumn
public org.citydb.sqlbuilder.select.ProjectionToken getGeometryColumn(org.citydb.sqlbuilder.schema.Column column, java.lang.String asName)
- Specified by:
getGeometryColumn
in interfaceCityGMLExportHelper
-
getGeometryColumn
public java.lang.String getGeometryColumn(java.lang.String columnName)
- Specified by:
getGeometryColumn
in interfaceCityGMLExportHelper
-
getGeometryColumn
public java.lang.String getGeometryColumn(java.lang.String columnName, java.lang.String asName)
- Specified by:
getGeometryColumn
in interfaceCityGMLExportHelper
-
logOrThrowErrorMessage
public void logOrThrowErrorMessage(java.lang.String message) throws CityGMLExportException
- Specified by:
logOrThrowErrorMessage
in interfaceCityGMLExportHelper
- Throws:
CityGMLExportException
-
getObjectSignature
public java.lang.String getObjectSignature(int objectClassId, long id)
- Specified by:
getObjectSignature
in interfaceCityGMLExportHelper
-
getObjectSignature
public java.lang.String getObjectSignature(AbstractObjectType<?> objectType, long id)
- Specified by:
getObjectSignature
in interfaceCityGMLExportHelper
-
getFeatureType
public FeatureType getFeatureType(org.citygml4j.model.gml.feature.AbstractFeature feature)
- Specified by:
getFeatureType
in interfaceCityGMLExportHelper
-
getObjectType
public ObjectType getObjectType(org.citygml4j.model.gml.base.AbstractGML object)
- Specified by:
getObjectType
in interfaceCityGMLExportHelper
-
getAbstractObjectType
public AbstractObjectType<?> getAbstractObjectType(org.citygml4j.model.gml.base.AbstractGML object)
- Specified by:
getAbstractObjectType
in interfaceCityGMLExportHelper
-
getFeatureType
public FeatureType getFeatureType(int objectClassId)
- Specified by:
getFeatureType
in interfaceCityGMLExportHelper
-
getObjectType
public ObjectType getObjectType(int objectClassId)
- Specified by:
getObjectType
in interfaceCityGMLExportHelper
-
getAbstractObjectType
public AbstractObjectType<?> getAbstractObjectType(int objectClassId)
- Specified by:
getAbstractObjectType
in interfaceCityGMLExportHelper
-
generateFeatureGmlId
public java.lang.String generateFeatureGmlId(org.citygml4j.model.gml.feature.AbstractFeature feature)
-
generateFeatureGmlId
public java.lang.String generateFeatureGmlId(org.citygml4j.model.gml.feature.AbstractFeature feature, java.lang.String oldGmlId)
-
generateGeometryGmlId
public java.lang.String generateGeometryGmlId(org.citygml4j.model.gml.geometry.AbstractGeometry geometry)
-
generateGeometryGmlId
public java.lang.String generateGeometryGmlId(java.lang.String oldGmlId)
-
propagateXlink
public void propagateXlink(DBXlink xlink)
-
lookupAndPutObjectId
public boolean lookupAndPutObjectId(java.lang.String gmlId, long id, int objectClassId)
- Specified by:
lookupAndPutObjectId
in interfaceCityGMLExportHelper
-
lookupObjectId
public boolean lookupObjectId(java.lang.String gmlId)
- Specified by:
lookupObjectId
in interfaceCityGMLExportHelper
-
putObjectId
public void putObjectId(java.lang.String gmlId, long id, int objectClassId)
-
lookupAndPutGeometryId
public boolean lookupAndPutGeometryId(java.lang.String gmlId, long id, boolean useLocalScope)
-
lookupGeometryId
public boolean lookupGeometryId(java.lang.String gmlId)
-
getGeometrySignature
public java.lang.String getGeometrySignature(org.citygml4j.model.gml.geometry.AbstractGeometry geometry, long id)
-
getGeometrySignature
public java.lang.String getGeometrySignature(org.citygml4j.model.gml.GMLClass geometryClass, long id)
-
getPropertyName
protected java.lang.String getPropertyName(AbstractProperty property)
-
setFailOnError
public void setFailOnError(boolean failOnError)
-
hasADESupport
protected boolean hasADESupport()
-
getFeatureType
protected FeatureType getFeatureType(java.lang.Class<? extends org.citygml4j.model.gml.feature.AbstractFeature> featureClass)
-
getAbstractObjectType
protected AbstractObjectType<?> getAbstractObjectType(java.lang.Class<? extends org.citygml4j.model.gml.base.AbstractGML> objectClass)
-
isLazyTextureExport
public boolean isLazyTextureExport()
-
updateExportCounter
public void updateExportCounter(org.citygml4j.model.gml.feature.AbstractFeature feature)
-
getAndResetObjectCounter
public java.util.Map<java.lang.Integer,java.lang.Long> getAndResetObjectCounter()
-
getAndResetGeometryCounter
public java.util.Map<org.citygml4j.model.gml.GMLClass,java.lang.Long> getAndResetGeometryCounter()
-
getCityGMLBuilder
public org.citygml4j.builder.jaxb.CityGMLBuilder getCityGMLBuilder()
-
getSchemaMapping
protected SchemaMapping getSchemaMapping()
-
createADEGenericElement
protected org.citygml4j.model.citygml.ade.generic.ADEGenericElement createADEGenericElement(java.lang.String uri, java.lang.String localName) throws javax.xml.parsers.ParserConfigurationException
- Throws:
javax.xml.parsers.ParserConfigurationException
-
unmarshal
protected java.lang.Object unmarshal(java.io.Reader reader)
-
close
public void close() throws CityGMLExportException, java.sql.SQLException
- Throws:
CityGMLExportException
java.sql.SQLException
-
getADEHookTables
protected java.util.Set<java.lang.String> getADEHookTables(TableEnum table)
-
getExporter
protected <T extends DBExporter> T getExporter(java.lang.Class<T> type) throws CityGMLExportException, java.sql.SQLException
- Throws:
CityGMLExportException
java.sql.SQLException
-
-