Opened 13 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 13 years ago by Peter Powers

Milestone: OpenSHA 1.2OpenSHA 1.3

org.opensha.commons.data.region.SitesInGriddedRegion? -->

org.opensha.commons.data.siteData.gui.beans.OrderedSiteDataGUIBean -->

org.opensha.commons.data.siteData.util.SiteDataTypeParameterNameMap? -->

  • org.opensha.sha.imr.ScalarIMR;
  • org.opensha.sha.imr.attenRelImpl.Campbell_1997_AttenRel;
  • org.opensha.sha.imr.param.SiteParams?.Vs30_Param;
  • org.opensha.sha.util.SiteTranslator?;

org.opensha.commons.mapping.gmt.gui.GMT_MapGuiBean -->

among others

comment:2 Changed 11 years ago by Kevin Milner

Milestone: OpenSHA 1.3OpenSHA 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 Kevin Milner

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
  • 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?
  • org.opensha.commons.gui.plot.jfreechart.tornado.TornadoDiagram?
  • org.opensha.commons.mapping.gmt.gui.GMT_MapGeneratorApplet
  • org.opensha.commons.mapping.gmt.gui.GMT_MapGuiBean
  • 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?
  • org.opensha.commons.data.siteData.impl.WillsMap2000 & WillsMap2000TranslatedVs30
  • 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 Kevin Milner

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.commons.geo.LocationUtils?

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.commons.data.region.SitesInGriddedRegion?

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.commons.data.siteData.gui.beans.OrderedSiteDataGUIBean

org.opensha.commons.data.siteData.impl.WillsMap2000

org.opensha.commons.gui.AppVersionDialog?

  • org.opensha.ui.components.Resources

11 offenders

Note: See TracTickets for help on using tickets.