Opened 11 years ago
Closed 7 years ago
#502 closed enhancement (fixed)
ORM in petascope with Spring Boot
Reported by: | Piero Campalani | Owned by: | Vlad Merticariu |
---|---|---|---|
Priority: | critical | Milestone: | 9.5 |
Component: | petascope | Version: | development |
Keywords: | refactoring dbmetadatasource gmlcov | Cc: | Vlad Merticariu, Dimitar Misev |
Complexity: | Hard |
Description (last modified by )
Updated: Petascope will change to use Spring to make the legacy code easier to maintain, especially the Data Access Layer which is dependent to Postgresql which will use Hibernate to decouple.
Class petascope.core.DbMetadataSource
is very fat, getting fatter. Its .read() method especially.
On one side there is the need for a more handy interface with the database (maybe through Java persistence APIs, or some other ORM).
Additionally, there is the need for a new supporting package which abstracts the GMLCOV coverage metadata (petascope.gmlcov
?), to avoid the extensive use of Java Lists and Maps and to support the creation of petascope.CoverageMetadata
objects.
A linkage with class petascope.wcps.server.core.CoverageInfo
to let WCS and WCPS have a single source of metadata information should be evaluated.
Change History (7)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Version: | 8.5 → development |
---|
Does not look a requirement for 8.5 so moving to dev, version should be changed to whatever released version we have once it gets tackled
comment:3 by , 11 years ago
Complexity: | Hard → Easy |
---|---|
Priority: | major → minor |
I was just going to open a ticket for this. There are a few rather large classes/methods that might be good to refactor at some point into smaller pieces, most notably the DbMetadataSource
. E.g. (ignore the generated wcpsParser/Lexer though)
$ find -name '*.java' | xargs wc -l | sort -n -r 81914 total 21431 ./petascope/wcps/grammar/wcpsParser.java 8777 ./petascope/wcps/grammar/wcpsLexer.java 2200 ./petascope/core/DbMetadataSource.java 1733 ./petascope/util/CrsUtil.java 1276 ./petascope/wms/WmsRequest.java 1145 ./petascope/util/XMLUtil.java 1132 ./petascope/wms/WmsCapabilities.java 1093 ./petascope/wcst/transaction/executeTransaction.java 1020 ./petascope/wms/commander/Table_Service.java 886 ./petascope/core/CoverageMetadata.java 864 ./petascope/wms/commander/Table_Layer.java 797 ./petascope/wms/RequestConverter.java 774 ./petascope/PetascopeInterface.java 756 ./petascope/wms/commander/Globals.java 724 ./petascope/util/WcsUtil.java 701 ./petascope/wms/commander/Table_ServiceLayer.java 681 ./petascope/wms/WmsServlet.java 674 ./petascope/wms/commander/Table_Style.java 649 ./petascope/wms/WmsConfig.java 627 ./petascope/wms/commander/Table_PyramidLevels.java 505 ./petascope/wcs2/legacy/GetCoverageOld.java 501 ./petascope/wcs2/parsers/GetCoverageRequest.java 487 ./petascope/wcs/server/core/convertGetCoverage.java 481 ./petascope/wcs2/extensions/AbstractFormatExtension.java 481 ./petascope/wcps/server/core/Bbox.java 468 ./petascope/wcst/transaction/tools/RasdamanUtils.java 463 ./petascope/wms/commander/CommanderConnection.java 427 ./petascope/util/StringUtil.java 420 ./petascope/wcps/server/core/XmlQuery.java 386 ./petascope/util/ras/RasUtil.java 384 ./petascope/wcs2/parsers/GetCoverageMetadata.java ...
Should be low priority in any case.
comment:4 by , 10 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Priority: | minor → major |
Status: | new → assigned |
Summary: | DbMetadataSource and Coverageclass needs refactoring → ORM in petascope |
comment:5 by , 8 years ago
Cc: | added; removed |
---|---|
Complexity: | Easy → Hard |
Description: | modified (diff) |
Milestone: | Future → 9.4 |
Owner: | changed from | to
Priority: | major → critical |
Summary: | ORM in petascope → ORM in petascope with Spring Boot |
comment:6 by , 7 years ago
Milestone: | 9.4 → 9.5 |
---|
comment:7 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Additionally,
petascope.CoverageMetadata
needs restructuring: hierarchy should be exploited to reflect the tree of coverage types in GML, for gridded and multipoint coverages, and in case, for different grids.