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
dfdf4b33
Commit
dfdf4b33
authored
Mar 21, 2022
by
Matthias Betz
Browse files
switch to java 17
add repository for citygml4j v3
parent
3c09e26b
Pipeline
#6019
failed with stage
in 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/parser/CityGmlParser.java
View file @
dfdf4b33
...
...
@@ -194,12 +194,10 @@ public class CityGmlParser {
List
<
ADEGenericElement
>
genericElements
=
new
ArrayList
<>();
while
(
reader
.
hasNext
())
{
CityGML
chunk
=
reader
.
nextFeature
();
if
(
chunk
instanceof
AbstractCityObject
)
{
AbstractCityObject
aco
=
(
AbstractCityObject
)
chunk
;
if
(
chunk
instanceof
AbstractCityObject
aco
)
{
aco
.
accept
(
mapper
);
acos
.
add
(
aco
);
}
else
if
(
chunk
instanceof
CityModel
)
{
CityModel
cModel
=
(
CityModel
)
chunk
;
}
else
if
(
chunk
instanceof
CityModel
cModel
)
{
((
CityModel
)
chunk
).
unsetCityObjectMember
();
// re-add all objects
for
(
AbstractCityObject
aco
:
acos
)
{
...
...
@@ -211,8 +209,8 @@ public class CityGmlParser {
cModel
.
addGenericADEElement
(
ele
);
}
mapper
.
setCityModel
(
cModel
);
}
else
if
(
chunk
instanceof
ADEGenericElement
)
{
genericElements
.
add
(
(
ADEGenericElement
)
chunk
);
}
else
if
(
chunk
instanceof
ADEGenericElement
ge
)
{
genericElements
.
add
(
ge
);
}
}
if
(
logger
.
isInfoEnabled
())
{
...
...
@@ -336,7 +334,7 @@ public class CityGmlParser {
}
}
p
ublic
static
String
getExtension
(
String
fileName
)
{
p
rivate
static
String
getExtension
(
String
fileName
)
{
char
ch
;
int
len
;
if
(
fileName
==
null
||
(
len
=
fileName
.
length
())
==
0
||
(
ch
=
fileName
.
charAt
(
len
-
1
))
==
'/'
||
ch
==
'\\'
...
...
@@ -426,8 +424,7 @@ public class CityGmlParser {
try
(
CityGMLReader
reader
=
inputFactory
.
createCityGMLReader
(
inputFile
))
{
while
(
reader
.
hasNext
())
{
CityGML
chunk
=
reader
.
nextFeature
();
if
(
chunk
instanceof
CityModel
)
{
CityModel
cModel
=
(
CityModel
)
chunk
;
if
(
chunk
instanceof
CityModel
cModel
)
{
unsetParsedCityObjectMembers
(
cModel
);
return
cModel
;
}
...
...
@@ -471,19 +468,17 @@ public class CityGmlParser {
writer
.
writeStartDocument
();
isInitialized
=
true
;
}
if
(
chunk
instanceof
AbstractCityObject
)
{
AbstractCityObject
ag
=
(
AbstractCityObject
)
chunk
;
if
(
chunk
instanceof
AbstractCityObject
ag
)
{
ag
.
accept
(
mapper
);
drainCityModel
(
model
,
cityObjectConsumer
);
writeAbstractCityObject
(
writer
,
ag
);
}
else
if
(
chunk
instanceof
CityModel
)
{
CityModel
cModel
=
(
CityModel
)
chunk
;
}
else
if
(
chunk
instanceof
CityModel
cModel
)
{
cModel
.
unsetCityObjectMember
();
mapper
.
setCityModel
(
cModel
);
cityObjectConsumer
.
accept
(
cModel
);
writeCityModel
(
writer
,
cityModelInfo
,
cModel
);
}
else
if
(
chunk
instanceof
AbstractFeature
&&
writer
!=
null
)
{
writer
.
writeFeatureMember
(
(
AbstractFeature
)
chunk
);
}
else
if
(
chunk
instanceof
AbstractFeature
af
&&
writer
!=
null
)
{
writer
.
writeFeatureMember
(
af
);
}
}
...
...
CityDoctorParent/pom.xml
View file @
dfdf4b33
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://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=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
de.hft.stuttgart
</groupId>
<artifactId>
CityDoctorParent
</artifactId>
...
...
@@ -10,8 +8,8 @@
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven.compiler.source>
1
.8
</maven.compiler.source>
<maven.compiler.target>
1
.8
</maven.compiler.target>
<maven.compiler.source>
1
7
</maven.compiler.source>
<maven.compiler.target>
1
7
</maven.compiler.target>
<revision>
${project.version}
</revision>
<nonMavenLibsPath>
${project.baseUri}../non-maven-libs
</nonMavenLibsPath>
</properties>
...
...
@@ -21,6 +19,10 @@
<id>
non-maven-libs
</id>
<url>
${nonMavenLibsPath}
</url>
</repository>
<repository>
<id>
sonartype
</id>
<url>
https://oss.sonatype.org/content/repositories/snapshots/
</url>
</repository>
</repositories>
<build>
...
...
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