Java Code Examples for org.citygml4j.model.module.citygml.CityGMLVersion#DEFAULT
The following examples show how to use
org.citygml4j.model.module.citygml.CityGMLVersion#DEFAULT .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FeatureTypeFilterBuilder.java From importer-exporter with Apache License 2.0 | 6 votes |
protected void buildFeatureTypeFilter(FeatureTypeFilter typeFilter, CityGMLVersion targetVersion, SQLQueryContext queryContext) throws QueryBuildException { if (targetVersion == null) targetVersion = CityGMLVersion.DEFAULT; List<FeatureType> featureTypes = typeFilter.getFeatureTypes(targetVersion); if (featureTypes.isEmpty()) return; Set<Integer> ids = new HashSet<>(featureTypes.size()); for (FeatureType featureType : featureTypes) ids.add(featureType.getObjectClassId()); Select select = queryContext.getSelect(); Table cityObject = builder.joinCityObjectTable(queryContext); Column objectClassId = cityObject.getColumn(MappingConstants.OBJECTCLASS_ID); if (ids.size() == 1) select.addSelection(ComparisonFactory.equalTo(objectClassId, new IntegerLiteral(ids.iterator().next()))); else select.addSelection(ComparisonFactory.in(objectClassId, new LiteralList(ids.toArray(new Integer[0])))); }
Example 2
Source File: FeatureTypes.java From web-feature-service with Apache License 2.0 | 5 votes |
public CityGMLVersion getDefaultVersion() { for (CityGMLVersionType version : versions) if (version.isDefault()) return version.getValue().getCityGMLVersion(); return versions.size() == 1 ? versions.iterator().next().getValue().getCityGMLVersion() : CityGMLVersion.DEFAULT; }
Example 3
Source File: ConfigNamespaceFilter.java From importer-exporter with Apache License 2.0 | 5 votes |
public ConfigNamespaceFilter(XMLReader reader) { super(reader); prefixToUri = new HashMap<>(); uriToPrefix = new HashMap<>(); // bind default CityGML and ADE namespaces ModuleContext modules = new ModuleContext(CityGMLVersion.DEFAULT); for (Module module : modules.getModules()) bindNamespace(module.getNamespacePrefix(), module.getNamespaceURI()); // bind 3DCityDB ADE namespace bindNamespace("citydb", "http://www.3dcitydb.org/citygml-ade/3.0/citygml/2.0"); }
Example 4
Source File: VersionPanel.java From importer-exporter with Apache License 2.0 | 5 votes |
private void initGui() { ButtonGroup group = new ButtonGroup(); cityGMLVersionBox = new JRadioButton[CityGMLVersionType.values().length]; for (int i = 0; i < CityGMLVersionType.values().length; i++) { cityGMLVersionBox[i] = new JRadioButton(); cityGMLVersionBox[i].setText(CityGMLVersionType.values()[i].toString()); cityGMLVersionBox[i].setIconTextGap(10); group.add(cityGMLVersionBox[i]); if (Util.toCityGMLVersion(CityGMLVersionType.values()[i]) == CityGMLVersion.DEFAULT) cityGMLVersionBox[i].setSelected(true); // fire property change event cityGMLVersionBox[i].addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { for (int i = 0; i < CityGMLVersionType.values().length; i++) { if (cityGMLVersionBox[i] == e.getSource()) { ObjectRegistry.getInstance().getEventDispatcher().triggerEvent( new PropertyChangeEvent("citygml.version", null, Util.toCityGMLVersion(CityGMLVersionType.values()[i]), VersionPanel.this)); break; } } } }); } setLayout(new GridBagLayout()); block1 = new JPanel(); add(block1, GuiUtil.setConstraints(0,0,1.0,0.0,GridBagConstraints.BOTH,5,0,5,0)); block1.setBorder(BorderFactory.createTitledBorder("")); block1.setLayout(new GridBagLayout()); { for (int i = 0; i < cityGMLVersionBox.length; i++) block1.add(cityGMLVersionBox[i], GuiUtil.setConstraints(0,i,1.0,1.0,GridBagConstraints.BOTH,0,5,0,5)); } }
Example 5
Source File: CityGMLImportManager.java From importer-exporter with Apache License 2.0 | 4 votes |
public CityGMLImportManager(InputFile inputFile, Connection connection, AbstractDatabaseAdapter databaseAdapter, SchemaMapping schemaMapping, CityGMLBuilder cityGMLBuilder, WorkerPool<DBXlink> xlinkPool, UIDCacheManager uidCacheManager, AffineTransformer affineTransformer, Config config) throws SQLException { this.inputFile = inputFile; this.connection = connection; this.databaseAdapter = databaseAdapter; this.schemaMapping = schemaMapping; this.cityGMLBuilder = cityGMLBuilder; this.xlinkPool = xlinkPool; this.uidCacheManager = uidCacheManager; this.config = config; adeManager = ADEExtensionManager.getInstance(); hasADESupport = !adeManager.getEnabledExtensions().isEmpty(); tableHelper = new TableHelper(schemaMapping); sequenceHelper = new SequenceHelper(connection, databaseAdapter, config); geometryConverter = new GeometryConverter(databaseAdapter, affineTransformer, config); objectCounter = new HashMap<>(); geometryCounter = new HashMap<>(); attributeValueJoiner = new AttributeValueJoiner(); externalFileChecker = new ExternalFileChecker(inputFile); if (config.getProject().getImporter().getAppearances().isSetImportAppearance()) localAppearanceHandler = new LocalAppearanceHandler(this); if (config.getProject().getImporter().getImportLog().isSetLogImportedFeatures()) importLogEntries = new ArrayList<>(); if (config.getProject().getImporter().getAffineTransformation().isEnabled()) this.affineTransformer = affineTransformer; if (config.getProject().getImporter().getAddress().isSetImportXAL()) { cityGMLVersion = CityGMLVersion.DEFAULT; jaxbMarshaller = cityGMLBuilder.createJAXBMarshaller(cityGMLVersion); saxWriter = new SAXWriter(); } if (hasADESupport) propertyCollector = new ADEPropertyCollector(); }
Example 6
Source File: ModuleContext.java From citygml4j with Apache License 2.0 | 4 votes |
public ModuleContext() { this(CityGMLVersion.DEFAULT); }