12.9.1-10 baseline
Former-commit-id: 32048810bc091d7ba09a321c36cd5a78b2d4bd39
This commit is contained in:
parent
b77a4d40d7
commit
cb9b80f3a0
80 changed files with 4281 additions and 23390 deletions
|
@ -74,6 +74,7 @@ import com.raytheon.uf.viz.d2d.core.D2DLoadProperties;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 10, 2009 chammack Initial creation
|
||||
* 2012-04-20 DR 14699 D. Friedman Work around race conditions
|
||||
* 2012-08-14 DR 15160 D. Friedman Reduce chance of UI blocking
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -94,9 +95,7 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
@Override
|
||||
public void disposed(AbstractVizResource<?, ?> resource) {
|
||||
if ((resource == timeMatchBasis)) {
|
||||
synchronized (D2DTimeMatcher.this) {
|
||||
timeMatchBasis = null;
|
||||
}
|
||||
internalSetTimeMatchBasis(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,6 +127,11 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
private boolean needRetry;
|
||||
private int nRetries;
|
||||
|
||||
// DR 15160 state
|
||||
private transient boolean pendingTmbChange = false;
|
||||
private transient boolean inTimeMatch = false;
|
||||
private transient AbstractVizResource<?, ?> pendingTimeMatchBasis;
|
||||
|
||||
/**
|
||||
* Default Constructor.
|
||||
*/
|
||||
|
@ -158,8 +162,15 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
public void redoTimeMatching(IDescriptor descriptor) throws VizException {
|
||||
|
||||
synchronized (this) {
|
||||
if (inTimeMatch) {
|
||||
needRetry = true;
|
||||
return;
|
||||
}
|
||||
pendingTmbChange = false;
|
||||
inTimeMatch = true;
|
||||
needRetry = false;
|
||||
|
||||
}
|
||||
try {
|
||||
if (timeMatchBasis != null) {
|
||||
IDescriptor tmDescriptor = timeMatchBasis.getDescriptor();
|
||||
if (tmDescriptor != null && tmDescriptor != descriptor) {
|
||||
|
@ -205,14 +216,28 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
}
|
||||
}
|
||||
|
||||
} finally {
|
||||
boolean scheduleRetry = false;
|
||||
synchronized (this) {
|
||||
inTimeMatch = false;
|
||||
if (pendingTmbChange) {
|
||||
pendingTmbChange = false;
|
||||
changeTimeMatchBasis(pendingTimeMatchBasis);
|
||||
pendingTimeMatchBasis = null;
|
||||
scheduleRetry = true;
|
||||
}
|
||||
|
||||
if (needRetry) {
|
||||
if (nRetries < 200) {
|
||||
++nRetries;
|
||||
TimeMatchingJob.scheduleTimeMatch(descriptor);
|
||||
scheduleRetry = true;
|
||||
}
|
||||
} else
|
||||
nRetries = 0;
|
||||
}
|
||||
if (scheduleRetry)
|
||||
TimeMatchingJob.scheduleTimeMatch(descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
private int indexToUpdateTo(IDescriptor descriptor, DataTime[] oldTimes,
|
||||
|
@ -708,9 +733,7 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
IDescriptor descriptor) {
|
||||
if ((resource == timeMatchBasis)
|
||||
&& (descriptor instanceof AbstractDescriptor)) {
|
||||
synchronized (this) {
|
||||
timeMatchBasis = null;
|
||||
}
|
||||
internalSetTimeMatchBasis(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1004,4 +1027,17 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
configFactory.resetMultiload();
|
||||
}
|
||||
|
||||
// For DR 15160
|
||||
protected void internalSetTimeMatchBasis(AbstractVizResource<?, ?> timeMatchBasis) {
|
||||
synchronized (this) {
|
||||
if (inTimeMatch) {
|
||||
pendingTmbChange = true;
|
||||
pendingTimeMatchBasis = timeMatchBasis;
|
||||
} else {
|
||||
pendingTmbChange = false;
|
||||
pendingTimeMatchBasis = null;
|
||||
changeTimeMatchBasis(timeMatchBasis);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -389,23 +389,30 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
|
||||
if (source != null) {
|
||||
|
||||
boolean dupOverride = false;
|
||||
if (getSourceConfig().getSource(source).getSourceType().equals(SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
dupOverride = true;
|
||||
}
|
||||
|
||||
SortedMap<Date, List<String>> urisByDate = getAvailableUris(
|
||||
siteKey, dataKey, source, ptime, retrieveNew);
|
||||
|
||||
if (urisByDate != null) {
|
||||
for (List<String> uris : urisByDate.values()) {
|
||||
for (String uri : uris) {
|
||||
if ((uri != null)
|
||||
&& !getUriMap(siteKey, source, phuc)
|
||||
if (uri != null) {
|
||||
if (dupOverride
|
||||
|| !getUriMap(siteKey, source, phuc)
|
||||
.containsKey(uri)) {
|
||||
try {
|
||||
populateFFMPRecord(isProductLoad, siteKey,
|
||||
loadRecordFromDatabase(uri), source,
|
||||
phuc);
|
||||
loadRecordFromDatabase(uri),
|
||||
source, phuc);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"FFMP Can't retrieve FFMP URI, " + uri,
|
||||
e);
|
||||
"FFMP Can't retrieve FFMP URI, "
|
||||
+ uri, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -538,15 +545,9 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
ffmpRec.getSourceName(), fbasin);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
try {
|
||||
throw new VizException(
|
||||
"Error occurred loading uri "
|
||||
+ fdataUri, e);
|
||||
} catch (VizException e1) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"FFMP Can't retrieve FFMP URI, "
|
||||
+ fdataUri, e1);
|
||||
}
|
||||
+ fdataUri, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -584,9 +585,28 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
return uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get me the available URIS for this source
|
||||
*
|
||||
* @param siteKey
|
||||
* @param dataKey
|
||||
* @param sourceName
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
public ConcurrentNavigableMap<Date, List<String>> getAvailableUris(
|
||||
String siteKey, String dataKey, String sourceName, Date time) {
|
||||
return getAvailableUris(siteKey, dataKey, sourceName, time, false);
|
||||
|
||||
ConcurrentNavigableMap<Date, List<String>> uris = null;
|
||||
|
||||
try {
|
||||
uris = getAvailableUris(siteKey, dataKey, sourceName, time, false);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.WARN,
|
||||
"FFMP Can't find availble URI list for, " + sourceName, e);
|
||||
}
|
||||
|
||||
return uris;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -825,8 +845,15 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
// check for special case with dual stand alone and table
|
||||
// display loaded
|
||||
|
||||
SourceXML sourcexml = getSourceConfig().getSource(sourceName);
|
||||
|
||||
if (sourcexml.getSourceType().equals(
|
||||
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
sourceName = sourcexml.getDisplayName();
|
||||
} else {
|
||||
populateFFMPRecord(product, siteKey, dataKey, sourceName,
|
||||
ptime, phuc, retrieveNew);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1796,37 +1823,24 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
public void processUri(boolean isProductLoad, String uri, String siteKey,
|
||||
String sourceName, Date barrierTime, String phuc) {
|
||||
|
||||
final boolean fisProductLoad = isProductLoad;
|
||||
final String furi = uri;
|
||||
final String fsiteKey = siteKey;
|
||||
final String fsourceName = sourceName;
|
||||
final String fhuc = phuc;
|
||||
SourceXML source = getSourceConfig().getSource(sourceName);
|
||||
|
||||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
SourceXML source = getSourceConfig().getSource(fsourceName);
|
||||
|
||||
if (furi != null) {
|
||||
FFMPRecord record = new FFMPRecord(furi);
|
||||
if (uri != null) {
|
||||
FFMPRecord record = new FFMPRecord(uri);
|
||||
|
||||
try {
|
||||
record = populateFFMPRecord(fisProductLoad, furi,
|
||||
fsiteKey, fsourceName, fhuc);
|
||||
record = populateFFMPRecord(isProductLoad, uri, siteKey,
|
||||
sourceName, phuc);
|
||||
if ((record != null) && (source != null)) {
|
||||
record.setExpiration(source
|
||||
.getExpirationMinutes(fsiteKey));
|
||||
record.setExpiration(source.getExpirationMinutes(siteKey));
|
||||
record.setRate(source.isRate());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"FFMP Can't retrieve FFMP URI, " + furi, e);
|
||||
"FFMP Can't retrieve FFMP URI, " + uri, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds this source to the URI hash in the monitor
|
||||
|
@ -1836,76 +1850,11 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
*/
|
||||
public void processUris(NavigableMap<Date, List<String>> uriMap,
|
||||
boolean isProductLoad, String siteKey, String sourceName,
|
||||
Date barrierTime, String phuc, LOADER_TYPE type) {
|
||||
Date barrierTime, String phuc) {
|
||||
|
||||
// don't wrap it, locks UI thread
|
||||
if ((type == LOADER_TYPE.GENERAL) || (type == LOADER_TYPE.TERTIARY)) {
|
||||
|
||||
FFMPProcessUris processor = new FFMPProcessUris(uriMap,
|
||||
isProductLoad, siteKey, sourceName, barrierTime, phuc);
|
||||
FFMPProcessUris processor = new FFMPProcessUris(uriMap, isProductLoad,
|
||||
siteKey, sourceName, barrierTime, phuc);
|
||||
processor.run();
|
||||
|
||||
} else {
|
||||
|
||||
final boolean fisProductLoad = isProductLoad;
|
||||
final NavigableMap<Date, List<String>> furiMap = uriMap;
|
||||
final String fsiteKey = siteKey;
|
||||
final String fsourceName = sourceName;
|
||||
final Date fbarrierTime = barrierTime;
|
||||
final String fhuc = phuc;
|
||||
|
||||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
SourceXML source = getSourceConfig().getSource(fsourceName);
|
||||
|
||||
if (furiMap != null) {
|
||||
for (List<String> uris : furiMap.descendingMap()
|
||||
.values()) {
|
||||
for (String uri : uris) {
|
||||
if (uri != null) {
|
||||
FFMPRecord record = new FFMPRecord(uri);
|
||||
if (record.getDataTime().getRefTime()
|
||||
.after(fbarrierTime)
|
||||
|| source
|
||||
.getSourceType()
|
||||
.equals(FFMPSourceConfigurationManager.SOURCE_TYPE.GUIDANCE
|
||||
.getSourceType())) {
|
||||
try {
|
||||
|
||||
if (!getUriMap(fsiteKey,
|
||||
fsourceName, fhuc)
|
||||
.containsKey(uri)) {
|
||||
|
||||
record = populateFFMPRecord(
|
||||
fisProductLoad, uri,
|
||||
fsiteKey, fsourceName,
|
||||
fhuc);
|
||||
|
||||
if ((record != null)
|
||||
&& (source != null)) {
|
||||
record.setExpiration(source
|
||||
.getExpirationMinutes(fsiteKey));
|
||||
record.setRate(source
|
||||
.isRate());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"FFMP Can't retrieve FFMP URI, "
|
||||
+ uri, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2394,6 +2343,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
}
|
||||
|
||||
public void load() {
|
||||
|
||||
if (fffmpRec != null) {
|
||||
|
||||
ConcurrentMap<String, String> uris = getUriMap(fsiteKey,
|
||||
|
@ -2412,8 +2362,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
SourceXML source = fscm.getSource(fsource);
|
||||
|
||||
if (source.getSourceType().equals(
|
||||
SOURCE_TYPE.GUIDANCE.getSourceType())
|
||||
&& fisProductLoad) {
|
||||
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
mySource = source.getDisplayName();
|
||||
}
|
||||
|
||||
|
@ -2506,7 +2455,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
}
|
||||
|
||||
/**
|
||||
* Thread the uri processing
|
||||
* The uri processing
|
||||
*
|
||||
* @author dhladky
|
||||
*
|
||||
|
@ -2539,6 +2488,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
}
|
||||
|
||||
public void run() {
|
||||
|
||||
SourceXML source = getSourceConfig().getSource(fsourceName);
|
||||
|
||||
if (furiMap != null) {
|
||||
|
|
|
@ -82,6 +82,8 @@ public abstract class FFMPTable extends Composite {
|
|||
/** DR14406: For columns with more words */
|
||||
protected static final int EXTRA_COLUMN_WIDTH = 28;
|
||||
|
||||
private static final String NAME = "Name";
|
||||
|
||||
protected String currentPfaf = null;
|
||||
|
||||
/**
|
||||
|
@ -392,6 +394,7 @@ public abstract class FFMPTable extends Composite {
|
|||
ArrayList<FFMPTableColumnXML> ffmpTableCols = ffmpCfgBasin
|
||||
.getTableColumnData();
|
||||
|
||||
if (!sortedColumnName.equalsIgnoreCase(NAME)) {
|
||||
for (ThreshColNames threshColName : ThreshColNames.values()) {
|
||||
if (sortedColumnName.contains(threshColName.name())) {
|
||||
sortedThreshCol = threshColName;
|
||||
|
@ -413,6 +416,7 @@ public abstract class FFMPTable extends Composite {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
table.removeAll();
|
||||
|
||||
|
@ -439,10 +443,11 @@ public abstract class FFMPTable extends Composite {
|
|||
/*
|
||||
* Check if the data value is Not A Number.
|
||||
*/
|
||||
if (!sortedColumnName.equalsIgnoreCase(NAME)) {
|
||||
float dataVal = cellData[sortColIndex].getValueAsFloat();
|
||||
|
||||
// DR 14250 fix: any value not a number will be omitted
|
||||
if (/* sortedThreshCol.name().equalsIgnoreCase("RATIO") && */Float
|
||||
.isNaN(dataVal)) {
|
||||
if (Float.isNaN(dataVal)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -457,7 +462,7 @@ public abstract class FFMPTable extends Composite {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
indexArray.add(t);
|
||||
|
||||
// Check to see if this is the selected row
|
||||
|
@ -465,6 +470,7 @@ public abstract class FFMPTable extends Composite {
|
|||
tableIndex = indexArray.indexOf(t);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* VIRTUAL TABLE
|
||||
*
|
||||
|
@ -608,6 +614,10 @@ public abstract class FFMPTable extends Composite {
|
|||
* Table column to sort.
|
||||
*/
|
||||
private void sortTableData(TableColumn tc) {
|
||||
if (tableData == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String sortCol = (String) tc.getData();
|
||||
|
||||
int sortDir = getColumnAttributeData(sortCol).getSortDir();
|
||||
|
|
|
@ -227,7 +227,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
|
||||
private FFMPTableDataLoader dataRetrieveThread = null;
|
||||
|
||||
private boolean sweet = true;
|
||||
private boolean groupLabelFlag = true;
|
||||
|
||||
public FfmpBasinTableDlg(Shell parent, FFMPTableData tData,
|
||||
FFMPResource resource) {
|
||||
|
@ -1646,7 +1646,6 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
@Override
|
||||
public void run() {
|
||||
// Must be a full 11 digit pfaf in order to display the graph.
|
||||
System.out.println(pfaf);
|
||||
if ((pfaf.length() < 11) && pfaf.matches("\\d+")) {
|
||||
resetCursor();
|
||||
return;
|
||||
|
@ -1693,7 +1692,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
@Override
|
||||
public void tableSelection(String pfaf, String name) {
|
||||
if (groupLbl.getText().length() > 0) {
|
||||
sweet = false;
|
||||
groupLabelFlag = false;
|
||||
}
|
||||
|
||||
if ((groupLbl.getText().length() == 0)
|
||||
|
@ -2011,7 +2010,6 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
// System.out.println("Status message...");
|
||||
|
||||
if (gd.exclude == true) {
|
||||
System.out.println("Showing data load comp");
|
||||
((GridData) dataLoadComp.getLayoutData()).exclude = false;
|
||||
dataLoadComp.setVisible(true);
|
||||
shell.pack();
|
||||
|
@ -2127,13 +2125,13 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
dataRetrieveThread = getLoader();
|
||||
dataRetrieveThread.start();
|
||||
return;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (fupdateData.getTableData() != null && sweet) {
|
||||
if (fupdateData.getTableData() != null && groupLabelFlag) {
|
||||
resetData(fupdateData.getTableData());
|
||||
}
|
||||
|
||||
groupLabelFlag = true;
|
||||
if (fupdateData.isFireGraph()) {
|
||||
fireGraphDataEvent(fupdateData.getGraphPfaf(), false,
|
||||
fupdateData.getGraphTime());
|
||||
|
@ -2143,7 +2141,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
updateGapValueLabel(fupdateData.getGapValueLabel());
|
||||
|
||||
resetCursor();
|
||||
sweet = true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -73,9 +73,24 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FfmpTableConfigData;
|
|||
public class FFMPDataGenerator {
|
||||
private FfmpTableConfig tableConfig;
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(FFMPDataGenerator.class);
|
||||
|
||||
private final String ALL = "ALL";
|
||||
|
||||
private final String NA = "NA";
|
||||
|
||||
private String siteKey;
|
||||
private String dataKey;
|
||||
private ProductXML product;
|
||||
private Date paintRefTime;
|
||||
private Date tableTime;
|
||||
private Object centeredAggregationKey;
|
||||
private String huc;
|
||||
private ArrayList<DomainXML> domains;
|
||||
private double sliderTime;
|
||||
private boolean isWorstCase = false;
|
||||
|
||||
FFMPConfig ffmpCfg = FFMPConfig.getInstance();
|
||||
|
||||
FFMPTemplates ft = null;
|
||||
|
@ -125,16 +140,27 @@ public class FFMPDataGenerator {
|
|||
private FfmpTableConfigData ffmpTableCfgData = null;
|
||||
|
||||
public FFMPDataGenerator(FFMPMonitor monitor, FFMPResource resource) {
|
||||
siteKey = resource.getSiteKey();
|
||||
dataKey = resource.getDataKey();
|
||||
product = resource.getProduct();
|
||||
paintRefTime = resource.getPaintTime().getRefTime();
|
||||
tableTime = resource.getTableTime();
|
||||
centeredAggregationKey = resource.centeredAggregationKey;
|
||||
huc = resource.getHuc();
|
||||
domains = resource.getDomains();
|
||||
sliderTime = resource.getTime();
|
||||
isWorstCase = resource.isWorstCase();
|
||||
|
||||
this.tableConfig = FfmpTableConfig.getInstance();
|
||||
this.resource = resource;
|
||||
this.monitor = monitor;
|
||||
this.ft = monitor.getTemplates(resource.getSiteKey());
|
||||
this.ft = monitor.getTemplates(siteKey);
|
||||
this.primarySource = resource.getResourceData().getPrimarySourceXML();
|
||||
this.isRate = primarySource.isRate();
|
||||
this.expirationTime = primarySource.getExpirationMinutes(resource
|
||||
.getSiteKey()) * 60 * 1000;
|
||||
ffmpTableCfgData = tableConfig
|
||||
.getTableConfigData(resource.getSiteKey());
|
||||
.getTableConfigData(siteKey);
|
||||
}
|
||||
|
||||
public FFMPTableData generateFFMPData() throws Exception {
|
||||
|
@ -149,24 +175,23 @@ public class FFMPDataGenerator {
|
|||
if (field != null) {
|
||||
if (baseRec != null) {
|
||||
FFMPBasinData fbd = null;
|
||||
if (resource.centeredAggregationKey != null) {
|
||||
fbd = baseRec.getBasinData("ALL");
|
||||
if (centeredAggregationKey != null) {
|
||||
fbd = baseRec.getBasinData(ALL);
|
||||
} else {
|
||||
fbd = baseRec.getBasinData(resource.getHuc());
|
||||
fbd = baseRec.getBasinData(huc);
|
||||
}
|
||||
|
||||
if (fbd.getBasins().size() > 0) {
|
||||
if ((resource.centeredAggregationKey == null)
|
||||
|| resource.getHuc().equals("ALL")) {
|
||||
if ((centeredAggregationKey == null)
|
||||
|| huc.equals(ALL)) {
|
||||
// System.out.println(fbd.getBasins().keySet().size()
|
||||
// + " rows in the table");
|
||||
for (Long key : fbd.getBasins().keySet()) {
|
||||
if (resource.getHuc().equals("ALL")) {
|
||||
for (DomainXML domain : resource
|
||||
.getDomains()) {
|
||||
if (huc.equals(ALL)) {
|
||||
for (DomainXML domain : domains) {
|
||||
|
||||
FFMPBasinMetaData fmdb = ft.getBasin(
|
||||
resource.getSiteKey(), key);
|
||||
siteKey, key);
|
||||
|
||||
if (fmdb == null) {
|
||||
continue;
|
||||
|
@ -183,7 +208,7 @@ public class FFMPDataGenerator {
|
|||
if (virtualBasin != null) {
|
||||
for (Long id : ft
|
||||
.getVirtualGageBasinLookupIds(
|
||||
resource.getSiteKey(),
|
||||
siteKey,
|
||||
key)) {
|
||||
setFFMPRow(
|
||||
virtualBasin
|
||||
|
@ -203,13 +228,13 @@ public class FFMPDataGenerator {
|
|||
|
||||
ArrayList<Long> pfafs = ft
|
||||
.getAggregatePfafs(key,
|
||||
resource.getSiteKey(),
|
||||
resource.getHuc());
|
||||
siteKey,
|
||||
huc);
|
||||
|
||||
boolean isVGB = false;
|
||||
if (ft.checkVGBsInAggregate(key,
|
||||
resource.getSiteKey(),
|
||||
resource.getHuc())) {
|
||||
siteKey,
|
||||
huc)) {
|
||||
isVGB = true;
|
||||
}
|
||||
|
||||
|
@ -217,8 +242,8 @@ public class FFMPDataGenerator {
|
|||
|
||||
FFMPBasinMetaData fmdb = ft
|
||||
.getBasinInDomains(
|
||||
resource.getSiteKey(),
|
||||
resource.getDomains(),
|
||||
siteKey,
|
||||
domains,
|
||||
pfafs);
|
||||
|
||||
if (fmdb != null) {
|
||||
|
@ -239,11 +264,10 @@ public class FFMPDataGenerator {
|
|||
.getCenteredAggregatePfafs()) {
|
||||
|
||||
FFMPBasinMetaData fmdb = ft.getBasin(
|
||||
resource.getSiteKey(), key);
|
||||
siteKey, key);
|
||||
|
||||
if (fmdb != null) {
|
||||
for (DomainXML domain : resource
|
||||
.getDomains()) {
|
||||
for (DomainXML domain : domains) {
|
||||
|
||||
if ((domain.getCwa().equals(fmdb
|
||||
.getCwa()))
|
||||
|
@ -256,7 +280,7 @@ public class FFMPDataGenerator {
|
|||
if (virtualBasin != null) {
|
||||
for (Long id : ft
|
||||
.getVirtualGageBasinLookupIds(
|
||||
resource.getSiteKey(),
|
||||
siteKey,
|
||||
key)) {
|
||||
setFFMPRow(
|
||||
virtualBasin
|
||||
|
@ -325,17 +349,17 @@ public class FFMPDataGenerator {
|
|||
// in this special case it is actually the LID
|
||||
trd.setPfaf(((FFMPVirtualGageBasin) cBasin).getLid());
|
||||
FFMPVirtualGageBasinMetaData fvgmbd = ft
|
||||
.getVirtualGageBasinMetaData(resource.getSiteKey(),
|
||||
.getVirtualGageBasinMetaData(siteKey,
|
||||
((FFMPVirtualGageBasin) cBasin).getLid());
|
||||
FFMPBasinMetaData metabasin = ft.getBasin(
|
||||
resource.getSiteKey(), fvgmbd.getParentPfaf());
|
||||
siteKey, fvgmbd.getParentPfaf());
|
||||
Long parentBasinPfaf = fvgmbd.getParentPfaf();
|
||||
|
||||
if (fvgmbd != null) {
|
||||
mouseOverText = metabasin.getBasinId() + "\n"
|
||||
+ fvgmbd.getLid() + "-" + fvgmbd.getName();
|
||||
|
||||
if (!resource.getHuc().equals("ALL")) {
|
||||
if (!huc.equals(ALL)) {
|
||||
displayName += "-" + fvgmbd.getName();
|
||||
}
|
||||
}
|
||||
|
@ -343,12 +367,12 @@ public class FFMPDataGenerator {
|
|||
trd.setTableCellData(0, new FFMPTableCellData(rowField,
|
||||
displayName, mouseOverText));
|
||||
|
||||
if (!resource.isWorstCase() || resource.getHuc().equals("ALL")
|
||||
|| (resource.centeredAggregationKey != null)) {
|
||||
if (!isWorstCase || huc.equals(ALL)
|
||||
|| (centeredAggregationKey != null)) {
|
||||
|
||||
if (cBasin.getValues().size() > 0) {
|
||||
rate = ((FFMPVirtualGageBasin) cBasin)
|
||||
.getValue(resource.getPaintTime().getRefTime());
|
||||
.getValue(paintRefTime);
|
||||
trd.setTableCellData(1, new FFMPTableCellData(
|
||||
FIELDS.RATE, rate));
|
||||
} else {
|
||||
|
@ -357,7 +381,7 @@ public class FFMPDataGenerator {
|
|||
}
|
||||
if (cBasin.getValues().size() > 0) {
|
||||
|
||||
if (resource.getTime() > 0.00) {
|
||||
if (sliderTime > 0.00) {
|
||||
qpe = cBasin.getAccumValue(monitor.getQpeWindow()
|
||||
.getAfterTime(), monitor.getQpeWindow()
|
||||
.getBeforeTime(), expirationTime, isRate);
|
||||
|
@ -394,7 +418,7 @@ public class FFMPDataGenerator {
|
|||
boolean forced = false;
|
||||
FFFGForceUtil forceUtil = forceUtils.get(guidType);
|
||||
FFMPBasinData guidBasin = guidBasins.get(guidType);
|
||||
forceUtil.setSliderTime(resource.getTime());
|
||||
forceUtil.setSliderTime(sliderTime);
|
||||
|
||||
if ((guidBasin != null)
|
||||
&& ((FFMPGuidanceBasin) guidBasin
|
||||
|
@ -407,26 +431,26 @@ public class FFMPDataGenerator {
|
|||
if (domain == null) {
|
||||
pfafList = ft.getAggregatePfafs(
|
||||
cBasin.getPfaf(),
|
||||
resource.getSiteKey(),
|
||||
resource.getHuc());
|
||||
} else if (!domain.equals("NA")) {
|
||||
if (!resource.getHuc().equals("ALL")) {
|
||||
siteKey,
|
||||
huc);
|
||||
} else if (!domain.equals(NA)) {
|
||||
if (!huc.equals(ALL)) {
|
||||
pfafList = ft
|
||||
.getAggregatePfafsByDomain(
|
||||
parentBasinPfaf,
|
||||
resource.getSiteKey(),
|
||||
siteKey,
|
||||
domain,
|
||||
resource.getHuc());
|
||||
huc);
|
||||
}
|
||||
} else {
|
||||
pfafList = ft.getAggregatePfafsByDomain(
|
||||
parentBasinPfaf,
|
||||
resource.getSiteKey(), domain,
|
||||
resource.getHuc());
|
||||
siteKey, domain,
|
||||
huc);
|
||||
pfafList.add(ft.getAggregatedPfaf(
|
||||
cBasin.getPfaf(),
|
||||
resource.getSiteKey(),
|
||||
resource.getHuc()));
|
||||
siteKey,
|
||||
huc));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -434,7 +458,7 @@ public class FFMPDataGenerator {
|
|||
|
||||
if (fdm.isForcingConfigured()) {
|
||||
FFMPBasin parentBasin = baseRec.getBasinData(
|
||||
"ALL").get(parentBasinPfaf);
|
||||
ALL).get(parentBasinPfaf);
|
||||
forceUtil.calculateForcings(domain, ft,
|
||||
parentBasin);
|
||||
forcedPfafs = forceUtil.getForcedPfafList();
|
||||
|
@ -446,7 +470,7 @@ public class FFMPDataGenerator {
|
|||
// value(s)
|
||||
guidance = guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData("ALL")
|
||||
.getBasinData(ALL)
|
||||
.getAverageGuidanceValue(
|
||||
pfafList,
|
||||
resource.getGuidanceInterpolators()
|
||||
|
@ -457,7 +481,7 @@ public class FFMPDataGenerator {
|
|||
} else if (forcedPfafs.size() > 1) {
|
||||
guidance = guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData("ALL")
|
||||
.getBasinData(ALL)
|
||||
.getAverageGuidanceValue(
|
||||
pfafList,
|
||||
resource.getGuidanceInterpolators()
|
||||
|
@ -469,7 +493,7 @@ public class FFMPDataGenerator {
|
|||
} else if (pfafList.size() > 1) {
|
||||
guidance = guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData("ALL")
|
||||
.getBasinData(ALL)
|
||||
.getAverageGuidanceValue(
|
||||
pfafList,
|
||||
resource.getGuidanceInterpolators()
|
||||
|
@ -479,8 +503,7 @@ public class FFMPDataGenerator {
|
|||
resource.getGuidSourceExpiration());
|
||||
} else {
|
||||
guidance = resource.getGuidanceValue(
|
||||
ffmpGuidBasin, resource.getPaintTime()
|
||||
.getRefTime(), guidType);
|
||||
ffmpGuidBasin, paintRefTime, guidType);
|
||||
|
||||
if (guidance < 0.0f) {
|
||||
guidance = Float.NaN;
|
||||
|
@ -530,11 +553,11 @@ public class FFMPDataGenerator {
|
|||
displayName, cBasin.getPfaf().toString() + "\n"
|
||||
+ displayName));
|
||||
|
||||
if (!resource.isWorstCase() || resource.getHuc().equals("ALL")
|
||||
|| (resource.centeredAggregationKey != null)) {
|
||||
if (!isWorstCase || huc.equals(ALL)
|
||||
|| (centeredAggregationKey != null)) {
|
||||
if ((rateBasin != null)
|
||||
&& (rateBasin.get(cBasin.getPfaf()) != null)) {
|
||||
rate = rateBasin.get(cBasin.getPfaf()).getValue(resource.getPaintTime().getRefTime());
|
||||
rate = rateBasin.get(cBasin.getPfaf()).getValue(paintRefTime);
|
||||
trd.setTableCellData(1, new FFMPTableCellData(
|
||||
FIELDS.RATE, rate));
|
||||
// System.out.println("rate: "+rate);
|
||||
|
@ -579,7 +602,7 @@ public class FFMPDataGenerator {
|
|||
boolean forced = false;
|
||||
FFFGForceUtil forceUtil = forceUtils.get(guidType);
|
||||
FFMPBasinData guidBasin = guidBasins.get(guidType);
|
||||
forceUtil.setSliderTime(resource.getTime());
|
||||
forceUtil.setSliderTime(sliderTime);
|
||||
|
||||
if ((guidBasin != null)
|
||||
&& ((FFMPGuidanceBasin) guidBasin.get(cBasin
|
||||
|
@ -592,26 +615,26 @@ public class FFMPDataGenerator {
|
|||
if (domain == null) {
|
||||
pfafList = ft.getAggregatePfafs(
|
||||
cBasin.getPfaf(),
|
||||
resource.getSiteKey(),
|
||||
resource.getHuc());
|
||||
} else if (!domain.equals("NA")) {
|
||||
if (!resource.getHuc().equals("ALL")) {
|
||||
siteKey,
|
||||
huc);
|
||||
} else if (!domain.equals(NA)) {
|
||||
if (!huc.equals(ALL)) {
|
||||
pfafList = ft
|
||||
.getAggregatePfafsByDomain(
|
||||
cBasin.getPfaf(),
|
||||
resource.getSiteKey(),
|
||||
siteKey,
|
||||
domain,
|
||||
resource.getHuc());
|
||||
huc);
|
||||
}
|
||||
} else {
|
||||
pfafList = ft.getAggregatePfafsByDomain(
|
||||
cBasin.getPfaf(),
|
||||
resource.getSiteKey(), domain,
|
||||
resource.getHuc());
|
||||
siteKey, domain,
|
||||
huc);
|
||||
pfafList.add(ft.getAggregatedPfaf(
|
||||
cBasin.getPfaf(),
|
||||
resource.getSiteKey(),
|
||||
resource.getHuc()));
|
||||
siteKey,
|
||||
huc));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -628,7 +651,7 @@ public class FFMPDataGenerator {
|
|||
// value(s)
|
||||
guidance = guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData("ALL")
|
||||
.getBasinData(ALL)
|
||||
.getAverageGuidanceValue(
|
||||
pfafList,
|
||||
resource.getGuidanceInterpolators()
|
||||
|
@ -639,7 +662,7 @@ public class FFMPDataGenerator {
|
|||
} else if (forcedPfafs.size() > 1) {
|
||||
guidance = guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData("ALL")
|
||||
.getBasinData(ALL)
|
||||
.getAverageGuidanceValue(
|
||||
pfafList,
|
||||
resource.getGuidanceInterpolators()
|
||||
|
@ -651,7 +674,7 @@ public class FFMPDataGenerator {
|
|||
} else if (pfafList.size() > 1) {
|
||||
guidance = guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData("ALL")
|
||||
.getBasinData(ALL)
|
||||
.getAverageGuidanceValue(
|
||||
pfafList,
|
||||
resource.getGuidanceInterpolators()
|
||||
|
@ -739,22 +762,22 @@ public class FFMPDataGenerator {
|
|||
if (cBasin.getAggregated()) {
|
||||
if (domain == null) {
|
||||
pfafList = ft.getAggregatePfafs(cBasin.getPfaf(),
|
||||
resource.getSiteKey(), resource.getHuc());
|
||||
} else if (!domain.equals("NA")) {
|
||||
if (!resource.getHuc().equals("ALL")) {
|
||||
siteKey, huc);
|
||||
} else if (!domain.equals(NA)) {
|
||||
if (!huc.equals(ALL)) {
|
||||
pfafList = ft.getAggregatePfafsByDomain(cBasin.getPfaf(),
|
||||
resource.getSiteKey(), domain, resource.getHuc());
|
||||
siteKey, domain, huc);
|
||||
}
|
||||
} else {
|
||||
pfafList = ft.getAggregatePfafsByDomain(cBasin.getPfaf(),
|
||||
resource.getSiteKey(), domain, resource.getHuc());
|
||||
siteKey, domain, huc);
|
||||
pfafList.add(ft.getAggregatedPfaf(cBasin.getPfaf(),
|
||||
resource.getSiteKey(), resource.getHuc()));
|
||||
siteKey, huc));
|
||||
}
|
||||
}
|
||||
|
||||
if (!resource.isWorstCase() || resource.getHuc().equals("ALL")
|
||||
|| (resource.centeredAggregationKey != null)) {
|
||||
if (!isWorstCase || huc.equals(ALL)
|
||||
|| (centeredAggregationKey != null)) {
|
||||
if (((forcedPfafs.size() > 1)) || forced) {
|
||||
// Calculate an average
|
||||
guidance = forceUtil.getAvgForcedValue(pfafList, forcedPfafs,
|
||||
|
@ -785,25 +808,25 @@ public class FFMPDataGenerator {
|
|||
String name = null;
|
||||
|
||||
try {
|
||||
if (resource.getHuc().equals("ALL")
|
||||
|| (resource.centeredAggregationKey != null)) {
|
||||
name = ft.getBasin(resource.getSiteKey(), basin.getPfaf())
|
||||
if (huc.equals(ALL)
|
||||
|| (centeredAggregationKey != null)) {
|
||||
name = ft.getBasin(siteKey, basin.getPfaf())
|
||||
.getStreamName();
|
||||
}
|
||||
// aggregations
|
||||
else {
|
||||
|
||||
ArrayList<Long> pfafs = ft.getAggregatePfafs(basin.getPfaf(),
|
||||
resource.getSiteKey(), resource.getHuc());
|
||||
siteKey, huc);
|
||||
if (pfafs.size() > 0) {
|
||||
if (resource.getHuc().equals("COUNTY")) {
|
||||
name = ft.getCountyStateName(resource.getSiteKey(),
|
||||
if (huc.equals("COUNTY")) {
|
||||
name = ft.getCountyStateName(siteKey,
|
||||
basin.getPfaf());
|
||||
} else {
|
||||
for (int i = 0; i < pfafs.size(); i++) {
|
||||
if (ft.getBasin(resource.getSiteKey(), pfafs.get(0))
|
||||
if (ft.getBasin(siteKey, pfafs.get(0))
|
||||
.getHucName() != null) {
|
||||
name = ft.getBasin(resource.getSiteKey(),
|
||||
name = ft.getBasin(siteKey,
|
||||
pfafs.get(0)).getHucName();
|
||||
break;
|
||||
}
|
||||
|
@ -832,7 +855,7 @@ public class FFMPDataGenerator {
|
|||
}
|
||||
|
||||
ArrayList<Long> pfafs = ft.getAggregatePfafs(cBasin.getPfaf(),
|
||||
resource.getSiteKey(), resource.getHuc(), activeDomains);
|
||||
siteKey, huc, activeDomains);
|
||||
trd.setPfaf(cBasin.getPfaf().toString());
|
||||
Float qpe = Float.NaN;
|
||||
Float guidance = Float.NaN;
|
||||
|
@ -846,13 +869,13 @@ public class FFMPDataGenerator {
|
|||
1,
|
||||
new FFMPTableCellData(FIELDS.RATE, virtualBasin
|
||||
.get(cBasin.getPfaf()).getValue(
|
||||
resource.getPaintTime().getRefTime())));
|
||||
paintRefTime)));
|
||||
} else {
|
||||
trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE,
|
||||
Float.NaN));
|
||||
}
|
||||
if (virtualBasin != null) {
|
||||
if (resource.getTime() > 0.00) {
|
||||
if (sliderTime > 0.00) {
|
||||
qpe = virtualBasin.get(cBasin.getPfaf()).getAccumValue(
|
||||
monitor.getQpeWindow().getAfterTime(),
|
||||
monitor.getQpeWindow().getBeforeTime(),
|
||||
|
@ -887,7 +910,7 @@ public class FFMPDataGenerator {
|
|||
int i = 0;
|
||||
for (String guidType : guidBasins.keySet()) {
|
||||
FFFGForceUtil forceUtil = forceUtils.get(guidType);
|
||||
forceUtil.setSliderTime(resource.getTime());
|
||||
forceUtil.setSliderTime(sliderTime);
|
||||
|
||||
FFMPBasinData guidBasin = guidBasins.get(guidType);
|
||||
|
||||
|
@ -941,7 +964,7 @@ public class FFMPDataGenerator {
|
|||
} else {
|
||||
if (pfafs.size() > 0) {
|
||||
if (rateBasin != null) {
|
||||
rate = rateBasin.getMaxValue(pfafs, resource.getPaintTime().getRefTime());
|
||||
rate = rateBasin.getMaxValue(pfafs, paintRefTime);
|
||||
trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE,
|
||||
rate));
|
||||
} else {
|
||||
|
@ -977,7 +1000,7 @@ public class FFMPDataGenerator {
|
|||
int i = 0;
|
||||
for (String guidType : guidBasins.keySet()) {
|
||||
FFFGForceUtil forceUtil = forceUtils.get(guidType);
|
||||
forceUtil.setSliderTime(resource.getTime());
|
||||
forceUtil.setSliderTime(sliderTime);
|
||||
|
||||
FFMPBasinData guidBasin = guidBasins.get(guidType);
|
||||
|
||||
|
@ -986,9 +1009,9 @@ public class FFMPDataGenerator {
|
|||
&& (guidBasin.getBasins().size() > 0)) {
|
||||
if (cBasin.getAggregated()) {
|
||||
pfafList = ft.getAggregatePfafs(cBasin.getPfaf(),
|
||||
resource.getSiteKey(), resource.getHuc());
|
||||
siteKey, huc);
|
||||
pfafList.add(ft.getAggregatedPfaf(cBasin.getPfaf(),
|
||||
resource.getSiteKey(), resource.getHuc()));
|
||||
siteKey, huc));
|
||||
}
|
||||
|
||||
boolean forced = false;
|
||||
|
@ -1008,10 +1031,10 @@ public class FFMPDataGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
if (resource.isWorstCase()) {
|
||||
if (isWorstCase) {
|
||||
guidance = guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData("ALL")
|
||||
.getBasinData(ALL)
|
||||
.getMaxGuidanceValue(
|
||||
pfafs,
|
||||
resource.getGuidanceInterpolators()
|
||||
|
@ -1021,7 +1044,7 @@ public class FFMPDataGenerator {
|
|||
} else {
|
||||
FFMPGuidanceBasin basin = (FFMPGuidanceBasin) guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData(resource.getHuc())
|
||||
.getBasinData(huc)
|
||||
.get(cBasin.getPfaf());
|
||||
guidance = resource.getGuidanceValue(basin, monitor
|
||||
.getQpeWindow().getBeforeTime(), guidType);
|
||||
|
@ -1081,7 +1104,7 @@ public class FFMPDataGenerator {
|
|||
trd.setTableCellData(
|
||||
1,
|
||||
new FFMPTableCellData(FIELDS.RATE, rateBasin.get(
|
||||
cBasin.getPfaf()).getValue(resource.getPaintTime().getRefTime())));
|
||||
cBasin.getPfaf()).getValue(paintRefTime)));
|
||||
} else {
|
||||
trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE,
|
||||
Float.NaN));
|
||||
|
@ -1118,7 +1141,7 @@ public class FFMPDataGenerator {
|
|||
int i = 0;
|
||||
for (String guidType : guidBasins.keySet()) {
|
||||
FFFGForceUtil forceUtil = forceUtils.get(guidType);
|
||||
forceUtil.setSliderTime(resource.getTime());
|
||||
forceUtil.setSliderTime(sliderTime);
|
||||
|
||||
FFMPBasinData guidBasin = guidBasins.get(guidType);
|
||||
|
||||
|
@ -1185,84 +1208,78 @@ public class FFMPDataGenerator {
|
|||
* @throws VizException
|
||||
*/
|
||||
private FIELDS getBaseField() {
|
||||
System.out.println("Paint/Table Time: " + paintRefTime + "/" + tableTime);
|
||||
|
||||
FIELDS field = null;
|
||||
String huc = null;
|
||||
String localHuc = null;
|
||||
dman = FFFGDataMgr.getInstance();
|
||||
|
||||
|
||||
FfmpTableConfigData ffmpTableCfgData = FfmpTableConfig.getInstance()
|
||||
.getTableConfigData(resource.getSiteKey());
|
||||
.getTableConfigData(siteKey);
|
||||
String qpfType = ffmpTableCfgData.getQpfType();
|
||||
ProductRunXML productRun = FFMPRunConfigurationManager.getInstance()
|
||||
.getProduct(resource.getSiteKey());
|
||||
.getProduct(siteKey);
|
||||
String qpfSource = productRun
|
||||
.getQpfSources(resource.getProduct(), qpfType).get(0)
|
||||
.getQpfSources(product, qpfType).get(0)
|
||||
.getSourceName();
|
||||
|
||||
FFMPConfig config = FFMPConfig.getInstance();
|
||||
String includedCWAs = config.getFFMPConfigData().getIncludedCWAs();
|
||||
cwaArr = includedCWAs.split(",");
|
||||
monitor.setQpfWindow(monitor.getTimeWindow(qpfSource, resource
|
||||
.getPaintTime().getRefTime(), resource.getSiteKey()));
|
||||
Date qpeTime = resource.getPaintTime().getRefTime();
|
||||
monitor.setQpfWindow(monitor.getTimeWindow(qpfSource, paintRefTime, siteKey));
|
||||
Date qpeTime = paintRefTime;
|
||||
if (resource.isSplit()) {
|
||||
// hack off the QPF duration for the table values of QPE (Split
|
||||
// Window)
|
||||
double duration = FFMPSourceConfigurationManager.getInstance()
|
||||
.getSource(qpfSource).getDurationHour();
|
||||
qpeTime = new Date((long) (resource.getPaintTime().getRefTime()
|
||||
.getTime() - (duration * 3600 * 1000)));
|
||||
qpeTime = new Date((long) (qpeTime.getTime() - (duration * 3600 * 1000)));
|
||||
}
|
||||
|
||||
monitor.setQpeWindow(new FFMPTimeWindow(resource.getTableTime(),
|
||||
monitor.setQpeWindow(new FFMPTimeWindow(tableTime,
|
||||
qpeTime));
|
||||
// set keys
|
||||
String siteKey = resource.getSiteKey();
|
||||
String dataKey = resource.getDataKey();
|
||||
ProductXML product = resource.getProduct();
|
||||
|
||||
if (resource.isWorstCase() || (resource.centeredAggregationKey != null)) {
|
||||
if (isWorstCase || (centeredAggregationKey != null)) {
|
||||
// make sure that "ALL" is loaded
|
||||
huc = "ALL";
|
||||
localHuc = ALL;
|
||||
rateRecord = monitor.getRateRecord(product, siteKey, dataKey,
|
||||
product.getRate(), resource.getPaintTime().getRefTime(),
|
||||
huc, true);
|
||||
product.getRate(), paintRefTime, localHuc, true);
|
||||
qpeRecord = monitor.getQPERecord(product, siteKey, dataKey,
|
||||
product.getQpe(), resource.getTableTime(), huc, true);
|
||||
product.getQpe(), tableTime, localHuc, true);
|
||||
qpfRecord = monitor.getQPFRecord(product, siteKey, dataKey, null,
|
||||
resource.getPaintTime().getRefTime(), huc, true);
|
||||
paintRefTime, localHuc, true);
|
||||
guidRecords = monitor.getGuidanceRecords(product, siteKey,
|
||||
resource.getTableTime(), huc, true);
|
||||
tableTime, localHuc, true);
|
||||
virtualRecord = monitor.getVirtualRecord(product, siteKey, dataKey,
|
||||
product.getVirtual(), resource.getTableTime(), huc, true);
|
||||
product.getVirtual(), tableTime, localHuc, true);
|
||||
} else {
|
||||
rateRecord = monitor.getRateRecord(product, siteKey, dataKey,
|
||||
product.getRate(), resource.getPaintTime().getRefTime(),
|
||||
resource.getHuc(), true);
|
||||
product.getRate(), paintRefTime, huc, true);
|
||||
qpeRecord = monitor.getQPERecord(product, siteKey, dataKey,
|
||||
product.getQpe(), resource.getTableTime(),
|
||||
resource.getHuc(), true);
|
||||
product.getQpe(), tableTime, huc, true);
|
||||
qpfRecord = monitor.getQPFRecord(product, siteKey, dataKey, null,
|
||||
resource.getPaintTime().getRefTime(), resource.getHuc(), true);
|
||||
paintRefTime, huc, true);
|
||||
guidRecords = monitor.getGuidanceRecords(product, siteKey,
|
||||
resource.getTableTime(), resource.getHuc(), true);
|
||||
if (resource.getHuc().equals("ALL")) {
|
||||
tableTime, huc, true);
|
||||
if (huc.equals(ALL)) {
|
||||
virtualRecord = monitor.getVirtualRecord(product, siteKey,
|
||||
dataKey, product.getVirtual(), resource.getTableTime(),
|
||||
resource.getHuc(), true);
|
||||
dataKey, product.getVirtual(), tableTime,
|
||||
huc, true);
|
||||
}
|
||||
huc = resource.getHuc();
|
||||
localHuc = huc;
|
||||
}
|
||||
|
||||
try {
|
||||
if (rateRecord != null) {
|
||||
rateBasin = rateRecord.getBasinData(huc);
|
||||
rateBasin = rateRecord.getBasinData(localHuc);
|
||||
if (rateBasin.getBasins().size() > 0) {
|
||||
field = FIELDS.RATE;
|
||||
baseRec = rateRecord;
|
||||
}
|
||||
}
|
||||
if (qpeRecord != null) {
|
||||
qpeBasin = qpeRecord.getBasinData(huc);
|
||||
qpeBasin = qpeRecord.getBasinData(localHuc);
|
||||
if (qpeBasin.getBasins().size() > 0) {
|
||||
field = FIELDS.QPE;
|
||||
if (baseRec == null) {
|
||||
|
@ -1271,21 +1288,21 @@ public class FFMPDataGenerator {
|
|||
}
|
||||
}
|
||||
if (qpfRecord != null) {
|
||||
qpfBasin = qpfRecord.getBasinData(huc);
|
||||
qpfBasin = qpfRecord.getBasinData(localHuc);
|
||||
}
|
||||
if (guidRecords != null) {
|
||||
guidBasins = new HashMap<String, FFMPBasinData>();
|
||||
for (String type : guidRecords.keySet()) {
|
||||
if (guidRecords.get(type) != null) {
|
||||
guidBasins.put(type, guidRecords.get(type)
|
||||
.getBasinData(huc));
|
||||
.getBasinData(localHuc));
|
||||
} else {
|
||||
guidBasins.put(type, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (virtualRecord != null) {
|
||||
virtualBasin = virtualRecord.getBasinData(huc);
|
||||
virtualBasin = virtualRecord.getBasinData(localHuc);
|
||||
}
|
||||
|
||||
// Get interpolators
|
||||
|
|
|
@ -40,7 +40,6 @@ import com.raytheon.uf.common.ohd.AppsDefaults;
|
|||
import com.raytheon.uf.common.serialization.DynamicSerializationManager;
|
||||
import com.raytheon.uf.common.serialization.DynamicSerializationManager.SerializationType;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.time.SimulatedTime;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.monitor.ffmp.FFMPMonitor;
|
||||
import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FFMPConfig;
|
||||
|
@ -65,7 +64,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.listeners.FFMPLoaderEvent;
|
|||
*/
|
||||
public class FFMPDataLoader extends Thread {
|
||||
|
||||
//private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
// private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
// .getHandler(FFMPDataLoader.class);
|
||||
|
||||
private String sharePath = null;
|
||||
|
@ -152,7 +151,6 @@ public class FFMPDataLoader extends Thread {
|
|||
|
||||
try {
|
||||
resourceData.setLoader(loadType);
|
||||
System.out.println("Starting Loader: "+loadType.getLoaderType());
|
||||
|
||||
ProductRunXML productRun = runner.getProduct(siteKey);
|
||||
ArrayList<String> qpfSources = new ArrayList<String>();
|
||||
|
@ -220,7 +218,8 @@ public class FFMPDataLoader extends Thread {
|
|||
}
|
||||
}
|
||||
}
|
||||
// We only load all for long range data, all + layer for medium range
|
||||
// We only load all for long range data, all + layer for medium
|
||||
// range
|
||||
if (loadType == LOADER_TYPE.TERTIARY) {
|
||||
hucsToLoad.clear();
|
||||
hucsToLoad.add("ALL");
|
||||
|
@ -238,7 +237,8 @@ public class FFMPDataLoader extends Thread {
|
|||
} else {
|
||||
// rate
|
||||
if (rateURI != null) {
|
||||
fireLoaderEvent(loadType, "Processing "+product.getRate() + "/" + phuc,
|
||||
fireLoaderEvent(loadType,
|
||||
"Processing " + product.getRate() + "/" + phuc,
|
||||
isDone);
|
||||
|
||||
getMonitor().processUri(isProductLoad, rateURI,
|
||||
|
@ -248,8 +248,8 @@ public class FFMPDataLoader extends Thread {
|
|||
}
|
||||
|
||||
// qpes
|
||||
fireLoaderEvent(loadType, "Processing "+product.getQpe() + "/" + phuc,
|
||||
isDone);
|
||||
fireLoaderEvent(loadType, "Processing " + product.getQpe()
|
||||
+ "/" + phuc, isDone);
|
||||
FFMPBasinData qpeData = null;
|
||||
|
||||
if (loadType == LOADER_TYPE.INITIAL) {
|
||||
|
@ -268,10 +268,10 @@ public class FFMPDataLoader extends Thread {
|
|||
}
|
||||
|
||||
if (!qpeURIs.isEmpty() && qpeData == null) {
|
||||
if (phuc.equals(config.getFFMPConfigData().getLayer()) || phuc.equals("ALL")) {
|
||||
if (phuc.equals(config.getFFMPConfigData().getLayer())
|
||||
|| phuc.equals("ALL")) {
|
||||
getMonitor().processUris(qpeURIs, isProductLoad,
|
||||
siteKey, product.getQpe(), timeBack, phuc,
|
||||
loadType);
|
||||
siteKey, product.getQpe(), timeBack, phuc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -281,7 +281,8 @@ public class FFMPDataLoader extends Thread {
|
|||
int i = 0;
|
||||
for (NavigableMap<Date, List<String>> qpfURIs : qpfs) {
|
||||
// qpf
|
||||
fireLoaderEvent(loadType, "Processing "+product.getQpf(i) + "/" + phuc,
|
||||
fireLoaderEvent(loadType,
|
||||
"Processing " + product.getQpf(i) + "/" + phuc,
|
||||
isDone);
|
||||
FFMPBasinData qpfData = null;
|
||||
if (loadType == LOADER_TYPE.INITIAL) {
|
||||
|
@ -306,7 +307,7 @@ public class FFMPDataLoader extends Thread {
|
|||
getMonitor().processUris(qpfURIs,
|
||||
isProductLoad, siteKey,
|
||||
source.getSourceName(),
|
||||
timeBack, phuc, loadType);
|
||||
timeBack, phuc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -314,15 +315,19 @@ public class FFMPDataLoader extends Thread {
|
|||
source.getSourceName(), phuc);
|
||||
}
|
||||
}
|
||||
//if (isUrisProcessNeeded(qpfData,qpfURIs)) {/*DR13839*/
|
||||
// if (isUrisProcessNeeded(qpfData,qpfURIs))
|
||||
// {/*DR13839*/
|
||||
if ((qpfData == null) && !qpfURIs.isEmpty()) {
|
||||
if (phuc.equals(config.getFFMPConfigData()
|
||||
.getLayer()) || phuc.equals("ALL")) { //old code: keep for reference*/
|
||||
//if (isHucProcessNeeded(phuc)) {/*DR13839*/
|
||||
.getLayer()) || phuc.equals("ALL")) { // old
|
||||
// code:
|
||||
// keep
|
||||
// for
|
||||
// reference*/
|
||||
// if (isHucProcessNeeded(phuc)) {/*DR13839*/
|
||||
getMonitor().processUris(qpfURIs,
|
||||
isProductLoad, siteKey,
|
||||
product.getQpf(i), timeBack, phuc,
|
||||
loadType);
|
||||
product.getQpf(i), timeBack, phuc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -335,7 +340,8 @@ public class FFMPDataLoader extends Thread {
|
|||
}
|
||||
// virtuals only have data for ALL
|
||||
if (phuc.equals("ALL")) {
|
||||
fireLoaderEvent(loadType, "Processing "+product.getVirtual() + "/" + phuc,
|
||||
fireLoaderEvent(loadType,
|
||||
"Processing " + product.getVirtual() + "/" + phuc,
|
||||
isDone);
|
||||
FFMPBasinData vgbData = null;
|
||||
|
||||
|
@ -356,8 +362,7 @@ public class FFMPDataLoader extends Thread {
|
|||
|
||||
if ((vgbData == null) && !virtualURIs.isEmpty()) {
|
||||
getMonitor().processUris(virtualURIs, isProductLoad,
|
||||
siteKey, product.getVirtual(), timeBack, phuc,
|
||||
loadType);
|
||||
siteKey, product.getVirtual(), timeBack, phuc);
|
||||
}
|
||||
|
||||
fireLoaderEvent(loadType,
|
||||
|
@ -374,12 +379,13 @@ public class FFMPDataLoader extends Thread {
|
|||
NavigableMap<Date, List<String>> iguidURIs = guids
|
||||
.get(guidSource.getSourceName());
|
||||
|
||||
fireLoaderEvent(loadType, "Processing "+guidSource.getSourceName() + "/" + phuc,
|
||||
isDone);
|
||||
fireLoaderEvent(loadType,
|
||||
"Processing " + guidSource.getSourceName()
|
||||
+ "/" + phuc, isDone);
|
||||
|
||||
getMonitor().processUris(iguidURIs, isProductLoad,
|
||||
siteKey, guidSource.getSourceName(), timeBack,
|
||||
phuc, loadType);
|
||||
phuc);
|
||||
|
||||
fireLoaderEvent(loadType, guidSource.getSourceName()
|
||||
+ "/" + phuc, isDone);
|
||||
|
@ -390,7 +396,6 @@ public class FFMPDataLoader extends Thread {
|
|||
fireLoaderEvent(loadType, phuc + " Load complete", isDone);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
isDone = true;
|
||||
System.err.println("FFMP Data Loader terminated...."
|
||||
+ e.getMessage());
|
||||
} finally {
|
||||
|
@ -491,7 +496,8 @@ public class FFMPDataLoader extends Thread {
|
|||
break;
|
||||
}
|
||||
|
||||
System.out.println("Buddy File expected path: " + file.getAbsolutePath());
|
||||
System.out.println("Buddy File expected path: "
|
||||
+ file.getAbsolutePath());
|
||||
FFMPBasinData basinData = null;
|
||||
|
||||
if (file.exists()) {
|
||||
|
@ -503,7 +509,8 @@ public class FFMPDataLoader extends Thread {
|
|||
while (lockFile.exists()) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
try {
|
||||
System.out.println("Waiting for new file: " + file.getAbsolutePath());
|
||||
System.out.println("Waiting for new file: "
|
||||
+ file.getAbsolutePath());
|
||||
sleep(100);
|
||||
i++;
|
||||
} catch (InterruptedException e) {
|
||||
|
@ -519,8 +526,7 @@ public class FFMPDataLoader extends Thread {
|
|||
try {
|
||||
|
||||
System.out.println("Loading file: " + file.getName());
|
||||
is = new BufferedInputStream(
|
||||
new FileInputStream(file));
|
||||
is = new BufferedInputStream(new FileInputStream(file));
|
||||
DynamicSerializationManager dsm = DynamicSerializationManager
|
||||
.getManager(SerializationType.Thrift);
|
||||
basinData = (FFMPBasinData) dsm.deserialize(is);
|
||||
|
|
|
@ -152,6 +152,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* 31 July 2012 14517 mpduff Fix for blanking map on update.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -373,7 +374,9 @@ public class FFMPResource extends
|
|||
private RGB basinBoundaryColor = null;
|
||||
|
||||
/** ordered list of times **/
|
||||
private ArrayList<Date> timeOrderedKeys = null;
|
||||
private ArrayList<Date> timeOrderedKeys = new ArrayList<Date>();
|
||||
|
||||
private boolean toKeysInitialized = false;
|
||||
|
||||
/** force utility **/
|
||||
private FFFGForceUtil forceUtil = null;
|
||||
|
@ -412,9 +415,15 @@ public class FFMPResource extends
|
|||
FFFGDataMgr.getUpdatedInstance();
|
||||
PluginDataObject[] pdos = (PluginDataObject[]) object;
|
||||
FFMPRecord ffmpRec = (FFMPRecord) pdos[pdos.length - 1];
|
||||
|
||||
if (getTimeOrderedKeys().contains(
|
||||
ffmpRec.getDataTime().getRefTime())) {
|
||||
return;
|
||||
}
|
||||
// an update clears everything
|
||||
clear();
|
||||
// only care about the most recent one
|
||||
try {
|
||||
|
||||
if (ffmpRec.getSourceName()
|
||||
.equals(getResourceData().sourceName)) {
|
||||
// go back an extra time step
|
||||
|
@ -430,6 +439,11 @@ public class FFMPResource extends
|
|||
}
|
||||
|
||||
updateTimeOrderedkeys(ffmpRec.getDataTime().getRefTime());
|
||||
|
||||
if (getResourceData().tableLoad) {
|
||||
setTableTime();
|
||||
}
|
||||
|
||||
setRecord(ffmpRec);
|
||||
|
||||
statusHandler.handle(Priority.INFO, "Updating : Previous: "
|
||||
|
@ -445,7 +459,7 @@ public class FFMPResource extends
|
|||
} else {
|
||||
while (!loader.isDone) {
|
||||
try {
|
||||
Thread.sleep(10);
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -457,7 +471,7 @@ public class FFMPResource extends
|
|||
|
||||
while (!loader.isDone) {
|
||||
try {
|
||||
Thread.sleep(10);
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -649,7 +663,8 @@ public class FFMPResource extends
|
|||
}
|
||||
case QPF: {
|
||||
value = getQpfRecord(recentTime).getBasinData("ALL")
|
||||
.getAverageMaxValue(pfafs, recentTime, getQpfSourceExpiration());
|
||||
.getAverageMaxValue(pfafs, recentTime,
|
||||
getQpfSourceExpiration());
|
||||
break;
|
||||
}
|
||||
case GUIDANCE: {
|
||||
|
@ -698,11 +713,13 @@ public class FFMPResource extends
|
|||
break;
|
||||
}
|
||||
case RATE:
|
||||
value = getBasin(key, field, recentTime, aggregate).getValue(recentTime);
|
||||
value = getBasin(key, field, recentTime, aggregate)
|
||||
.getValue(recentTime);
|
||||
break;
|
||||
case QPF: {
|
||||
value = getBasin(key, field, recentTime, aggregate)
|
||||
.getAverageValue(recentTime, getQpfSourceExpiration());
|
||||
.getAverageValue(recentTime,
|
||||
getQpfSourceExpiration());
|
||||
break;
|
||||
}
|
||||
case GUIDANCE: {
|
||||
|
@ -729,7 +746,8 @@ public class FFMPResource extends
|
|||
switch (field) {
|
||||
case QPF: {
|
||||
value = getBasin(key, field, recentTime, aggregate)
|
||||
.getAverageValue(recentTime, getQpfSourceExpiration());
|
||||
.getAverageValue(recentTime,
|
||||
getQpfSourceExpiration());
|
||||
break;
|
||||
}
|
||||
case GUIDANCE: {
|
||||
|
@ -862,7 +880,6 @@ public class FFMPResource extends
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return rateRecord;
|
||||
}
|
||||
|
||||
|
@ -891,6 +908,7 @@ public class FFMPResource extends
|
|||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// System.out.println("FFMPResource.getQPERecord(): " + getTableTime());
|
||||
|
||||
return qpeRecord;
|
||||
}
|
||||
|
@ -917,11 +935,13 @@ public class FFMPResource extends
|
|||
}
|
||||
|
||||
if (isWorstCase()) {
|
||||
guidRecord = monitor.getGuidanceRecord(getProduct(),
|
||||
getSiteKey(), sourceName, date, "ALL", isStandAlone);
|
||||
guidRecord = monitor
|
||||
.getGuidanceRecord(getProduct(), getSiteKey(),
|
||||
sourceName, date, "ALL", isStandAlone);
|
||||
} else {
|
||||
guidRecord = monitor.getGuidanceRecord(getProduct(),
|
||||
getSiteKey(), sourceName, date, getHuc(), isStandAlone);
|
||||
getSiteKey(), sourceName, date, getHuc(),
|
||||
isStandAlone);
|
||||
}
|
||||
|
||||
isNewGuid = false;
|
||||
|
@ -1073,12 +1093,12 @@ public class FFMPResource extends
|
|||
}
|
||||
|
||||
/**
|
||||
* DR 14522 fixing: enclosing font setting
|
||||
* into GUI thread to avoid invalid thread
|
||||
* access.
|
||||
* DR 14522 fixing: enclosing font setting into GUI thread to avoid invalid
|
||||
* thread access.
|
||||
*/
|
||||
@Override
|
||||
protected void initInternal(final IGraphicsTarget target) throws VizException {
|
||||
protected void initInternal(final IGraphicsTarget target)
|
||||
throws VizException {
|
||||
EditableManager.makeEditable(this,
|
||||
getCapability(EditableCapability.class).isEditable());
|
||||
IDisplayPaneContainer container = getResourceContainer();
|
||||
|
@ -1104,34 +1124,39 @@ public class FFMPResource extends
|
|||
statusHandler.handle(Priority.PROBLEM, "Error opening FFMP", ex);
|
||||
}
|
||||
|
||||
//DR 14522: use Display.getDefault().asyncExec() for GUI thread.
|
||||
org.eclipse.swt.widgets.Display.getDefault().asyncExec(new Runnable(){
|
||||
// DR 14522: use Display.getDefault().asyncExec() for GUI thread.
|
||||
org.eclipse.swt.widgets.Display.getDefault().asyncExec(new Runnable() {
|
||||
|
||||
public void run(){
|
||||
public void run() {
|
||||
|
||||
if (/*this.*/font == null) {
|
||||
/*this.*/font = target.initializeFont("Dialog", 11, null);
|
||||
if (/* this. */font == null) {
|
||||
/* this. */font = target.initializeFont("Dialog", 11, null);
|
||||
}
|
||||
|
||||
font.setMagnification(getCapability(MagnificationCapability.class)
|
||||
.getMagnification().floatValue());
|
||||
font.setMagnification(getCapability(
|
||||
MagnificationCapability.class).getMagnification()
|
||||
.floatValue());
|
||||
|
||||
if (/*this.*/xfont == null) {
|
||||
if (/* this. */xfont == null) {
|
||||
IFont.Style[] styles = new IFont.Style[] { IFont.Style.BOLD };
|
||||
/*this.*/xfont = target.initializeFont("Monospace", 12, styles);
|
||||
/* this. */xfont = target.initializeFont("Monospace", 12,
|
||||
styles);
|
||||
}
|
||||
|
||||
xfont.setMagnification(getCapability(MagnificationCapability.class)
|
||||
.getMagnification().floatValue());
|
||||
xfont.setMagnification(getCapability(
|
||||
MagnificationCapability.class).getMagnification()
|
||||
.floatValue());
|
||||
|
||||
fieldDescString = new DrawableString("FFMP " + df.format(getTime())
|
||||
+ " hour " + FFMPRecord.getFieldLongDescription(getField()),
|
||||
fieldDescString = new DrawableString("FFMP "
|
||||
+ df.format(getTime()) + " hour "
|
||||
+ FFMPRecord.getFieldLongDescription(getField()),
|
||||
getCapability(ColorableCapability.class).getColor());
|
||||
fieldDescString.font = font;
|
||||
fieldDescString.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
fieldDescString.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
basinLocatorString = new DrawableString("X", new RGB(255, 255, 255));
|
||||
basinLocatorString = new DrawableString("X", new RGB(255, 255,
|
||||
255));
|
||||
basinLocatorString.font = xfont;
|
||||
basinLocatorString.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
basinLocatorString.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
|
@ -1170,13 +1195,17 @@ public class FFMPResource extends
|
|||
FFMPDrawable drawable = null;
|
||||
|
||||
if (paintTime != null) {
|
||||
|
||||
if (loader != null && !loader.isDone && loader.loadType == LOADER_TYPE.GENERAL) {
|
||||
return;
|
||||
}
|
||||
if (!drawables.containsKey(paintTime)) {
|
||||
|
||||
drawable = new FFMPDrawable(getDomains());
|
||||
drawables.put(paintTime, drawable);
|
||||
} else {
|
||||
// we found it!
|
||||
drawable = drawables.get(paintTime);
|
||||
// System.out.println("Found the drawable");
|
||||
|
||||
if (!paintTime.equals(drawable.getTime())) {
|
||||
drawable.setDirty(true);
|
||||
|
@ -1198,6 +1227,7 @@ public class FFMPResource extends
|
|||
&& !paintTime.getRefTime().equals(getMostRecentTime())) {
|
||||
setMostRecentTime(paintTime.getRefTime());
|
||||
setTableTime();
|
||||
// if (isLinkToFrame && loader != null && loader.loadType != LOADER_TYPE.GENERAL) {
|
||||
if (isLinkToFrame) {
|
||||
updateDialog();
|
||||
}
|
||||
|
@ -1581,8 +1611,8 @@ public class FFMPResource extends
|
|||
if (getHuc().equals("ALL") || centeredAggregationKey != null) {
|
||||
pfaf = metaBasin.getPfaf();
|
||||
if (isMaintainLayer) {
|
||||
pfaf = monitor.getTemplates(getSiteKey()).findAggregatedPfaf(
|
||||
pfaf, getSiteKey(), getHuc());
|
||||
pfaf = monitor.getTemplates(getSiteKey())
|
||||
.findAggregatedPfaf(pfaf, getSiteKey(), getHuc());
|
||||
aggregate = true;
|
||||
}
|
||||
} else {
|
||||
|
@ -1611,8 +1641,8 @@ public class FFMPResource extends
|
|||
if (val.isNaN() || (val == FFMPUtils.MISSING)) {
|
||||
valst = "NO DATA";
|
||||
} else {
|
||||
valst = df.format(getBasinValue(pfaf,
|
||||
getPaintTime().getRefTime(), aggregate));
|
||||
valst = df.format(getBasinValue(pfaf, getPaintTime()
|
||||
.getRefTime(), aggregate));
|
||||
}
|
||||
|
||||
if (!valst.equals("NO DATA")) {
|
||||
|
@ -2446,8 +2476,7 @@ public class FFMPResource extends
|
|||
}
|
||||
if ((cwaBasins.size() == 0)
|
||||
|| !req.extent.equals(drawable.getExt())
|
||||
|| !phuc.equals(drawable.getHuc())
|
||||
|| restoreTable) {
|
||||
|| !phuc.equals(drawable.getHuc()) || restoreTable) {
|
||||
Envelope env = null;
|
||||
try {
|
||||
Envelope e = req.descriptor.pixelToWorld(req.extent,
|
||||
|
@ -2472,7 +2501,8 @@ public class FFMPResource extends
|
|||
templates, getSiteKey(), cwa, phuc);
|
||||
for (Entry<Long, Envelope> entry : envMap.entrySet()) {
|
||||
|
||||
if (env.intersects(entry.getValue()) || env.contains(entry.getValue())) {
|
||||
if (env.intersects(entry.getValue())
|
||||
|| env.contains(entry.getValue())) {
|
||||
// add the individual basins
|
||||
cwaBasins.add(entry.getKey());
|
||||
}
|
||||
|
@ -2556,11 +2586,11 @@ public class FFMPResource extends
|
|||
// the
|
||||
// the basin when the color map changes.
|
||||
if (globalRegen || drawable.genCwa(cwa)) {
|
||||
//System.out
|
||||
//.println("Regenerating the entire image: CWA: +"
|
||||
//+ cwa
|
||||
//+ " Table:"
|
||||
//+ resourceData.tableLoad);
|
||||
// System.out
|
||||
// .println("Regenerating the entire image: CWA: +"
|
||||
// + cwa
|
||||
// + " Table:"
|
||||
// + resourceData.tableLoad);
|
||||
// get base aggr basins that are in screen area
|
||||
Set<Long> cwaPfafs = null;
|
||||
cwaPfafs = getAreaBasins(cwa, req, phuc);
|
||||
|
@ -2585,7 +2615,11 @@ public class FFMPResource extends
|
|||
.getCenterAggrKey();
|
||||
// this is a fall back for VGB's
|
||||
if (centeredAggr == null) {
|
||||
centeredAggr = templates.findAggregatedVGB((String) centeredAggregationKey, getSiteKey(), phuc);
|
||||
centeredAggr = templates
|
||||
.findAggregatedVGB(
|
||||
(String) centeredAggregationKey,
|
||||
getSiteKey(),
|
||||
phuc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2596,7 +2630,11 @@ public class FFMPResource extends
|
|||
centeredAggr = (Long) drawable
|
||||
.getCenterAggrKey();
|
||||
if (centeredAggr == null) {
|
||||
centeredAggr = templates.getAggregatedPfaf((Long)centeredAggregationKey, getSiteKey(), phuc);
|
||||
centeredAggr = templates
|
||||
.getAggregatedPfaf(
|
||||
(Long) centeredAggregationKey,
|
||||
getSiteKey(),
|
||||
phuc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3223,7 +3261,8 @@ public class FFMPResource extends
|
|||
@Override
|
||||
public FFMPGraphData getGraphData(String pfafString) throws VizException {
|
||||
FfmpTableConfig tableConfig = FfmpTableConfig.getInstance();
|
||||
String ffgGraphType = tableConfig.getTableConfigData(getSiteKey()).getFfgGraphType();
|
||||
String ffgGraphType = tableConfig.getTableConfigData(getSiteKey())
|
||||
.getFfgGraphType();
|
||||
Long basinPfaf = null;
|
||||
Long dataId = null;
|
||||
FFMPVirtualGageBasinMetaData fvgbmd = null;
|
||||
|
@ -3397,7 +3436,7 @@ public class FFMPResource extends
|
|||
|
||||
if (fvgbmd != null) {
|
||||
try {
|
||||
// VGB's use a different timing sequence
|
||||
// VGB's use a different timing sequenceFFMPResource
|
||||
String lid = fvgbmd.getLid();
|
||||
|
||||
virtualBasin = monitor.getVirtualGageBasinData(dataId, lid,
|
||||
|
@ -3557,14 +3596,19 @@ public class FFMPResource extends
|
|||
* Sets the time used for accumulation drawn from the slider time
|
||||
*/
|
||||
private void setTableTime() {
|
||||
if (tableTime == null) {
|
||||
tableTime = new Date();
|
||||
}
|
||||
|
||||
synchronized (tableTime) {
|
||||
Date recentTime = getMostRecentTime();
|
||||
long time = new Double(recentTime.getTime() - (1000 * 3600) * getTime())
|
||||
.longValue();
|
||||
long time = new Double(recentTime.getTime() - (1000 * 3600)
|
||||
* getTime()).longValue();
|
||||
Date date = new Date();
|
||||
date.setTime(time);
|
||||
this.tableTime = date;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the huc
|
||||
|
@ -3721,8 +3765,9 @@ public class FFMPResource extends
|
|||
* @param set
|
||||
* @return ordered dates
|
||||
*/
|
||||
public ArrayList<Date> getTimeOrderedKeys() {
|
||||
if (timeOrderedKeys == null) {
|
||||
public synchronized ArrayList<Date> getTimeOrderedKeys() {
|
||||
if (timeOrderedKeys == null || !toKeysInitialized) {
|
||||
toKeysInitialized = true;
|
||||
|
||||
// stand alone displays use this
|
||||
timeOrderedKeys = new ArrayList<Date>();
|
||||
|
@ -4045,7 +4090,6 @@ public class FFMPResource extends
|
|||
return qpfSourceExpiration;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the guidance source expiration
|
||||
*
|
||||
|
@ -4055,7 +4099,8 @@ public class FFMPResource extends
|
|||
if (guidSourceExpiration == 0l) {
|
||||
if (getProduct() != null) {
|
||||
|
||||
String guidSrc = FFMPConfig.getInstance().getFFMPConfigData().getIncludedGuids();
|
||||
String guidSrc = FFMPConfig.getInstance().getFFMPConfigData()
|
||||
.getIncludedGuids();
|
||||
if (guidSrc.contains(",")) {
|
||||
String[] parts = guidSrc.split(",");
|
||||
guidSrc = parts[0];
|
||||
|
@ -4123,7 +4168,8 @@ public class FFMPResource extends
|
|||
String ffgName = null;
|
||||
|
||||
if (getResourceData().tableLoad) {
|
||||
String guidSrc = FFMPConfig.getInstance().getFFMPConfigData().getGuidSrc();
|
||||
String guidSrc = FFMPConfig.getInstance().getFFMPConfigData()
|
||||
.getGuidSrc();
|
||||
if (guidSrc.startsWith("xxx")) {
|
||||
ffgName = "";
|
||||
} else {
|
||||
|
@ -4210,10 +4256,8 @@ public class FFMPResource extends
|
|||
ArrayList<String> hucsToLoad = new ArrayList<String>();
|
||||
|
||||
if (isWorstCase) {
|
||||
if (!hucsToLoad.contains("ALL")) {
|
||||
hucsToLoad.add("ALL");
|
||||
}
|
||||
}
|
||||
|
||||
// tertiary loader only loads ALL
|
||||
if (type != LOADER_TYPE.TERTIARY) {
|
||||
|
@ -4252,36 +4296,34 @@ public class FFMPResource extends
|
|||
public long getPurgePeriod() {
|
||||
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
LocalizationContext lc = pm.getContext(
|
||||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
LocalizationContext lc = pm.getContext(LocalizationType.COMMON_STATIC,
|
||||
LocalizationLevel.SITE);
|
||||
LocalizationFile lfFile = pm.getLocalizationFile(lc,
|
||||
"purge/ffmpPurgeRules.xml");
|
||||
|
||||
if (lfFile.exists()) {
|
||||
|
||||
//TODO Need to figure out why we can't read in the purgeRules!
|
||||
/*try {
|
||||
PurgeRuleSet prs = (PurgeRuleSet) SerializationUtil
|
||||
.jaxbUnmarshalFromXmlFile(lfFile.getFile().getAbsolutePath());
|
||||
|
||||
for (PurgeRule rule: prs.getRules()) {
|
||||
if (rule.getId().equals("ffmp")) {
|
||||
return rule.getPeriodInMillis();
|
||||
}
|
||||
}
|
||||
|
||||
} catch (SerializationException e) {
|
||||
e.printStackTrace();
|
||||
return 3600*24*1000;
|
||||
} */
|
||||
// TODO Need to figure out why we can't read in the purgeRules!
|
||||
/*
|
||||
* try { PurgeRuleSet prs = (PurgeRuleSet) SerializationUtil
|
||||
* .jaxbUnmarshalFromXmlFile(lfFile.getFile().getAbsolutePath());
|
||||
*
|
||||
* for (PurgeRule rule: prs.getRules()) { if
|
||||
* (rule.getId().equals("ffmp")) { return rule.getPeriodInMillis();
|
||||
* } }
|
||||
*
|
||||
* } catch (SerializationException e) { e.printStackTrace(); return
|
||||
* 3600*24*1000; }
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
return 3600*24*1000;
|
||||
return 3600 * 24 * 1000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Kicks off additional loaders that need to be fired off
|
||||
*
|
||||
* @param loader
|
||||
* @param isDone
|
||||
*/
|
||||
|
@ -4290,7 +4332,8 @@ public class FFMPResource extends
|
|||
if (status.getLoaderType() == LOADER_TYPE.SECONDARY) {
|
||||
if (status.isDone() && !this.getResourceData().isTertiaryLoad) {
|
||||
try {
|
||||
Date startDate = new Date(getMostRecentTime().getTime() - (6 * 3600 * 1000));
|
||||
Date startDate = new Date(getMostRecentTime().getTime()
|
||||
- (6 * 3600 * 1000));
|
||||
FFMPMonitor.getInstance().startLoad(this, startDate,
|
||||
LOADER_TYPE.TERTIARY);
|
||||
} catch (VizException e) {
|
||||
|
|
|
@ -22,6 +22,8 @@ package com.raytheon.uf.viz.monitor.ffmp.ui.rsc;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.NavigableMap;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
@ -258,15 +260,33 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
|
|||
}
|
||||
|
||||
} else {
|
||||
/*
|
||||
* This appears completely un-orthodox for anything in D2D. But
|
||||
* alas FFMP always does things differently. According to Vada
|
||||
* Driesbach, FFMP in stand alone mode functions similarly to
|
||||
* the way it does in table mode. Meaning you have to reach back
|
||||
* and find time windows for the source displayed +- the
|
||||
* expirationTime. None of the sources are displayed for exact
|
||||
* times like everything else in D2D. This forces us to use the
|
||||
* same Data Population methods the table uses. The only
|
||||
* difference here is they are done for single sources.
|
||||
*/
|
||||
|
||||
SourceXML source = getPrimarySourceXML();
|
||||
this.domains = monitor.getRunConfig().getDomains();
|
||||
SourceXML source = monitor.getSourceConfig().getSource(
|
||||
sourceName);
|
||||
|
||||
for (int i = 0; i < objects.length; i++) {
|
||||
FFMPRecord rec = (FFMPRecord) objects[i];
|
||||
rec.setExpiration(source.getExpirationMinutes(siteKey));
|
||||
rec.setRate(source.isRate());
|
||||
populateRecord(getProduct(), rec, huc);
|
||||
if (source != null) {
|
||||
|
||||
long oldestTime = availableTimes[0].getRefTime().getTime();
|
||||
long expirationTime = source.getExpirationMinutes(siteKey) * 60 * 1000;
|
||||
Date standAloneTime = new Date(oldestTime - expirationTime);
|
||||
|
||||
NavigableMap<Date, List<String>> sourceURIs = getMonitor()
|
||||
.getAvailableUris(siteKey, dataKey, sourceName,
|
||||
standAloneTime);
|
||||
getMonitor().processUris(sourceURIs, false, siteKey,
|
||||
sourceName, standAloneTime, "ALL");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,8 @@ import com.raytheon.uf.common.time.TimeRange;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 3, 2008 1167 mnash Initial creation
|
||||
* Sep 3, 2008 1283 njensen Fixed issues
|
||||
* Aug 9, 2012 #1036 dgilling Fixed NullPointerException
|
||||
* in compareTo().
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -141,7 +143,7 @@ public class SamplerRequest implements Comparable<SamplerRequest> {
|
|||
* @return
|
||||
*/
|
||||
public boolean isRefID() {
|
||||
if (_areaID != null && _areaID.getName().length() > 0) {
|
||||
if ((_areaID != null) && (!_areaID.getName().isEmpty())) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -154,59 +156,98 @@ public class SamplerRequest implements Comparable<SamplerRequest> {
|
|||
* @return
|
||||
*/
|
||||
public boolean isRefArea() {
|
||||
if (_area.getId().getName().length() > 0) {
|
||||
if ((_area != null) && (!_area.getId().getName().isEmpty())) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the class information
|
||||
*
|
||||
* @param o
|
||||
*/
|
||||
public String printOn() {
|
||||
return "(" + _parmID + "," + _timeRange + "," + _areaID + "," + _area
|
||||
+ ")";
|
||||
@Override
|
||||
public int compareTo(SamplerRequest samp) {
|
||||
// 1st level - parmID
|
||||
int pid = _parmID.compareTo(samp._parmID);
|
||||
if (pid != 0) {
|
||||
return pid;
|
||||
} else {
|
||||
// 2nd level, time range
|
||||
int tr = _timeRange.compareTo(samp._timeRange);
|
||||
if (tr != 0) {
|
||||
return tr;
|
||||
} else {
|
||||
// 3rd level, reference id
|
||||
String left = (_area != null) ? _area.getId().getName()
|
||||
: _areaID.getName();
|
||||
String right = (samp._area != null) ? samp._area.getId()
|
||||
.getName() : samp._areaID.getName();
|
||||
return left.compareTo(right);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(SamplerRequest samp) {
|
||||
int pid = _parmID.compareTo(samp._parmID);
|
||||
if (pid == -1) {
|
||||
return -1;
|
||||
} else if (pid == 1) {
|
||||
return 1;
|
||||
} else if (pid == 0) {
|
||||
int tr = _timeRange.compareTo(samp._timeRange);
|
||||
if (tr == -1) {
|
||||
return -1;
|
||||
} else if (tr == 1) {
|
||||
return 1;
|
||||
} else if (tr == 0) {
|
||||
int rid = _area.getId().getName().compareTo(
|
||||
samp._area.getId().getName());
|
||||
if (rid == -1) {
|
||||
return -1;
|
||||
} else if (rid == 1) {
|
||||
return 1;
|
||||
} else if (rid == 0) {
|
||||
return 0;
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
return 0; // should never reach this
|
||||
SamplerRequest other = (SamplerRequest) obj;
|
||||
if (_area == null) {
|
||||
if (other._area != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!_area.equals(other._area)) {
|
||||
return false;
|
||||
}
|
||||
if (_areaID == null) {
|
||||
if (other._areaID != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!_areaID.equals(other._areaID)) {
|
||||
return false;
|
||||
}
|
||||
if (_parmID == null) {
|
||||
if (other._parmID != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!_parmID.equals(other._parmID)) {
|
||||
return false;
|
||||
}
|
||||
if (_timeRange == null) {
|
||||
if (other._timeRange != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!_timeRange.equals(other._timeRange)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String s = "SamplerRequest: " + _parmID.getParmName() + " "
|
||||
+ _timeRange.toString() + " ";
|
||||
if (_area != null) {
|
||||
s += _area.getId().getName();
|
||||
} else if (_areaID != null) {
|
||||
s += _areaID.getName();
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("SamplerRequest (");
|
||||
builder.append(_parmID);
|
||||
builder.append(", ");
|
||||
builder.append(_timeRange);
|
||||
builder.append(", ");
|
||||
if (_areaID != null) {
|
||||
builder.append(_areaID.getName());
|
||||
} else {
|
||||
builder.append("null");
|
||||
}
|
||||
return s;
|
||||
builder.append(", ");
|
||||
if (_area != null) {
|
||||
builder.append(_area.getId().getName());
|
||||
} else {
|
||||
builder.append("null");
|
||||
}
|
||||
builder.append(")");
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ import com.vividsolutions.jts.index.strtree.STRtree;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 8, 2011 mschenke Initial creation
|
||||
* Aug 8, 2012 15271 snaples Updated hourly slot
|
||||
* Aug 17, 2012 15271 snaples Added check to add only PP gages
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -122,6 +123,8 @@ public class MPEGageResource extends AbstractMPEInputResource {
|
|||
|
||||
private final RGB triangleColor = RGBColors.getRGBColor("YELLOW");
|
||||
|
||||
private final double MILLICVT = 25.4;
|
||||
|
||||
private DataMappingPreferences dmPref;
|
||||
|
||||
private ColorMap colorMap;
|
||||
|
@ -175,6 +178,8 @@ public class MPEGageResource extends AbstractMPEInputResource {
|
|||
gageTriangles = null;
|
||||
}
|
||||
}
|
||||
lastDate = displayMgr.getCurrentDate();
|
||||
addPoints(MPEDataManager.getInstance().readGageData(lastDate, lastDate));
|
||||
issueRefresh();
|
||||
}
|
||||
|
||||
|
@ -267,6 +272,7 @@ public class MPEGageResource extends AbstractMPEInputResource {
|
|||
double lon_2 = in.getDouble();
|
||||
lon_2 *= (lon_2 > 0) ? -1 : 1;
|
||||
lat_2 *= (lat_2 < 0) ? -1 : 1;
|
||||
|
||||
compiler.handle(gf.createLineString(new Coordinate[] {
|
||||
new Coordinate(lon_1, lat_1),
|
||||
new Coordinate(lon_2, lat_2) }));
|
||||
|
@ -422,9 +428,7 @@ public class MPEGageResource extends AbstractMPEInputResource {
|
|||
// Check for pseudo gage and convert
|
||||
float fltVal = gageData.getGval();
|
||||
if (gageData.getId().contains("PSEUDO")) {
|
||||
UnitConverter conv = SI.MILLIMETER
|
||||
.getConverterTo(NonSI.INCH);
|
||||
fltVal = (float) conv.convert(gageData.getGval());
|
||||
fltVal = (float) (gageData.getGval() / MILLICVT);
|
||||
}
|
||||
// System.out.println("--- fltVal = " + fltVal);
|
||||
gageColor = getColorByValue(fltVal);
|
||||
|
@ -452,6 +456,9 @@ public class MPEGageResource extends AbstractMPEInputResource {
|
|||
for (ListIterator<MPEGageData> it = gages.listIterator(); it
|
||||
.hasNext();) {
|
||||
MPEGageData gageData = it.next();
|
||||
if (!gageData.getPe().equalsIgnoreCase("PP")) {
|
||||
continue;
|
||||
}
|
||||
Coordinate latLon = gageData.getLatLon();
|
||||
double[] pixel = descriptor.worldToPixel(new double[] {
|
||||
latLon.x, latLon.y });
|
||||
|
@ -463,8 +470,9 @@ public class MPEGageResource extends AbstractMPEInputResource {
|
|||
Envelope env = new Envelope(p1, p2);
|
||||
ArrayList<Object> data = new ArrayList<Object>();
|
||||
data.add(latLon);
|
||||
data.add("GAGE: " + gageData.getId() + " VALUE: "
|
||||
+ gageData.getGval());
|
||||
String newData = "GAGE: " + gageData.getId() + " VALUE: "
|
||||
+ gageData.getGval();
|
||||
data.add(newData);
|
||||
strTree.insert(env, data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,13 @@
|
|||
further_licensing_information.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/DefaultSatellite.xml"
|
||||
menuText="Blended Rain Rate" id="rainfallRate">
|
||||
<dataURI>/satellite/%/NESDIS/POES-NPOESS/Supernational/Rain_fall_rate</dataURI>
|
||||
<substitute key="element" value="Rain fall rate"/>
|
||||
<substitute key="entity" value="POES-NPOESS"/>
|
||||
<substitute key="colormap" value="Sat/VIS/ZA (Vis Default)"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="titleItem" titleText="------ GOES ------"
|
||||
id="GOESLine"/>
|
||||
<contribute xsi:type="bundleItem" file="bundles/DefaultSatellite.xml"
|
||||
|
@ -66,13 +73,6 @@
|
|||
<substitute key="colormap" value="Sat/Low Cloud Base" />
|
||||
</contribute>
|
||||
<contribute xsi:type="titleItem" titleText="------ DMSP SSM/I ------" id="DMSPLine"/>
|
||||
<contribute xsi:type="bundleItem" file="bundles/DefaultSatellite.xml"
|
||||
menuText="Rainfall Rate" id="rainfallRate">
|
||||
<dataURI>/satellite/%/NESDIS/DMSP/Supernational/Rain_fall_rate</dataURI>
|
||||
<substitute key="element" value="Rain fall rate"/>
|
||||
<substitute key="entity" value="DMSP"/>
|
||||
<substitute key="colormap" value="Sat/VIS/ZA (Vis Default)"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/DefaultSatellite.xml"
|
||||
menuText="Total Precip Water" id="totalPrecipWater">
|
||||
<dataURI>/satellite/%/NESDIS/DMSP/Supernational/Sounder_Based_Derived_Precipitable_Water_(PW)</dataURI>
|
||||
|
@ -82,13 +82,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="titleItem" titleText="------ POES AMSU ------" id="POESAMSULine"/>
|
||||
<contribute xsi:type="bundleItem" file="bundles/DefaultSatellite.xml"
|
||||
menuText="Rainfall Rate" id="rainfallRate">
|
||||
<dataURI>/satellite/%/NESDIS/POES-NPOESS/Supernational/Rain_fall_rate</dataURI>
|
||||
<substitute key="element" value="Rain fall rate"/>
|
||||
<substitute key="entity" value="POES-NPOESS"/>
|
||||
<substitute key="colormap" value="Sat/VIS/ZA (Vis Default)"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/DefaultSatellite.xml"
|
||||
menuText="Total Precip Water" id="totalPrecipWater">
|
||||
<dataURI>/satellite/%/NESDIS/POES-NPOESS/Supernational/Sounder_Based_Derived_Precipitable_Water_(PW)</dataURI>
|
||||
<substitute key="element" value="Sounder Based Derived Precipitable Water (PW)"/>
|
||||
|
|
|
@ -151,7 +151,12 @@ public class SatelliteConstants {
|
|||
} else if(creatingEntity.equals(DMSP)){
|
||||
rVal = "DMSP SSM/I " + rVal;
|
||||
} else if(creatingEntity.equals(POES)){
|
||||
if (productName.equals("Rain fall rate")) {
|
||||
rVal = "Blended Rain Rate (mm/hr)";
|
||||
}
|
||||
else {
|
||||
rVal = "POES AMSU " + rVal;
|
||||
}
|
||||
} else if(creatingEntity.equals(MISC)){
|
||||
rVal = "Blended " + rVal;
|
||||
}
|
||||
|
|
|
@ -158,6 +158,7 @@ import com.raytheon.viz.texteditor.command.CommandFailedException;
|
|||
import com.raytheon.viz.texteditor.command.CommandHistory;
|
||||
import com.raytheon.viz.texteditor.command.CommandType;
|
||||
import com.raytheon.viz.texteditor.command.ICommand;
|
||||
import com.raytheon.viz.texteditor.dialogs.WarnGenConfirmationDlg.SessionDelegate;
|
||||
import com.raytheon.viz.texteditor.fax.dialogs.FaxMessageDlg;
|
||||
import com.raytheon.viz.texteditor.fax.dialogs.LdadFaxSitesDlg;
|
||||
import com.raytheon.viz.texteditor.msgs.IAfosBrowserCallback;
|
||||
|
@ -282,6 +283,7 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox;
|
|||
* 18JUL2012 14457 rferrel Add mouse listener to clear site's update obs when clicked on.
|
||||
* 25JUL2012 14459 rferrel Strip WMH headers when getting all METARs.
|
||||
* 13AUG2012 14613 M.Gamazaychikov Ensured the WMO and MND header times are the same.
|
||||
* 20AUG2012 15340 D.Friedman Use callbacks for stop sign dialog. Prevent NOR in header.
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
|
@ -4358,43 +4360,50 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
* @param resend
|
||||
* true if product is to be resent
|
||||
*/
|
||||
synchronized private void sendProduct(boolean resend) {
|
||||
CAVEMode mode = CAVEMode.getMode();
|
||||
synchronized private void sendProduct(final boolean resend) {
|
||||
final CAVEMode mode = CAVEMode.getMode();
|
||||
StdTextProduct prod = getStdTextProduct();
|
||||
String afosId = prod.getCccid() + prod.getNnnid() + prod.getXxxid();
|
||||
String title = QualityControl.getProductWarningType(prod.getNnnid());
|
||||
StringBuilder productMessage = new StringBuilder();
|
||||
final String title = QualityControl.getProductWarningType(prod.getNnnid());
|
||||
final StringBuilder productMessage = new StringBuilder();
|
||||
|
||||
StringBuilder modeMessage = new StringBuilder();
|
||||
final StringBuilder modeMessage = new StringBuilder();
|
||||
modeMessage.append("The workstation is in ").append(mode)
|
||||
.append(" mode.");
|
||||
|
||||
if (resend) {
|
||||
productMessage = new StringBuilder();
|
||||
productMessage.append("You are about to RESEND a " + afosId + "\n");
|
||||
productMessage.append(title).append(".\n");
|
||||
modeMessage.append("\nThere is no QC check for resend product.");
|
||||
} else if (warnGenFlag) {
|
||||
productMessage.append("You are about to SEND a " + afosId + "\n");
|
||||
productMessage.append(title).append(".\n");
|
||||
|
||||
QualityControl qcCheck = new QualityControl();
|
||||
if (qcCheck.checkWarningInfo(headerTF.getText().toUpperCase(),
|
||||
textEditor.getText().toUpperCase(), prod.getNnnid()) == false) {
|
||||
WarnGenConfirmationDlg wgcd = new WarnGenConfirmationDlg(shell,
|
||||
"Problem Detected by QC", qcCheck.getErrorMessage(),
|
||||
"Do you really want to Send?\n", mode);
|
||||
wgcd.open();
|
||||
if (!Boolean.TRUE.equals(wgcd.getReturnValue())) {
|
||||
wgcd.open(new SessionDelegate() {
|
||||
@Override
|
||||
public void dialogDismissed(Object dialogResult) {
|
||||
if (Boolean.TRUE.equals(dialogResult))
|
||||
finishSendProduct1(resend, title, mode, productMessage, modeMessage);
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
productMessage.append("You are about to SEND a " + afosId + "\n");
|
||||
productMessage.append(title).append(".\n");
|
||||
finishSendProduct1(resend, title, mode, productMessage, modeMessage);
|
||||
}
|
||||
|
||||
private void finishSendProduct1(final boolean resend, String title, CAVEMode mode, StringBuilder productMessage, StringBuilder modeMessage) {
|
||||
Pattern p = Pattern.compile(".\\%[s].");
|
||||
Matcher m = p.matcher(STORED_SENT_MSG);
|
||||
|
||||
boolean result = (CAVEMode.OPERATIONAL.equals(mode) || CAVEMode.TEST
|
||||
final boolean result = (CAVEMode.OPERATIONAL.equals(mode) || CAVEMode.TEST
|
||||
.equals(mode));
|
||||
modeMessage.append(result ? m.replaceAll(" ") : m.replaceAll(" not "));
|
||||
|
||||
|
@ -4423,11 +4432,16 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
|
||||
WarnGenConfirmationDlg wgcd = new WarnGenConfirmationDlg(shell, title,
|
||||
productMessage.toString(), modeMessage.toString(), mode);
|
||||
wgcd.open();
|
||||
|
||||
if (!Boolean.TRUE.equals(wgcd.getReturnValue())) {
|
||||
return;
|
||||
wgcd.open(new SessionDelegate() {
|
||||
@Override
|
||||
public void dialogDismissed(Object dialogResult) {
|
||||
if (Boolean.TRUE.equals(dialogResult))
|
||||
finishSendProduct2(resend, result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void finishSendProduct2(boolean resend, boolean result) {
|
||||
|
||||
// DR14553 (make upper case in product)
|
||||
String body = textEditor.getText().toUpperCase();
|
||||
|
@ -4450,7 +4464,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
token);
|
||||
OUPRequest req = new OUPRequest();
|
||||
OfficialUserProduct oup = new OfficialUserProduct();
|
||||
prod = getStdTextProduct();
|
||||
StdTextProduct prod = getStdTextProduct(); // TODO: makes me nervous...
|
||||
String awipsWanPil = prod.getSite() + prod.getNnnid()
|
||||
+ prod.getXxxid();
|
||||
String awipsID = prod.getNnnid() + prod.getXxxid();
|
||||
|
@ -4462,7 +4476,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
oup.setNeedsWmoHeader(false);
|
||||
oup.setProductText(product);
|
||||
oup.setSource("TextWS");
|
||||
oup.setWmoType(prod.getBbbid());
|
||||
oup.setWmoType(fixNOR(prod.getBbbid()));
|
||||
oup.setUserDateTimeStamp(prod.getHdrtime());
|
||||
oup.setFilename(awipsID + ".wan"
|
||||
+ (System.currentTimeMillis() / 1000));
|
||||
|
@ -4872,7 +4886,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
|
||||
StdTextProductServerRequest request = new StdTextProductServerRequest();
|
||||
|
||||
request.setBbbid(product.getBbbid());
|
||||
request.setBbbid(fixNOR(product.getBbbid()));
|
||||
request.setCccid(product.getCccid());
|
||||
request.setCreatetime(product.getRefTime());
|
||||
request.setDataCrc(product.getDataCrc());
|
||||
|
@ -5182,7 +5196,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
}
|
||||
|
||||
public void setCurrentBbbId(String bbbId) {
|
||||
TextDisplayModel.getInstance().setBbbId(token, bbbId);
|
||||
TextDisplayModel.getInstance().setBbbId(token, fixNOR(bbbId));
|
||||
}
|
||||
|
||||
public void setCurrentWsfoId(String wsfoId) {
|
||||
|
@ -7279,4 +7293,11 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
job.setSystem(true);
|
||||
job.schedule();
|
||||
}
|
||||
|
||||
private static String fixNOR(String bbb) {
|
||||
if ("NOR".equals(bbb))
|
||||
return "";
|
||||
else
|
||||
return bbb;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@ package com.raytheon.viz.texteditor.dialogs;
|
|||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
|
@ -48,6 +50,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 27Jul2010 4773 cjeanbap Initial development
|
||||
* 10Aug2010 2187 cjeanbap Removed warnGenFlag.
|
||||
* 10Nov2011 11552 rferrel returnvalue no longer null
|
||||
* 08/20/2012 DR 15340 D. Friedman Use callbacks for closing
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -67,9 +70,16 @@ public class WarnGenConfirmationDlg extends CaveSWTDialog {
|
|||
|
||||
private String IMAGE_PRACTICE = "res/images/twsPractice.gif";
|
||||
|
||||
public static interface SessionDelegate {
|
||||
void dialogDismissed(Object result);
|
||||
}
|
||||
|
||||
private SessionDelegate sessionDelegate;
|
||||
|
||||
protected WarnGenConfirmationDlg(Shell parentShell, String title,
|
||||
String productMessage, String modeMessage, CAVEMode mode) {
|
||||
super(parentShell, SWT.DIALOG_TRIM, CAVE.NONE);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.PRIMARY_MODAL,
|
||||
CAVE.NONE | CAVE.DO_NOT_BLOCK);
|
||||
|
||||
setText(title);
|
||||
|
||||
|
@ -79,6 +89,13 @@ public class WarnGenConfirmationDlg extends CaveSWTDialog {
|
|||
setReturnValue(Boolean.FALSE);
|
||||
}
|
||||
|
||||
public void open(SessionDelegate sessionDelegate) {
|
||||
if (sessionDelegate != null && isOpen())
|
||||
throw new RuntimeException(String.format("Dialog \"%s\" already open", getText()));
|
||||
this.sessionDelegate = sessionDelegate;
|
||||
super.open();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
Composite mainComposite = new Composite(shell, SWT.NONE);
|
||||
|
@ -86,7 +103,13 @@ public class WarnGenConfirmationDlg extends CaveSWTDialog {
|
|||
createImage(mainComposite);
|
||||
createMessageLabel(mainComposite);
|
||||
createButtonRow(mainComposite);
|
||||
|
||||
shell.addDisposeListener(new DisposeListener() {
|
||||
@Override
|
||||
public void widgetDisposed(DisposeEvent e) {
|
||||
if (sessionDelegate != null)
|
||||
sessionDelegate.dialogDismissed(getReturnValue());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void createImage(Composite mainComposite) {
|
||||
|
|
Binary file not shown.
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.jboss.cache</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1,5 +1,6 @@
|
|||
package com.raytheon.uf.common.dataplugin.ffmp;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
@ -100,6 +101,28 @@ public class FFMPGuidanceBasin extends FFMPBasin implements ISerializableObject
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* purge out old entries
|
||||
*
|
||||
* @param date
|
||||
*/
|
||||
public void purgeData(Date date) {
|
||||
if (guidValues != null) {
|
||||
synchronized (guidValues) {
|
||||
ArrayList<Date> removes = new ArrayList<Date>();
|
||||
for (Date mdate : guidValues.keySet()) {
|
||||
if (mdate.before(date)) {
|
||||
removes.add(mdate);
|
||||
}
|
||||
}
|
||||
|
||||
for (Date rdate : removes) {
|
||||
guidValues.remove(rdate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for a source, only recent date
|
||||
*
|
||||
|
@ -188,7 +211,12 @@ public class FFMPGuidanceBasin extends FFMPBasin implements ISerializableObject
|
|||
FFMPGuidanceInterpolation interpolation, long expiration) {
|
||||
|
||||
Float dvalue = Float.NaN;
|
||||
Float value = getValue(date, sourceName);
|
||||
Float value = Float.NaN;
|
||||
Date closestDate = getClosest(sourceName, date, expiration);
|
||||
|
||||
if (closestDate != null) {
|
||||
value = getValue(closestDate, sourceName);
|
||||
}
|
||||
|
||||
if (!value.isNaN()) {
|
||||
FFFGDataMgr dman = FFFGDataMgr.getInstance();
|
||||
|
@ -220,6 +248,7 @@ public class FFMPGuidanceBasin extends FFMPBasin implements ISerializableObject
|
|||
Date markerDate = guidValues.firstKey();
|
||||
|
||||
for (Date checkDate : guidValues.keySet()) {
|
||||
|
||||
if (guidValues.get(checkDate).containsKey(sourceName)) {
|
||||
float val = guidValues.get(checkDate).get(sourceName);
|
||||
if (val != FFMPUtils.MISSING) {
|
||||
|
@ -239,6 +268,68 @@ public class FFMPGuidanceBasin extends FFMPBasin implements ISerializableObject
|
|||
return rdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Youngest Key
|
||||
*
|
||||
* @param sourceName
|
||||
* @param Date
|
||||
* @param expiration
|
||||
* @return
|
||||
*/
|
||||
public Date getClosest(String sourceName, Date date, long expiration) {
|
||||
|
||||
Date rdate = null;
|
||||
|
||||
if (guidValues != null && guidValues.size() > 0) {
|
||||
|
||||
if (guidValues.containsKey(date)) {
|
||||
if (guidValues.get(date).containsKey(sourceName)) {
|
||||
|
||||
float val = guidValues.get(date).get(sourceName);
|
||||
|
||||
if (val != FFMPUtils.MISSING) {
|
||||
rdate = date;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (rdate == null) {
|
||||
|
||||
long time1 = date.getTime();
|
||||
|
||||
for (Date checkDate : guidValues.descendingKeySet()) {
|
||||
if (guidValues.get(checkDate).containsKey(sourceName)) {
|
||||
|
||||
float val2 = guidValues.get(checkDate).get(sourceName);
|
||||
|
||||
if (val2 != FFMPUtils.MISSING) {
|
||||
|
||||
long time2 = checkDate.getTime();
|
||||
// as long as it is +- expiration from orig date,
|
||||
// golden
|
||||
if (date.after(checkDate)) {
|
||||
if ((time1 - time2) > expiration) {
|
||||
rdate = checkDate;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if ((time2 - time1) > expiration) {
|
||||
rdate = checkDate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rdate = checkDate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interpolate between guidance sources
|
||||
*
|
||||
|
|
|
@ -19,13 +19,16 @@
|
|||
**/
|
||||
package com.raytheon.uf.common.dataplugin.persist;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Inheritance;
|
||||
import javax.persistence.InheritanceType;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* Provides an abstract implementation of plugindataobject with clustered file
|
||||
|
@ -37,7 +40,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 16, 2008 chammack Initial creation
|
||||
*
|
||||
* - AWIPS2 Baseline Repository --------
|
||||
* 08/22/2012 798 jkorman Corrected hdfFileId persistence.
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
|
@ -52,6 +56,9 @@ public abstract class ServerSpecificPersistablePluginDataObject extends
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
@Column
|
||||
private Integer hdfFileId;
|
||||
|
||||
/**
|
||||
|
|
|
@ -40,6 +40,7 @@ import com.raytheon.uf.edex.dissemination.transmitted.TransmittedProductList;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 13, 2009 njensen Initial creation
|
||||
* 08/20/2012 DR 15340 D. Friedman Fix BBB problems
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -124,7 +125,8 @@ public class ModifyProduct {
|
|||
sb.append(DDHHMM.format(new Date()));
|
||||
}
|
||||
}
|
||||
if (req.getProduct().getWmoType() != null) {
|
||||
if (req.getProduct().getWmoType() != null
|
||||
&& req.getProduct().getWmoType().length() > 0) {
|
||||
sb.append(" ");
|
||||
sb.append(req.getProduct().getWmoType());
|
||||
}
|
||||
|
@ -173,6 +175,7 @@ public class ModifyProduct {
|
|||
product.setProductText(sb.toString());
|
||||
changed = true;
|
||||
}
|
||||
header.setBbb(productBBB);
|
||||
}
|
||||
product.setWmoType(productBBB);
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ import com.raytheon.uf.edex.dissemination.StatusConstants;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 10, 2009 njensen Initial creation
|
||||
* 08/20/2012 DR 15340 D. Friedman Fix BBB problems
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -83,7 +84,7 @@ public class TransmittedProductList {
|
|||
}
|
||||
|
||||
private static String assignBBB(String productBBB, String transmittedBBB) {
|
||||
if (transmittedBBB == null)
|
||||
if (transmittedBBB == null || transmittedBBB.length() == 0)
|
||||
return "RRA";
|
||||
|
||||
String newBBB = null;
|
||||
|
@ -91,7 +92,7 @@ public class TransmittedProductList {
|
|||
if (newX[0] == 'X') {
|
||||
newX[0] = 'A';
|
||||
} else {
|
||||
newX[0] = newX[0]++;
|
||||
newX[0]++;
|
||||
}
|
||||
newBBB = transmittedBBB.substring(0, 2) + new String(newX);
|
||||
|
||||
|
|
|
@ -32,10 +32,11 @@
|
|||
# 12/09/09 DR3778 M. Huang Add acknowledgment handling
|
||||
# 09/05/11 DR9602 M. Huang Fix acknowledgment handling error
|
||||
# 04/13/12 DR 10388 D. Friedman Correct acknowledgment handling
|
||||
# 08/17/12 DR 15304 D. Friedman Use unique output file names
|
||||
#
|
||||
#
|
||||
|
||||
import time, os, os.path, sys, subprocess, select
|
||||
import time, os, os.path, sys, subprocess, select, errno
|
||||
import logging, UFStatusHandler
|
||||
from com.raytheon.uf.common.dissemination import OUPResponse
|
||||
_Logger = logging.getLogger("HandleOUP")
|
||||
|
@ -126,8 +127,9 @@ def process(oup, afosID, resp, ackMgr = None):
|
|||
#----------
|
||||
# Locally store OUP in text database and archive
|
||||
#----------
|
||||
awipsPathname = OUT_DIR + '/' + oup.getFilename()
|
||||
if not createTargetFile(contents, awipsPathname):
|
||||
awipsPathname = createTargetFile(contents,
|
||||
OUT_DIR + '/' + oup.getFilename())
|
||||
if not awipsPathname:
|
||||
_Logger.debug('Unable to store product to text database:')
|
||||
storageCompleted = DB_FAILURE
|
||||
msg = 'Product ' + awipsWanPil + ' failed to be ingested and archived.\n'
|
||||
|
@ -500,8 +502,7 @@ def isNWWSProduct(myAwipsId, myAfosId, myWmoId, siteID):
|
|||
# target product pathname (Output)
|
||||
#
|
||||
# Returns:
|
||||
# 1 (TRUE) = target product successfully created
|
||||
# 0 (FALSE) = target product creation failed
|
||||
# The output path (which may differ from targetPathname)
|
||||
#
|
||||
# Implementation:
|
||||
#
|
||||
|
@ -510,12 +511,26 @@ def createTargetFile(fileData, targetPathname):
|
|||
_Logger.debug('createTargetFile():')
|
||||
_Logger.debug('target product pathname = ' + targetPathname)
|
||||
|
||||
outFile = open(targetPathname, 'w')
|
||||
pathToUse = targetPathname
|
||||
i = 0
|
||||
while True:
|
||||
try:
|
||||
fd = os.open(pathToUse, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0666)
|
||||
except OSError, e:
|
||||
if e.errno == errno.EEXIST:
|
||||
i += 1
|
||||
pathToUse = targetPathname + '.' + str(i)
|
||||
continue
|
||||
raise e
|
||||
else:
|
||||
break
|
||||
|
||||
if i > 0:
|
||||
_Logger.info('Renamed target file to ' + pathToUse)
|
||||
|
||||
outFile = os.fdopen(fd, 'w')
|
||||
outFile.write(fileData)
|
||||
outFile.flush()
|
||||
outFile.close()
|
||||
return True
|
||||
|
||||
|
||||
|
||||
return pathToUse
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
public ArrayList<String> loadedData = new ArrayList<String>();
|
||||
|
||||
/** thread the productkeys **/
|
||||
public HashMap<String, ArrayList<String>> productKeys = new HashMap<String, ArrayList<String>>();
|
||||
public ConcurrentHashMap<String, ArrayList<String>> productKeys = new ConcurrentHashMap<String, ArrayList<String>>();
|
||||
|
||||
/** template config manager **/
|
||||
public FFMPTemplateConfigurationManager tempConfig = null;
|
||||
|
@ -510,7 +510,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
+ " ms, wrote " + records.size() + " ");
|
||||
|
||||
} else {
|
||||
statusHandler.handle(Priority.INFO, config.getCWA()
|
||||
statusHandler.handle(Priority.WARN, config.getCWA()
|
||||
+ " no new products to produce.");
|
||||
}
|
||||
// dump data we don't need anymore
|
||||
|
@ -1371,12 +1371,9 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
source, ffmpRec.getBasinData(huc), huc,
|
||||
ffmpRec.getSiteKey());
|
||||
}
|
||||
// purge it up
|
||||
fdc.purge(backDate);
|
||||
// set the name
|
||||
fdc.setFilePath("" + sharePath + ffmpRec.getWfo() + "/"
|
||||
+ sourceSiteDataKey);
|
||||
|
||||
// cache it temporarily for FFTI use
|
||||
if (source.getSourceType().equals(
|
||||
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
|
@ -1396,7 +1393,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
+ (System.currentTimeMillis() - ptime)
|
||||
+ " ms: source: " + sourceSiteDataKey);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.INFO,
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Failed Processing FFMPDataContainer" + e.getMessage());
|
||||
|
||||
} finally {
|
||||
|
@ -1413,6 +1410,15 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
}
|
||||
}
|
||||
}
|
||||
// purge it up
|
||||
if (fdc != null) {
|
||||
// this is defensive for if errors get thrown
|
||||
if (backDate == null) {
|
||||
backDate = new Date((System.currentTimeMillis())
|
||||
- (3600 * 1000 * 6));
|
||||
}
|
||||
|
||||
fdc.purge(backDate);
|
||||
|
||||
if (write) {
|
||||
// write it out
|
||||
|
@ -1421,6 +1427,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* load existing container
|
||||
|
@ -1624,6 +1631,10 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
statusHandler.handle(Priority.ERROR,
|
||||
"IO Error Writing buddy file: "
|
||||
+ e.getMessage());
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"General Error Writing buddy file: "
|
||||
+ e.getMessage());
|
||||
} finally {
|
||||
if (os != null) {
|
||||
os.close();
|
||||
|
@ -1643,7 +1654,17 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
try {
|
||||
for (String tmpName : fileNames.keySet()) {
|
||||
File file = new File(tmpName);
|
||||
file.renameTo(new File(fileNames.get(tmpName)));
|
||||
if (file.renameTo(new File(fileNames.get(tmpName)))) {
|
||||
statusHandler
|
||||
.handle(Priority.DEBUG,
|
||||
"Successful rename: : "
|
||||
+fileNames.get(tmpName));
|
||||
} else {
|
||||
statusHandler
|
||||
.handle(Priority.ERROR,
|
||||
"UN-Successful rename: : "
|
||||
+fileNames.get(tmpName));
|
||||
}
|
||||
}
|
||||
|
||||
if (lockfile.exists()) {
|
||||
|
@ -1849,13 +1870,16 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
.file2bytes(f.getFile(), true));
|
||||
} catch (FileNotFoundException fnfe) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Unable to locate file " + f.getName());
|
||||
"Unable to locate file " + f.getName(), fnfe);
|
||||
} catch (SerializationException se) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Unable to read file " + f.getName());
|
||||
"Unable to serialize file " + f.getName(), se);
|
||||
} catch (IOException ioe) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Unable to read file " + f.getName());
|
||||
"IO problem reading file " + f.getName(), ioe);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"General Exception reading file " + f.getName(), e);
|
||||
}
|
||||
|
||||
return ffti;
|
||||
|
|
|
@ -205,7 +205,7 @@ mask=ISC_Send_Area
|
|||
|
||||
# Parameter list for the netcdf file
|
||||
parmlist="" #send all parameters
|
||||
. ${IFPS_DATA}/rsync_parms.${1}
|
||||
. ${IFPS_DATA}/rsync_parms.${site}
|
||||
|
||||
creationAttempts=3 # How many times do you want script to create and
|
||||
# quality control netcdf files if bad netcdf files
|
||||
|
@ -272,7 +272,7 @@ find ${WRKDIR}/. -mmin +60 -exec rm {} -f \;
|
|||
echo ...finished. >> $LOG_FILE
|
||||
echo " " >> $LOG_FILE
|
||||
|
||||
if [ "$parmlist" != "" ]; then
|
||||
if [ "$parmlist" != "" ] && [ "$parmlist" != " " ]; then
|
||||
echo "Will trim elements to $parmlist" >> $LOG_FILE
|
||||
else
|
||||
echo "Will send all elements" >> $LOG_FILE
|
||||
|
|
BIN
nativeLib/rary.cots.jasper/jasper-1.900.1.64-bit_mods.tgz
Normal file
BIN
nativeLib/rary.cots.jasper/jasper-1.900.1.64-bit_mods.tgz
Normal file
Binary file not shown.
|
@ -59,6 +59,12 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
/*
|
||||
* Color Management
|
||||
*
|
||||
|
|
|
@ -59,6 +59,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <jasper/jas_config.h>
|
||||
#include <jasper/jas_types.h>
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Image Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Memory Allocator
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Sequence/Matrix Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* I/O Stream Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Windows Bitmap File Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Memory Allocator
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* JP2 Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* JP2 Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* JP2 Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* JPEG-2000 Code Stream Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* MQ Arithmetic Decoder
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* MQ Arithmetic Encoder
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Quadrature Mirror-Image Filter Bank (QMFB) Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Quadrature Mirror-Image Filter Bank (QMFB) Routines
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Tier 1 Encoder
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Tier-2 Coding Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Tier 2 Decoder
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Tier 2 Encoder
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Tag Tree Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Tree-Structured Filter Bank (TSFB) Library
|
||||
*
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
|
|
@ -59,6 +59,13 @@
|
|||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
/*
|
||||
August 20, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
This file modified for 64-bit compatibility
|
||||
*/
|
||||
|
||||
|
||||
/******************************************************************************\
|
||||
* Includes.
|
||||
\******************************************************************************/
|
||||
|
|
|
@ -41,6 +41,13 @@ import jep.python.PyObject;
|
|||
* @author [mrjohnson0 at sourceforge.net] Mike Johnson
|
||||
* @version $Id: Jep.java 448 2007-11-27 00:30:23Z mrjohnson0 $
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
public final class Jep {
|
||||
|
||||
private boolean closed = false;
|
||||
|
|
|
@ -12,6 +12,13 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
#
|
||||
# August 2, 2012
|
||||
# Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
# Modifications marked and described by 'njensen'
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
srcdir = .
|
||||
|
|
|
@ -26,6 +26,12 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
#include "util.h"
|
||||
#include "jep.h"
|
||||
#include "pyembed.h"
|
||||
|
|
|
@ -38,6 +38,13 @@
|
|||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
# include "winconfig.h"
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _Included_pyembed
|
||||
#define _Included_pyembed
|
||||
|
||||
|
|
|
@ -31,6 +31,13 @@
|
|||
of the python distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
# include "winconfig.h"
|
||||
#endif
|
||||
|
|
|
@ -25,6 +25,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// shut up the compiler
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
# include "winconfig.h"
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
// shut up the compiler
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
# undef _POSIX_C_SOURCE
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
# include "winconfig.h"
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// shut up the compiler
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
New file created with modifications to pyjmethod.c
|
||||
*/
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
# include "winconfig.h"
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
New file created with modifications to pyjmethod.h
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// shut up the compiler
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
# include "winconfig.h"
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// shut up the compiler
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
August 2, 2012
|
||||
Modified by Raytheon (c) 2012 Raytheon Company. All Rights Reserved.
|
||||
Modifications marked and described by 'njensen'
|
||||
*/
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
# include "winconfig.h"
|
||||
#endif
|
||||
|
|
|
@ -1,224 +0,0 @@
|
|||
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
|
||||
|
||||
#
|
||||
# AWIPS II Java JRockit Spec File
|
||||
#
|
||||
Name: awips2-java-jrockit
|
||||
Summary: AWIPS II Java JRockit Distribution - 32 Bit
|
||||
Version: 1.6.0_26
|
||||
Release: 1
|
||||
Group: AWIPSII
|
||||
BuildRoot: %{_build_root}
|
||||
URL: N/A
|
||||
License: N/A
|
||||
Distribution: N/A
|
||||
Vendor: Raytheon
|
||||
Packager: Bryan Kowal
|
||||
|
||||
AutoReq: no
|
||||
provides: awips2-java-jrockit
|
||||
requires: awips2-java
|
||||
|
||||
%description
|
||||
AWIPS II Java JRockit Distribution - Contains JRockit JDK 1.6.0_26 and
|
||||
the JRockit Mission Control Utility.
|
||||
|
||||
%prep
|
||||
# Verify That The User Has Specified A BuildRoot.
|
||||
if [ "%{_build_root}" = "/tmp" ]
|
||||
then
|
||||
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
|
||||
echo "Unable To Continue ... Terminating"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf %{_build_root}
|
||||
mkdir -p %{_build_root}/build-java
|
||||
mkdir -p %{_build_root}/awips2/java
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
RPM_CORE_PROJECT_DIR="%{_baseline_workspace}/rpms/awips2.core"
|
||||
JROCKIT_PROJECT_DIR="${RPM_CORE_PROJECT_DIR}/Installer.java-jrockit"
|
||||
JROCKIT_INSTALLER="jrockit-jdk1.6.0_26-R28.1.4-4.0.1-linux-ia32.bin"
|
||||
SILENT_XML="silent.xml"
|
||||
|
||||
pushd . > /dev/null
|
||||
# JRockit Setup
|
||||
cd ${JROCKIT_PROJECT_DIR}/src
|
||||
chmod u+x ${JROCKIT_INSTALLER}
|
||||
./${JROCKIT_INSTALLER} -mode=silent -silent_xml="${SILENT_XML}"
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
popd > /dev/null
|
||||
|
||||
# Copy the Java "Extensions" to build-java.
|
||||
JROCKIT_SRC_DIR="${JROCKIT_PROJECT_DIR}/src"
|
||||
JAI_BIN="jai-1_1_3-lib-linux-i586-jdk.bin"
|
||||
JAI_PATCH="jai.patch1"
|
||||
JAI_IMAGEIO_BIN="jai_imageio-1_1-lib-linux-i586-jdk.bin"
|
||||
JAI_IMAGEIO_PATCH="jai_imageio.patch1"
|
||||
|
||||
# Prepare
|
||||
touch %{_build_root}/build-java/yes.txt
|
||||
echo "yes" > %{_build_root}/build-java/yes.txt
|
||||
|
||||
cp -v ${JROCKIT_SRC_DIR}/${JAI_BIN} \
|
||||
%{_build_root}/build-java
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -v ${JROCKIT_SRC_DIR}/${JAI_PATCH} \
|
||||
%{_build_root}/build-java
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -v ${JROCKIT_SRC_DIR}/${JAI_IMAGEIO_BIN} \
|
||||
%{_build_root}/build-java
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -v ${JROCKIT_SRC_DIR}/${JAI_IMAGEIO_PATCH} \
|
||||
%{_build_root}/build-java
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# JAI Setup
|
||||
# ... Complete Patching.
|
||||
pushd . > /dev/null
|
||||
cd %{_build_root}/build-java
|
||||
patch -i ${JAI_PATCH}
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
chmod u+x ${JAI_BIN}
|
||||
popd > /dev/null
|
||||
# ... Complete Installation.
|
||||
pushd . > /dev/null
|
||||
cd %{_build_root}/awips2/java/jrockit
|
||||
%{_build_root}/build-java/${JAI_BIN} < %{_build_root}/build-java/yes.txt
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
popd > /dev/null
|
||||
|
||||
# JAI ImageIO Setup
|
||||
# ... Complete Patching.
|
||||
pushd . > /dev/null
|
||||
cd %{_build_root}/build-java
|
||||
patch -i ${JAI_IMAGEIO_PATCH}
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
chmod u+x ${JAI_IMAGEIO_BIN}
|
||||
popd > /dev/null
|
||||
# ... Complete Installation.
|
||||
pushd . > /dev/null
|
||||
cd %{_build_root}/awips2/java/jrockit
|
||||
%{_build_root}/build-java/${JAI_IMAGEIO_BIN} < %{_build_root}/build-java/yes.txt
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
popd > /dev/null
|
||||
|
||||
# pydev certificate
|
||||
PYDEV_CERTIFICATE="pydev_certificate.cer"
|
||||
cp -v ${JROCKIT_SRC_DIR}/${PYDEV_CERTIFICATE} \
|
||||
%{_build_root}/awips2/java/jrockit/jre/lib/security
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
touch %{_build_root}/build-java/changeit.txt
|
||||
echo "changeit" > %{_build_root}/build-java/changeit.txt
|
||||
chmod 666 %{_build_root}/awips2/java/jrockit/jre/lib/security/cacerts
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
%{_build_root}/awips2/java/jrockit/bin/keytool -import \
|
||||
-file %{_build_root}/awips2/java/jrockit/jre/lib/security/pydev_certificate.cer \
|
||||
-keystore %{_build_root}/awips2/java/jrockit/jre/lib/security/cacerts \
|
||||
-noprompt < %{_build_root}/build-java/changeit.txt
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf %{_build_root}/build-java
|
||||
|
||||
%pre
|
||||
|
||||
%post
|
||||
# Create a link JRockit Mission Control.
|
||||
pushd . > /dev/null
|
||||
cd /awips2/java/bin
|
||||
ln -sf /awips2/java/jrockit/bin/jrmc .
|
||||
popd > /dev/null
|
||||
|
||||
%preun
|
||||
# Remove the link JRockit Mission Control.
|
||||
pushd . > /dev/null
|
||||
cd /awips2/java/bin
|
||||
if [ -L jrockit ]; then
|
||||
rm -f jrockit
|
||||
fi
|
||||
popd > /dev/null
|
||||
|
||||
%postun
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%files
|
||||
%defattr(644,awips,fxalpha,755)
|
||||
%dir /awips2
|
||||
%dir /awips2/java
|
||||
%dir /awips2/java/jrockit
|
||||
%dir /awips2/java/jrockit/bin
|
||||
%dir /awips2/java/jrockit/include
|
||||
/awips2/java/jrockit/include/*
|
||||
%dir /awips2/java/jrockit/inventory
|
||||
/awips2/java/jrockit/inventory/*
|
||||
%dir /awips2/java/jrockit/jre
|
||||
/awips2/java/jrockit/jre/*
|
||||
%dir /awips2/java/jrockit/lib
|
||||
%dir /awips2/java/jrockit/missioncontrol
|
||||
/awips2/java/jrockit/missioncontrol/*
|
||||
%doc /awips2/java/jrockit/THIRDPARTYLICENSEREADME.txt
|
||||
%doc /awips2/java/jrockit/jre/THIRDPARTYLICENSEREADME.txt
|
||||
/awips2/java/jrockit/jre/.systemPrefs/.system.lock
|
||||
/awips2/java/jrockit/jre/.systemPrefs/.systemRootModFile
|
||||
/awips2/java/jrockit/missioncontrol/.eclipseproduct
|
||||
%doc /awips2/java/jrockit/COPYRIGHT-jai.txt
|
||||
%doc /awips2/java/jrockit/COPYRIGHT-jai_imageio.txt
|
||||
%doc /awips2/java/jrockit/DISTRIBUTIONREADME-jai.txt
|
||||
%doc /awips2/java/jrockit/DISTRIBUTIONREADME-jai_imageio.txt
|
||||
%doc /awips2/java/jrockit/ENTITLEMENT-jai_imageio.txt
|
||||
%doc /awips2/java/jrockit/LICENSE-jai.txt
|
||||
%doc /awips2/java/jrockit/LICENSE-jai_imageio.txt
|
||||
%doc /awips2/java/jrockit/THIRDPARTYLICENSEREADME-jai.txt
|
||||
%doc /awips2/java/jrockit/THIRDPARTYLICENSEREADME-jai_imageio.txt
|
||||
%doc /awips2/java/jrockit/UNINSTALL-jai
|
||||
%doc /awips2/java/jrockit/UNINSTALL-jai_imageio
|
||||
|
||||
%defattr(755,awips,fxalpha,755)
|
||||
/awips2/java/jrockit/bin/*
|
||||
/awips2/java/jrockit/lib/*
|
||||
/awips2/java/jrockit/jre/bin/*
|
||||
/awips2/java/jrockit/jre/lib/*
|
File diff suppressed because it is too large
Load diff
|
@ -1,49 +0,0 @@
|
|||
*** jai-1_1_3-lib-linux-i586-jdk.bin 2011-09-08 14:03:07.000000000 -0500
|
||||
--- jai-1_1_3-lib-linux-i586-jdk.bin.update 2011-09-08 14:04:43.000000000 -0500
|
||||
***************
|
||||
*** 1,6 ****
|
||||
#!/bin/sh
|
||||
PATH=/bin:/usr/bin
|
||||
! more <<EOF
|
||||
|
||||
|
||||
|
||||
--- 1,6 ----
|
||||
#!/bin/sh
|
||||
PATH=/bin:/usr/bin
|
||||
! cat <<EOF
|
||||
|
||||
|
||||
|
||||
***************
|
||||
*** 81,89 ****
|
||||
outname=install.sfx.$$
|
||||
echo "Unpacking..."
|
||||
if [ "`uname`" = "SunOS" ]; then
|
||||
! /bin/tail +139 $0 > $outname
|
||||
else
|
||||
! tail -n +139 $0 > $outname
|
||||
fi
|
||||
if [ -x /usr/bin/cksum ] ; then
|
||||
echo "Checksumming..."
|
||||
--- 81,89 ----
|
||||
outname=install.sfx.$$
|
||||
echo "Unpacking..."
|
||||
if [ "`uname`" = "SunOS" ]; then
|
||||
! /bin/tail +137 $0 > $outname
|
||||
else
|
||||
! tail -n +137 $0 > $outname
|
||||
fi
|
||||
if [ -x /usr/bin/cksum ] ; then
|
||||
echo "Checksumming..."
|
||||
***************
|
||||
*** 119,126 ****
|
||||
else
|
||||
ARCH=i386 # solaris-i586 or solaris-amd64
|
||||
fi
|
||||
- elif [ `expr "\`uname -m\`" : .*64.*` != '0' ]; then
|
||||
- ARCH=amd64 # linux-amd64
|
||||
else
|
||||
ARCH=i386 # linux-i586
|
||||
fi
|
||||
--- 119,124 ----
|
File diff suppressed because it is too large
Load diff
|
@ -1,45 +0,0 @@
|
|||
*** jai_imageio-1_1-lib-linux-i586-jdk.bin 2011-09-08 14:29:01.000000000 -0500
|
||||
--- jai_imageio-1_1-lib-linux-i586-jdk.bin.update 2011-09-08 14:30:10.000000000 -0500
|
||||
***************
|
||||
*** 1,6 ****
|
||||
#!/bin/sh
|
||||
PATH=/bin:/usr/bin
|
||||
! more <<EOF
|
||||
|
||||
|
||||
|
||||
--- 1,6 ----
|
||||
#!/bin/sh
|
||||
PATH=/bin:/usr/bin
|
||||
! cat <<EOF
|
||||
|
||||
|
||||
|
||||
***************
|
||||
*** 160,166 ****
|
||||
fi
|
||||
outname=install.sfx.$$
|
||||
echo "Unpacking..."
|
||||
! tail +215 $0 > $outname
|
||||
if [ -x /usr/bin/cksum ] ; then
|
||||
echo "Checksumming..."
|
||||
|
||||
--- 160,166 ----
|
||||
fi
|
||||
outname=install.sfx.$$
|
||||
echo "Unpacking..."
|
||||
! tail -n +213 $0 > $outname
|
||||
if [ -x /usr/bin/cksum ] ; then
|
||||
echo "Checksumming..."
|
||||
|
||||
***************
|
||||
*** 195,202 ****
|
||||
else
|
||||
ARCH=i386 # solaris-i586 or solaris-amd64
|
||||
fi
|
||||
- elif [ `expr \`uname -m\` : .*64.*` != '0' ]; then
|
||||
- ARCH=amd64 # linux-amd64
|
||||
else
|
||||
ARCH=i386 # linux-i586
|
||||
fi
|
||||
--- 195,200 ----
|
|
@ -1 +0,0 @@
|
|||
c2ac231a9d923a1b93ea001ce86bc20765f6dc2c
|
Binary file not shown.
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<domain-template-descriptor>
|
||||
<input-fields>
|
||||
<data-value name="USER_INSTALL_DIR" value="/tmp/awips-component/awips2/java/jrockit" />
|
||||
<data-value name="INSTALL_DEMOS_AND_SAMPLES" value="false" />
|
||||
<data-value name="INSTALL_SOURCE_CODE" value="false" />
|
||||
</input-fields>
|
||||
</domain-template-descriptor>
|
|
@ -98,6 +98,54 @@ if [ "${1}" = "-custom" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-python-qpid" ]; then
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-python"
|
||||
buildRPM "awips2-python-cherrypy"
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-nose"
|
||||
buildRPM "awips2-python-numpy"
|
||||
buildRPM "awips2-python-h5py"
|
||||
buildRPM "awips2-python-jimporter"
|
||||
buildRPM "awips2-python-matplotlib"
|
||||
buildRPM "awips2-python-pil"
|
||||
buildRPM "awips2-python-pmw"
|
||||
buildRPM "awips2-python-pupynere"
|
||||
buildRPM "awips2-python-qpid"
|
||||
buildRPM "awips2-python-scientific"
|
||||
buildRPM "awips2-python-scipy"
|
||||
buildRPM "awips2-python-tables"
|
||||
buildRPM "awips2-python-thrift"
|
||||
buildRPM "awips2-python-tpg"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
buildRPM "awips2-python-werkzeug"
|
||||
buildRPM "awips2-python-pygtk"
|
||||
buildRPM "awips2-python-pycairo"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildQPID
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#buildRPM "awips2-ant"
|
||||
#unpackHttpdPypies
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
#buildRPM "awips2-httpd-pypies"
|
||||
#buildRPM "awips2-java"
|
||||
#buildRPM "awips2-ldm"
|
||||
#buildRPM "awips2-postgresql"
|
||||
#buildRPM "awips2-psql"
|
||||
#buildRPM "awips2-tools"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
if [ "${1}" = "-delta" ]; then
|
||||
buildCAVE
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -109,6 +157,9 @@ if [ "${1}" = "-delta" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-gfesuite-client"
|
||||
buildRPM "awips2-gfesuite-server"
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
|
||||
|
@ -119,8 +170,6 @@ if [ "${1}" = "-delta" ]; then
|
|||
buildRPM "awips2-database-server-configuration"
|
||||
buildRPM "awips2-database-standalone-configuration"
|
||||
buildRPM "awips2-data.hdf5-gfe.climo"
|
||||
buildRPM "awips2-gfesuite-client"
|
||||
buildRPM "awips2-gfesuite-server"
|
||||
buildRPM "awips2-hydroapps-shared"
|
||||
buildRPM "awips2-localapps-environment"
|
||||
buildRPM "awips2-maps-database"
|
||||
|
@ -128,7 +177,6 @@ if [ "${1}" = "-delta" ]; then
|
|||
buildRPM "awips2-pypies"
|
||||
buildRPM "awips2-data.hdf5-topo"
|
||||
buildRPM "awips2-data.gfe"
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-rcm"
|
||||
buildLocalizationRPMs
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -297,6 +345,7 @@ if [ "${1}" = "-viz" ]; then
|
|||
fi
|
||||
|
||||
if [ "${1}" = "-edex" ]; then
|
||||
buildRPM "awips2"
|
||||
buildEDEX
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
|
|
368
rpms/build/i386/build.sh_b4_python-qpid_flag
Normal file
368
rpms/build/i386/build.sh_b4_python-qpid_flag
Normal file
|
@ -0,0 +1,368 @@
|
|||
#!/bin/bash
|
||||
|
||||
function buildRPM()
|
||||
{
|
||||
# Arguments:
|
||||
# ${1} == the name of the rpm.
|
||||
lookupRPM "${1}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: '${1}' is not a recognized AWIPS II RPM."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/usr/bin/rpmbuild -ba \
|
||||
--define '_topdir %(echo ${AWIPSII_TOP_DIR})' \
|
||||
--define '_baseline_workspace %(echo ${WORKSPACE})' \
|
||||
--define '_uframe_eclipse %(echo ${UFRAME_ECLIPSE})' \
|
||||
--define '_awipscm_share %(echo ${AWIPSCM_SHARE})' \
|
||||
--define '_build_root %(echo ${AWIPSII_BUILD_ROOT})' \
|
||||
--define '_component_version %(echo ${AWIPSII_VERSION})' \
|
||||
--define '_component_release %(echo ${AWIPSII_RELEASE})' \
|
||||
--define '_component_build_date %(echo ${COMPONENT_BUILD_DATE})' \
|
||||
--define '_component_build_time %(echo ${COMPONENT_BUILD_TIME})' \
|
||||
--define '_component_build_system %(echo ${COMPONENT_BUILD_SYSTEM})' \
|
||||
--buildroot ${AWIPSII_BUILD_ROOT} \
|
||||
${RPM_SPECIFICATION}/component.spec
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to build RPM ${1}."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# This script will build all of the 32-bit rpms.
|
||||
# Ensure that we are on a machine with the correct architecture.
|
||||
|
||||
architecture=`uname -i`
|
||||
if [ ! "${architecture}" = "i386" ]; then
|
||||
echo "ERROR: This build can only be performed on a 32-bit Operating System."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine which directory we are running from.
|
||||
path_to_script=`readlink -f $0`
|
||||
dir=$(dirname $path_to_script)
|
||||
|
||||
common_dir=`cd ${dir}/../common; pwd;`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to find the common functions directory."
|
||||
exit 1
|
||||
fi
|
||||
# source the common functions.
|
||||
source ${common_dir}/lookupRPM.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to source the common functions."
|
||||
exit 1
|
||||
fi
|
||||
source ${common_dir}/usage.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to source the common functions."
|
||||
exit 1
|
||||
fi
|
||||
source ${common_dir}/rpms.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to source the common functions."
|
||||
exit 1
|
||||
fi
|
||||
source ${common_dir}/systemInfo.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to retrieve the system information."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# prepare the build environment.
|
||||
source ${dir}/buildEnvironment.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to prepare the build environment."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export LIGHTNING=true
|
||||
# Determine if the optional '-nobinlightning' argument has been specified.
|
||||
if [ "${2}" = "-nobinlightning" ]; then
|
||||
LIGHTNING=false
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-custom" ]; then
|
||||
buildRPM "awips2-java"
|
||||
buildRPM "awips2-postgresql"
|
||||
buildRPM "awips2-psql"
|
||||
buildRPM "awips2-tools"
|
||||
unpackHttpdPypies
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-httpd-pypies"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-delta" ]; then
|
||||
buildCAVE
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-alertviz"
|
||||
buildEDEX
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
|
||||
buildRPM "awips2-adapt-native"
|
||||
buildRPM "awips2-aviation-shared"
|
||||
buildRPM "awips2-cli"
|
||||
buildRPM "awips2-database"
|
||||
buildRPM "awips2-database-server-configuration"
|
||||
buildRPM "awips2-database-standalone-configuration"
|
||||
buildRPM "awips2-data.hdf5-gfe.climo"
|
||||
buildRPM "awips2-gfesuite-client"
|
||||
buildRPM "awips2-gfesuite-server"
|
||||
buildRPM "awips2-hydroapps-shared"
|
||||
buildRPM "awips2-localapps-environment"
|
||||
buildRPM "awips2-maps-database"
|
||||
buildRPM "awips2-notification"
|
||||
buildRPM "awips2-pypies"
|
||||
buildRPM "awips2-data.hdf5-topo"
|
||||
buildRPM "awips2-data.gfe"
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-rcm"
|
||||
buildLocalizationRPMs
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-full" ]; then
|
||||
buildCAVE
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-alertviz"
|
||||
buildEDEX
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-python"
|
||||
buildRPM "awips2-python-cherrypy"
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-h5py"
|
||||
buildRPM "awips2-python-jimporter"
|
||||
buildRPM "awips2-python-matplotlib"
|
||||
buildRPM "awips2-python-nose"
|
||||
buildRPM "awips2-python-numpy"
|
||||
buildRPM "awips2-python-pil"
|
||||
buildRPM "awips2-python-pmw"
|
||||
buildRPM "awips2-python-pupynere"
|
||||
buildRPM "awips2-python-qpid"
|
||||
buildRPM "awips2-python-scientific"
|
||||
buildRPM "awips2-python-scipy"
|
||||
buildRPM "awips2-python-tables"
|
||||
buildRPM "awips2-python-thrift"
|
||||
buildRPM "awips2-python-tpg"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
buildRPM "awips2-python-werkzeug"
|
||||
buildRPM "awips2-python-pygtk"
|
||||
buildRPM "awips2-python-pycairo"
|
||||
|
||||
buildRPM "awips2-adapt-native"
|
||||
buildRPM "awips2-aviation-shared"
|
||||
buildRPM "awips2-cli"
|
||||
buildRPM "awips2-database"
|
||||
buildRPM "awips2-database-server-configuration"
|
||||
buildRPM "awips2-database-standalone-configuration"
|
||||
buildRPM "awips2-data.hdf5-gfe.climo"
|
||||
buildRPM "awips2-data.gfe"
|
||||
buildRPM "awips2-gfesuite-client"
|
||||
buildRPM "awips2-gfesuite-server"
|
||||
buildRPM "awips2-hydroapps-shared"
|
||||
buildRPM "awips2-localapps-environment"
|
||||
buildRPM "awips2-maps-database"
|
||||
buildRPM "awips2-notification"
|
||||
buildRPM "awips2-pypies"
|
||||
buildRPM "awips2-data.hdf5-topo"
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-rcm"
|
||||
buildLocalizationRPMs
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildQPID
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildRPM "awips2-ant"
|
||||
unpackHttpdPypies
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-httpd-pypies"
|
||||
buildRPM "awips2-java"
|
||||
#buildRPM "awips2-ldm"
|
||||
buildRPM "awips2-postgresql"
|
||||
buildRPM "awips2-psql"
|
||||
buildRPM "awips2-tools"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-ade" ]; then
|
||||
buildRPM "awips2-eclipse"
|
||||
buildRPM "awips2-java"
|
||||
buildRPM "awips2-ant"
|
||||
buildRPM "awips2-python"
|
||||
buildRPM "awips2-python-cherrypy"
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-h5py"
|
||||
buildRPM "awips2-python-jimporter"
|
||||
buildRPM "awips2-python-matplotlib"
|
||||
buildRPM "awips2-python-nose"
|
||||
buildRPM "awips2-python-numpy"
|
||||
buildRPM "awips2-python-pil"
|
||||
buildRPM "awips2-python-pmw"
|
||||
buildRPM "awips2-python-pupynere"
|
||||
buildRPM "awips2-python-qpid"
|
||||
buildRPM "awips2-python-scientific"
|
||||
buildRPM "awips2-python-scipy"
|
||||
buildRPM "awips2-python-tables"
|
||||
buildRPM "awips2-python-thrift"
|
||||
buildRPM "awips2-python-tpg"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
buildRPM "awips2-python-werkzeug"
|
||||
buildRPM "awips2-python-pygtk"
|
||||
buildRPM "awips2-python-pycairo"
|
||||
buildQPID -ade
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Package the ade.
|
||||
# Create the containing directory.
|
||||
ade_directory="awips2-ade-${AWIPSII_VERSION}-${AWIPSII_RELEASE}"
|
||||
if [ -d ${WORKSPACE}/${ade_directory} ]; then
|
||||
rm -rf ${WORKSPACE}/${ade_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
mkdir -p ${WORKSPACE}/${ade_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Copy the rpms to the directory.
|
||||
cp -v ${AWIPSII_TOP_DIR}/RPMS/i386/* \
|
||||
${AWIPSII_TOP_DIR}/RPMS/noarch/* \
|
||||
${WORKSPACE}/${ade_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
awips2_ade_directory="${WORKSPACE}/rpms/awips2.ade"
|
||||
# Copy the install and uninstall script to the directory.
|
||||
cp -v ${awips2_ade_directory}/tar.ade/scripts/*.sh \
|
||||
${WORKSPACE}/${ade_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Tar the directory.
|
||||
pushd . > /dev/null 2>&1
|
||||
cd ${WORKSPACE}
|
||||
tar -cvf ${ade_directory}.tar ${ade_directory}
|
||||
popd > /dev/null 2>&1
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-viz" ]; then
|
||||
buildCAVE
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-alertviz"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-edex" ]; then
|
||||
buildEDEX
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-qpid" ]; then
|
||||
buildQPID
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-ldm" ]; then
|
||||
# Ensure that the user has root privileges.
|
||||
if [ ! ${UID} = 0 ]; then
|
||||
echo "ERROR: You must have root privileges to build ldm."
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-ldm"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-package" ]; then
|
||||
repository_directory="awips2-repository-${AWIPSII_VERSION}-${AWIPSII_RELEASE}"
|
||||
if [ -d ${WORKSPACE}/${repository_directory} ]; then
|
||||
rm -rf ${WORKSPACE}/${repository_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
mkdir -p ${WORKSPACE}/${repository_directory}/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -r ${AWIPSII_TOP_DIR}/RPMS/* \
|
||||
${WORKSPACE}/${repository_directory}/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rpms_directory="${WORKSPACE}/rpms"
|
||||
comps_xml="${rpms_directory}/common/yum/arch.x86/comps.xml"
|
||||
cp -v ${comps_xml} ${WORKSPACE}/${repository_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pushd . > /dev/null
|
||||
cd ${WORKSPACE}
|
||||
tar -cvf ${repository_directory}.tar ${repository_directory}
|
||||
RC=$?
|
||||
popd > /dev/null
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
usage
|
||||
exit 0
|
51
rpms/legal/FOSS_licenses/jasper/LICENSE
Normal file
51
rpms/legal/FOSS_licenses/jasper/LICENSE
Normal file
|
@ -0,0 +1,51 @@
|
|||
JasPer License Version 2.0
|
||||
|
||||
Copyright (c) 2001-2006 Michael David Adams
|
||||
Copyright (c) 1999-2000 Image Power, Inc.
|
||||
Copyright (c) 1999-2000 The University of British Columbia
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person (the
|
||||
"User") obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
1. The above copyright notices and this permission notice (which
|
||||
includes the disclaimer below) shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
2. The name of a copyright holder shall not be used to endorse or
|
||||
promote products derived from the Software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO
|
||||
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
|
||||
INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE
|
||||
PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE
|
||||
THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY.
|
||||
EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS
|
||||
BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL
|
||||
PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS
|
||||
GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE
|
||||
ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE
|
||||
IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL
|
||||
SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES,
|
||||
AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL
|
||||
SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH
|
||||
THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH,
|
||||
PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
Name: awips2-python-qpid
|
||||
Summary: AWIPS II Python qpid Distribution
|
||||
Version: 0.6
|
||||
Release: 4
|
||||
Release: 5
|
||||
Group: AWIPSII
|
||||
BuildRoot: %{_build_root}
|
||||
BuildArch: %{_build_arch}
|
||||
|
@ -60,6 +60,7 @@ QPID_SRC_DIR="%{_python_pkgs_dir}/qpid"
|
|||
QPID_SRC="qpid-0.6/python"
|
||||
QPID_SPECS="qpid-0.6/specs"
|
||||
QPID_QUEUE_COUNT_SCRIPT="qpid-queue-count"
|
||||
QPID_MONITOR_SCRIPT="monitor_qpid_host.sh"
|
||||
|
||||
pushd . > /dev/null
|
||||
cd %{_build_root}/build-python/${QPID_SRC}
|
||||
|
@ -77,6 +78,10 @@ popd > /dev/null
|
|||
cp -v ${QPID_SRC_DIR}/bin/${QPID_QUEUE_COUNT_SCRIPT} \
|
||||
%{_build_root}/awips2/python/bin
|
||||
|
||||
# Copy the queue-counting script to bin
|
||||
cp -v ${QPID_SRC_DIR}/bin/${QPID_MONITOR_SCRIPT} \
|
||||
%{_build_root}/awips2/python/bin
|
||||
|
||||
# Copy the amqp dtd/xml data to share
|
||||
mkdir -p %{_build_root}/awips2/python/share/amqp
|
||||
cp -prv %{_build_root}/build-python/${QPID_SPECS}/* \
|
||||
|
|
116
rpms/python.site-packages/Installer.qpid/component.spec.ORIG
Normal file
116
rpms/python.site-packages/Installer.qpid/component.spec.ORIG
Normal file
|
@ -0,0 +1,116 @@
|
|||
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
|
||||
%define _build_arch %(uname -i)
|
||||
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
|
||||
|
||||
#
|
||||
# AWIPS II Python qpid Spec File
|
||||
#
|
||||
Name: awips2-python-qpid
|
||||
Summary: AWIPS II Python qpid Distribution
|
||||
Version: 0.6
|
||||
Release: 4
|
||||
Group: AWIPSII
|
||||
BuildRoot: %{_build_root}
|
||||
BuildArch: %{_build_arch}
|
||||
URL: N/A
|
||||
License: N/A
|
||||
Distribution: N/A
|
||||
Vendor: Raytheon
|
||||
Packager: Bryan Kowal
|
||||
|
||||
AutoReq: no
|
||||
requires: awips2-python
|
||||
provides: awips2-python-qpid
|
||||
|
||||
%description
|
||||
AWIPS II Python qpid Site-Package
|
||||
|
||||
%prep
|
||||
# Verify That The User Has Specified A BuildRoot.
|
||||
if [ "%{_build_root}" = "" ]
|
||||
then
|
||||
echo "A Build Root has not been specified."
|
||||
echo "Unable To Continue ... Terminating"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf %{_build_root}
|
||||
mkdir -p %{_build_root}
|
||||
mkdir -p %{_build_root}/build-python
|
||||
|
||||
%build
|
||||
QPID_SRC_DIR="%{_python_pkgs_dir}/qpid"
|
||||
QPID_TAR="qpid-0.6.tar.gz"
|
||||
|
||||
cp -rv ${QPID_SRC_DIR}/${QPID_TAR} \
|
||||
%{_build_root}/build-python
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pushd . > /dev/null
|
||||
cd %{_build_root}/build-python
|
||||
tar -xvf ${QPID_TAR}
|
||||
rm -f ${QPID_TAR}
|
||||
popd > /dev/null
|
||||
|
||||
%install
|
||||
QPID_SRC_DIR="%{_python_pkgs_dir}/qpid"
|
||||
QPID_SRC="qpid-0.6/python"
|
||||
QPID_SPECS="qpid-0.6/specs"
|
||||
QPID_QUEUE_COUNT_SCRIPT="qpid-queue-count"
|
||||
|
||||
pushd . > /dev/null
|
||||
cd %{_build_root}/build-python/${QPID_SRC}
|
||||
mkdir -p %{_build_root}/awips2/python
|
||||
export LD_LIBRARY_PATH=/awips2/python/lib
|
||||
export PATH=/awips2/python/bin:${PATH}
|
||||
make install PREFIX=%{_build_root}/awips2/python
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
popd > /dev/null
|
||||
|
||||
# Copy the queue-counting script to bin
|
||||
cp -v ${QPID_SRC_DIR}/bin/${QPID_QUEUE_COUNT_SCRIPT} \
|
||||
%{_build_root}/awips2/python/bin
|
||||
|
||||
# Copy the amqp dtd/xml data to share
|
||||
mkdir -p %{_build_root}/awips2/python/share/amqp
|
||||
cp -prv %{_build_root}/build-python/${QPID_SPECS}/* \
|
||||
%{_build_root}/awips2/python/share/amqp
|
||||
|
||||
rm -rf %{_build_root}/build-python
|
||||
|
||||
%pre
|
||||
|
||||
%post
|
||||
# get the path to the awips2-python that is installed
|
||||
PYDIR="/awips2/python"
|
||||
|
||||
# get the python version so we can fix the amqp xml/dtd
|
||||
PYTHON_VERSION=$( LD_LIBRARY_PATH=${PYDIR}/lib ${PYDIR}/bin/python -c "from distutils.sysconfig import get_python_version; print get_python_version()" )
|
||||
# the file /awips2/python/lib/python$PYTHON_VERSION/site-packages/qpid_config.py is wrong
|
||||
# this substitution will put the correct path in the file qpid_config.py
|
||||
# otherwise it will generate AMQP errors when run, it won't find the directory
|
||||
sed -i "s|^AMQP_SPEC_DIR=.*/share/amqp\"|AMQP_SPEC_DIR=\"${PYDIR}/share/amqp\"|g" \
|
||||
${PYDIR}/lib/python${PYTHON_VERSION}/site-packages/qpid_config.py
|
||||
|
||||
%preun
|
||||
|
||||
%postun
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%files
|
||||
%defattr(644,awips,fxalpha,755)
|
||||
%dir /awips2/python/lib/python2.7/site-packages
|
||||
/awips2/python/lib/python2.7/site-packages/*
|
||||
%dir /awips2/python/share
|
||||
/awips2/python/share/*
|
||||
%defattr(755,awips,fxalpha,755)
|
||||
%dir /awips2/python/bin
|
||||
/awips2/python/bin/*
|
Loading…
Add table
Reference in a new issue