-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#864 Updates radio reference service library to resolve issue where t…
…he library wasn't parsing the system information object correctly and was assuming a singular bandplan object versus an array of bandplans. (#865) Updating the service library prompted some minor changes with the way that county info objects are handled for each site. Co-authored-by: Denny <denny@denny-desktop>
- Loading branch information
Showing
7 changed files
with
232 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 131 additions & 0 deletions
131
src/main/java/io/github/dsheirer/gui/playlist/radioreference/EnrichedSite.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
/* | ||
* ***************************************************************************** | ||
* Copyright (C) 2014-2020 Dennis Sheirer | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/> | ||
* **************************************************************************** | ||
*/ | ||
|
||
package io.github.dsheirer.gui.playlist.radioreference; | ||
|
||
import io.github.dsheirer.rrapi.type.CountyInfo; | ||
import io.github.dsheirer.rrapi.type.Site; | ||
|
||
/** | ||
* Wrapper class to join a Site and a corresponding County Info | ||
*/ | ||
public class EnrichedSite | ||
{ | ||
private Site mSite; | ||
private CountyInfo mCountyInfo; | ||
|
||
/** | ||
* Constructs an instance | ||
* @param site object | ||
* @param countyInfo optional | ||
*/ | ||
public EnrichedSite(Site site, CountyInfo countyInfo) | ||
{ | ||
mSite = site; | ||
mCountyInfo = countyInfo; | ||
} | ||
|
||
/** | ||
* Site instance | ||
* @return site or null | ||
*/ | ||
public Site getSite() | ||
{ | ||
return mSite; | ||
} | ||
|
||
/** | ||
* Sets the site instance | ||
* @param site or null | ||
*/ | ||
public void setSite(Site site) | ||
{ | ||
mSite = site; | ||
} | ||
|
||
/** | ||
* County information | ||
* @return county info or null | ||
*/ | ||
public CountyInfo getCountyInfo() | ||
{ | ||
return mCountyInfo; | ||
} | ||
|
||
/** | ||
* Sets the county info | ||
* @param countyInfo or null | ||
*/ | ||
public void setCountyInfo(CountyInfo countyInfo) | ||
{ | ||
mCountyInfo = countyInfo; | ||
} | ||
|
||
/** | ||
* Optional site number | ||
*/ | ||
public Integer getSiteNumber() | ||
{ | ||
if(mSite != null) | ||
{ | ||
return mSite.getSiteNumber(); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
/** | ||
* Optional site RFSS value | ||
*/ | ||
public Integer getRfss() | ||
{ | ||
if(mSite != null) | ||
{ | ||
return mSite.getRfss(); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
/** | ||
* Optional county name | ||
*/ | ||
public String getCountyName() | ||
{ | ||
if(mCountyInfo != null) | ||
{ | ||
return mCountyInfo.getName(); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
/** | ||
* Optional description of the site | ||
*/ | ||
public String getDescription() | ||
{ | ||
if(mSite != null) | ||
{ | ||
return mSite.getDescription(); | ||
} | ||
|
||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.