Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
cd494d75
Commit
cd494d75
authored
Mar 12, 2021
by
Matthias Betz
Browse files
removing unused interface methods
parent
85cf93b6
Pipeline
#2109
passed with stage
in 2 minutes and 53 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/Check.java
View file @
cd494d75
...
...
@@ -310,7 +310,7 @@ public abstract class Check {
*
* @param params the parameter map containing the parameters for the check in
* String form. The key should be the same String provided by the
* {@link
Check
#getDefaultParameter()} method
* {@link
Requirement
#getDefaultParameter()} method
* @param config sometimes there are global parameters which can be used by
* checks. Those are be stored in this container
*/
...
...
@@ -318,16 +318,6 @@ public abstract class Check {
}
/**
* This methods gives checks the possibility to declare default parameters, used
* primarily in the GUI.
*
* @return a list of default parameters, not null
*/
public
List
<
DefaultParameter
>
getDefaultParameter
()
{
return
Collections
.
emptyList
();
}
@Override
public
String
toString
()
{
return
"Check [id="
+
getCheckId
()
+
"]"
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/Requirement.java
View file @
cd494d75
...
...
@@ -33,6 +33,7 @@ public class Requirement implements Serializable {
private
static
final
String
DEGENERATED_POLYGON_TOLERANCE
=
"degeneratedPolygonTolerance"
;
private
static
final
String
LOWER_ANGLE_NAME
=
"lowerAngle"
;
private
static
final
String
UPPER_ANGLE_NAME
=
"upperAngle"
;
private
static
final
String
MAX_ANGLE_DEVIATION
=
"maxAngleDeviation"
;
public
static
final
Requirement
R_GE_R_TOO_FEW_POINTS
=
new
Requirement
(
"R_GE_R_TOO_FEW_POINTS"
,
RequirementType
.
GEOMETRY
);
public
static
final
Requirement
R_GE_R_NOT_CLOSED
=
new
Requirement
(
"R_GE_R_NOT_CLOSED"
,
RequirementType
.
GEOMETRY
);
...
...
@@ -79,6 +80,10 @@ public class Requirement implements Serializable {
defaultParameters
.
add
(
new
DefaultParameter
(
LOWER_ANGLE_NAME
,
"45"
,
Unit
.
DEGREE
));
defaultParameters
.
add
(
new
DefaultParameter
(
UPPER_ANGLE_NAME
,
"135"
,
Unit
.
DEGREE
));
R_SE_BS_IS_WALL
.
parameters
=
Collections
.
unmodifiableList
(
defaultParameters
);
defaultParameters
.
add
(
new
DefaultParameter
(
MAX_ANGLE_DEVIATION
,
"1"
,
Unit
.
DEGREE
));
R_SE_BS_ROOF_UNFRAGMENTED
.
parameters
=
Collections
.
unmodifiableList
(
defaultParameters
);
}
private
String
id
;
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/CheckContainer.java
View file @
cd494d75
...
...
@@ -29,10 +29,9 @@ import de.hft.stuttgart.citydoctor2.check.Check;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckResult
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.check.Checkable
;
import
de.hft.stuttgart.citydoctor2.check.DefaultParameter
;
import
de.hft.stuttgart.citydoctor2.check.Requirement
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.error.UnknownCheckError
;
import
de.hft.stuttgart.citydoctor2.datastructure.AbstractBuilding
;
...
...
@@ -105,11 +104,6 @@ public class CheckContainer extends Check {
c
.
addCheckResult
(
cr
);
}
@Override
public
List
<
DefaultParameter
>
getDefaultParameter
()
{
return
check
.
getDefaultParameter
();
}
@Override
public
List
<
CheckId
>
getDependencies
()
{
return
check
.
getDependencies
();
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/CheckPrototype.java
View file @
cd494d75
...
...
@@ -23,9 +23,8 @@ import java.util.Set;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.check.DefaultParameter
;
import
de.hft.stuttgart.citydoctor2.check.Requirement
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
/**
* This class is for having a read only access to a check for accessing meta
...
...
@@ -60,10 +59,6 @@ public class CheckPrototype {
return
c
.
getDependencies
();
}
public
List
<
DefaultParameter
>
getDefaultParameter
()
{
return
c
.
getDefaultParameter
();
}
public
RequirementType
getType
()
{
return
c
.
getType
();
}
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/NullAreaCheck.java
View file @
cd494d75
...
...
@@ -27,11 +27,9 @@ import java.util.Set;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckResult
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.check.DefaultParameter
;
import
de.hft.stuttgart.citydoctor2.check.Requirement
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.Unit
;
import
de.hft.stuttgart.citydoctor2.check.error.NullAreaError
;
import
de.hft.stuttgart.citydoctor2.checks.util.CollectionUtils
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
...
...
@@ -48,7 +46,6 @@ public class NullAreaCheck extends Check {
private
static
final
String
DELTA_NAME
=
"delta"
;
private
static
final
List
<
CheckId
>
dependencies
;
private
static
final
List
<
DefaultParameter
>
defaultParameters
;
static
{
ArrayList
<
CheckId
>
deps
=
new
ArrayList
<>();
...
...
@@ -56,10 +53,6 @@ public class NullAreaCheck extends Check {
deps
.
add
(
CheckId
.
C_GE_R_NOT_CLOSED
);
deps
.
add
(
CheckId
.
C_GE_R_DUPLICATE_POINT
);
dependencies
=
Collections
.
unmodifiableList
(
deps
);
ArrayList
<
DefaultParameter
>
defParameters
=
new
ArrayList
<>();
defParameters
.
add
(
new
DefaultParameter
(
DELTA_NAME
,
"0.0001"
,
Unit
.
SQUARE_METER
));
defaultParameters
=
Collections
.
unmodifiableList
(
defParameters
);
}
private
double
delta
=
0.0001
;
...
...
@@ -71,11 +64,6 @@ public class NullAreaCheck extends Check {
}
}
@Override
public
List
<
DefaultParameter
>
getDefaultParameter
()
{
return
defaultParameters
;
}
@Override
public
void
check
(
LinearRing
lr
)
{
boolean
areaIsNull
=
checkWithDistanceToRegressionLine
(
lr
,
delta
);
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/PlanarCheck.java
View file @
cd494d75
...
...
@@ -29,11 +29,9 @@ import de.hft.stuttgart.citydoctor2.check.Check;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckResult
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.check.DefaultParameter
;
import
de.hft.stuttgart.citydoctor2.check.Requirement
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.Unit
;
import
de.hft.stuttgart.citydoctor2.check.error.DegeneratedPolygonError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonDistancePlaneError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonNormalsDeviation
;
...
...
@@ -61,14 +59,13 @@ import de.hft.stuttgart.citydoctor2.tesselation.TesselatedPolygon;
*/
public
class
PlanarCheck
extends
Check
{
p
ublic
static
final
String
DISTANCE
=
"distance"
;
p
ublic
static
final
String
DISTANCE_TOLERANCE
=
"distanceTolerance"
;
p
ublic
static
final
String
ANGLE_TOLERANCE
=
"angleTolerance"
;
p
ublic
static
final
String
TYPE
=
"type"
;
p
ublic
static
final
String
DEGENERATED_POLYGON_TOLERANCE
=
"degeneratedPolygonTolerance"
;
p
rivate
static
final
String
DISTANCE
=
"distance"
;
p
rivate
static
final
String
DISTANCE_TOLERANCE
=
"distanceTolerance"
;
p
rivate
static
final
String
ANGLE_TOLERANCE
=
"angleTolerance"
;
p
rivate
static
final
String
TYPE
=
"type"
;
p
rivate
static
final
String
DEGENERATED_POLYGON_TOLERANCE
=
"degeneratedPolygonTolerance"
;
private
static
final
List
<
CheckId
>
dependencies
;
private
static
final
List
<
DefaultParameter
>
defaultParameters
;
static
{
ArrayList
<
CheckId
>
deps
=
new
ArrayList
<>(
4
);
...
...
@@ -77,14 +74,6 @@ public class PlanarCheck extends Check {
deps
.
add
(
CheckId
.
C_GE_R_DUPLICATE_POINT
);
deps
.
add
(
CheckId
.
C_GE_R_SELF_INTERSECTION
);
dependencies
=
Collections
.
unmodifiableList
(
deps
);
ArrayList
<
DefaultParameter
>
defParameters
=
new
ArrayList
<>(
3
);
defParameters
.
add
(
new
DefaultParameter
(
TYPE
,
DISTANCE
,
Unit
.
NONE
));
defParameters
.
add
(
new
DefaultParameter
(
DISTANCE_TOLERANCE
,
"0.01"
,
Unit
.
METER
));
defParameters
.
add
(
new
DefaultParameter
(
ANGLE_TOLERANCE
,
"1"
,
Unit
.
DEGREE
));
defParameters
.
add
(
new
DefaultParameter
(
DEGENERATED_POLYGON_TOLERANCE
,
"0.00000"
,
Unit
.
METER
));
defaultParameters
=
Collections
.
unmodifiableList
(
defParameters
);
}
private
String
planarCheckType
=
DISTANCE
;
...
...
@@ -111,11 +100,6 @@ public class PlanarCheck extends Check {
}
}
@Override
public
List
<
DefaultParameter
>
getDefaultParameter
()
{
return
defaultParameters
;
}
@Override
public
void
check
(
Polygon
p
)
{
if
(
DISTANCE
.
equals
(
planarCheckType
))
{
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/semantics/IsWallCheck.java
View file @
cd494d75
...
...
@@ -27,11 +27,9 @@ import java.util.Set;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckResult
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.check.DefaultParameter
;
import
de.hft.stuttgart.citydoctor2.check.Requirement
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.Unit
;
import
de.hft.stuttgart.citydoctor2.check.error.NotWallError
;
import
de.hft.stuttgart.citydoctor2.checks.util.CollectionUtils
;
import
de.hft.stuttgart.citydoctor2.datastructure.BoundarySurface
;
...
...
@@ -55,7 +53,6 @@ public class IsWallCheck extends Check {
private
static
final
String
UPPER_ANGLE_NAME
=
"upperAngle"
;
private
static
final
List
<
CheckId
>
dependencies
;
private
static
final
List
<
DefaultParameter
>
defaultParameters
;
static
{
ArrayList
<
CheckId
>
deps
=
new
ArrayList
<>();
...
...
@@ -66,10 +63,6 @@ public class IsWallCheck extends Check {
deps
.
add
(
CheckId
.
C_GE_P_NON_PLANAR
);
dependencies
=
Collections
.
unmodifiableList
(
deps
);
ArrayList
<
DefaultParameter
>
defParameters
=
new
ArrayList
<>(
3
);
defParameters
.
add
(
new
DefaultParameter
(
LOWER_ANGLE_NAME
,
"45"
,
Unit
.
DEGREE
));
defParameters
.
add
(
new
DefaultParameter
(
UPPER_ANGLE_NAME
,
"135"
,
Unit
.
DEGREE
));
defaultParameters
=
Collections
.
unmodifiableList
(
defParameters
);
}
private
static
final
Vector3d
Z_AXIS
=
new
Vector3d
(
0
,
0
,
1
);
...
...
@@ -140,11 +133,6 @@ public class IsWallCheck extends Check {
return
CollectionUtils
.
singletonSet
(
Requirement
.
R_SE_BS_IS_WALL
);
}
@Override
public
List
<
DefaultParameter
>
getDefaultParameter
()
{
return
defaultParameters
;
}
@Override
public
RequirementType
getType
()
{
return
RequirementType
.
SEMANTIC
;
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/semantics/RoofSurfaceUnfragmentedCheck.java
View file @
cd494d75
...
...
@@ -27,10 +27,8 @@ import java.util.Set;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckResult
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
import
de.hft.stuttgart.citydoctor2.check.DefaultParameter
;
import
de.hft.stuttgart.citydoctor2.check.Requirement
;
import
de.hft.stuttgart.citydoctor2.check.
Unit
;
import
de.hft.stuttgart.citydoctor2.check.
RequirementType
;
import
de.hft.stuttgart.citydoctor2.checks.util.CollectionUtils
;
import
de.hft.stuttgart.citydoctor2.checks.util.UnfragmentedCheck
;
import
de.hft.stuttgart.citydoctor2.datastructure.BoundarySurface
;
...
...
@@ -46,17 +44,12 @@ import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
public
class
RoofSurfaceUnfragmentedCheck
extends
Check
{
private
static
final
List
<
CheckId
>
dependencies
;
private
static
final
List
<
DefaultParameter
>
defaultParameters
;
private
static
final
String
MAX_ANGLE_DEVIATION
=
"maxAngleDeviation"
;
private
double
maxAngleDeviation
=
Math
.
toRadians
(
1
);
static
{
ArrayList
<
DefaultParameter
>
defParameters
=
new
ArrayList
<>(
3
);
defParameters
.
add
(
new
DefaultParameter
(
MAX_ANGLE_DEVIATION
,
"1"
,
Unit
.
DEGREE
));
defaultParameters
=
Collections
.
unmodifiableList
(
defParameters
);
ArrayList
<
CheckId
>
deps
=
new
ArrayList
<>();
deps
.
add
(
CheckId
.
C_GE_R_TOO_FEW_POINTS
);
deps
.
add
(
CheckId
.
C_GE_R_NOT_CLOSED
);
...
...
@@ -90,11 +83,6 @@ public class RoofSurfaceUnfragmentedCheck extends Check {
return
dependencies
;
}
@Override
public
List
<
DefaultParameter
>
getDefaultParameter
()
{
return
defaultParameters
;
}
@Override
public
Set
<
Requirement
>
appliesToRequirements
()
{
return
CollectionUtils
.
singletonSet
(
Requirement
.
R_SE_BS_ROOF_UNFRAGMENTED
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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