Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
QualityADE
Commits
017aeb12
Commit
017aeb12
authored
Jun 11, 2021
by
Matthias Betz
Browse files
fixing inheritance abundance where not needed, release 1.3
parent
11b91324
Pipeline
#4363
passed with stage
in 14 seconds
Changes
80
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
citygml4j-quality-ade/pom.xml
View file @
017aeb12
...
...
@@ -4,7 +4,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
de.hft.stuttgart
</groupId>
<artifactId>
citygml4j-quality-ade
</artifactId>
<version>
0.1.
2
</version>
<version>
0.1.
3
</version>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
...
...
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/QualityADEContext.java
View file @
017aeb12
...
...
@@ -28,7 +28,7 @@ import de.hft.stuttgart.quality.marshaller.QualityAdeUnmarshaller;
public
class
QualityADEContext
implements
ADEContext
{
private
final
List
<
ADEModule
>
modules
=
Collections
.
singletonList
(
QualityADEModule
.
V0_1_
2
);
private
final
List
<
ADEModule
>
modules
=
Collections
.
singletonList
(
QualityADEModule
.
V0_1_
3
);
@Override
public
List
<
ADEModule
>
getADEModules
()
{
...
...
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/QualityADEModule.java
View file @
017aeb12
...
...
@@ -17,8 +17,6 @@ package de.hft.stuttgart.quality;
import
java.net.URL
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -28,25 +26,16 @@ import org.citygml4j.model.gml.feature.AbstractFeature;
import
org.citygml4j.model.module.ade.ADEModule
;
import
org.citygml4j.model.module.citygml.CityGMLVersion
;
import
de.hft.stuttgart.quality.model.Validation
;
public
class
QualityADEModule
extends
ADEModule
{
public
static
final
String
NAMESPACE_URI
=
"https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/0.1.
2
"
;
public
static
final
String
NAMESPACE_URI
=
"https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/0.1.
3
"
;
public
static
final
QualityADEModule
V0_1_
2
=
new
QualityADEModule
();
public
static
final
QualityADEModule
V0_1_
3
=
new
QualityADEModule
();
private
HashMap
<
String
,
Class
<?
extends
AbstractFeature
>>
features
;
private
HashSet
<
String
>
featureProperties
;
private
static
final
long
serialVersionUID
=
-
8208579547274734280L
;
public
QualityADEModule
()
{
super
(
NAMESPACE_URI
,
"qual"
,
CityGMLVersion
.
v2_0_0
);
features
=
new
HashMap
<>();
features
.
put
(
"validation"
,
Validation
.
class
);
featureProperties
=
new
HashSet
<>();
}
@Override
...
...
@@ -61,32 +50,27 @@ public class QualityADEModule extends ADEModule {
@Override
public
boolean
hasFeatureProperty
(
String
name
)
{
return
featureProperties
.
contains
(
name
)
;
return
false
;
}
@Override
public
boolean
hasFeature
(
String
name
)
{
return
f
eatures
.
containsKey
(
name
)
;
return
f
alse
;
}
@Override
public
Class
<?
extends
AbstractFeature
>
getFeatureClass
(
String
name
)
{
return
features
.
get
(
name
);
throw
new
IllegalStateException
(
"No feature classes available"
);
}
@Override
public
QName
getFeatureName
(
Class
<?
extends
AbstractFeature
>
featureClass
)
{
for
(
Map
.
Entry
<
String
,
Class
<?
extends
AbstractFeature
>>
entry
:
features
.
entrySet
())
{
if
(
entry
.
getValue
()
==
featureClass
)
return
new
QName
(
getNamespaceURI
(),
entry
.
getKey
());
}
return
null
;
}
@Override
public
Map
<
String
,
Class
<?
extends
AbstractFeature
>>
getFeatures
()
{
return
Collections
.
unmodifiableMap
(
features
);
return
Collections
.
emptyMap
(
);
}
@Override
...
...
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AllPolygonsWrongOrientation.java
View file @
017aeb12
...
...
@@ -16,30 +16,14 @@
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.model.common.visitor.FeatureFunctor
;
import
org.citygml4j.model.common.visitor.FeatureVisitor
;
import
org.citygml4j.model.common.visitor.GMLFunctor
;
import
org.citygml4j.model.common.visitor.GMLVisitor
;
import
org.citygml4j.model.gml.feature.AbstractFeature
;
public
class
AllPolygonsWrongOrientation
extends
AbstractFeature
implements
ValidationError
,
ADEModelObject
{
public
class
AllPolygonsWrongOrientation
extends
SolidError
{
private
static
final
long
serialVersionUID
=
3817224755569965908L
;
private
String
geometryId
;
public
void
setGeometryId
(
String
geometryId
)
{
this
.
geometryId
=
geometryId
;
}
public
String
getGeometryId
()
{
return
geometryId
;
}
@Override
public
String
toString
()
{
return
"AllPolygonsWrongOrientation [geometryId="
+
geometryId
+
"]"
;
return
"AllPolygonsWrongOrientation [geometryId="
+
ge
tGe
ometryId
()
+
"]"
;
}
@Override
...
...
@@ -47,24 +31,4 @@ public class AllPolygonsWrongOrientation extends AbstractFeature implements Vali
return
copyTo
(
new
AllPolygonsWrongOrientation
(),
copyBuilder
);
}
@Override
public
void
accept
(
FeatureVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
FeatureFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
@Override
public
void
accept
(
GMLVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
GMLFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AttributeMissing.java
View file @
017aeb12
...
...
@@ -16,14 +16,8 @@
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.model.common.visitor.FeatureFunctor
;
import
org.citygml4j.model.common.visitor.FeatureVisitor
;
import
org.citygml4j.model.common.visitor.GMLFunctor
;
import
org.citygml4j.model.common.visitor.GMLVisitor
;
import
org.citygml4j.model.gml.feature.AbstractFeature
;
public
class
AttributeMissing
extends
AbstractFeature
implements
ValidationError
,
ADEModelObject
{
public
class
AttributeMissing
extends
SemanticError
{
private
static
final
long
serialVersionUID
=
-
5416574100733885169L
;
...
...
@@ -59,24 +53,4 @@ public class AttributeMissing extends AbstractFeature implements ValidationError
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
AttributeWrongValue
(),
copyBuilder
);
}
@Override
public
void
accept
(
FeatureVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
FeatureFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
@Override
public
void
accept
(
GMLVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
GMLFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AttributeWrongValue.java
View file @
017aeb12
...
...
@@ -16,14 +16,8 @@
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.model.common.visitor.FeatureFunctor
;
import
org.citygml4j.model.common.visitor.FeatureVisitor
;
import
org.citygml4j.model.common.visitor.GMLFunctor
;
import
org.citygml4j.model.common.visitor.GMLVisitor
;
import
org.citygml4j.model.gml.feature.AbstractFeature
;
public
class
AttributeWrongValue
extends
AbstractFeature
implements
ValidationError
,
ADEModelObject
{
public
class
AttributeWrongValue
extends
SemanticError
{
private
static
final
long
serialVersionUID
=
-
5650985861847806620L
;
...
...
@@ -65,24 +59,4 @@ public class AttributeWrongValue extends AbstractFeature implements ValidationEr
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
AttributeWrongValue
(),
copyBuilder
);
}
@Override
public
void
accept
(
FeatureVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
FeatureFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
@Override
public
void
accept
(
GMLVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
GMLFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ChildObject.java
0 → 100644
View file @
017aeb12
/*-
* Copyright 2020 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.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.model.common.base.ModelObject
;
public
abstract
class
ChildObject
implements
ADEModelObject
{
private
static
final
long
serialVersionUID
=
6726372382501963276L
;
private
ModelObject
parent
;
@Override
public
Object
copyTo
(
Object
target
,
CopyBuilder
copyBuilder
)
{
return
target
;
}
@Override
public
ModelObject
getParent
()
{
return
parent
;
}
@Override
public
void
setParent
(
ModelObject
parent
)
{
this
.
parent
=
parent
;
}
@Override
public
boolean
isSetParent
()
{
return
parent
!=
null
;
}
@Override
public
void
unsetParent
()
{
parent
=
null
;
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/ConsecutivePointsSame.java
View file @
017aeb12
...
...
@@ -16,26 +16,15 @@
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.model.common.visitor.FeatureFunctor
;
import
org.citygml4j.model.common.visitor.FeatureVisitor
;
import
org.citygml4j.model.common.visitor.GMLFunctor
;
import
org.citygml4j.model.common.visitor.GMLVisitor
;
import
org.citygml4j.model.gml.feature.AbstractFeature
;
import
org.citygml4j.model.gml.geometry.primitives.DirectPosition
;
public
class
ConsecutivePointsSame
extends
AbstractFeature
implements
ValidationError
,
ADEModelObject
{
public
class
ConsecutivePointsSame
extends
RingError
{
private
static
final
long
serialVersionUID
=
-
838421312521561747L
;
private
String
linearRingId
;
private
DirectPosition
vertex1
;
private
DirectPosition
vertex2
;
public
void
setLinearRingId
(
String
linearRingId
)
{
this
.
linearRingId
=
linearRingId
;
}
public
void
setVertex1
(
DirectPosition
vertex1
)
{
this
.
vertex1
=
vertex1
;
}
...
...
@@ -43,11 +32,7 @@ public class ConsecutivePointsSame extends AbstractFeature implements Validation
public
void
setVertex2
(
DirectPosition
vertex2
)
{
this
.
vertex2
=
vertex2
;
}
public
String
getLinearRingId
()
{
return
linearRingId
;
}
public
DirectPosition
getVertex1
()
{
return
vertex1
;
}
...
...
@@ -58,7 +43,7 @@ public class ConsecutivePointsSame extends AbstractFeature implements Validation
@Override
public
String
toString
()
{
return
"ConsecutivePointsSame [linearRingId="
+
l
inearRingId
+
", vertex1="
+
vertex1
+
", vertex2="
+
vertex2
return
"ConsecutivePointsSame [linearRingId="
+
getL
inearRingId
()
+
", vertex1="
+
vertex1
+
", vertex2="
+
vertex2
+
"]"
;
}
...
...
@@ -67,24 +52,4 @@ public class ConsecutivePointsSame extends AbstractFeature implements Validation
return
copyTo
(
new
ConsecutivePointsSame
(),
copyBuilder
);
}
@Override
public
void
accept
(
FeatureVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
FeatureFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
@Override
public
void
accept
(
GMLVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
GMLFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/HoleOutside.java
View file @
017aeb12
...
...
@@ -16,63 +16,28 @@
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.model.common.visitor.FeatureFunctor
;
import
org.citygml4j.model.common.visitor.FeatureVisitor
;
import
org.citygml4j.model.common.visitor.GMLFunctor
;
import
org.citygml4j.model.common.visitor.GMLVisitor
;
import
org.citygml4j.model.gml.feature.AbstractFeature
;
public
class
HoleOutside
extends
AbstractFeature
implements
ValidationError
,
ADEModelObject
{
public
class
HoleOutside
extends
PolygonError
{
private
static
final
long
serialVersionUID
=
-
3029497342950689843L
;
private
String
polygonId
;
private
String
linearRingId
;
public
void
setPolygonId
(
String
polygonId
)
{
this
.
polygonId
=
polygonId
;
}
public
void
setLinearRingId
(
String
linearRingId
)
{
this
.
linearRingId
=
linearRingId
;
}
public
String
getPolygonId
()
{
return
polygonId
;
}
public
String
getLinearRingId
()
{
return
linearRingId
;
}
@Override
public
String
toString
()
{
return
"HoleOutside [polygonId="
+
p
olygonId
+
", linearRingId="
+
linearRingId
+
"]"
;
return
"HoleOutside [polygonId="
+
getP
olygonId
()
+
", linearRingId="
+
linearRingId
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
HoleOutside
(),
copyBuilder
);
}
@Override
public
void
accept
(
FeatureVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
FeatureFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
@Override
public
void
accept
(
GMLVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
GMLFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/InnerRingsNested.java
View file @
017aeb12
...
...
@@ -16,25 +16,14 @@
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.model.common.visitor.FeatureFunctor
;
import
org.citygml4j.model.common.visitor.FeatureVisitor
;
import
org.citygml4j.model.common.visitor.GMLFunctor
;
import
org.citygml4j.model.common.visitor.GMLVisitor
;
import
org.citygml4j.model.gml.feature.AbstractFeature
;
public
class
InnerRingsNested
extends
AbstractFeature
implements
ValidationError
,
ADEModelObject
{
public
class
InnerRingsNested
extends
PolygonError
{
private
static
final
long
serialVersionUID
=
2291087505629924993L
;
private
String
polygonId
;
private
String
linearRingId1
;
private
String
linearRingId2
;
public
void
setPolygonId
(
String
polygonId
)
{
this
.
polygonId
=
polygonId
;
}
public
void
setLinearRingId1
(
String
linearRingId1
)
{
this
.
linearRingId1
=
linearRingId1
;
}
...
...
@@ -43,10 +32,6 @@ public class InnerRingsNested extends AbstractFeature implements ValidationError
this
.
linearRingId2
=
linearRingId2
;
}
public
String
getPolygonId
()
{
return
polygonId
;
}
public
String
getLinearRingId1
()
{
return
linearRingId1
;
}
...
...
@@ -59,24 +44,4 @@ public class InnerRingsNested extends AbstractFeature implements ValidationError
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
InnerRingsNested
(),
copyBuilder
);
}
@Override
public
void
accept
(
FeatureVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
FeatureFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
@Override
public
void
accept
(
GMLVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
GMLFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/InteriorDisconnected.java
View file @
017aeb12
...
...
@@ -16,54 +16,18 @@
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.model.common.visitor.FeatureFunctor
;
import
org.citygml4j.model.common.visitor.FeatureVisitor
;
import
org.citygml4j.model.common.visitor.GMLFunctor
;
import
org.citygml4j.model.common.visitor.GMLVisitor
;
import
org.citygml4j.model.gml.feature.AbstractFeature
;
public
class
InteriorDisconnected
extends
AbstractFeature
implements
ValidationError
,
ADEModelObject
{
public
class
InteriorDisconnected
extends
PolygonError
{
private
static
final
long
serialVersionUID
=
8443642232356795359L
;
private
String
polygonId
;
public
void
setPolygonId
(
String
polygonId
)
{
this
.
polygonId
=
polygonId
;
}
public
String
getPolygonId
()
{
return
polygonId
;
}
@Override
public
String
toString
()
{
return
"InteriorDisconnected [polygonId="
+
p
olygonId
+
"]"
;
return
"InteriorDisconnected [polygonId="
+
getP
olygonId
()
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
InteriorDisconnected
(),
copyBuilder
);
}
@Override
public
void
accept
(
FeatureVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
FeatureFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
@Override
public
void
accept
(
GMLVisitor
visitor
)
{
visitor
.
visit
(
this
);
}
@Override
public
<
T
>
T
accept
(
GMLFunctor
<
T
>
visitor
)
{
return
visitor
.
apply
(
this
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/IntersectingRings.java
View file @
017aeb12
...
...
@@ -16,25 +16,14 @@
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.model.common.visitor.FeatureFunctor
;
import
org.citygml4j.model.common.visitor.FeatureVisitor
;
import
org.citygml4j.model.common.visitor.GMLFunctor
;
import
org.citygml4j.model.common.visitor.GMLVisitor
;
import
org.citygml4j.model.gml.feature.AbstractFeature
;
public
class
IntersectingRings
extends
AbstractFeature
implements
ValidationError
,
ADEModelObject
{
public
class
IntersectingRings
extends
PolygonError
{
private
static
final
long
serialVersionUID
=
7668529369582991408L
;
private
String
polygonId
;
private
String
linearRingId1
;