Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
QualityADE
Commits
571a3248
Commit
571a3248
authored
Mar 30, 2022
by
Matthias Betz
Browse files
update model for citygml4j 3 and quality ade 1.4.0
parent
009cef54
Changes
127
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
571a3248
...
...
@@ -148,7 +148,7 @@ fabric.properties
### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
#
*.iml
*.iml
modules.xml
.idea/misc.xml
*.ipr
...
...
@@ -271,6 +271,6 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk
idea/
**/.
idea/
# End of https://www.gitignore.io/api/java,maven,macos,linux,eclipse,windows,netbeans,intellij
citygml4j-quality-ade/.gitignore
0 → 100644
View file @
571a3248
/.apt_generated_tests/
*.iml
citygml4j-quality-ade/pom.xml
View file @
571a3248
...
...
@@ -8,16 +8,20 @@
<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>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.citygml4j/citygml4j -->
<dependency>
<groupId>
org.citygml4j
</groupId>
<artifactId>
citygml4j
</artifactId>
<version>
2.10.2
</version>
<artifactId>
citygml4j-core
</artifactId>
<version>
3.0.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
org.citygml4j
</groupId>
<artifactId>
citygml4j-xml
</artifactId>
<version>
3.0.0-SNAPSHOT
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
...
...
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/QualityADEContext.java
View file @
571a3248
...
...
@@ -18,36 +18,23 @@ package de.hft.stuttgart.quality;
import
java.util.Collections
;
import
java.util.List
;
import
org.citygml4j.model.citygml.ade.binding.ADEContext
;
import
org.citygml4j.model.citygml.ade.binding.ADEMarshaller
;
import
org.citygml4j.model.citygml.ade.binding.ADEUnmarshaller
;
import
org.citygml4j.model.module.ade.ADEModule
;
import
org.citygml4j.core.visitor.ADEWalker
;
import
org.citygml4j.xml.ade.CityGMLADE
;
import
org.citygml4j.xml.module.ade.ADEModule
;
import
de.hft.stuttgart.quality.marshaller.QualityAdeMarshaller
;
import
de.hft.stuttgart.quality.marshaller.QualityAdeUnmarshaller
;
public
class
QualityADEContext
implements
ADEContext
{
public
class
QualityADEContext
implements
CityGMLADE
{
private
final
List
<
ADEModule
>
modules
=
Collections
.
singletonList
(
QualityADEModule
.
V0_1_
3
);
private
final
List
<
ADEModule
>
modules
=
Collections
.
singletonList
(
QualityADEModule
.
V0_1_
4
);
@Override
public
List
<
ADEModule
>
getADEModules
()
{
return
modules
;
}
@Override
public
List
<
String
>
getModelPackageNames
()
{
return
Collections
.
singletonList
(
"de.hft.stuttgart.quality.model"
);
}
@Override
public
ADEMarshaller
createADEMarshaller
()
{
return
new
QualityAdeMarshaller
();
}
@Override
public
ADE
Unmarsh
al
l
er
createADEUnmarsh
al
l
er
()
{
return
new
QualityA
deUnmarsh
al
l
er
();
public
ADE
W
al
k
er
getADEW
al
k
er
()
{
return
new
QualityA
DEW
al
k
er
();
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/QualityADEModule.java
View file @
571a3248
...
...
@@ -16,66 +16,22 @@
package
de.hft.stuttgart.quality
;
import
java.net.URL
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
javax.xml.namespace.QName
;
import
org.citygml4j.model.gml.feature.AbstractFeature
;
import
org.citygml4j.model.module.ade.ADEModule
;
import
org.citygml4j.model.module.citygml.CityGMLVersion
;
import
org.citygml4j.core.model.CityGMLVersion
;
import
org.citygml4j.xml.module.ade.ADEModule
;
public
class
QualityADEModule
extends
ADEModule
{
public
static
final
String
NAMESPACE_URI
=
"https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/0.1.3"
;
public
static
final
QualityADEModule
V0_1_3
=
new
QualityADEModule
();
private
static
final
long
serialVersionUID
=
-
8208579547274734280L
;
public
QualityADEModule
()
{
super
(
NAMESPACE_URI
,
"qual"
,
CityGMLVersion
.
v2_0_0
);
}
@Override
public
URL
getSchemaResource
()
{
return
QualityADEContext
.
class
.
getResource
(
"/qualityAde.xsd"
);
}
@Override
public
List
<
String
>
getJAXBPackageNames
()
{
return
Collections
.
singletonList
(
"de.hft.stuttgart.quality.model.jaxb"
);
}
public
static
final
String
NAMESPACE_URI
=
"https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/0.1.4"
;
@Override
public
boolean
hasFeatureProperty
(
String
name
)
{
return
false
;
}
public
static
final
QualityADEModule
V0_1_4
=
new
QualityADEModule
();
@Override
public
boolean
hasFeature
(
String
name
)
{
return
false
;
}
@Override
public
Class
<?
extends
AbstractFeature
>
getFeatureClass
(
String
name
)
{
throw
new
IllegalStateException
(
"No feature classes available"
);
}
@Override
public
QName
getFeatureName
(
Class
<?
extends
AbstractFeature
>
featureClass
)
{
return
null
;
}
@Override
public
Map
<
String
,
Class
<?
extends
AbstractFeature
>>
getFeatures
()
{
return
Collections
.
emptyMap
();
}
@Override
public
boolean
isTopLevelFeature
(
String
name
)
{
return
false
;
}
public
QualityADEModule
()
{
super
(
NAMESPACE_URI
,
"qual"
,
CityGMLVersion
.
v2_0
);
}
@Override
public
URL
getSchemaResource
()
{
return
QualityADEContext
.
class
.
getResource
(
"/qualityAde.xsd"
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/
model/ValidationErro
r.java
→
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/
QualityADEWalke
r.java
View file @
571a3248
/*-
* Copyright 202
0
Hochschule für Technik Stuttgart
* Copyright 202
2
Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -13,9 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality
.model
;
package
de.hft.stuttgart.quality
;
public
abstract
class
ValidationError
extends
ChildObject
{
import
org.citygml4j.core.visitor.ADEWalker
;
public
class
QualityADEWalker
extends
ADEWalker
{
private
static
final
long
serialVersionUID
=
-
2995694676938108325L
;
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/QualityAdeMarshaller.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.marshaller
;
import
java.util.List
;
import
java.util.concurrent.locks.ReentrantLock
;
import
javax.xml.bind.JAXBElement
;
import
org.citygml4j.builder.jaxb.marshal.citygml.ade.ADEMarshallerHelper
;
import
org.citygml4j.model.citygml.ade.binding.ADEMarshaller
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.util.mapper.TypeMapper
;
import
de.hft.stuttgart.quality.model.AllPolygonsWrongOrientation
;
import
de.hft.stuttgart.quality.model.AttributeMissing
;
import
de.hft.stuttgart.quality.model.AttributeWrongValue
;
import
de.hft.stuttgart.quality.model.ConsecutivePointsSame
;
import
de.hft.stuttgart.quality.model.Edge
;
import
de.hft.stuttgart.quality.model.HoleOutside
;
import
de.hft.stuttgart.quality.model.InnerRingsNested
;
import
de.hft.stuttgart.quality.model.InteriorDisconnected
;
import
de.hft.stuttgart.quality.model.IntersectingRings
;
import
de.hft.stuttgart.quality.model.MultipleConnectedComponents
;
import
de.hft.stuttgart.quality.model.NonManifoldEdge
;
import
de.hft.stuttgart.quality.model.NonManifoldVertex
;
import
de.hft.stuttgart.quality.model.NonPlanarDistancePlane
;
import
de.hft.stuttgart.quality.model.NonPlanarNormalsDeviation
;
import
de.hft.stuttgart.quality.model.OrientationRingsSame
;
import
de.hft.stuttgart.quality.model.PolygonWrongOrientation
;
import
de.hft.stuttgart.quality.model.RingNotClosed
;
import
de.hft.stuttgart.quality.model.RingSelfIntersection
;
import
de.hft.stuttgart.quality.model.SolidNotClosed
;
import
de.hft.stuttgart.quality.model.SolidSelfIntersection
;
import
de.hft.stuttgart.quality.model.TooFewPoints
;
import
de.hft.stuttgart.quality.model.TooFewPolygons
;
import
de.hft.stuttgart.quality.model.Validation
;
import
de.hft.stuttgart.quality.model.ValidationError
;
import
de.hft.stuttgart.quality.model.ValidationResult
;
import
de.hft.stuttgart.quality.model.jaxb.AllPolygonsWrongOrientationType
;
import
de.hft.stuttgart.quality.model.jaxb.AttributeMissingType
;
import
de.hft.stuttgart.quality.model.jaxb.AttributeWrongValueType
;
import
de.hft.stuttgart.quality.model.jaxb.ConsecutivePointsSameType
;
import
de.hft.stuttgart.quality.model.jaxb.EdgeType
;
import
de.hft.stuttgart.quality.model.jaxb.HoleOutsideType
;
import
de.hft.stuttgart.quality.model.jaxb.InnerRingsNestedType
;
import
de.hft.stuttgart.quality.model.jaxb.InteriorDisconnectedType
;
import
de.hft.stuttgart.quality.model.jaxb.IntersectingRingsType
;
import
de.hft.stuttgart.quality.model.jaxb.MultipleConnectedComponentsType
;
import
de.hft.stuttgart.quality.model.jaxb.NonManifoldEdgeType
;
import
de.hft.stuttgart.quality.model.jaxb.NonManifoldVertexType
;
import
de.hft.stuttgart.quality.model.jaxb.NonPlanarDistancePlaneType
;
import
de.hft.stuttgart.quality.model.jaxb.NonPlanarNormalsDeviationType
;
import
de.hft.stuttgart.quality.model.jaxb.ObjectFactory
;
import
de.hft.stuttgart.quality.model.jaxb.OrientationRingsSameType
;
import
de.hft.stuttgart.quality.model.jaxb.PolygonWrongOrientationType
;
import
de.hft.stuttgart.quality.model.jaxb.RingNotClosedType
;
import
de.hft.stuttgart.quality.model.jaxb.RingSelfIntersectionType
;
import
de.hft.stuttgart.quality.model.jaxb.SolidNotClosedType
;
import
de.hft.stuttgart.quality.model.jaxb.SolidSelfIntersectionType
;
import
de.hft.stuttgart.quality.model.jaxb.TooFewPointsType
;
import
de.hft.stuttgart.quality.model.jaxb.TooFewPolygonsType
;
import
de.hft.stuttgart.quality.model.jaxb.ValidationErrorType
;
import
de.hft.stuttgart.quality.model.jaxb.ValidationResultType
;
import
de.hft.stuttgart.quality.model.jaxb.ValidationType
;
public
class
QualityAdeMarshaller
implements
ADEMarshaller
{
private
final
ReentrantLock
lock
=
new
ReentrantLock
();
private
final
ObjectFactory
factory
=
new
ObjectFactory
();
private
TypeMapper
<
JAXBElement
<?>>
elementMapper
;
private
TypeMapper
<
Object
>
typeMapper
;
private
ADEMarshallerHelper
helper
;
private
TypeMapper
<
JAXBElement
<?>>
getElementMapper
()
{
if
(
elementMapper
==
null
)
{
lock
.
lock
();
try
{
if
(
elementMapper
==
null
)
{
elementMapper
=
TypeMapper
.<
JAXBElement
<?>>
create
().
with
(
Validation
.
class
,
this
::
createValidation
)
.
with
(
ValidationResult
.
class
,
this
::
createValidationResult
);
}
}
finally
{
lock
.
unlock
();
}
}
return
elementMapper
;
}
private
TypeMapper
<
Object
>
getTypeMapper
()
{
if
(
typeMapper
==
null
)
{
lock
.
lock
();
try
{
if
(
typeMapper
==
null
)
{
typeMapper
=
TypeMapper
.
create
().
with
(
Validation
.
class
,
this
::
marshalValidation
)
.
with
(
ValidationResult
.
class
,
this
::
marshalValidationResult
)
.
with
(
ConsecutivePointsSame
.
class
,
this
::
marshalConsecutivePointsSame
)
.
with
(
TooFewPoints
.
class
,
this
::
marshalTooFewPoints
)
.
with
(
RingSelfIntersection
.
class
,
this
::
marshalRingSelfIntersection
)
.
with
(
RingNotClosed
.
class
,
this
::
marshalRingNotClosed
)
.
with
(
InteriorDisconnected
.
class
,
this
::
marshalInteriorDisconnected
)
.
with
(
IntersectingRings
.
class
,
this
::
marshalIntersectingRings
)
.
with
(
NonPlanarDistancePlane
.
class
,
this
::
marshalNonPlanarDistancePlane
)
.
with
(
InnerRingsNested
.
class
,
this
::
marshalInnerRingsNested
)
.
with
(
HoleOutside
.
class
,
this
::
marshalHoleOutside
)
.
with
(
NonPlanarNormalsDeviation
.
class
,
this
::
marshalNonPlanarNormalsDeviation
)
.
with
(
OrientationRingsSame
.
class
,
this
::
marshalOrientationRingsSame
)
.
with
(
AllPolygonsWrongOrientation
.
class
,
this
::
marshalAllPolygonsWrongOrientation
)
.
with
(
PolygonWrongOrientation
.
class
,
this
::
marshalPolygonWrongOrientation
)
.
with
(
SolidSelfIntersection
.
class
,
this
::
marshalSolidSelfIntersection
)
.
with
(
NonManifoldVertex
.
class
,
this
::
marshalNonManifoldVertex
)
.
with
(
NonManifoldEdge
.
class
,
this
::
marshalNonManifoldEdge
)
.
with
(
SolidNotClosed
.
class
,
this
::
marshalSolidNotClosed
)
.
with
(
TooFewPolygons
.
class
,
this
::
marshalTooFewPolygons
)
.
with
(
MultipleConnectedComponents
.
class
,
this
::
marshalMultipleConnectedComponents
)
.
with
(
AttributeWrongValue
.
class
,
this
::
marshalAttributeWrongValue
)
.
with
(
AttributeMissing
.
class
,
this
::
marshalAttributeMissing
);
}
}
finally
{
lock
.
unlock
();
}
}
return
typeMapper
;
}
private
ValidationType
marshalValidation
(
Validation
src
)
{
ValidationType
dest
=
new
ValidationType
();
if
(
src
.
isSetDateTime
())
{
dest
.
setValidationDate
(
src
.
getValidationDate
());
}
if
(
src
.
isSetValidationSoftware
())
{
dest
.
setValidationSoftware
(
src
.
getValidationSoftware
());
}
if
(
src
.
isSetValidationPlan
())
{
dest
.
setValidationPlan
(
src
.
getValidationPlan
());
}
if
(
src
.
isSetStatistics
())
{
dest
.
setStatistics
(
src
.
getStatistics
());
}
return
dest
;
}
private
ValidationResultType
marshalValidationResult
(
ValidationResult
src
)
{
ValidationResultType
dest
=
factory
.
createValidationResultType
();
dest
.
setResult
(
src
.
getResult
());
if
(
src
.
hasErrors
())
{
for
(
ValidationError
err
:
src
.
getErrors
())
{
dest
.
getErrors
().
add
(
marshalValidationError
(
err
));
// sort lexicographic, order does not actually matter but xml is restrictive
// that way
// could be solved with xsd v1.1 but jaxb can only process v1.0
dest
.
getErrors
().
sort
((
e1
,
e2
)
->
e1
.
getName
().
compareTo
(
e2
.
getName
()));
}
}
return
dest
;
}
private
JAXBElement
<?>
createValidation
(
Validation
src
)
{
return
factory
.
createValidationType
(
marshalValidation
(
src
));
}
private
JAXBElement
<?>
createValidationResult
(
ValidationResult
src
)
{
return
factory
.
createValidationResultType
(
marshalValidationResult
(
src
));
}
private
ValidationErrorType
marshalValidationError
(
ValidationError
err
)
{
return
(
ValidationErrorType
)
marshal
(
err
);
}
@Override
public
void
setADEMarshallerHelper
(
ADEMarshallerHelper
helper
)
{
this
.
helper
=
helper
;
}
@Override
public
JAXBElement
<?>
marshalJAXBElement
(
ADEModelObject
src
)
{
return
getElementMapper
().
apply
(
src
);
}
@Override
public
Object
marshal
(
ADEModelObject
src
)
{
return
getTypeMapper
().
apply
(
src
);
}
private
ConsecutivePointsSameType
marshalConsecutivePointsSame
(
ConsecutivePointsSame
src
)
{
ConsecutivePointsSameType
dest
=
factory
.
createConsecutivePointsSameType
();
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
if
(
src
.
getVertex1
()
!=
null
)
{
dest
.
setVertex1
(
helper
.
getGMLMarshaller
().
marshalDirectPosition
(
src
.
getVertex1
()));
}
if
(
src
.
getVertex2
()
!=
null
)
{
dest
.
setVertex2
(
helper
.
getGMLMarshaller
().
marshalDirectPosition
(
src
.
getVertex2
()));
}
return
dest
;
}
private
TooFewPointsType
marshalTooFewPoints
(
TooFewPoints
src
)
{
TooFewPointsType
dest
=
factory
.
createTooFewPointsType
();
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
return
dest
;
}
private
RingSelfIntersectionType
marshalRingSelfIntersection
(
RingSelfIntersection
src
)
{
RingSelfIntersectionType
dest
=
factory
.
createRingSelfIntersectionType
();
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
dest
.
setType
(
src
.
getType
());
if
(
src
.
getEdge1
()
!=
null
)
{
dest
.
setEdge1
(
marshalEdge
(
src
.
getEdge1
()));
}
if
(
src
.
getEdge2
()
!=
null
)
{
dest
.
setEdge2
(
marshalEdge
(
src
.
getEdge2
()));
}
if
(
src
.
getVertex1
()
!=
null
)
{
dest
.
setVertex1
(
helper
.
getGMLMarshaller
().
marshalDirectPosition
(
src
.
getVertex1
()));
}
if
(
src
.
getVertex2
()
!=
null
)
{
dest
.
setVertex2
(
helper
.
getGMLMarshaller
().
marshalDirectPosition
(
src
.
getVertex2
()));
}
return
dest
;
}
private
EdgeType
marshalEdge
(
Edge
src
)
{
EdgeType
dest
=
new
EdgeType
();
if
(
src
.
getFrom
()
!=
null
)
{
dest
.
setFrom
(
helper
.
getGMLMarshaller
().
marshalDirectPosition
(
src
.
getFrom
()));
}
if
(
src
.
getTo
()
!=
null
)
{
dest
.
setTo
(
helper
.
getGMLMarshaller
().
marshalDirectPosition
(
src
.
getTo
()));
}
return
dest
;
}
private
RingNotClosedType
marshalRingNotClosed
(
RingNotClosed
src
)
{
RingNotClosedType
dest
=
new
RingNotClosedType
();
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
return
dest
;
}
private
InteriorDisconnectedType
marshalInteriorDisconnected
(
InteriorDisconnected
src
)
{
InteriorDisconnectedType
dest
=
new
InteriorDisconnectedType
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
return
dest
;
}
private
IntersectingRingsType
marshalIntersectingRings
(
IntersectingRings
src
)
{
IntersectingRingsType
dest
=
new
IntersectingRingsType
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
dest
.
setLinearRingId1
(
src
.
getLinearRingId1
());
dest
.
setLinearRingId2
(
src
.
getLinearRingId2
());
return
dest
;
}
private
NonPlanarDistancePlaneType
marshalNonPlanarDistancePlane
(
NonPlanarDistancePlane
src
)
{
NonPlanarDistancePlaneType
dest
=
new
NonPlanarDistancePlaneType
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
if
(
src
.
getVertex
()
!=
null
)
{
dest
.
setVertex
(
helper
.
getGMLMarshaller
().
marshalDirectPosition
(
src
.
getVertex
()));
}
if
(
src
.
getDistance
()
!=
null
)
{
dest
.
setDistance
(
helper
.
getGMLMarshaller
().
marshalLength
(
src
.
getDistance
()));
}
return
dest
;
}
private
InnerRingsNestedType
marshalInnerRingsNested
(
InnerRingsNested
src
)
{
InnerRingsNestedType
dest
=
new
InnerRingsNestedType
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
dest
.
setLinearRingId1
(
src
.
getLinearRingId1
());
dest
.
setLinearRingId2
(
src
.
getLinearRingId2
());
return
dest
;
}
private
HoleOutsideType
marshalHoleOutside
(
HoleOutside
src
)
{
HoleOutsideType
dest
=
new
HoleOutsideType
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
return
dest
;
}
private
NonPlanarNormalsDeviationType
marshalNonPlanarNormalsDeviation
(
NonPlanarNormalsDeviation
src
)
{
NonPlanarNormalsDeviationType
dest
=
new
NonPlanarNormalsDeviationType
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
if
(
src
.
getDeviation
()
!=
null
)
{
dest
.
setDeviation
(
helper
.
getGMLMarshaller
().
marshalAngle
(
src
.
getDeviation
()));
}
return
dest
;
}
private
OrientationRingsSameType
marshalOrientationRingsSame
(
OrientationRingsSame
src
)
{
OrientationRingsSameType
dest
=
new
OrientationRingsSameType
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
return
dest
;
}
private
AllPolygonsWrongOrientationType
marshalAllPolygonsWrongOrientation
(
AllPolygonsWrongOrientation
src
)
{
AllPolygonsWrongOrientationType
dest
=
new
AllPolygonsWrongOrientationType
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
return
dest
;
}
private
PolygonWrongOrientationType
marshalPolygonWrongOrientation
(
PolygonWrongOrientation
src
)
{
PolygonWrongOrientationType
dest
=
new
PolygonWrongOrientationType
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
if
(
src
.
isSetEdges
())
{
List
<
EdgeType
>
edges
=
dest
.
getEdges
();
for
(
Edge
e
:
src
.
getEdges
())
{
edges
.
add
(
marshalEdge
(
e
));
}
}
return
dest
;
}
private
SolidSelfIntersectionType
marshalSolidSelfIntersection
(
SolidSelfIntersection
src
)
{
SolidSelfIntersectionType
dest
=
new
SolidSelfIntersectionType
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
dest
.
setPolygonId1
(
src
.
getPolygonId1
());
dest
.
setPolygonId2
(
src
.
getPolygonId2
());
return
dest
;
}
private
NonManifoldVertexType
marshalNonManifoldVertex
(
NonManifoldVertex
src
)
{
NonManifoldVertexType
dest
=
new
NonManifoldVertexType
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
if
(
src
.
getVertex
()
!=
null
)
{
dest
.
setVertex
(
helper
.
getGMLMarshaller
().
marshalDirectPosition
(
src
.
getVertex
()));
}
return
dest
;
}
private
NonManifoldEdgeType
marshalNonManifoldEdge
(
NonManifoldEdge
src
)
{
NonManifoldEdgeType
dest
=
new
NonManifoldEdgeType
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
if
(
src
.
isSetEdges
())
{
List
<
EdgeType
>
edges
=
dest
.
getEdges
();
for
(
Edge
e
:
src
.
getEdges
())
{
edges
.
add
(
marshalEdge
(
e
));
}
}
return
dest
;
}
private
SolidNotClosedType
marshalSolidNotClosed
(
SolidNotClosed
src
)
{
SolidNotClosedType
dest
=
new
SolidNotClosedType
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
if
(
src
.
isSetEdges
())
{
List
<
EdgeType
>
edges
=
dest
.
getEdges
();
for
(
Edge
e
:
src
.
getEdges
())
{
edges
.
add
(
marshalEdge
(
e
));
}
}
return
dest
;
}
private
TooFewPolygonsType
marshalTooFewPolygons
(
TooFewPolygons
src
)
{
TooFewPolygonsType
dest
=
new
TooFewPolygonsType
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
return
dest
;
}
private
MultipleConnectedComponentsType
marshalMultipleConnectedComponents
(
MultipleConnectedComponents
src
)
{
MultipleConnectedComponentsType
dest
=
new
MultipleConnectedComponentsType
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
if
(
src
.
isSetComponents
())
{
dest
.
getComponents
().
addAll
(
src
.
getComponents
());
}
return
dest
;
}
private
AttributeWrongValueType
marshalAttributeWrongValue
(
AttributeWrongValue
src
)
{
AttributeWrongValueType
dest
=
new
AttributeWrongValueType
();
dest
.
setAttributeName
(
src
.
getAttributeName
());
dest
.
setChildId
(
src
.
getChildId
());
dest
.
setGeneric
(
src
.
isGeneric
());
return
dest
;
}
private
AttributeMissingType
marshalAttributeMissing
(
AttributeMissing
src
)
{
AttributeMissingType
dest
=
new
AttributeMissingType
();
dest
.
setAttributeName
(
src
.
getAttributeName
());
dest
.
setChildId
(
src
.
getChildId
());
dest
.
setGeneric
(
src
.
isGeneric
());
return
dest
;
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/marshaller/QualityAdeUnmarshaller.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.marshaller
;
import
java.util.List
;
import
java.util.concurrent.locks.ReentrantLock
;
import
java.util.stream.Collectors
;
import
javax.xml.bind.JAXBElement
;
import
org.citygml4j.builder.jaxb.unmarshal.citygml.ade.ADEUnmarshallerHelper
;
import
org.citygml4j.model.citygml.ade.binding.ADEModelObject
;
import
org.citygml4j.model.citygml.ade.binding.ADEUnmarshaller
;
import
org.citygml4j.util.mapper.CheckedTypeMapper
;
import
org.citygml4j.xml.io.reader.MissingADESchemaException
;
import
de.hft.stuttgart.quality.model.AllPolygonsWrongOrientation
;
import
de.hft.stuttgart.quality.model.AttributeMissing
;
import
de.hft.stuttgart.quality.model.AttributeWrongValue
;
import
de.hft.stuttgart.quality.model.ConsecutivePointsSame
;
import
de.hft.stuttgart.quality.model.Edge
;
import
de.hft.stuttgart.quality.model.HoleOutside
;
import
de.hft.stuttgart.quality.model.InnerRingsNested
;
import
de.hft.stuttgart.quality.model.InteriorDisconnected
;
import
de.hft.stuttgart.quality.model.IntersectingRings
;
import
de.hft.stuttgart.quality.model.MultipleConnectedComponents
;
import
de.hft.stuttgart.quality.model.NonManifoldEdge
;
import
de.hft.stuttgart.quality.model.NonManifoldVertex
;
import
de.hft.stuttgart.quality.model.NonPlanarDistancePlane
;
import
de.hft.stuttgart.quality.model.NonPlanarNormalsDeviation
;
import
de.hft.stuttgart.quality.model.OrientationRingsSame
;
import
de.hft.stuttgart.quality.model.PolygonWrongOrientation
;
import
de.hft.stuttgart.quality.model.RingNotClosed
;
import
de.hft.stuttgart.quality.model.RingSelfIntersection
;
import
de.hft.stuttgart.quality.model.SolidNotClosed
;
import
de.hft.stuttgart.quality.model.SolidSelfIntersection
;
import
de.hft.stuttgart.quality.model.TooFewPoints
;
import
de.hft.stuttgart.quality.model.TooFewPolygons
;
import
de.hft.stuttgart.quality.model.Validation
;
import
de.hft.stuttgart.quality.model.ValidationError
;
import
de.hft.stuttgart.quality.model.ValidationResult
;
import
de.hft.stuttgart.quality.model.jaxb.AllPolygonsWrongOrientationType
;
import
de.hft.stuttgart.quality.model.jaxb.AttributeMissingType
;
import
de.hft.stuttgart.quality.model.jaxb.AttributeWrongValueType
;
import
de.hft.stuttgart.quality.model.jaxb.ConsecutivePointsSameType
;
import
de.hft.stuttgart.quality.model.jaxb.EdgeType
;
import
de.hft.stuttgart.quality.model.jaxb.HoleOutsideType
;
import
de.hft.stuttgart.quality.model.jaxb.InnerRingsNestedType
;
import
de.hft.stuttgart.quality.model.jaxb.InteriorDisconnectedType
;
import
de.hft.stuttgart.quality.model.jaxb.IntersectingRingsType
;
import
de.hft.stuttgart.quality.model.jaxb.MultipleConnectedComponentsType
;
import
de.hft.stuttgart.quality.model.jaxb.NonManifoldEdgeType
;
import
de.hft.stuttgart.quality.model.jaxb.NonManifoldVertexType
;
import
de.hft.stuttgart.quality.model.jaxb.NonPlanarDistancePlaneType
;
import
de.hft.stuttgart.quality.model.jaxb.NonPlanarNormalsDeviationType
;
import
de.hft.stuttgart.quality.model.jaxb.OrientationRingsSameType
;
import
de.hft.stuttgart.quality.model.jaxb.PolygonWrongOrientationType
;
import
de.hft.stuttgart.quality.model.jaxb.RingNotClosedType
;
import
de.hft.stuttgart.quality.model.jaxb.RingSelfIntersectionType
;
import
de.hft.stuttgart.quality.model.jaxb.SolidNotClosedType
;
import
de.hft.stuttgart.quality.model.jaxb.SolidSelfIntersectionType
;
import
de.hft.stuttgart.quality.model.jaxb.TooFewPointsType
;
import
de.hft.stuttgart.quality.model.jaxb.TooFewPolygonsType
;
import
de.hft.stuttgart.quality.model.jaxb.ValidationErrorType
;
import
de.hft.stuttgart.quality.model.jaxb.ValidationResultType
;
import
de.hft.stuttgart.quality.model.jaxb.ValidationType
;
import
de.hft.stuttgart.quality.util.UncheckedMissingADESchemaException
;
public
class
QualityAdeUnmarshaller
implements
ADEUnmarshaller
{
private
final
ReentrantLock
lock
=
new
ReentrantLock
();
private
CheckedTypeMapper
<
ADEModelObject
>
typeMapper
;
private
ADEUnmarshallerHelper
helper
;
private
CheckedTypeMapper
<
ADEModelObject
>
getTypeMapper
()
{
if
(
typeMapper
==
null
)
{
lock
.
lock
();
try
{
if
(
typeMapper
==
null
)
{
typeMapper
=
CheckedTypeMapper
.<
ADEModelObject
>
create
()
.
with
(
ValidationType
.
class
,
this
::
unmarshalValidationType
)
.
with
(
ValidationResultType
.
class
,
this
::
umarshalValidationResultType
)
.
with
(
ConsecutivePointsSameType
.
class
,
this
::
unmarshalConsecutivePointsSameType
)
.
with
(
TooFewPointsType
.
class
,
this
::
unmarshalTooFewPointsType
)
.
with
(
RingSelfIntersectionType
.
class
,
this
::
unmarshalRingSelfIntersectionType
)
.
with
(
RingNotClosedType
.
class
,
this
::
unmarshalRingNotClosedType
)
.
with
(
InteriorDisconnectedType
.
class
,
this
::
unmarshalInteriorDisconnectedType
)
.
with
(
IntersectingRingsType
.
class
,
this
::
unmarshalIntersectingRingsType
)
.
with
(
NonPlanarDistancePlaneType
.
class
,
this
::
unmarshalNonPlanarDistancePlaneType
)
.
with
(
InnerRingsNestedType
.
class
,
this
::
unmarshalInnerRingsType
)
.
with
(
HoleOutsideType
.
class
,
this
::
unmarshalHoleOutsideType
)
.
with
(
OrientationRingsSameType
.
class
,
this
::
unmarshalOrientationRingsSameType
)
.
with
(
NonPlanarNormalsDeviationType
.
class
,
this
::
unmarshalNonPlanarNormalsDeviationType
)
.
with
(
AllPolygonsWrongOrientationType
.
class
,
this
::
unmarshalAllPolygonsWrongOrientationType
)
.
with
(
PolygonWrongOrientationType
.
class
,
this
::
unmarshalPolygonWrongOrientationType
)
.
with
(
SolidSelfIntersectionType
.
class
,
this
::
unmarshalSolidSelfIntersectionType
)
.
with
(
NonManifoldVertexType
.
class
,
this
::
unmarshalNonManifoldVertexType
)
.
with
(
NonManifoldEdgeType
.
class
,
this
::
unmarshalNonManifoldEdgeType
)
.
with
(
SolidNotClosedType
.
class
,
this
::
unmarshalSolidNotClosedType
)
.
with
(
TooFewPolygonsType
.
class
,
this
::
unmarshalTooFewPolygonsType
)
.
with
(
MultipleConnectedComponentsType
.
class
,
this
::
unmarshalMultipleConnectedComponentsType
)
.
with
(
AttributeWrongValueType
.
class
,
this
::
unmarshalAttributeWrongValueType
)
.
with
(
AttributeMissingType
.
class
,
this
::
unmarshalAttributeMissingType
);
}
}
finally
{
lock
.
unlock
();
}
}
return
typeMapper
;
}
@Override
public
void
setADEUnmarshallerHelper
(
ADEUnmarshallerHelper
helper
)
{
this
.
helper
=
helper
;
}
@Override
public
ADEModelObject
unmarshal
(
JAXBElement
<?>
src
)
throws
MissingADESchemaException
{
return
unmarshal
(
src
.
getValue
());
}
@Override
public
ADEModelObject
unmarshal
(
Object
src
)
throws
MissingADESchemaException
{
return
getTypeMapper
().
apply
(
src
);
}
private
Validation
unmarshalValidationType
(
ValidationType
src
)
{
Validation
dest
=
new
Validation
();
dest
.
setValidationDate
(
src
.
getValidationDate
());
dest
.
setValidationSoftware
(
src
.
getValidationSoftware
());
dest
.
setValidationPlan
(
src
.
getValidationPlan
());
dest
.
setStatistics
(
src
.
getStatistics
());
return
dest
;
}
private
ValidationResult
umarshalValidationResultType
(
ValidationResultType
src
)
throws
MissingADESchemaException
{
ValidationResult
dest
=
new
ValidationResult
();
dest
.
setResult
(
src
.
getResult
());
if
(
src
.
isSetErrors
())
{
try
{
dest
.
getErrors
()
.
addAll
(
src
.
getErrors
().
stream
().
map
(
this
::
unmarshalError
).
collect
(
Collectors
.
toList
()));
}
catch
(
UncheckedMissingADESchemaException
e
)
{
throw
e
.
getCause
();
}
}
return
dest
;
}
private
ValidationError
unmarshalError
(
ValidationErrorType
err
)
{
try
{
return
(
ValidationError
)
getTypeMapper
().
apply
(
err
);
}
catch
(
MissingADESchemaException
e
)
{
throw
new
UncheckedMissingADESchemaException
(
e
);
}
}
private
ConsecutivePointsSame
unmarshalConsecutivePointsSameType
(
ConsecutivePointsSameType
src
)
{
ConsecutivePointsSame
dest
=
new
ConsecutivePointsSame
();
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
dest
.
setVertex1
(
helper
.
getGMLUnmarshaller
().
unmarshalDirectPosition
(
src
.
getVertex1
()));
dest
.
setVertex2
(
helper
.
getGMLUnmarshaller
().
unmarshalDirectPosition
(
src
.
getVertex2
()));
return
dest
;
}
private
TooFewPoints
unmarshalTooFewPointsType
(
TooFewPointsType
src
)
{
TooFewPoints
dest
=
new
TooFewPoints
();
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
return
dest
;
}
private
RingSelfIntersection
unmarshalRingSelfIntersectionType
(
RingSelfIntersectionType
src
)
{
RingSelfIntersection
dest
=
new
RingSelfIntersection
();
if
(
src
.
getEdge1
()
!=
null
)
{
dest
.
setEdge1
(
unmarshalEdge
(
src
.
getEdge1
()));
}
if
(
src
.
getEdge2
()
!=
null
)
{
dest
.
setEdge2
(
unmarshalEdge
(
src
.
getEdge2
()));
}
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
dest
.
setType
(
src
.
getType
());
if
(
src
.
getVertex1
()
!=
null
)
{
dest
.
setVertex1
(
helper
.
getGMLUnmarshaller
().
unmarshalDirectPosition
(
src
.
getVertex1
()));
}
if
(
src
.
getVertex2
()
!=
null
)
{
dest
.
setVertex2
(
helper
.
getGMLUnmarshaller
().
unmarshalDirectPosition
(
src
.
getVertex2
()));
}
return
dest
;
}
private
RingNotClosed
unmarshalRingNotClosedType
(
RingNotClosedType
src
)
{
RingNotClosed
dest
=
new
RingNotClosed
();
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
return
dest
;
}
private
Edge
unmarshalEdge
(
EdgeType
src
)
{
Edge
dest
=
new
Edge
();
if
(
src
.
getFrom
()
!=
null
)
{
dest
.
setFrom
(
helper
.
getGMLUnmarshaller
().
unmarshalDirectPosition
(
src
.
getFrom
()));
}
if
(
src
.
getTo
()
!=
null
)
{
dest
.
setTo
(
helper
.
getGMLUnmarshaller
().
unmarshalDirectPosition
(
src
.
getTo
()));
}
return
dest
;
}
private
InteriorDisconnected
unmarshalInteriorDisconnectedType
(
InteriorDisconnectedType
src
)
{
InteriorDisconnected
dest
=
new
InteriorDisconnected
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
return
dest
;
}
private
IntersectingRings
unmarshalIntersectingRingsType
(
IntersectingRingsType
src
)
{
IntersectingRings
dest
=
new
IntersectingRings
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
dest
.
setLinearRingId1
(
src
.
getLinearRingId1
());
dest
.
setLinearRingId2
(
src
.
getLinearRingId2
());
return
dest
;
}
private
InnerRingsNested
unmarshalInnerRingsType
(
InnerRingsNestedType
src
)
{
InnerRingsNested
dest
=
new
InnerRingsNested
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
dest
.
setLinearRingId1
(
src
.
getLinearRingId1
());
dest
.
setLinearRingId2
(
src
.
getLinearRingId2
());
return
dest
;
}
private
NonPlanarDistancePlane
unmarshalNonPlanarDistancePlaneType
(
NonPlanarDistancePlaneType
src
)
{
NonPlanarDistancePlane
dest
=
new
NonPlanarDistancePlane
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
if
(
src
.
getVertex
()
!=
null
)
{
dest
.
setVertex
(
helper
.
getGMLUnmarshaller
().
unmarshalDirectPosition
(
src
.
getVertex
()));
}
if
(
src
.
getDistance
()
!=
null
)
{
dest
.
setDistance
(
helper
.
getGMLUnmarshaller
().
unmarshalLength
(
src
.
getDistance
()));
}
return
dest
;
}
private
HoleOutside
unmarshalHoleOutsideType
(
HoleOutsideType
src
)
{
HoleOutside
dest
=
new
HoleOutside
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
return
dest
;
}
private
NonPlanarNormalsDeviation
unmarshalNonPlanarNormalsDeviationType
(
NonPlanarNormalsDeviationType
src
)
{
NonPlanarNormalsDeviation
dest
=
new
NonPlanarNormalsDeviation
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
if
(
src
.
getDeviation
()
!=
null
)
{
dest
.
setDeviation
(
helper
.
getGMLUnmarshaller
().
unmarshalAngle
(
src
.
getDeviation
()));
}
return
dest
;
}
private
OrientationRingsSame
unmarshalOrientationRingsSameType
(
OrientationRingsSameType
src
)
{
OrientationRingsSame
dest
=
new
OrientationRingsSame
();
dest
.
setPolygonId
(
src
.
getPolygonId
());
dest
.
setLinearRingId
(
src
.
getLinearRingId
());
return
dest
;
}
private
AllPolygonsWrongOrientation
unmarshalAllPolygonsWrongOrientationType
(
AllPolygonsWrongOrientationType
src
)
{
AllPolygonsWrongOrientation
dest
=
new
AllPolygonsWrongOrientation
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
return
dest
;
}
private
PolygonWrongOrientation
unmarshalPolygonWrongOrientationType
(
PolygonWrongOrientationType
src
)
{
PolygonWrongOrientation
dest
=
new
PolygonWrongOrientation
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
if
(
src
.
isSetEdges
())
{
List
<
Edge
>
edges
=
dest
.
getEdges
();
for
(
EdgeType
e
:
src
.
getEdges
())
{
edges
.
add
(
unmarshalEdge
(
e
));
}
}
return
dest
;
}
private
SolidSelfIntersection
unmarshalSolidSelfIntersectionType
(
SolidSelfIntersectionType
src
)
{
SolidSelfIntersection
dest
=
new
SolidSelfIntersection
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
dest
.
setPolygonId1
(
src
.
getPolygonId1
());
dest
.
setPolygonId2
(
src
.
getPolygonId2
());
return
dest
;
}
private
NonManifoldVertex
unmarshalNonManifoldVertexType
(
NonManifoldVertexType
src
)
{
NonManifoldVertex
dest
=
new
NonManifoldVertex
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
if
(
src
.
getVertex
()
!=
null
)
{
dest
.
setVertex
(
helper
.
getGMLUnmarshaller
().
unmarshalDirectPosition
(
src
.
getVertex
()));
}
return
dest
;
}
private
NonManifoldEdge
unmarshalNonManifoldEdgeType
(
NonManifoldEdgeType
src
)
{
NonManifoldEdge
dest
=
new
NonManifoldEdge
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
if
(
src
.
isSetEdges
())
{
List
<
Edge
>
edges
=
dest
.
getEdges
();
for
(
EdgeType
e
:
src
.
getEdges
())
{
edges
.
add
(
unmarshalEdge
(
e
));
}
}
return
dest
;
}
private
SolidNotClosed
unmarshalSolidNotClosedType
(
SolidNotClosedType
src
)
{
SolidNotClosed
dest
=
new
SolidNotClosed
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
if
(
src
.
isSetEdges
())
{
List
<
Edge
>
edges
=
dest
.
getEdges
();
for
(
EdgeType
e
:
src
.
getEdges
())
{
edges
.
add
(
unmarshalEdge
(
e
));
}
}
return
dest
;
}
private
TooFewPolygons
unmarshalTooFewPolygonsType
(
TooFewPolygonsType
src
)
{
TooFewPolygons
dest
=
new
TooFewPolygons
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
return
dest
;
}
private
MultipleConnectedComponents
unmarshalMultipleConnectedComponentsType
(
MultipleConnectedComponentsType
src
)
{
MultipleConnectedComponents
dest
=
new
MultipleConnectedComponents
();
dest
.
setGeometryId
(
src
.
getGeometryId
());
if
(
src
.
isSetComponents
())
{
dest
.
getComponents
().
addAll
(
src
.
getComponents
());
}
return
dest
;
}
private
AttributeWrongValue
unmarshalAttributeWrongValueType
(
AttributeWrongValueType
src
)
{
AttributeWrongValue
dest
=
new
AttributeWrongValue
();
dest
.
setAttributeName
(
src
.
getAttributeName
());
dest
.
setChildId
(
src
.
getChildId
());
dest
.
setGeneric
(
src
.
isGeneric
());
return
dest
;
}
private
AttributeMissing
unmarshalAttributeMissingType
(
AttributeMissingType
src
)
{
AttributeMissing
dest
=
new
AttributeMissing
();
dest
.
setAttributeName
(
src
.
getAttributeName
());
dest
.
setChildId
(
src
.
getChildId
());
dest
.
setGeneric
(
src
.
isGeneric
());
return
dest
;
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/AttributeWrongValue.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
public
class
AttributeWrongValue
extends
SemanticError
{
private
static
final
long
serialVersionUID
=
-
5650985861847806620L
;
private
String
childId
;
private
String
attributeName
;
private
boolean
generic
;
public
String
getChildId
()
{
return
childId
;
}
public
void
setChildId
(
String
childId
)
{
this
.
childId
=
childId
;
}
public
String
getAttributeName
()
{
return
attributeName
;
}
public
void
setAttributeName
(
String
attributeName
)
{
this
.
attributeName
=
attributeName
;
}
public
boolean
isGeneric
()
{
return
generic
;
}
public
void
setGeneric
(
boolean
generic
)
{
this
.
generic
=
generic
;
}
@Override
public
String
toString
()
{
return
"AttributeWrongValue [childId="
+
childId
+
", attributeName="
+
attributeName
+
", generic="
+
generic
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
AttributeWrongValue
(),
copyBuilder
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/HoleOutside.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
public
class
HoleOutside
extends
PolygonError
{
private
static
final
long
serialVersionUID
=
-
3029497342950689843L
;
private
String
linearRingId
;
public
void
setLinearRingId
(
String
linearRingId
)
{
this
.
linearRingId
=
linearRingId
;
}
public
String
getLinearRingId
()
{
return
linearRingId
;
}
@Override
public
String
toString
()
{
return
"HoleOutside [polygonId="
+
getPolygonId
()
+
", linearRingId="
+
linearRingId
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
HoleOutside
(),
copyBuilder
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/InteriorDisconnected.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
public
class
InteriorDisconnected
extends
PolygonError
{
private
static
final
long
serialVersionUID
=
8443642232356795359L
;
@Override
public
String
toString
()
{
return
"InteriorDisconnected [polygonId="
+
getPolygonId
()
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
InteriorDisconnected
(),
copyBuilder
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/IntersectingRings.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
public
class
IntersectingRings
extends
PolygonError
{
private
static
final
long
serialVersionUID
=
7668529369582991408L
;
private
String
linearRingId1
;
private
String
linearRingId2
;
public
void
setLinearRingId1
(
String
linearRingId1
)
{
this
.
linearRingId1
=
linearRingId1
;
}
public
void
setLinearRingId2
(
String
linearRingId2
)
{
this
.
linearRingId2
=
linearRingId2
;
}
public
String
getLinearRingId1
()
{
return
linearRingId1
;
}
public
String
getLinearRingId2
()
{
return
linearRingId2
;
}
@Override
public
String
toString
()
{
return
"IntersectingRings [polygonId="
+
getPolygonId
()
+
", linearRingId1="
+
linearRingId1
+
", linearRingId2="
+
linearRingId2
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
IntersectingRings
(),
copyBuilder
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/MultipleConnectedComponents.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
de.hft.stuttgart.quality.model.jaxb.Component
;
public
class
MultipleConnectedComponents
extends
SolidError
{
private
static
final
long
serialVersionUID
=
-
4199420154182053060L
;
private
List
<
Component
>
components
;
public
boolean
isSetComponents
()
{
return
components
!=
null
&&
!
components
.
isEmpty
();
}
public
List
<
Component
>
getComponents
()
{
if
(
components
==
null
)
{
components
=
new
ArrayList
<>();
}
return
components
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
MultipleConnectedComponents
(),
copyBuilder
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonManifoldVertex.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.gml.geometry.primitives.DirectPosition
;
public
class
NonManifoldVertex
extends
SolidError
{
private
static
final
long
serialVersionUID
=
-
3434116956866828127L
;
private
DirectPosition
vertex
;
public
void
setVertex
(
DirectPosition
vertex
)
{
this
.
vertex
=
vertex
;
}
public
DirectPosition
getVertex
()
{
return
vertex
;
}
@Override
public
String
toString
()
{
return
"NonManifoldVertex [geometryId="
+
getGeometryId
()
+
", vertex="
+
vertex
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
NonManifoldVertex
(),
copyBuilder
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/NonPlanarNormalsDeviation.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
org.citygml4j.model.gml.measures.Angle
;
public
class
NonPlanarNormalsDeviation
extends
PolygonError
{
private
static
final
long
serialVersionUID
=
-
8574024132334399550L
;
private
Angle
deviation
;
public
void
setDeviation
(
Angle
deviation
)
{
this
.
deviation
=
deviation
;
}
public
Angle
getDeviation
()
{
return
deviation
;
}
@Override
public
String
toString
()
{
return
"NonPlanarNormalsDeviation [polygonId="
+
getPolygonId
()
+
", deviation="
+
deviation
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
NonPlanarNormalsDeviation
(),
copyBuilder
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/OrientationRingsSame.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
public
class
OrientationRingsSame
extends
PolygonError
{
private
static
final
long
serialVersionUID
=
-
6983324580253488854L
;
private
String
linearRingId
;
public
void
setLinearRingId
(
String
linearRingId
)
{
this
.
linearRingId
=
linearRingId
;
}
public
String
getLinearRingId
()
{
return
linearRingId
;
}
@Override
public
String
toString
()
{
return
"OrientationRingsSame [polygonId="
+
getPolygonId
()
+
", linearRingId="
+
linearRingId
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
OrientationRingsSame
(),
copyBuilder
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/RingNotClosed.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
public
class
RingNotClosed
extends
RingError
{
private
static
final
long
serialVersionUID
=
5502668444088395535L
;
@Override
public
String
toString
()
{
return
"RingNotClosed [linearRingId="
+
getLinearRingId
()
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
RingNotClosed
(),
copyBuilder
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/SolidSelfIntersection.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
org.citygml4j.builder.copy.CopyBuilder
;
public
class
SolidSelfIntersection
extends
SolidError
{
private
static
final
long
serialVersionUID
=
4086097021438848040L
;
private
String
polygonId1
;
private
String
polygonId2
;
public
String
getPolygonId1
()
{
return
polygonId1
;
}
public
void
setPolygonId1
(
String
polygonId1
)
{
this
.
polygonId1
=
polygonId1
;
}
public
String
getPolygonId2
()
{
return
polygonId2
;
}
public
void
setPolygonId2
(
String
polygonId2
)
{
this
.
polygonId2
=
polygonId2
;
}
@Override
public
String
toString
()
{
return
"SolidSelfIntersection [geometryId="
+
getGeometryId
()
+
", polygonId1="
+
polygonId1
+
", polygonId2="
+
polygonId2
+
"]"
;
}
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
copyTo
(
new
SolidSelfIntersection
(),
copyBuilder
);
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/Validation.java
deleted
100644 → 0
View file @
009cef54
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model
;
import
java.time.ZonedDateTime
;
import
org.citygml4j.builder.copy.CopyBuilder
;
import
de.hft.stuttgart.quality.model.jaxb.Statistics
;
import
de.hft.stuttgart.quality.model.jaxb.ValidationPlan
;
public
class
Validation
extends
ChildObject
{
private
static
final
long
serialVersionUID
=
1738293574859506005L
;
private
ZonedDateTime
validationDate
;
private
String
validationSoftware
;
private
ValidationPlan
validationPlan
;
private
Statistics
statistics
;
@Override
public
Object
copy
(
CopyBuilder
copyBuilder
)
{
return
this
;
}
public
boolean
isSetStatistics
()
{
return
statistics
!=
null
;
}
public
void
setStatistics
(
Statistics
statistics
)
{
this
.
statistics
=
statistics
;
}
public
Statistics
getStatistics
()
{
return
statistics
;
}
public
boolean
isSetValidationPlan
()
{
return
validationPlan
!=
null
;
}
public
void
setValidationPlan
(
ValidationPlan
validationPlan
)
{
this
.
validationPlan
=
validationPlan
;
}
public
ValidationPlan
getValidationPlan
()
{
return
validationPlan
;
}
public
boolean
isSetDateTime
()
{
return
validationDate
!=
null
;
}
public
boolean
isSetValidationSoftware
()
{
return
validationSoftware
!=
null
;
}
public
void
setValidationDate
(
ZonedDateTime
validationDate
)
{
this
.
validationDate
=
validationDate
;
}
public
ZonedDateTime
getValidationDate
()
{
return
validationDate
;
}
public
void
setValidationSoftware
(
String
validationSoftware
)
{
this
.
validationSoftware
=
validationSoftware
;
}
public
String
getValidationSoftware
()
{
return
validationSoftware
;
}
}
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/
jaxb
/ErrorId.java
→
citygml4j-quality-ade/src/main/java/de/hft/stuttgart/quality/model/
enums
/ErrorId.java
View file @
571a3248
/*-
* Copyright 202
0
Hochschule für Technik Stuttgart
* Copyright 202
2
Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -13,11 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.quality.model.
jaxb
;
package
de.hft.stuttgart.quality.model.
enums
;
import
javax.xml.bind.annotation.XmlEnum
;
@XmlEnum
public
enum
ErrorId
{
GE_R_TOO_FEW_POINTS
,
GE_R_NOT_CLOSED
,
GE_R_CONSECUTIVE_POINTS_SAME
,
GE_R_SELF_INTERSECTION
,
...
...
Prev
1
2
3
4
5
…
7
Next
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