Opened 12 years ago
Last modified 9 years ago
#264 new defect
Refactor reverse dependencies in org.opensha.commons
Reported by: | Peter Powers | Owned by: | Peter Powers |
---|---|---|---|
Priority: | major | Milestone: | OpenSHA 1.4 |
Component: | commons | Version: | |
Keywords: | Cc: |
Description
Building javadoc for just org.opensha.commons revealed numerous reverse dependencies on org.opensha.sha.*
Change History (4)
comment:1 Changed 12 years ago by
Milestone: | OpenSHA 1.2 → OpenSHA 1.3 |
---|
comment:2 Changed 10 years ago by
Milestone: | OpenSHA 1.3 → OpenSHA 1.4 |
---|
This is still theoretically though not immediately important and has some nasty consequences. Delaying for the future.
comment:3 Changed 9 years ago by
I just checked out another version of the project where I deleted everything but commons to find all of the reverse dependencies (results below). Most are simple, but a few are tricky. If we decide to enforce this, then we should add a test (I guess using reflection...ugly) which validates this requirement to the svn post-commit hook.
- org.opensha.commons.metadata.MetadataLoader?
- various ERF/IMR classes, only in main method which can just be removed
- org.opensha.commons.gui.plot.jfreechart.GriddedSurfaceXYDataSet
- surface classes, this class should just be moved to SHA (no commons classes use it)
- org.opensha.commons.geo.LocationUtils?
- distanceToSurf and distanceToSurfFast both take RuptureSurface? instances. This one is a little tougher, should I guess be moved but I don't have a good other location in mind. Thoughts?
- org.opensha.commons.data.function.HistogramFunction?
- main class references BPT_DistCalc, should be removed
- org.opensha.commons.data.siteData.util.SiteDataTypeParameterNameMap?
- ScalarIMR, should be moved to SHA (with OrderedSiteDataGUIBean
- org.opensha.commons.hpc.mpj.taskDispatch.MPJTaskCalculator
- DeadlockDetectionThread?, which can/should be moved to commons
- org.opensha.commons.param.editor.impl.ConstrainedEstimateParameterEditor?
- a couple ref fault param db classes, and EstimateViewer? in sha. might be a little tricky
- org.opensha.commons.util.FaultUtils?
- relies on FaultTrace? as would be assumed. Could be moved to sha, but MagScalingRelationship? uses assertValidRake
- org.opensha.commons.gui.plot.jfreechart.tornado.TornadoDiagram?
- relies on HeadlessGraphPanel?, which definitely should be in commons instead of sha
- org.opensha.commons.mapping.gmt.gui.GMT_MapGeneratorApplet
- relies on IconFetcher?, which might be moveable to commons
- org.opensha.commons.mapping.gmt.gui.GMT_MapGuiBean
- relies on ImageViewerWindow?, which can likely be moved to commons
- org.opensha.commons.calc.WeightedSampler?<T>
- relies on IntegerPDF_FunctionSampler in scratch, which should probably be moved to commons
- org.opensha.commons.gui.AppVersionDialog?
- relies on "Resources" class in ui package. Not sure why the "ui" package exists or what belongs there. Thoughts?
- org.opensha.commons.gui.DisclaimerDialog?
- same as above, Resources class in ui
- org.opensha.commons.data.siteData.gui.beans.OrderedSiteDataGUIBean
- many IMR/site data specific things, should be moved to SHA
- org.opensha.commons.param.editor.demo.ParameterApplet?
- uses SimpleFaultParameter?, can be deleted or moved. probably not useful anymore
- org.opensha.commons.data.siteData.impl.WillsMap2000 & WillsMap2000TranslatedVs30
- uses SiteTranslator? for Vs30/Wills conversions, needs some thought
- org.opensha.commons.data.siteData.impl.CVM4BasinDepth & CVM4i26BasinDepth
- unused import can be removed
- org.opensha.commons.hpc.mpj.taskDispatch.DispatcherThread?
- unused import can be removed
comment:4 Changed 9 years ago by
I just fixed all of the trial ones in [10933]. I also added a class which can generate the list of reverse references (and found a few not in the previous comments): scratch.kevin.CommonsImportCheck?
Here's the current list (with notes):
org.opensha.commons.util.FaultUtils?
- org.opensha.sha.faultSurface.FaultTrace?
- Could be moved to sha, but MagScalingRelationship?? uses assertValidRake
org.opensha.commons.geo.LocationUtils?
- org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurface?
- org.opensha.sha.faultSurface.RuptureSurface?
- This one is a little tougher, should I guess be moved but I don't have a good other location in mind. Thoughts?
org.opensha.commons.param.editor.impl.ConstrainedEstimateParameterEditor?
- org.opensha.refFaultParamDb.gui.infotools.GUI_Utils
- org.opensha.refFaultParamDb.gui.infotools.InfoLabel?
- org.opensha.sha.gui.infoTools.EstimateViewer?
org.opensha.commons.geo.RegionUtils?
- org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurface?
org.opensha.commons.data.region.SitesInGriddedRegion?
- org.opensha.sha.util.SiteTranslator?
org.opensha.commons.mapping.gmt.gui.GMT_MapGeneratorApplet
- org.opensha.sha.gui.util.IconFetcher?
- tricky because IconFetcher? relies on JNLPGen, which references all of the apps. I guess JNLPGen could be turned into a general utility in commons, with code in sha which calls it for the apps (e.g. SHA_JNLPGen)
org.opensha.commons.gui.DisclaimerDialog?
- org.opensha.ui.components.Resources
org.opensha.commons.data.siteData.impl.WillsMap2000TranslatedVs30
- org.opensha.sha.util.SiteTranslator?
- Wills Class -> Vs30 done in SiteTranslator?
org.opensha.commons.data.siteData.gui.beans.OrderedSiteDataGUIBean
- org.opensha.sha.imr.ScalarIMR
- org.opensha.sha.util.SiteDataTypeParameterNameMap?
- org.opensha.sha.util.SiteTranslator?
org.opensha.commons.data.siteData.impl.WillsMap2000
- org.opensha.sha.gui.servlets.siteEffect.WillsSiteClass?
- org.opensha.sha.util.SiteTranslator?
- Wills Class -> Vs30 done in SiteTranslator?
org.opensha.commons.gui.AppVersionDialog?
- org.opensha.ui.components.Resources
11 offenders
org.opensha.commons.data.region.SitesInGriddedRegion? -->
org.opensha.commons.data.siteData.gui.beans.OrderedSiteDataGUIBean -->
org.opensha.commons.data.siteData.util.SiteDataTypeParameterNameMap? -->
org.opensha.commons.mapping.gmt.gui.GMT_MapGuiBean -->
among others