Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
59e8a24d
Commit
59e8a24d
authored
7 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Code cleaning. Ref
#69
parent
d06f29ab
master
107-opengl-view
dev
dev_bht
dev_cpp_code_conversion
dev_gui_features
dev_gui_features_zip_loading
3.16.0
3.15.0
archive/dev_gui_features_zip_loading
archive/dev_citygml3
archive/dev_GUI
2 merge requests
!8
Version 3.15.0
,
!6
Open source release of CityDoctorGUI and other extensions.
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java
+1
-9
...main/java/de/hft/stuttgart/citydoctor2/check/Checker.java
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Filter.java
+1
-0
.../main/java/de/hft/stuttgart/citydoctor2/check/Filter.java
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/StreamCityGmlConsumer.java
+2
-2
...ft/stuttgart/citydoctor2/check/StreamCityGmlConsumer.java
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/CheckPrototype.java
+1
-1
...a/de/hft/stuttgart/citydoctor2/checks/CheckPrototype.java
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/SvrlContentHandler.java
+10
-9
.../hft/stuttgart/citydoctor2/checks/SvrlContentHandler.java
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/util/FeatureCheckedListener.java
+1
-0
...tgart/citydoctor2/checks/util/FeatureCheckedListener.java
with
16 additions
and
21 deletions
+16
-21
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java
+
1
-
9
View file @
59e8a24d
...
...
@@ -43,7 +43,6 @@ import javax.xml.transform.Source;
import
javax.xml.transform.Transformer
;
import
javax.xml.transform.TransformerException
;
import
javax.xml.transform.TransformerFactory
;
import
javax.xml.transform.URIResolver
;
import
javax.xml.transform.dom.DOMResult
;
import
javax.xml.transform.dom.DOMSource
;
import
javax.xml.transform.sax.SAXResult
;
...
...
@@ -131,7 +130,6 @@ public class Checker {
* given or this checker has not validated anything, nothing is done.
*
* @param xmlOutput the output file location for the XML report. Can be null.
* @param model the model for which the report is written.
*/
public
void
writeXmlReport
(
String
xmlOutput
)
{
if
(!
model
.
isValidated
()
||
xmlOutput
==
null
)
{
...
...
@@ -437,13 +435,7 @@ public class Checker {
transformerFactory
.
setAttribute
(
XMLConstants
.
ACCESS_EXTERNAL_DTD
,
""
);
transformerFactory
.
setFeature
(
XMLConstants
.
FEATURE_SECURE_PROCESSING
,
true
);
transformerFactory
.
setURIResolver
(
new
URIResolver
()
{
@Override
public
Source
resolve
(
String
href
,
String
base
)
throws
TransformerException
{
return
new
StreamSource
(
Checker
.
class
.
getResourceAsStream
(
href
));
}
});
transformerFactory
.
setURIResolver
((
href
,
base
)
->
new
StreamSource
(
Checker
.
class
.
getResourceAsStream
(
href
)));
Source
dsdlXslSource
=
new
StreamSource
(
Checker
.
class
.
getResourceAsStream
(
"iso_dsdl_include.xsl"
));
Transformer
dsdlXslTransformer
=
transformerFactory
.
newTransformer
(
dsdlXslSource
);
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Filter.java
+
1
-
0
View file @
59e8a24d
...
...
@@ -27,6 +27,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.CityObject;
* @author Matthias Betz
*
*/
@FunctionalInterface
public
interface
Filter
{
/**
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/StreamCityGmlConsumer.java
+
2
-
2
View file @
59e8a24d
...
...
@@ -92,7 +92,7 @@ public class StreamCityGmlConsumer implements CityGmlConsumer {
gmlFactory
=
GeometryFactory
.
newInstance
();
val
=
new
Validation
();
val
.
setId
(
"CD"
+
UUID
.
randomUUID
()
.
toString
()
);
val
.
setId
(
"CD"
+
UUID
.
randomUUID
());
val
.
setValidationDate
(
ZonedDateTime
.
now
());
val
.
setValidationSoftware
(
"CityDoctor "
+
Localization
.
getText
(
Localization
.
VERSION
));
statistics
=
new
Statistics
();
...
...
@@ -182,7 +182,7 @@ public class StreamCityGmlConsumer implements CityGmlConsumer {
}
val
.
setStatistics
(
new
StatisticsProperty
(
statistics
));
ValidationPlan
validationPlan
=
c
.
createValidationPlan
();
validationPlan
.
setId
(
"CD_PLAN_"
+
UUID
.
randomUUID
()
.
toString
()
);
validationPlan
.
setId
(
"CD_PLAN_"
+
UUID
.
randomUUID
());
cm
.
getFeatureMembers
().
add
(
new
AbstractFeatureProperty
(
validationPlan
));
val
.
setValidationPlan
(
new
Reference
(
validationPlan
));
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/CheckPrototype.java
+
1
-
1
View file @
59e8a24d
...
...
@@ -38,7 +38,7 @@ import de.hft.stuttgart.citydoctor2.check.RequirementType;
*/
public
class
CheckPrototype
{
private
Check
c
;
private
final
Check
c
;
public
CheckPrototype
(
Check
c
)
{
this
.
c
=
c
;
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/SvrlContentHandler.java
+
10
-
9
View file @
59e8a24d
...
...
@@ -45,8 +45,8 @@ public class SvrlContentHandler implements ContentHandler {
private
StringBuilder
buffer
;
private
Map
<
String
,
List
<
SchematronError
>>
featureErrors
;
private
List
<
SchematronError
>
generalErrors
;
private
final
Map
<
String
,
List
<
SchematronError
>>
featureErrors
;
private
final
List
<
SchematronError
>
generalErrors
;
public
SvrlContentHandler
()
{
featureErrors
=
new
HashMap
<>();
...
...
@@ -65,22 +65,23 @@ public class SvrlContentHandler implements ContentHandler {
public
void
setDocumentLocator
(
Locator
locator
)
{
// not needed
}
@SuppressWarnings
(
"RedundantThrows"
)
@Override
public
void
startDocument
()
throws
SAXException
{
// not needed
}
@Override
@SuppressWarnings
(
"RedundantThrows"
)
@Override
public
void
endDocument
()
throws
SAXException
{
// not needed
}
@SuppressWarnings
(
"RedundantThrows"
)
@Override
public
void
startPrefixMapping
(
String
prefix
,
String
uri
)
throws
SAXException
{
// not needed
}
@SuppressWarnings
(
"RedundantThrows"
)
@Override
public
void
endPrefixMapping
(
String
prefix
)
throws
SAXException
{
// not needed
...
...
@@ -132,17 +133,17 @@ public class SvrlContentHandler implements ContentHandler {
buffer
.
append
(
ch
,
start
,
length
);
}
}
@SuppressWarnings
(
"RedundantThrows"
)
@Override
public
void
ignorableWhitespace
(
char
[]
ch
,
int
start
,
int
length
)
throws
SAXException
{
// not needed
}
@SuppressWarnings
(
"RedundantThrows"
)
@Override
public
void
processingInstruction
(
String
target
,
String
data
)
throws
SAXException
{
// not needed
}
@SuppressWarnings
(
"RedundantThrows"
)
@Override
public
void
skippedEntity
(
String
name
)
throws
SAXException
{
// not needed
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/util/FeatureCheckedListener.java
+
1
-
0
View file @
59e8a24d
...
...
@@ -26,6 +26,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.CityObject;
* @author Matthias Betz
*
*/
@FunctionalInterface
public
interface
FeatureCheckedListener
{
public
void
featureChecked
(
CityObject
co
);
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets