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
7ebb95c1
Commit
7ebb95c1
authored
May 17, 2023
by
Matthias Betz
Browse files
Merge branch 'dev'
parents
84d3169f
75c0e581
Pipeline
#7499
passed with stage
in 1 minute and 13 seconds
Changes
56
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/QualityADEUtils.java
View file @
7ebb95c1
...
...
@@ -62,7 +62,7 @@ public class QualityADEUtils {
public
static
void
writeQualityAde
(
CityObject
co
,
Validation
val
)
{
ValidationResult
res
=
new
ValidationResult
();
res
.
setValidation
Plan
ID
(
new
Reference
(
val
));
res
.
setValidationID
(
new
Reference
(
val
));
if
(
co
.
isValidated
())
{
List
<
CheckError
>
errors
=
new
ArrayList
<>();
co
.
collectContainedErrors
(
errors
);
...
...
@@ -128,6 +128,8 @@ public class QualityADEUtils {
return
de
.
hft
.
stuttgart
.
quality
.
model
.
enums
.
ErrorId
.
SE_ATTRIBUTE_WRONG_VALUE
;
case
"SE_ATTRIBUTE_MISSING"
:
return
de
.
hft
.
stuttgart
.
quality
.
model
.
enums
.
ErrorId
.
SE_ATTRIBUTE_MISSING
;
case
"SE_ATTRIBUTE_INVALID"
:
return
de
.
hft
.
stuttgart
.
quality
.
model
.
enums
.
ErrorId
.
SE_ATTRIBUTE_INVALID
;
default
:
return
null
;
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/writer/CityGMLWriterUtils.java
View file @
7ebb95c1
...
...
@@ -28,6 +28,8 @@ import java.util.Set;
import
java.util.UUID
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.citygml4j.core.model.CityGMLVersion
;
import
org.citygml4j.core.model.core.AbstractCityObjectProperty
;
import
org.citygml4j.core.model.core.AbstractFeatureProperty
;
...
...
@@ -37,6 +39,7 @@ import org.citygml4j.xml.CityGMLContext;
import
org.citygml4j.xml.writer.CityGMLOutputFactory
;
import
org.citygml4j.xml.writer.CityGMLWriteException
;
import
org.citygml4j.xml.writer.CityGMLWriter
;
import
org.xmlobjects.gml.model.base.Reference
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
...
...
@@ -50,13 +53,17 @@ import de.hft.stuttgart.quality.QualityADEModule;
import
de.hft.stuttgart.quality.model.properties.ErrorProperty
;
import
de.hft.stuttgart.quality.model.properties.FeatureStatisticsProperty
;
import
de.hft.stuttgart.quality.model.properties.StatisticsProperty
;
import
de.hft.stuttgart.quality.model.properties.ValidationPlanProperty
;
import
de.hft.stuttgart.quality.model.types.FeatureStatistics
;
import
de.hft.stuttgart.quality.model.types.Statistics
;
import
de.hft.stuttgart.quality.model.types.Validation
;
public
class
CityGMLWriterUtils
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
CityGMLWriterUtils
.
class
);
private
CityGMLWriterUtils
()
{
}
public
static
void
writeCityModel
(
String
file
,
CityDoctorModel
model
)
throws
CityDoctorWriteException
{
CityGMLContext
gmlContext
=
CityGmlParser
.
getContext
();
CityModel
cModel
=
model
.
getCityModel
();
...
...
@@ -75,6 +82,7 @@ public class CityGMLWriterUtils {
// add to city model
cModel
.
getFeatureMembers
().
add
(
new
AbstractFeatureProperty
(
val
));
cModel
.
getFeatureMembers
().
add
(
new
AbstractFeatureProperty
(
model
.
getValidationPlan
()));
}
GeometryFactory
gmlFactory
=
GeometryFactory
.
newInstance
();
storeCityObjects
(
model
.
getBuildings
(),
gmlFactory
,
model
,
cModel
,
val
);
...
...
@@ -113,6 +121,7 @@ public class CityGMLWriterUtils {
de
.
hft
.
stuttgart
.
quality
.
model
.
enums
.
ErrorId
adeId
=
QualityADEUtils
.
mapErrorIdToAdeId
(
e
.
getKey
());
if
(
adeId
==
null
)
{
// error that is not part of the ade standard
logger
.
warn
(
"Found error {} that cannot be converted to ADE error. It will not be written"
,
e
.
getKey
());
continue
;
}
stats
.
setName
(
adeId
);
...
...
@@ -125,7 +134,7 @@ public class CityGMLWriterUtils {
statistics
.
setNumErrorVegetation
(
new
FeatureStatisticsProperty
(
countValidatedCityObjects
(
model
.
getVegetation
())));
statistics
.
setNumErrorWaterObjects
(
new
FeatureStatisticsProperty
(
countValidatedCityObjects
(
model
.
getWater
())));
val
.
setStatistics
(
new
StatisticsProperty
(
statistics
));
val
.
setValidationPlan
(
new
ValidationPlanProperty
(
model
.
getValidationPlan
()));
val
.
setValidationPlan
(
new
Reference
(
model
.
getValidationPlan
()));
return
val
;
}
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/check/CheckTest.java
View file @
7ebb95c1
...
...
@@ -184,16 +184,16 @@ public class CheckTest {
};
Building
b
=
new
Building
();
assertTrue
(
c2
.
canExecute
(
b
));
b
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
new
AttributeMissingError
(
b
,
null
,
null
,
false
)));
new
AttributeMissingError
(
b
,
null
,
null
)));
assertEquals
(
1
,
b
.
getAllCheckResults
().
size
());
assertTrue
(
b
.
getAllCheckResults
().
containsKey
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
));
assertFalse
(
c2
.
canExecute
(
b
));
assertEquals
(
2
,
b
.
getAllCheckResults
().
size
());
assertTrue
(
b
.
getAllCheckResults
().
containsKey
(
CheckId
.
C_GE_P_INNER_RINGS_NESTED
));
assertFalse
(
c2
.
canExecute
(
b
));
Vegetation
veg
=
new
Vegetation
(
VegetationType
.
PLANT_COVER
);
assertFalse
(
c2
.
canExecute
(
veg
));
}
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/check/CheckableTest.java
View file @
7ebb95c1
...
...
@@ -109,14 +109,14 @@ public class CheckableTest {
assertFalse
(
b
.
containsError
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
));
assertFalse
(
b
.
containsAnyError
());
geom
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
new
SchematronError
(
null
,
null
,
null
,
null
,
false
)));
new
SchematronError
(
null
,
null
,
null
,
null
)));
assertTrue
(
b
.
containsAnyError
());
assertTrue
(
b
.
containsError
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
));
geom
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_INNER_RINGS_NESTED
,
ResultStatus
.
DEPENDENCIES_NOT_MET
,
new
SchematronError
(
null
,
null
,
null
,
null
,
false
)));
new
SchematronError
(
null
,
null
,
null
,
null
)));
assertTrue
(
b
.
containsError
(
CheckId
.
C_GE_P_INNER_RINGS_NESTED
));
geom
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_INTERIOR_DISCONNECTED
,
ResultStatus
.
OK
,
new
SchematronError
(
null
,
null
,
null
,
null
,
false
)));
new
SchematronError
(
null
,
null
,
null
,
null
)));
assertFalse
(
b
.
containsError
(
CheckId
.
C_GE_P_INTERIOR_DISCONNECTED
));
}
...
...
@@ -131,7 +131,7 @@ public class CheckableTest {
public
void
testContainsAnyErrorError
()
{
Building
b
=
new
Building
();
b
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
new
SchematronError
(
null
,
null
,
null
,
null
,
false
)));
new
SchematronError
(
null
,
null
,
null
,
null
)));
assertTrue
(
b
.
containsAnyError
());
}
...
...
@@ -139,7 +139,7 @@ public class CheckableTest {
public
void
testContainsAnyErrorDependencyNotMetError
()
{
Building
b
=
new
Building
();
b
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
DEPENDENCIES_NOT_MET
,
new
SchematronError
(
null
,
null
,
null
,
null
,
false
)));
new
SchematronError
(
null
,
null
,
null
,
null
)));
assertTrue
(
b
.
containsAnyError
());
}
...
...
@@ -155,7 +155,7 @@ public class CheckableTest {
public
void
hasDependencyNotMetErrorError
()
{
Building
b
=
new
Building
();
b
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
new
SchematronError
(
null
,
null
,
null
,
null
,
false
)));
new
SchematronError
(
null
,
null
,
null
,
null
)));
assertFalse
(
b
.
hasDependencyNotMetError
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
));
}
...
...
@@ -165,11 +165,11 @@ public class CheckableTest {
Geometry
geom
=
new
Geometry
(
GeometryType
.
SOLID
,
Lod
.
LOD0
);
b
.
addGeometry
(
geom
);
b
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
new
SchematronError
(
null
,
null
,
null
,
null
,
false
)));
new
SchematronError
(
null
,
null
,
null
,
null
)));
geom
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_INNER_RINGS_NESTED
,
ResultStatus
.
DEPENDENCIES_NOT_MET
,
new
SchematronError
(
null
,
null
,
null
,
null
,
false
)));
new
SchematronError
(
null
,
null
,
null
,
null
)));
geom
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_INTERIOR_DISCONNECTED
,
ResultStatus
.
ERROR
,
new
SchematronError
(
null
,
null
,
null
,
null
,
false
)));
new
SchematronError
(
null
,
null
,
null
,
null
)));
List
<
CheckError
>
errors
=
new
ArrayList
<>();
b
.
collectContainedErrors
(
errors
);
assertEquals
(
2
,
errors
.
size
());
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/check/error/AttributeInvalidErrorTest.java
0 → 100644
View file @
7ebb95c1
/*-
* Copyright 2022 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package
de.hft.stuttgart.citydoctor2.check.error
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.util.List
;
import
org.junit.Test
;
import
de.hft.stuttgart.citydoctor2.check.QualityAdeErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.datastructure.Building
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlId
;
import
de.hft.stuttgart.quality.model.properties.AbstractErrorProperty
;
import
de.hft.stuttgart.quality.model.types.AbstractError
;
import
de.hft.stuttgart.quality.model.types.SemanticAttributeInvalidError
;
import
de.hft.stuttgart.quality.model.types.ValidationResult
;
public
class
AttributeInvalidErrorTest
{
@Test
public
void
testConvertToQualityAdeDatastructure
()
{
Building
b
=
new
Building
();
GmlId
id
=
new
GmlId
(
"testid"
);
b
.
setGmlId
(
id
);
AttributeInvalidError
err
=
new
AttributeInvalidError
(
b
,
"childid"
,
"attr"
);
ValidationResult
result
=
new
ValidationResult
();
QualityAdeErrorVisitor
visitor
=
new
QualityAdeErrorVisitor
(
result
);
err
.
accept
(
visitor
);
List
<
AbstractErrorProperty
>
errors
=
result
.
getErrors
();
assertEquals
(
1
,
errors
.
size
());
AbstractError
validationError
=
errors
.
get
(
0
).
getObject
();
assertTrue
(
validationError
instanceof
SemanticAttributeInvalidError
);
SemanticAttributeInvalidError
adeErr
=
(
SemanticAttributeInvalidError
)
validationError
;
assertEquals
(
"childid"
,
adeErr
.
getChildId
());
assertEquals
(
"attr"
,
adeErr
.
getAttributeName
());
}
}
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/check/error/AttributeMissingErrorTest.java
View file @
7ebb95c1
...
...
@@ -19,7 +19,6 @@
package
de.hft.stuttgart.citydoctor2.check.error
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.util.List
;
...
...
@@ -41,7 +40,7 @@ public class AttributeMissingErrorTest {
Building
b
=
new
Building
();
GmlId
id
=
new
GmlId
(
"testid"
);
b
.
setGmlId
(
id
);
AttributeMissingError
err
=
new
AttributeMissingError
(
b
,
"childid"
,
"attr"
,
false
);
AttributeMissingError
err
=
new
AttributeMissingError
(
b
,
"childid"
,
"attr"
);
ValidationResult
result
=
new
ValidationResult
();
QualityAdeErrorVisitor
visitor
=
new
QualityAdeErrorVisitor
(
result
);
...
...
@@ -54,7 +53,6 @@ public class AttributeMissingErrorTest {
SemanticAttributeMissingError
adeErr
=
(
SemanticAttributeMissingError
)
validationError
;
assertEquals
(
"childid"
,
adeErr
.
getChildId
());
assertEquals
(
"attr"
,
adeErr
.
getAttributeName
());
assertFalse
(
adeErr
.
isGeneric
());
}
}
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/check/error/AttributeValueWrongErrorTest.java
View file @
7ebb95c1
...
...
@@ -19,7 +19,6 @@
package
de.hft.stuttgart.citydoctor2.check.error
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.util.List
;
...
...
@@ -41,7 +40,7 @@ public class AttributeValueWrongErrorTest {
Building
b
=
new
Building
();
GmlId
id
=
new
GmlId
(
"testid"
);
b
.
setGmlId
(
id
);
AttributeValueWrongError
err
=
new
AttributeValueWrongError
(
b
,
"childid"
,
"attr"
,
false
);
AttributeValueWrongError
err
=
new
AttributeValueWrongError
(
b
,
"childid"
,
"attr"
);
ValidationResult
result
=
new
ValidationResult
();
QualityAdeErrorVisitor
visitor
=
new
QualityAdeErrorVisitor
(
result
);
...
...
@@ -54,7 +53,6 @@ public class AttributeValueWrongErrorTest {
SemanticAttributeWrongValueError
adeErr
=
(
SemanticAttributeWrongValueError
)
validationError
;
assertEquals
(
"childid"
,
adeErr
.
getChildId
());
assertEquals
(
"attr"
,
adeErr
.
getAttributeName
());
assertFalse
(
adeErr
.
isGeneric
());
}
}
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModelTest.java
View file @
7ebb95c1
...
...
@@ -25,6 +25,7 @@ import java.io.File;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.UUID
;
import
org.citygml4j.core.ade.ADEException
;
import
org.citygml4j.core.model.core.AbstractFeatureProperty
;
...
...
@@ -139,7 +140,7 @@ public class CityDoctorModelTest {
b
.
setGmlObject
(
gmlBuilding
);
model
.
addBuilding
(
b
);
File
saveFile
=
folder
.
newFile
();
model
.
saveAs
(
saveFile
.
getAbsolutePath
());
model
.
saveAs
(
saveFile
.
getAbsolutePath
()
,
true
);
assertTrue
(
saveFile
.
exists
());
assertTrue
(
saveFile
.
length
()
>
0
);
...
...
@@ -157,6 +158,8 @@ public class CityDoctorModelTest {
CityDoctorModel
model
=
new
CityDoctorModel
(
config
,
f
);
CityModel
cModel
=
new
CityModel
();
ValidationPlan
plan
=
new
ValidationPlan
();
plan
.
setId
(
"CD_PLAN_"
+
UUID
.
randomUUID
().
toString
());
// cModel.getFeatureMembers().add(new AbstractFeatureProperty(plan));
GlobalParameters
globParams
=
new
GlobalParameters
();
plan
.
setGlobalParameters
(
new
GlobalParametersProperty
(
globParams
));
plan
.
getGlobalParameters
().
getObject
().
getParameters
().
add
(
new
ParameterProperty
(
new
Parameter
()));
...
...
@@ -203,7 +206,7 @@ public class CityDoctorModelTest {
b
.
setGmlObject
(
gmlBuilding
);
model
.
addBuilding
(
b
);
File
saveFile
=
folder
.
newFile
();
model
.
saveAs
(
saveFile
.
getAbsolutePath
());
model
.
saveAs
(
saveFile
.
getAbsolutePath
()
,
true
);
assertTrue
(
saveFile
.
exists
());
assertTrue
(
saveFile
.
length
()
>
0
);
...
...
@@ -214,11 +217,16 @@ public class CityDoctorModelTest {
List
<
CityObjectProperties
>
props
=
parsedBuilding
.
getGmlObject
().
getADEProperties
(
CityObjectProperties
.
class
);
assertEquals
(
1
,
props
.
size
());
List
<
AbstractFeatureProperty
>
featureMembers
=
parsedModel
.
getCityModel
().
getFeatureMembers
();
assertEquals
(
1
,
featureMembers
.
size
());
assertEquals
(
2
,
featureMembers
.
size
());
Validation
val
=
(
Validation
)
featureMembers
.
get
(
0
).
getObject
();
de
.
hft
.
stuttgart
.
quality
.
model
.
types
.
Error
errorStatistics
=
val
.
getStatistics
().
getObject
().
getErrors
().
get
(
0
).
getObject
();
assertEquals
(
de
.
hft
.
stuttgart
.
quality
.
model
.
enums
.
ErrorId
.
GE_P_HOLE_OUTSIDE
,
errorStatistics
.
getName
());
assertEquals
(
1
,
errorStatistics
.
getOccurrences
());
ValidationPlan
resultPlan
=
(
ValidationPlan
)
featureMembers
.
get
(
1
).
getObject
();
assertEquals
(
val
.
getValidationPlan
().
getHref
().
substring
(
1
),
resultPlan
.
getId
());
}
@Test
...
...
CityDoctorParent/CityDoctorValidation/checkForSolid.xml
View file @
7ebb95c1
...
...
@@ -5,10 +5,10 @@
<pattern>
<rule
context=
"//*:Building"
>
<assert
test=
"count(descendant::*:lod1Solid) > 0 or count(descendant::*:lod2Solid) > 0 or count(descendant::*:lod3Solid) > 0 or count(descendant::*:lod4Solid) > 0"
><value-of
select=
"@gml:id | @id"
/>
||||SE_ATTRIBUTE_MISSING||
lodX
solid
||false
</assert>
<assert
test=
"count(descendant::*:lod1Solid) > 0 or count(descendant::*:lod2Solid) > 0 or count(descendant::*:lod3Solid) > 0 or count(descendant::*:lod4Solid) > 0"
><value-of
select=
"@gml:id | @id"
/>
||||SE_ATTRIBUTE_MISSING||
any
solid
</assert>
</rule>
<rule
context=
"//*:BuildingPart"
>
<assert
test=
"count(*:lod1Solid) = 1 or count(*:lod2Solid) = 1 or count(*:lod3Solid) = 1 or count(*:lod4Solid) = 1"
><value-of
select=
"ancestor::*:Building/@*:id"
/>
||
<value-of
select=
"@gml:id | @id"
/>
||SE_ATTRIBUTE_MISSING||
lodX
solid
||false
</assert>
<assert
test=
"count(*:lod1Solid) = 1 or count(*:lod2Solid) = 1 or count(*:lod3Solid) = 1 or count(*:lod4Solid) = 1"
><value-of
select=
"ancestor::*:Building/@*:id"
/>
||
<value-of
select=
"@gml:id | @id"
/>
||SE_ATTRIBUTE_MISSING||
any
solid
</assert>
</rule>
</pattern>
</schema>
CityDoctorParent/CityDoctorValidation/pom.xml
View file @
7ebb95c1
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"https://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"https://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
de.hft.stuttgart
</groupId>
<artifactId>
CityDoctorParent
</artifactId>
<version>
3.1
2
.0
</version>
<version>
3.1
3
.0
</version>
</parent>
<artifactId>
CityDoctorValidation
</artifactId>
<name>
CityDoctorValidation
</name>
<description>
validation part of city doctor containg all checks
</description>
<description>
validation part of city doctor contain
in
g all checks
</description>
<dependencies>
<dependency>
<groupId>
de.hft.stuttgart
</groupId>
...
...
@@ -23,10 +21,6 @@
<groupId>
de.hft.stuttgart
</groupId>
<artifactId>
CityDoctorCheckResult
</artifactId>
</dependency>
<dependency>
<groupId>
net.sf.saxon
</groupId>
<artifactId>
Saxon-HE
</artifactId>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
...
...
@@ -40,6 +34,10 @@
<groupId>
xml-apis
</groupId>
<artifactId>
xml-apis
</artifactId>
</exclusion>
<exclusion>
<groupId>
xalan
</groupId>
<artifactId>
xalan
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
...
...
@@ -62,6 +60,17 @@
<groupId>
de.hft.stuttgart
</groupId>
<artifactId>
citygml4j-quality-ade
</artifactId>
</dependency>
<dependency>
<groupId>
name.dmaus.schxslt
</groupId>
<artifactId>
schxslt
</artifactId>
<version>
1.9.5
</version>
</dependency>
<dependency>
<groupId>
net.sf.saxon
</groupId>
<artifactId>
Saxon-HE
</artifactId>
</dependency>
<!--
-->
</dependencies>
<build>
...
...
@@ -75,28 +84,150 @@
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-jar-plugin
</artifactId>
<version>
3.2.0
</version>
</plugin>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<configuration>
<appendAssemblyId>
false
</appendAssemblyId>
<finalName>
${project.artifactId}-${project.version}
</finalName>
<descriptors>
<descriptor>
${project.basedir}/src/assembly/assembly.xml
</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>
create-archive
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
</execution>
</executions>
<version>
3.3.0
</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>
create-binaries
</id>
<properties>
<win-jre>
jre-17.0.7
</win-jre>
<lin-jre>
jre-17.0.7
</lin-jre>
<mac-jre>
jre-17.0.7.jre
</mac-jre>
</properties>
<build>
<plugins>
<plugin>
<groupId>
com.googlecode.maven-download-plugin
</groupId>
<artifactId>
download-maven-plugin
</artifactId>
<version>
1.7.0
</version>
<executions>
<execution>
<id>
downloadWindowsJre
</id>
<phase>
install
</phase>
<goals>
<goal>
wget
</goal>
</goals>
<configuration>
<uri>
https://download.bell-sw.com/java/17.0.7+7/bellsoft-jre17.0.7+7-windows-amd64.zip
</uri>
<unpack>
false
</unpack>
<outputDirectory>
${project.build.directory}/jre/jre-win
</outputDirectory>
<outputFileName>
win-runtime.zip
</outputFileName>
</configuration>
</execution>
<execution>
<id>
downloadLinuxJre
</id>
<phase>
install
</phase>
<goals>
<goal>
wget
</goal>
</goals>
<configuration>
<uri>
https://download.bell-sw.com/java/17.0.7+7/bellsoft-jre17.0.7+7-linux-amd64.tar.gz
</uri>
<unpack>
false
</unpack>
<outputDirectory>
${project.build.directory}/jre/jre-lin
</outputDirectory>
<outputFileName>
lin-runtime.tar.gz
</outputFileName>
</configuration>
</execution>
<execution>
<id>
downloadMacJre
</id>
<phase>
install
</phase>
<goals>
<goal>
wget
</goal>
</goals>
<configuration>
<uri>
https://download.bell-sw.com/java/17.0.7+7/bellsoft-jre17.0.7+7-macos-amd64.zip
</uri>
<unpack>
false
</unpack>
<outputDirectory>
${project.build.directory}/jre/jre-mac
</outputDirectory>
<outputFileName>
mac-runtime.zip
</outputFileName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-antrun-plugin
</artifactId>
<version>
3.1.0
</version>
<executions>
<execution>
<id>
unpack
</id>
<phase>
install
</phase>
<configuration>
<target
name=
"unpack"
>
<untar
src=
"${project.build.directory}/jre/jre-lin/lin-runtime.tar.gz"
dest=
"${project.build.directory}/jre/jre-lin/runtime"
compression=
"gzip"
/>
<unzip
src=
"${project.build.directory}/jre/jre-win/win-runtime.zip"
dest=
"${project.build.directory}/jre/jre-win/runtime"
/>
<unzip
src=
"${project.build.directory}/jre/jre-mac/mac-runtime.zip"
dest=
"${project.build.directory}/jre/jre-mac/runtime"
/>
</target>
</configuration>
<goals>
<goal>
run
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<configuration>
<appendAssemblyId>
false
</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>
create-archive-no-runtime
</id>
<phase>
install
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<finalName>
${project.artifactId}-${project.version}-no-runtime
</finalName>
<descriptors>
<descriptor>
${project.basedir}/src/assembly/no_runtime/assembly.xml
</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>
create-archive-win
</id>
<phase>
install
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<finalName>
${project.artifactId}-${project.version}-win
</finalName>
<descriptors>
<descriptor>
${project.basedir}/src/assembly/win/assembly.xml
</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>
create-archive-lin
</id>
<phase>
install
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<finalName>
${project.artifactId}-${project.version}-lin
</finalName>
<descriptors>
<descriptor>
${project.basedir}/src/assembly/lin/assembly.xml
</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>
create-archive-mac
</id>
<phase>
install
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<finalName>
${project.artifactId}-${project.version}-mac
</finalName>
<descriptors>
<descriptor>
${project.basedir}/src/assembly/mac/assembly.xml
</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/assembly/REKaiserwall.gml
→
CityDoctorParent/CityDoctorValidation/src/assembly/
common/
REKaiserwall.gml
View file @
7ebb95c1
File moved
CityDoctorParent/CityDoctorValidation/src/assembly/checkForSolid.xml
→
CityDoctorParent/CityDoctorValidation/src/assembly/
common/
checkForSolid.xml
View file @
7ebb95c1
...
...
@@ -5,10 +5,10 @@
<pattern>
<rule
context=
"//*:Building"
>
<assert
test=
"count(descendant::*:lod1Solid) > 0 or count(descendant::*:lod2Solid) > 0 or count(descendant::*:lod3Solid) > 0 or count(descendant::*:lod4Solid) > 0"
><value-of
select=
"@gml:id | @id"
/>
||||SE_ATTRIBUTE_MISSING||any solid
||false
</assert>
<assert
test=
"count(descendant::*:lod1Solid) > 0 or count(descendant::*:lod2Solid) > 0 or count(descendant::*:lod3Solid) > 0 or count(descendant::*:lod4Solid) > 0"
><value-of
select=
"@gml:id | @id"
/>
||||SE_ATTRIBUTE_MISSING||any solid
</assert>
</rule>
<rule
context=
"//*:BuildingPart"
>
<assert
test=
"count(*:lod1Solid) = 1 or count(*:lod2Solid) = 1 or count(*:lod3Solid) = 1 or count(*:lod4Solid) = 1"
><value-of
select=
"ancestor::*:Building/@*:id"
/>
||
<value-of
select=
"@gml:id | @id"
/>
||SE_ATTRIBUTE_MISSING||any solid
||false
</assert>
<assert
test=
"count(*:lod1Solid) = 1 or count(*:lod2Solid) = 1 or count(*:lod3Solid) = 1 or count(*:lod4Solid) = 1"
><value-of
select=
"ancestor::*:Building/@*:id"
/>
||
<value-of
select=
"@gml:id | @id"
/>
||SE_ATTRIBUTE_MISSING||any solid
</assert>
</rule>
</pattern>
</schema>
CityDoctorParent/CityDoctorValidation/src/assembly/testConfigWithStreaming.yml
→
CityDoctorParent/CityDoctorValidation/src/assembly/
common/
testConfigWithStreaming.yml
View file @
7ebb95c1
File moved
CityDoctorParent/CityDoctorValidation/src/assembly/lin/assembly.xml
0 → 100644
View file @
7ebb95c1
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<id>
zip
</id>
<formats>
<format>
zip
</format>
</formats>
<includeBaseDirectory>
false
</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>
app
</outputDirectory>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>
${project.basedir}/src/assembly/lin
</directory>
<outputDirectory>
/
</outputDirectory>
<includes>
<include>
start.sh
</include>
</includes>
<filtered>
true
</filtered>
</fileSet>
<fileSet>
<directory>
${project.basedir}/src/assembly/common
</directory>
<outputDirectory>
/
</outputDirectory>
<includes>
<include>
testConfigWithStreaming.yml
</include>
<include>
REKaiserwall.gml
</include>
<include>
checkForSolid.xml
</include>
</includes>
<filtered>
false
</filtered>
</fileSet>
<fileSet>
<directory>
${project.build.directory}/jre/jre-lin/runtime/${lin-jre}/
</directory>
<outputDirectory>
/runtime
</outputDirectory>
<includes>
<include>
**/*
</include>
</includes>
<filtered>
false
</filtered>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/assembly/lin/start.sh
0 → 100644
View file @
7ebb95c1
#!/bin/sh
./runtime/bin/java
-classpath
app/
*
:plugin/
*
de.hft.stuttgart.citydoctor2.CityDoctorValidation
-in
REKaiserwall.gml
-config
testConfigWithStreaming.yml
-xmlReport
output.xml
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/assembly/mac/assembly.xml
0 → 100644
View file @
7ebb95c1
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<id>
zip
</id>
<formats>
<format>
zip
</format>
</formats>
<includeBaseDirectory>
false
</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>
app
</outputDirectory>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>
${project.basedir}/src/assembly/lin
</directory>
<outputDirectory>
/
</outputDirectory>
<includes>
<include>
start.sh
</include>
</includes>
<filtered>
true
</filtered>
</fileSet>
<fileSet>
<directory>
${project.basedir}/src/assembly/common
</directory>
<outputDirectory>
/
</outputDirectory>
<includes>
<include>
testConfigWithStreaming.yml
</include>
<include>
REKaiserwall.gml
</include>
<include>
checkForSolid.xml
</include>
</includes>
<filtered>
false
</filtered>
</fileSet>
<fileSet>
<directory>
${project.build.directory}/jre/jre-mac/runtime/${mac-jre}/
</directory>
<outputDirectory>
/runtime
</outputDirectory>
<includes>
<include>
**/*
</include>
</includes>
<filtered>
false
</filtered>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/assembly/assembly.xml
→
CityDoctorParent/CityDoctorValidation/src/assembly/
no_runtime/
assembly.xml
View file @
7ebb95c1
...
...
@@ -9,30 +9,28 @@
<includeBaseDirectory>
false
</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>
libs
</outputDirectory>
<excludes>
<exclude>
${project.groupId}:${project.artifactId}:jar:*
</exclude>
</excludes>
<outputDirectory>
app
</outputDirectory>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>
${project.b
uild.directory}
</directory>
<directory>
${project.b
asedir}/src/assembly/no_runtime
</directory>
<outputDirectory>
/
</outputDirectory>
<includes>
<include>
${project.artifactId}-${project.version}.jar
</include>
<include>
start.bat
</include>
<include>
start.sh
</include>
</includes>
<filtered>
true
</filtered>
</fileSet>
<fileSet>
<directory>
${project.basedir}/src/assembly
</directory>
<directory>
${project.basedir}/src/assembly
/common
</directory>
<outputDirectory>
/
</outputDirectory>
<includes>
<include>
start.bat
</include>
<include>
testConfigWithStreaming.yml
</include>
<include>
REKaiserwall.gml
</include>
<include>
checkForSolid.xml
</include>
</includes>
<filtered>
tru
e
</filtered>
<filtered>
fals
e
</filtered>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/assembly/no_runtime/start.bat
0 → 100644
View file @
7ebb95c1
java
-classpath
app
/
*;
plugin
/
*
de
.hft.stuttgart.citydoctor2.CityDoctorValidation
-in
REKaiserwall
.gml
-config
testConfigWithStreaming
.yml
-xmlReport
output
.xml
pause
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/assembly/no_runtime/start.sh
0 → 100644
View file @
7ebb95c1
#!/bin/sh
java
-classpath
app/
*
:plugin/
*
de.hft.stuttgart.citydoctor2.CityDoctorValidation
-in
REKaiserwall.gml
-config
testConfigWithStreaming.yml
-xmlReport
output.xml
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/assembly/start.bat
deleted
100644 → 0
View file @
84d3169f
java
-classpath
libs
/
*;
plugins
/
*;
$
{
project
.artifactId
}-
$
{
project
.version
}
.jar
de
.hft.stuttgart.citydoctor2.CityDoctorValidation
-in
REKaiserwall
.gml
-config
testConfigWithStreaming
.yml
-xmlReport
output
.xml
pause
\ No newline at end of file
Prev
1
2
3
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