...
This commit is contained in:
parent
36166f5b60
commit
5825b7a929
@ -4,8 +4,72 @@ import java.util.Vector;
|
||||
|
||||
public class QWeatherDisasterWarning
|
||||
{
|
||||
public QWeatherDisasterWarning( String code,
|
||||
String updateTime,
|
||||
String flLink,
|
||||
Vector<QWeatherDisasterWarningItem> warning,
|
||||
QWeatherDisasterWarningRefer refer )
|
||||
{
|
||||
this.code = code;
|
||||
this.updateTime = updateTime;
|
||||
this.flLink = flLink;
|
||||
this.warning = warning;
|
||||
this.refer = refer;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode( String code )
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime( String updateTime )
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getFlLink()
|
||||
{
|
||||
return flLink;
|
||||
}
|
||||
|
||||
public void setFlLink( String flLink )
|
||||
{
|
||||
this.flLink = flLink;
|
||||
}
|
||||
|
||||
public Vector<QWeatherDisasterWarningItem> getWarning()
|
||||
{
|
||||
return warning;
|
||||
}
|
||||
|
||||
public void setWarning( Vector<QWeatherDisasterWarningItem> warning )
|
||||
{
|
||||
this.warning = warning;
|
||||
}
|
||||
|
||||
public QWeatherDisasterWarningRefer getRefer()
|
||||
{
|
||||
return refer;
|
||||
}
|
||||
|
||||
public void setRefer( QWeatherDisasterWarningRefer refer )
|
||||
{
|
||||
this.refer = refer;
|
||||
}
|
||||
|
||||
private String code;
|
||||
private String updateTime;
|
||||
private String flLink;
|
||||
private Vector<QWeatherDisasterWarningItem> warningItems;
|
||||
private Vector<QWeatherDisasterWarningItem> warning;
|
||||
private QWeatherDisasterWarningRefer refer;
|
||||
}
|
||||
|
@ -0,0 +1,56 @@
|
||||
package com.cpic.xim.disaster_warning;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class QWeatherDisasterWarningRefer
|
||||
{
|
||||
public QWeatherDisasterWarningRefer( String source, String license )
|
||||
{
|
||||
this.source = source;
|
||||
this.license = license;
|
||||
}
|
||||
|
||||
public String getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource( String source )
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getLicense()
|
||||
{
|
||||
return license;
|
||||
}
|
||||
|
||||
public void setLicense( String license )
|
||||
{
|
||||
this.license = license;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o )
|
||||
{
|
||||
if ( this == o )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if ( o == null || getClass() != o.getClass() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
QWeatherDisasterWarningRefer that = (QWeatherDisasterWarningRefer) o;
|
||||
return source.equals( that.source ) && license.equals( that.license );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash( source, license );
|
||||
}
|
||||
|
||||
private String source;
|
||||
private String license;
|
||||
}
|
@ -98,9 +98,11 @@ public class WeatherDisasterWarningGrabber
|
||||
}
|
||||
}
|
||||
|
||||
assert connection != null;
|
||||
if ( connection != null )
|
||||
{
|
||||
connection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
return json;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user