Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
a0ff9ed7
Commit
a0ff9ed7
authored
Nov 30, 2020
by
Matthias Betz
Browse files
Added check plugin system
parent
0a7d6299
Pipeline
#1380
passed with stage
in 2 minutes and 13 seconds
Changes
71
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/PolygonHoleOutsideError.java
View file @
a0ff9ed7
...
@@ -27,6 +27,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
...
@@ -27,6 +27,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
...
@@ -37,7 +38,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
...
@@ -37,7 +38,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
PolygonHoleOutsideError
ext
en
d
s
CheckError
{
public
class
PolygonHoleOutsideError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
-
4522153084655775231L
;
private
static
final
long
serialVersionUID
=
-
4522153084655775231L
;
...
@@ -45,7 +46,6 @@ public class PolygonHoleOutsideError extends CheckError {
...
@@ -45,7 +46,6 @@ public class PolygonHoleOutsideError extends CheckError {
private
Polygon
p
;
private
Polygon
p
;
public
PolygonHoleOutsideError
(
Polygon
p
,
List
<
LinearRing
>
holesOutside
)
{
public
PolygonHoleOutsideError
(
Polygon
p
,
List
<
LinearRing
>
holesOutside
)
{
super
(
ErrorId
.
GE_P_HOLE_OUTSIDE
,
ErrorType
.
ERROR
,
p
);
this
.
p
=
p
;
this
.
p
=
p
;
this
.
holesOutside
=
holesOutside
;
this
.
holesOutside
=
holesOutside
;
}
}
...
@@ -80,4 +80,19 @@ public class PolygonHoleOutsideError extends CheckError {
...
@@ -80,4 +80,19 @@ public class PolygonHoleOutsideError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"HoleOutsideError [holesOutside="
+
holesOutside
+
", p="
+
p
+
"]"
;
return
"HoleOutsideError [holesOutside="
+
holesOutside
+
", p="
+
p
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_P_HOLE_OUTSIDE
;
}
@Override
public
GmlElement
getFeature
()
{
return
getPolygon
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/PolygonInteriorDisconnectedError.java
View file @
a0ff9ed7
...
@@ -27,6 +27,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
...
@@ -27,6 +27,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
...
@@ -37,7 +38,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
...
@@ -37,7 +38,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
PolygonInteriorDisconnectedError
ext
en
d
s
CheckError
{
public
class
PolygonInteriorDisconnectedError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
511849016699842395L
;
private
static
final
long
serialVersionUID
=
511849016699842395L
;
...
@@ -45,7 +46,6 @@ public class PolygonInteriorDisconnectedError extends CheckError {
...
@@ -45,7 +46,6 @@ public class PolygonInteriorDisconnectedError extends CheckError {
private
List
<
LinearRing
>
connectedRings
;
private
List
<
LinearRing
>
connectedRings
;
public
PolygonInteriorDisconnectedError
(
Polygon
p
,
List
<
LinearRing
>
connectedRings
)
{
public
PolygonInteriorDisconnectedError
(
Polygon
p
,
List
<
LinearRing
>
connectedRings
)
{
super
(
ErrorId
.
GE_P_INTERIOR_DISCONNECTED
,
ErrorType
.
ERROR
,
p
);
this
.
p
=
p
;
this
.
p
=
p
;
this
.
connectedRings
=
connectedRings
;
this
.
connectedRings
=
connectedRings
;
}
}
...
@@ -81,4 +81,19 @@ public class PolygonInteriorDisconnectedError extends CheckError {
...
@@ -81,4 +81,19 @@ public class PolygonInteriorDisconnectedError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"InteriorDisconnectedError [p="
+
p
+
", connectedRings="
+
connectedRings
+
"]"
;
return
"InteriorDisconnectedError [p="
+
p
+
", connectedRings="
+
connectedRings
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_P_INTERIOR_DISCONNECTED
;
}
@Override
public
GmlElement
getFeature
()
{
return
getPolygon
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/PolygonIntersectingRingsError.java
View file @
a0ff9ed7
...
@@ -25,6 +25,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
...
@@ -25,6 +25,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.utils.SerializablePair
;
import
de.hft.stuttgart.citydoctor2.utils.SerializablePair
;
...
@@ -36,7 +37,7 @@ import de.hft.stuttgart.citydoctor2.utils.SerializablePair;
...
@@ -36,7 +37,7 @@ import de.hft.stuttgart.citydoctor2.utils.SerializablePair;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
PolygonIntersectingRingsError
ext
en
d
s
CheckError
{
public
class
PolygonIntersectingRingsError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
-
7043521697085991901L
;
private
static
final
long
serialVersionUID
=
-
7043521697085991901L
;
...
@@ -44,7 +45,6 @@ public class PolygonIntersectingRingsError extends CheckError {
...
@@ -44,7 +45,6 @@ public class PolygonIntersectingRingsError extends CheckError {
private
SerializablePair
<
LinearRing
,
LinearRing
>
intersectingRings
;
private
SerializablePair
<
LinearRing
,
LinearRing
>
intersectingRings
;
public
PolygonIntersectingRingsError
(
Polygon
p
,
SerializablePair
<
LinearRing
,
LinearRing
>
intersectingRings
)
{
public
PolygonIntersectingRingsError
(
Polygon
p
,
SerializablePair
<
LinearRing
,
LinearRing
>
intersectingRings
)
{
super
(
ErrorId
.
GE_P_INTERSECTING_RINGS
,
ErrorType
.
ERROR
,
p
);
this
.
p
=
p
;
this
.
p
=
p
;
this
.
intersectingRings
=
intersectingRings
;
this
.
intersectingRings
=
intersectingRings
;
}
}
...
@@ -78,4 +78,19 @@ public class PolygonIntersectingRingsError extends CheckError {
...
@@ -78,4 +78,19 @@ public class PolygonIntersectingRingsError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"PolygonSelfIntError [p="
+
p
+
", intersectingRings="
+
intersectingRings
+
"]"
;
return
"PolygonSelfIntError [p="
+
p
+
", intersectingRings="
+
intersectingRings
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_P_INTERSECTING_RINGS
;
}
@Override
public
GmlElement
getFeature
()
{
return
getPolygon
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/PolygonSameOrientationError.java
View file @
a0ff9ed7
...
@@ -25,6 +25,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
...
@@ -25,6 +25,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
...
@@ -35,7 +36,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
...
@@ -35,7 +36,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
PolygonSameOrientationError
ext
en
d
s
CheckError
{
public
class
PolygonSameOrientationError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
-
6192337889977667459L
;
private
static
final
long
serialVersionUID
=
-
6192337889977667459L
;
...
@@ -43,7 +44,6 @@ public class PolygonSameOrientationError extends CheckError {
...
@@ -43,7 +44,6 @@ public class PolygonSameOrientationError extends CheckError {
private
LinearRing
innerRing
;
private
LinearRing
innerRing
;
public
PolygonSameOrientationError
(
Polygon
p
,
LinearRing
inner
)
{
public
PolygonSameOrientationError
(
Polygon
p
,
LinearRing
inner
)
{
super
(
ErrorId
.
GE_P_ORIENTATION_RINGS_SAME
,
ErrorType
.
ERROR
,
p
);
this
.
p
=
p
;
this
.
p
=
p
;
this
.
innerRing
=
inner
;
this
.
innerRing
=
inner
;
}
}
...
@@ -76,4 +76,19 @@ public class PolygonSameOrientationError extends CheckError {
...
@@ -76,4 +76,19 @@ public class PolygonSameOrientationError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"SameOrientationError [p="
+
p
+
", innerRing="
+
innerRing
+
"]"
;
return
"SameOrientationError [p="
+
p
+
", innerRing="
+
innerRing
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_P_ORIENTATION_RINGS_SAME
;
}
@Override
public
GmlElement
getFeature
()
{
return
getPolygon
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/PolygonWrongOrientationError.java
View file @
a0ff9ed7
...
@@ -31,6 +31,7 @@ import de.hft.stuttgart.citydoctor2.check.HealingMethod;
...
@@ -31,6 +31,7 @@ import de.hft.stuttgart.citydoctor2.check.HealingMethod;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.Edge
;
import
de.hft.stuttgart.citydoctor2.datastructure.Edge
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
/**
/**
...
@@ -41,7 +42,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
...
@@ -41,7 +42,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
PolygonWrongOrientationError
ext
en
d
s
CheckError
{
public
class
PolygonWrongOrientationError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
-
3006643655816847097L
;
private
static
final
long
serialVersionUID
=
-
3006643655816847097L
;
...
@@ -49,7 +50,6 @@ public class PolygonWrongOrientationError extends CheckError {
...
@@ -49,7 +50,6 @@ public class PolygonWrongOrientationError extends CheckError {
private
Geometry
g
;
private
Geometry
g
;
public
PolygonWrongOrientationError
(
Geometry
g
,
List
<
Edge
>
edges
)
{
public
PolygonWrongOrientationError
(
Geometry
g
,
List
<
Edge
>
edges
)
{
super
(
ErrorId
.
GE_S_POLYGON_WRONG_ORIENTATION
,
ErrorType
.
ERROR
,
g
);
this
.
edges
=
edges
;
this
.
edges
=
edges
;
this
.
g
=
g
;
this
.
g
=
g
;
}
}
...
@@ -86,4 +86,19 @@ public class PolygonWrongOrientationError extends CheckError {
...
@@ -86,4 +86,19 @@ public class PolygonWrongOrientationError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"PolygonWrongOrientationError [edges="
+
edges
+
", g="
+
g
+
"]"
;
return
"PolygonWrongOrientationError [edges="
+
edges
+
", g="
+
g
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_S_POLYGON_WRONG_ORIENTATION
;
}
@Override
public
GmlElement
getFeature
()
{
return
getGeometry
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingDuplicatePointError.java
View file @
a0ff9ed7
...
@@ -25,6 +25,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
...
@@ -25,6 +25,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
...
@@ -35,7 +36,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
...
@@ -35,7 +36,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
RingDuplicatePointError
ext
en
d
s
CheckError
{
public
class
RingDuplicatePointError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
7208982075173209953L
;
private
static
final
long
serialVersionUID
=
7208982075173209953L
;
...
@@ -44,7 +45,6 @@ public class RingDuplicatePointError extends CheckError {
...
@@ -44,7 +45,6 @@ public class RingDuplicatePointError extends CheckError {
private
Vertex
v2
;
private
Vertex
v2
;
public
RingDuplicatePointError
(
LinearRing
r
,
Vertex
v1
,
Vertex
v2
)
{
public
RingDuplicatePointError
(
LinearRing
r
,
Vertex
v1
,
Vertex
v2
)
{
super
(
ErrorId
.
GE_R_SELF_INTERSECTION
,
ErrorType
.
ERROR
,
r
);
this
.
r
=
r
;
this
.
r
=
r
;
this
.
v1
=
v1
;
this
.
v1
=
v1
;
this
.
v2
=
v2
;
this
.
v2
=
v2
;
...
@@ -84,4 +84,19 @@ public class RingDuplicatePointError extends CheckError {
...
@@ -84,4 +84,19 @@ public class RingDuplicatePointError extends CheckError {
return
"DuplicatePointError [r="
+
r
+
", v1="
+
v1
+
", v2="
+
v2
+
"]"
;
return
"DuplicatePointError [r="
+
r
+
", v1="
+
v1
+
", v2="
+
v2
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_R_SELF_INTERSECTION
;
}
@Override
public
GmlElement
getFeature
()
{
return
getRing
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingEdgeIntersectionError.java
View file @
a0ff9ed7
...
@@ -26,6 +26,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorVisitor;
...
@@ -26,6 +26,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorVisitor;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.Edge
;
import
de.hft.stuttgart.citydoctor2.datastructure.Edge
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.math.Vector3d
;
import
de.hft.stuttgart.citydoctor2.math.Vector3d
;
...
@@ -36,7 +37,7 @@ import de.hft.stuttgart.citydoctor2.math.Vector3d;
...
@@ -36,7 +37,7 @@ import de.hft.stuttgart.citydoctor2.math.Vector3d;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
RingEdgeIntersectionError
ext
en
d
s
CheckError
{
public
class
RingEdgeIntersectionError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
4923311259469198172L
;
private
static
final
long
serialVersionUID
=
4923311259469198172L
;
...
@@ -46,7 +47,6 @@ public class RingEdgeIntersectionError extends CheckError {
...
@@ -46,7 +47,6 @@ public class RingEdgeIntersectionError extends CheckError {
private
LinearRing
lr
;
private
LinearRing
lr
;
public
RingEdgeIntersectionError
(
LinearRing
lr
,
Edge
e1
,
Edge
e2
,
Vector3d
intersection
)
{
public
RingEdgeIntersectionError
(
LinearRing
lr
,
Edge
e1
,
Edge
e2
,
Vector3d
intersection
)
{
super
(
ErrorId
.
GE_R_SELF_INTERSECTION
,
ErrorType
.
ERROR
,
lr
);
if
(
e1
==
null
||
e2
==
null
||
lr
==
null
||
intersection
==
null
)
{
if
(
e1
==
null
||
e2
==
null
||
lr
==
null
||
intersection
==
null
)
{
throw
new
IllegalArgumentException
(
"Parameters may not be null"
);
throw
new
IllegalArgumentException
(
"Parameters may not be null"
);
}
}
...
@@ -96,4 +96,19 @@ public class RingEdgeIntersectionError extends CheckError {
...
@@ -96,4 +96,19 @@ public class RingEdgeIntersectionError extends CheckError {
return
"EdgeIntersectionError [e1="
+
e1
+
", e2="
+
e2
+
", intersection="
+
intersection
+
", lr="
+
lr
+
"]"
;
return
"EdgeIntersectionError [e1="
+
e1
+
", e2="
+
e2
+
", intersection="
+
intersection
+
", lr="
+
lr
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_R_SELF_INTERSECTION
;
}
@Override
public
GmlElement
getFeature
()
{
return
getRing
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingNotClosedError.java
View file @
a0ff9ed7
...
@@ -25,6 +25,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
...
@@ -25,6 +25,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
/**
/**
...
@@ -34,14 +35,13 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing;
...
@@ -34,14 +35,13 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
RingNotClosedError
ext
en
d
s
CheckError
{
public
class
RingNotClosedError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
2554099996830579201L
;
private
static
final
long
serialVersionUID
=
2554099996830579201L
;
private
LinearRing
ring
;
private
LinearRing
ring
;
public
RingNotClosedError
(
LinearRing
ring
)
{
public
RingNotClosedError
(
LinearRing
ring
)
{
super
(
ErrorId
.
GE_R_NOT_CLOSED
,
ErrorType
.
ERROR
,
ring
);
this
.
ring
=
ring
;
this
.
ring
=
ring
;
}
}
...
@@ -68,4 +68,19 @@ public class RingNotClosedError extends CheckError {
...
@@ -68,4 +68,19 @@ public class RingNotClosedError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"RingNotClosedError [ring="
+
ring
+
"]"
;
return
"RingNotClosedError [ring="
+
ring
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_R_NOT_CLOSED
;
}
@Override
public
GmlElement
getFeature
()
{
return
getRing
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingTooFewPointsError.java
View file @
a0ff9ed7
...
@@ -25,6 +25,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
...
@@ -25,6 +25,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
/**
/**
...
@@ -33,14 +34,13 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing;
...
@@ -33,14 +34,13 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
RingTooFewPointsError
ext
en
d
s
CheckError
{
public
class
RingTooFewPointsError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
7207518573842743261L
;
private
static
final
long
serialVersionUID
=
7207518573842743261L
;
private
LinearRing
lr
;
private
LinearRing
lr
;
public
RingTooFewPointsError
(
LinearRing
lr
)
{
public
RingTooFewPointsError
(
LinearRing
lr
)
{
super
(
ErrorId
.
GE_R_TOO_FEW_POINTS
,
ErrorType
.
ERROR
,
lr
);
this
.
lr
=
lr
;
this
.
lr
=
lr
;
}
}
...
@@ -67,4 +67,19 @@ public class RingTooFewPointsError extends CheckError {
...
@@ -67,4 +67,19 @@ public class RingTooFewPointsError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"TooFewPointsError [lr="
+
lr
+
"]"
;
return
"TooFewPointsError [lr="
+
lr
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_R_TOO_FEW_POINTS
;
}
@Override
public
GmlElement
getFeature
()
{
return
getRing
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/SchematronError.java
View file @
a0ff9ed7
...
@@ -25,15 +25,15 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
...
@@ -25,15 +25,15 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
public
class
SchematronError
ext
en
d
s
CheckError
{
public
class
SchematronError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
-
2964084500589868928L
;
private
static
final
long
serialVersionUID
=
-
2964084500589868928L
;
private
String
text
;
private
String
text
;
public
SchematronError
(
String
text
)
{
public
SchematronError
(
String
text
)
{
super
(
ErrorId
.
SEM_SCHEMATRON_ERROR
,
ErrorType
.
ERROR
,
null
);
this
.
text
=
text
;
this
.
text
=
text
;
}
}
...
@@ -61,4 +61,19 @@ public class SchematronError extends CheckError {
...
@@ -61,4 +61,19 @@ public class SchematronError extends CheckError {
return
text
;
return
text
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
SEM_SCHEMATRON_ERROR
;
}
@Override
public
GmlElement
getFeature
()
{
return
null
;
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/SolidNotClosedError.java
View file @
a0ff9ed7
...
@@ -29,6 +29,7 @@ import de.hft.stuttgart.citydoctor2.check.HealingMethod;
...
@@ -29,6 +29,7 @@ import de.hft.stuttgart.citydoctor2.check.HealingMethod;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.Edge
;
import
de.hft.stuttgart.citydoctor2.datastructure.Edge
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
/**
/**
* If a geometry has holes in it, it results in edges being traversed only once.
* If a geometry has holes in it, it results in edges being traversed only once.
...
@@ -37,7 +38,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
...
@@ -37,7 +38,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
SolidNotClosedError
ext
en
d
s
CheckError
{
public
class
SolidNotClosedError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
8256385219885788891L
;
private
static
final
long
serialVersionUID
=
8256385219885788891L
;
...
@@ -45,7 +46,6 @@ public class SolidNotClosedError extends CheckError {
...
@@ -45,7 +46,6 @@ public class SolidNotClosedError extends CheckError {
private
Geometry
g
;
private
Geometry
g
;
public
SolidNotClosedError
(
Geometry
g
,
List
<
Edge
>
errorEdges
)
{
public
SolidNotClosedError
(
Geometry
g
,
List
<
Edge
>
errorEdges
)
{
super
(
ErrorId
.
GE_S_NOT_CLOSED
,
ErrorType
.
ERROR
,
g
);
this
.
errorEdges
=
errorEdges
;
this
.
errorEdges
=
errorEdges
;
this
.
g
=
g
;
this
.
g
=
g
;
}
}
...
@@ -78,4 +78,19 @@ public class SolidNotClosedError extends CheckError {
...
@@ -78,4 +78,19 @@ public class SolidNotClosedError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"SolidNotClosedError [errorEdges="
+
errorEdges
+
", g="
+
g
+
"]"
;
return
"SolidNotClosedError [errorEdges="
+
errorEdges
+
", g="
+
g
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_S_NOT_CLOSED
;
}
@Override
public
GmlElement
getFeature
()
{
return
getGeometry
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/SolidSelfIntError.java
View file @
a0ff9ed7
...
@@ -28,6 +28,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorVisitor;
...
@@ -28,6 +28,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorVisitor;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.utils.PolygonIntersection
;
import
de.hft.stuttgart.citydoctor2.utils.PolygonIntersection
;
/**
/**
...
@@ -36,7 +37,7 @@ import de.hft.stuttgart.citydoctor2.utils.PolygonIntersection;
...
@@ -36,7 +37,7 @@ import de.hft.stuttgart.citydoctor2.utils.PolygonIntersection;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
SolidSelfIntError
ext
en
d
s
CheckError
{
public
class
SolidSelfIntError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
-
4479936555545861422L
;
private
static
final
long
serialVersionUID
=
-
4479936555545861422L
;
...
@@ -45,7 +46,6 @@ public class SolidSelfIntError extends CheckError {
...
@@ -45,7 +46,6 @@ public class SolidSelfIntError extends CheckError {
private
List
<
PolygonIntersection
>
intersections
;
private
List
<
PolygonIntersection
>
intersections
;
public
SolidSelfIntError
(
Geometry
g
,
List
<
PolygonIntersection
>
intersections
)
{
public
SolidSelfIntError
(
Geometry
g
,
List
<
PolygonIntersection
>
intersections
)
{
super
(
ErrorId
.
GE_S_SELF_INTERSECTION
,
ErrorType
.
ERROR
,
g
);
this
.
g
=
g
;
this
.
g
=
g
;
this
.
intersections
=
intersections
;
this
.
intersections
=
intersections
;
}
}
...
@@ -77,4 +77,19 @@ public class SolidSelfIntError extends CheckError {
...
@@ -77,4 +77,19 @@ public class SolidSelfIntError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"SolidSelfIntError [g="
+
g
+
", intersection="
+
intersections
+
"]"
;
return
"SolidSelfIntError [g="
+
g
+
", intersection="
+
intersections
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_S_SELF_INTERSECTION
;
}
@Override
public
GmlElement
getFeature
()
{
return
getGeometry
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/SurfaceUnfragmentedError.java
View file @
a0ff9ed7
...
@@ -26,6 +26,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorVisitor;
...
@@ -26,6 +26,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorVisitor;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.BoundarySurface
;
import
de.hft.stuttgart.citydoctor2.datastructure.BoundarySurface
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
/**
/**
* Container object for an unfragmented error
* Container object for an unfragmented error
...
@@ -33,7 +34,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.BoundarySurface;
...
@@ -33,7 +34,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.BoundarySurface;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
SurfaceUnfragmentedError
ext
en
d
s
CheckError
{
public
class
SurfaceUnfragmentedError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
3146243879393474196L
;
private
static
final
long
serialVersionUID
=
3146243879393474196L
;
...
@@ -41,7 +42,6 @@ public class SurfaceUnfragmentedError extends CheckError {
...
@@ -41,7 +42,6 @@ public class SurfaceUnfragmentedError extends CheckError {
private
double
angleDeviation
;
private
double
angleDeviation
;
public
SurfaceUnfragmentedError
(
BoundarySurface
bs
,
double
angleDerivation
)
{
public
SurfaceUnfragmentedError
(
BoundarySurface
bs
,
double
angleDerivation
)
{
super
(
ErrorId
.
SEM_BS_UNFRAGMENTED
,
ErrorType
.
ERROR
,
bs
);
this
.
bs
=
bs
;
this
.
bs
=
bs
;
this
.
angleDeviation
=
angleDerivation
;
this
.
angleDeviation
=
angleDerivation
;
}
}
...
@@ -70,4 +70,19 @@ public class SurfaceUnfragmentedError extends CheckError {
...
@@ -70,4 +70,19 @@ public class SurfaceUnfragmentedError extends CheckError {
report
.
add
(
"angleDerivation"
,
angleDeviation
);
report
.
add
(
"angleDerivation"
,
angleDeviation
);
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
SEM_BS_UNFRAGMENTED
;
}
@Override
public
GmlElement
getFeature
()
{
return
getBoundarySurface
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/TinyEdgeError.java
View file @
a0ff9ed7
...
@@ -25,21 +25,21 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
...
@@ -25,21 +25,21 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
public
class
TinyEdgeError
ext
en
d
s
CheckError
{
public
class
TinyEdgeError
implem
en
t
s
CheckError
{
/**
*
*/
private
static
final
long
serialVersionUID
=
865493182529055651L
;
private
static
final
long
serialVersionUID
=
865493182529055651L
;
private
Polygon
p
;
public
TinyEdgeError
(
Polygon
p
)
{
public
TinyEdgeError
(
Polygon
p
)
{
super
(
ErrorId
.
GE_P_TINY_EDGE
,
ErrorType
.
ERROR
,
p
)
;
this
.
p
=
p
;
}
}
public
Polygon
getPolygon
()
{
public
Polygon
getPolygon
()
{
return
(
Polygon
)
getFeature
()
;
return
p
;
}
}
@Override
@Override
...
@@ -56,5 +56,20 @@ public class TinyEdgeError extends CheckError {
...
@@ -56,5 +56,20 @@ public class TinyEdgeError extends CheckError {
public
void
report
(
ErrorReport
report
)
{
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
getPolygon
());
report
.
add
(
getPolygon
());
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_P_TINY_EDGE
;
}
@Override
public
GmlElement
getFeature
()
{
return
getPolygon
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/TooFewPolygonsError.java
View file @
a0ff9ed7
...
@@ -26,6 +26,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorVisitor;
...
@@ -26,6 +26,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorVisitor;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
/**
/**
* When a geometry has less than 4 polygons, it cannot form a valid solid.
* When a geometry has less than 4 polygons, it cannot form a valid solid.
...
@@ -33,14 +34,13 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
...
@@ -33,14 +34,13 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
TooFewPolygonsError
ext
en
d
s
CheckError
{
public
class
TooFewPolygonsError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
5800732409355221678L
;
private
static
final
long
serialVersionUID
=
5800732409355221678L
;
private
Geometry
g
;
private
Geometry
g
;
public
TooFewPolygonsError
(
Geometry
g
)
{
public
TooFewPolygonsError
(
Geometry
g
)
{
super
(
ErrorId
.
GE_S_TOO_FEW_POLYGONS
,
ErrorType
.
ERROR
,
g
);
this
.
g
=
g
;
this
.
g
=
g
;
}
}
...
@@ -68,4 +68,19 @@ public class TooFewPolygonsError extends CheckError {
...
@@ -68,4 +68,19 @@ public class TooFewPolygonsError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"TooFewPolygonsError [g="
+
g
+
"]"
;
return
"TooFewPolygonsError [g="
+
g
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
GE_S_TOO_FEW_POLYGONS
;
}
@Override
public
GmlElement
getFeature
()
{
return
getGeometry
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/UnknownCheckError.java
View file @
a0ff9ed7
...
@@ -28,6 +28,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
...
@@ -28,6 +28,7 @@ import de.hft.stuttgart.citydoctor2.check.ErrorType;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
/**
/**
* This error is created when an unexpected exception is thrown by the code.
* This error is created when an unexpected exception is thrown by the code.
...
@@ -35,7 +36,7 @@ import de.hft.stuttgart.citydoctor2.check.ModificationListener;
...
@@ -35,7 +36,7 @@ import de.hft.stuttgart.citydoctor2.check.ModificationListener;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
UnknownCheckError
ext
en
d
s
CheckError
{
public
class
UnknownCheckError
implem
en
t
s
CheckError
{
private
static
final
long
serialVersionUID
=
-
6554097632341055596L
;
private
static
final
long
serialVersionUID
=
-
6554097632341055596L
;
...
@@ -44,7 +45,6 @@ public class UnknownCheckError extends CheckError {
...
@@ -44,7 +45,6 @@ public class UnknownCheckError extends CheckError {
private
CheckId
checkId
;
private
CheckId
checkId
;
public
UnknownCheckError
(
Checkable
c
,
Exception
e
,
Check
check
)
{
public
UnknownCheckError
(
Checkable
c
,
Exception
e
,
Check
check
)
{
super
(
ErrorId
.
UNKNOWN_ERROR
,
ErrorType
.
ERROR
,
null
);
this
.
c
=
c
;
this
.
c
=
c
;
this
.
e
=
e
;
this
.
e
=
e
;
checkId
=
check
.
getCheckId
();
checkId
=
check
.
getCheckId
();
...
@@ -83,4 +83,19 @@ public class UnknownCheckError extends CheckError {
...
@@ -83,4 +83,19 @@ public class UnknownCheckError extends CheckError {
public
String
toString
()
{
public
String
toString
()
{
return
"UnknownCheckError [c="
+
c
+
", e="
+
e
+
"]"
;
return
"UnknownCheckError [c="
+
c
+
", e="
+
e
+
"]"
;
}
}
@Override
public
ErrorType
getType
()
{
return
ErrorType
.
ERROR
;
}
@Override
public
ErrorId
getErrorId
()
{
return
ErrorId
.
UNKNOWN_ERROR
;
}
@Override
public
GmlElement
getFeature
()
{
return
null
;
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Vertex.java
View file @
a0ff9ed7
...
@@ -73,6 +73,9 @@ public class Vertex extends Vector3d {
...
@@ -73,6 +73,9 @@ public class Vertex extends Vector3d {
}
}
public
Set
<
LinearRing
>
getAdjacentRings
(
Geometry
geom
)
{
public
Set
<
LinearRing
>
getAdjacentRings
(
Geometry
geom
)
{
if
(
adjacentRings
==
null
)
{
return
Collections
.
emptySet
();
}
for
(
SerializablePair
<
Geometry
,
HashSet
<
LinearRing
>>
adjacency
:
adjacentRings
)
{
for
(
SerializablePair
<
Geometry
,
HashSet
<
LinearRing
>>
adjacency
:
adjacentRings
)
{
if
(
adjacency
.
getValue0
()
==
geom
)
{
if
(
adjacency
.
getValue0
()
==
geom
)
{
if
(
neighbors
==
null
||
neighbors
.
isEmpty
())
{
if
(
neighbors
==
null
||
neighbors
.
isEmpty
())
{
...
@@ -91,6 +94,9 @@ public class Vertex extends Vector3d {
...
@@ -91,6 +94,9 @@ public class Vertex extends Vector3d {
}
}
void
addAdjacentRing
(
LinearRing
ring
,
Geometry
geom
)
{
void
addAdjacentRing
(
LinearRing
ring
,
Geometry
geom
)
{
if
(
adjacentRings
==
null
)
{
adjacentRings
=
new
ArrayList
<>(
2
);
}
findAdjacentRingsForGeometry
(
geom
).
add
(
ring
);
findAdjacentRingsForGeometry
(
geom
).
add
(
ring
);
}
}
...
@@ -122,6 +128,9 @@ public class Vertex extends Vector3d {
...
@@ -122,6 +128,9 @@ public class Vertex extends Vector3d {
}
}
public
Set
<
Polygon
>
getAdjacentPolygons
(
Geometry
geom
)
{
public
Set
<
Polygon
>
getAdjacentPolygons
(
Geometry
geom
)
{
if
(
adjacentRings
==
null
)
{
return
Collections
.
emptySet
();
}
for
(
SerializablePair
<
Geometry
,
HashSet
<
LinearRing
>>
adjecency
:
adjacentRings
)
{
for
(
SerializablePair
<
Geometry
,
HashSet
<
LinearRing
>>
adjecency
:
adjacentRings
)
{
if
(
adjecency
.
getValue0
()
==
geom
)
{
if
(
adjecency
.
getValue0
()
==
geom
)
{
Set
<
Polygon
>
polygons
=
new
HashSet
<>();
Set
<
Polygon
>
polygons
=
new
HashSet
<>();
...
@@ -163,6 +172,9 @@ public class Vertex extends Vector3d {
...
@@ -163,6 +172,9 @@ public class Vertex extends Vector3d {
}
}
public
void
clearAdjacentRings
(
Geometry
geometry
)
{
public
void
clearAdjacentRings
(
Geometry
geometry
)
{
if
(
adjacentRings
==
null
)
{
return
;
}
findAdjacentRingsForGeometry
(
geometry
).
clear
();
findAdjacentRingsForGeometry
(
geometry
).
clear
();
}
}
...
@@ -202,6 +214,6 @@ public class Vertex extends Vector3d {
...
@@ -202,6 +214,6 @@ public class Vertex extends Vector3d {
* Remove all adjacent rings from this vertex, ignoring geometry association
* Remove all adjacent rings from this vertex, ignoring geometry association
*/
*/
void
clearAdjacentRings
()
{
void
clearAdjacentRings
()
{
adjacentRings
=
n
ew
ArrayList
<>(
2
)
;
adjacentRings
=
n
ull
;
}
}
}
}
CityDoctorParent/CityDoctorValidation/pom.xml
View file @
a0ff9ed7
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
<groupId>
de.hft.stuttgart
</groupId>
<groupId>
de.hft.stuttgart
</groupId>
<artifactId>
CityDoctorCheckResult
</artifactId>
<artifactId>
CityDoctorCheckResult
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
net.sf.saxon
</groupId>
<groupId>
net.sf.saxon
</groupId>
<artifactId>
Saxon-HE
</artifactId>
<artifactId>
Saxon-HE
</artifactId>
...
@@ -67,17 +66,6 @@
...
@@ -67,17 +66,6 @@
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-jar-plugin
</artifactId>
<artifactId>
maven-jar-plugin
</artifactId>
<version>
3.2.0
</version>
<version>
3.2.0
</version>
<configuration>
<archive>
<manifest>
<addClasspath>
true
</addClasspath>
<classpathPrefix>
libs/
</classpathPrefix>
<mainClass>
de.hft.stuttgart.citydoctor2.CityDoctorValidation
</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugin>
<plugin>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<artifactId>
maven-assembly-plugin
</artifactId>
...
...
CityDoctorParent/CityDoctorValidation/src/assembly/start.bat
View file @
a0ff9ed7
java
-
jar
$
{
project
.artifactId
}-
$
{
project
.version
}
.jar
-in
REKaiserwall
.gml
-config
testConfigWithStreaming
.yml
-xmlReport
output
.xml
java
-
classpath
libs
/
*;
plugins
/
*;
$
{
project
.artifactId
}-
$
{
project
.version
}
.jar
de
.hft.stuttgart.citydoctor2.CityDoctorValidation
-in
REKaiserwall
.gml
-config
testConfigWithStreaming
.yml
-xmlReport
output
.xml
pause
pause
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/ValidationConfiguration.java
View file @
a0ff9ed7
...
@@ -26,7 +26,6 @@ import java.io.FileWriter;
...
@@ -26,7 +26,6 @@ import java.io.FileWriter;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.EnumMap
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -82,7 +81,7 @@ public class ValidationConfiguration implements Serializable {
...
@@ -82,7 +81,7 @@ public class ValidationConfiguration implements Serializable {
public
static
ValidationConfiguration
loadStandardValidationConfig
()
{
public
static
ValidationConfiguration
loadStandardValidationConfig
()
{
ValidationConfiguration
config
=
new
ValidationConfiguration
();
ValidationConfiguration
config
=
new
ValidationConfiguration
();
config
.
checks
=
new
Enum
Map
<>(
CheckId
.
class
);
config
.
checks
=
new
Hash
Map
<>();
for
(
CheckPrototype
c
:
Checks
.
getCheckPrototypes
())
{
for
(
CheckPrototype
c
:
Checks
.
getCheckPrototypes
())
{
CheckConfiguration
cConfig
=
new
CheckConfiguration
();
CheckConfiguration
cConfig
=
new
CheckConfiguration
();
cConfig
.
setEnabled
(
true
);
cConfig
.
setEnabled
(
true
);
...
@@ -144,7 +143,7 @@ public class ValidationConfiguration implements Serializable {
...
@@ -144,7 +143,7 @@ public class ValidationConfiguration implements Serializable {
public
Map
<
CheckId
,
CheckConfiguration
>
getChecks
()
{
public
Map
<
CheckId
,
CheckConfiguration
>
getChecks
()
{
if
(
checks
==
null
)
{
if
(
checks
==
null
)
{
checks
=
new
Enum
Map
<>(
CheckId
.
class
);
checks
=
new
Hash
Map
<>();
}
}
return
checks
;
return
checks
;
}
}
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment