Commit 38715130 authored by Matthias Betz's avatar Matthias Betz
Browse files

Merge branch 'citygml3'

parents 6cf1abce bd8f73de
Pipeline #7210 passed with stage
in 7 seconds
......@@ -148,10 +148,10 @@ fabric.properties
### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
*.iml
modules.xml
.idea/misc.xml
*.ipr
# Sonarlint plugin
.idea/sonarlint
......@@ -271,4 +271,6 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk
**/.idea/
# End of https://www.gitignore.io/api/java,maven,macos,linux,eclipse,windows,netbeans,intellij
/.apt_generated_tests/
*.iml
......@@ -4,21 +4,25 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.hft.stuttgart</groupId>
<artifactId>citygml4j-quality-ade</artifactId>
<version>0.1.3</version>
<version>3.1.4</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.citygml4j/citygml4j -->
<dependency>
<groupId>org.citygml4j</groupId>
<artifactId>citygml4j</artifactId>
<version>2.10.2</version>
</dependency>
<dependency>
<groupId>org.citygml4j</groupId>
<artifactId>citygml4j-core</artifactId>
<version>3.0.0-rc.4</version>
</dependency>
<dependency>
<groupId>org.citygml4j</groupId>
<artifactId>citygml4j-xml</artifactId>
<version>3.0.0-rc.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>org.junit.jupiter</groupId>
......
......@@ -18,36 +18,23 @@ package de.hft.stuttgart.quality;
import java.util.Collections;
import java.util.List;
import org.citygml4j.model.citygml.ade.binding.ADEContext;
import org.citygml4j.model.citygml.ade.binding.ADEMarshaller;
import org.citygml4j.model.citygml.ade.binding.ADEUnmarshaller;
import org.citygml4j.model.module.ade.ADEModule;
import org.citygml4j.core.visitor.ADEWalker;
import org.citygml4j.xml.ade.CityGMLADE;
import org.citygml4j.xml.module.ade.ADEModule;
import de.hft.stuttgart.quality.marshaller.QualityAdeMarshaller;
import de.hft.stuttgart.quality.marshaller.QualityAdeUnmarshaller;
public class QualityADEContext implements ADEContext {
public class QualityADEContext implements CityGMLADE {
private final List<ADEModule> modules = Collections.singletonList(QualityADEModule.V0_1_3);
private final List<ADEModule> modules = Collections.singletonList(QualityADEModule.V0_1_4);
@Override
public List<ADEModule> getADEModules() {
return modules;
}
@Override
public List<String> getModelPackageNames() {
return Collections.singletonList("de.hft.stuttgart.quality.model");
}
@Override
public ADEMarshaller createADEMarshaller() {
return new QualityAdeMarshaller();
}
@Override
public ADEUnmarshaller createADEUnmarshaller() {
return new QualityAdeUnmarshaller();
public ADEWalker getADEWalker() {
return new QualityADEWalker();
}
}
......@@ -16,66 +16,22 @@
package de.hft.stuttgart.quality;
import java.net.URL;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
import org.citygml4j.model.gml.feature.AbstractFeature;
import org.citygml4j.model.module.ade.ADEModule;
import org.citygml4j.model.module.citygml.CityGMLVersion;
import org.citygml4j.core.model.CityGMLVersion;
import org.citygml4j.xml.module.ade.ADEModule;
public class QualityADEModule extends ADEModule {
public static final String NAMESPACE_URI = "https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/0.1.3";
public static final QualityADEModule V0_1_3 = new QualityADEModule();
private static final long serialVersionUID = -8208579547274734280L;
public QualityADEModule() {
super(NAMESPACE_URI, "qual", CityGMLVersion.v2_0_0);
}
@Override
public URL getSchemaResource() {
return QualityADEContext.class.getResource("/qualityAde.xsd");
}
@Override
public List<String> getJAXBPackageNames() {
return Collections.singletonList("de.hft.stuttgart.quality.model.jaxb");
}
public static final String NAMESPACE_URI = "https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/0.1.4";
@Override
public boolean hasFeatureProperty(String name) {
return false;
}
public static final QualityADEModule V0_1_4 = new QualityADEModule();
@Override
public boolean hasFeature(String name) {
return false;
}
@Override
public Class<? extends AbstractFeature> getFeatureClass(String name) {
throw new IllegalStateException("No feature classes available");
}
@Override
public QName getFeatureName(Class<? extends AbstractFeature> featureClass) {
return null;
}
@Override
public Map<String, Class<? extends AbstractFeature>> getFeatures() {
return Collections.emptyMap();
}
@Override
public boolean isTopLevelFeature(String name) {
return false;
}
public QualityADEModule() {
super(NAMESPACE_URI, "qual", CityGMLVersion.v2_0);
}
@Override
public URL getSchemaResource() {
return QualityADEContext.class.getResource("/qualityAde.xsd");
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -13,9 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality;
public abstract class ValidationError extends ChildObject {
import org.citygml4j.core.visitor.ADEWalker;
public class QualityADEWalker extends ADEWalker {
private static final long serialVersionUID = -2995694676938108325L;
}
/*-
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.adapter.properties;
import de.hft.stuttgart.quality.model.properties.AbstractErrorProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
import javax.xml.namespace.QName;
public class AbstractErrorPropertyAdapter extends AbstractInlinePropertyAdapter<AbstractErrorProperty> {
@Override
public AbstractErrorProperty createObject(QName name, Object parent) throws ObjectBuildException {
return new AbstractErrorProperty();
}
}
/*-
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.adapter.properties;
import de.hft.stuttgart.quality.model.properties.AbstractGeometryErrorProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
import javax.xml.namespace.QName;
public class AbstractGeometryErrorPropertyAdapter extends AbstractInlinePropertyAdapter<AbstractGeometryErrorProperty> {
@Override
public AbstractGeometryErrorProperty createObject(QName name, Object parent) throws ObjectBuildException {
return new AbstractGeometryErrorProperty();
}
}
/*-
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.adapter.properties;
import de.hft.stuttgart.quality.model.properties.AbstractPolygonErrorProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
import javax.xml.namespace.QName;
public class AbstractPolygonErrorPropertyAdapter extends AbstractInlinePropertyAdapter<AbstractPolygonErrorProperty> {
@Override
public AbstractPolygonErrorProperty createObject(QName name, Object parent) throws ObjectBuildException {
return new AbstractPolygonErrorProperty();
}
}
/*-
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.adapter.properties;
import de.hft.stuttgart.quality.model.properties.AbstractRingErrorProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
import javax.xml.namespace.QName;
public class AbstractRingErrorPropertyAdapter extends AbstractInlinePropertyAdapter<AbstractRingErrorProperty> {
@Override
public AbstractRingErrorProperty createObject(QName name, Object parent) throws ObjectBuildException {
return new AbstractRingErrorProperty();
}
}
/*-
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.adapter.properties;
import de.hft.stuttgart.quality.model.properties.AbstractSemanticErrorProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
import javax.xml.namespace.QName;
public class AbstractSemanticErrorPropertyAdapter extends AbstractInlinePropertyAdapter<AbstractSemanticErrorProperty> {
@Override
public AbstractSemanticErrorProperty createObject(QName name, Object parent) throws ObjectBuildException {
return new AbstractSemanticErrorProperty();
}
}
/*-
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.adapter.properties;
import de.hft.stuttgart.quality.model.properties.AbstractSolidErrorProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
import javax.xml.namespace.QName;
public class AbstractSolidErrorPropertyAdapter extends AbstractInlinePropertyAdapter<AbstractSolidErrorProperty> {
@Override
public AbstractSolidErrorProperty createObject(QName name, Object parent) throws ObjectBuildException {
return new AbstractSolidErrorProperty();
}
}
/*-
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.adapter.properties;
import de.hft.stuttgart.quality.model.properties.CheckingProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
import javax.xml.namespace.QName;
public class CheckingPropertyAdapter extends AbstractInlinePropertyAdapter<CheckingProperty> {
@Override
public CheckingProperty createObject(QName name, Object parent) throws ObjectBuildException {
return new CheckingProperty();
}
}
/*-
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.adapter.properties;
import de.hft.stuttgart.quality.model.properties.EdgeListProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
import javax.xml.namespace.QName;
public class EdgeListPropertyAdapter extends AbstractInlinePropertyAdapter<EdgeListProperty> {
@Override
public EdgeListProperty createObject(QName name, Object parent) throws ObjectBuildException {
return new EdgeListProperty();
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -13,21 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.adapter.properties;
import org.citygml4j.builder.copy.CopyBuilder;
import de.hft.stuttgart.quality.model.properties.EdgeProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
public class InteriorDisconnected extends PolygonError {
import javax.xml.namespace.QName;
private static final long serialVersionUID = 8443642232356795359L;
@Override
public String toString() {
return "InteriorDisconnected [polygonId=" + getPolygonId() + "]";
}
public class EdgePropertyAdapter extends AbstractInlinePropertyAdapter<EdgeProperty> {
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new InteriorDisconnected(), copyBuilder);
public EdgeProperty createObject(QName name, Object parent) throws ObjectBuildException {
return new EdgeProperty();
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -13,22 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.adapter.properties;
import org.citygml4j.builder.copy.CopyBuilder;
import de.hft.stuttgart.quality.model.properties.ErrorProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
public class AllPolygonsWrongOrientation extends SolidError {
import javax.xml.namespace.QName;
private static final long serialVersionUID = 3817224755569965908L;
public class ErrorPropertyAdapter extends AbstractInlinePropertyAdapter<ErrorProperty> {
@Override
public String toString() {
return "AllPolygonsWrongOrientation [geometryId=" + getGeometryId() + "]";
public ErrorProperty createObject(QName name, Object parent) throws ObjectBuildException {
return new ErrorProperty();
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new AllPolygonsWrongOrientation(), copyBuilder);
}
}
/*-
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.adapter.properties;
import de.hft.stuttgart.quality.model.properties.FeatureStatisticsProperty;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.base.AbstractInlinePropertyAdapter;
import javax.xml.namespace.QName;
public class FeatureStatisticsPropertyAdapter extends AbstractInlinePropertyAdapter<FeatureStatisticsProperty> {
@Override