Formatted and cleaned up code

This commit is contained in:
Patrick Gotthard 2014-04-12 15:14:43 +02:00
parent cfd85a7986
commit 6e2a56066b
220 changed files with 4416 additions and 4196 deletions

View file

@ -28,6 +28,11 @@ import com.sun.syndication.feed.atom.Entry;
*/ */
public abstract class ActivityObject extends Entry implements HasLocation { public abstract class ActivityObject extends Entry implements HasLocation {
/**
*
*/
private static final long serialVersionUID = 1L;
public abstract String getTypeIRI(); public abstract String getTypeIRI();
@Override @Override

View file

@ -44,6 +44,11 @@ package org.rometools.feed.module.activitystreams.types;
* @author robert.cooper * @author robert.cooper
*/ */
public class Article extends ActivityObject { public class Article extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/article"; return "http://activitystrea.ms/schema/1.0/article";

View file

@ -41,6 +41,10 @@ package org.rometools.feed.module.activitystreams.types;
* @author robert.cooper * @author robert.cooper
*/ */
public class Audio extends ActivityObject { public class Audio extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
private String embedCode; private String embedCode;
private String streamLink; private String streamLink;

View file

@ -66,6 +66,11 @@ import com.sun.syndication.feed.atom.Link;
*/ */
public class Bookmark extends ActivityObject { public class Bookmark extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/bookmark"; return "http://activitystrea.ms/schema/1.0/bookmark";

View file

@ -49,6 +49,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Comment extends ActivityObject { public class Comment extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/comment"; return "http://activitystrea.ms/schema/1.0/comment";

View file

@ -44,6 +44,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Event extends ActivityObject { public class Event extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/event"; return "http://activitystrea.ms/schema/1.0/event";

View file

@ -48,6 +48,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class File extends ActivityObject { public class File extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/file"; return "http://activitystrea.ms/schema/1.0/file";

View file

@ -42,6 +42,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Folder extends ActivityObject { public class Folder extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/folder"; return "http://activitystrea.ms/schema/1.0/folder";

View file

@ -32,6 +32,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class List extends ActivityObject { public class List extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/list"; return "http://activitystrea.ms/schema/1.0/list";

View file

@ -47,6 +47,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Note extends ActivityObject { public class Note extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/note"; return "http://activitystrea.ms/schema/1.0/note";

View file

@ -46,6 +46,11 @@ import com.sun.syndication.feed.atom.Link;
*/ */
public class Person extends ActivityObject { public class Person extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/person"; return "http://activitystrea.ms/schema/1.0/person";

View file

@ -44,6 +44,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Photo extends ActivityObject { public class Photo extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/photo"; return "http://activitystrea.ms/schema/1.0/photo";

View file

@ -41,6 +41,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class PhotoAlbum extends ActivityObject { public class PhotoAlbum extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/photo-album"; return "http://activitystrea.ms/schema/1.0/photo-album";

View file

@ -44,6 +44,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Place extends ActivityObject { public class Place extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/place"; return "http://activitystrea.ms/schema/1.0/place";

View file

@ -33,6 +33,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Playlist extends ActivityObject { public class Playlist extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/playlist"; return "http://activitystrea.ms/schema/1.0/playlist";

View file

@ -44,6 +44,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Product extends ActivityObject { public class Product extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/product"; return "http://activitystrea.ms/schema/1.0/product";

View file

@ -51,6 +51,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Review extends ActivityObject { public class Review extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/review"; return "http://activitystrea.ms/schema/1.0/review";

View file

@ -43,6 +43,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Service extends ActivityObject { public class Service extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/service"; return "http://activitystrea.ms/schema/1.0/service";

View file

@ -36,6 +36,10 @@ package org.rometools.feed.module.activitystreams.types;
* @author robert.cooper * @author robert.cooper
*/ */
public class Song extends ActivityObject { public class Song extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
private Audio audio; private Audio audio;
/** /**

View file

@ -40,6 +40,11 @@ package org.rometools.feed.module.activitystreams.types;
*/ */
public class Status extends ActivityObject { public class Status extends ActivityObject {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/status"; return "http://activitystrea.ms/schema/1.0/status";

View file

@ -31,6 +31,10 @@ import com.sun.syndication.feed.CopyFrom;
*/ */
public class CustomTagsImpl implements CustomTags { public class CustomTagsImpl implements CustomTags {
/**
*
*/
private static final long serialVersionUID = 1L;
private List values; private List values;
/** Creates a new instance of CustomTagsImpl */ /** Creates a new instance of CustomTagsImpl */

View file

@ -65,6 +65,11 @@ import com.sun.syndication.feed.impl.EqualsBean;
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
*/ */
public class GoogleBaseImpl implements GoogleBase { public class GoogleBaseImpl implements GoogleBase {
/**
*
*/
private static final long serialVersionUID = 1L;
/** boolean:listing_type */ /** boolean:listing_type */
private Boolean listingType; private Boolean listingType;

View file

@ -28,6 +28,11 @@ package org.rometools.feed.module.base;
*/ */
public class ValidationException extends RuntimeException { public class ValidationException extends RuntimeException {
/**
*
*/
private static final long serialVersionUID = 1L;
/** Creates a new instance of ValidationException */ /** Creates a new instance of ValidationException */
public ValidationException(final String message) { public ValidationException(final String message) {
super(message); super(message);

View file

@ -51,6 +51,11 @@ import java.util.Date;
* @version $Revision: 1.1 $ * @version $Revision: 1.1 $
*/ */
public class ShortDate extends Date implements CloneableType { public class ShortDate extends Date implements CloneableType {
/**
*
*/
private static final long serialVersionUID = 1L;
/** Creates a new instance of ShortDate */ /** Creates a new instance of ShortDate */
public ShortDate() { public ShortDate() {
super(); super();

View file

@ -54,6 +54,10 @@ import com.sun.syndication.feed.impl.ToStringBean;
*/ */
public class CreativeCommonsImpl implements CreativeCommons { public class CreativeCommonsImpl implements CreativeCommons {
/**
*
*/
private static final long serialVersionUID = 1L;
public static final String RDF_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; public static final String RDF_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
public static final String RSS2_URI = "http://backend.userland.com/creativeCommonsRssModule"; public static final String RSS2_URI = "http://backend.userland.com/creativeCommonsRssModule";
public static final String RSS1_URI = "http://web.resource.org/cc/"; public static final String RSS1_URI = "http://web.resource.org/cc/";

View file

@ -53,6 +53,10 @@ import com.sun.syndication.feed.CopyFrom;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class ContentModuleImpl extends com.sun.syndication.feed.module.ModuleImpl implements ContentModule { public class ContentModuleImpl extends com.sun.syndication.feed.module.ModuleImpl implements ContentModule {
/**
*
*/
private static final long serialVersionUID = 1L;
private List encodeds; private List encodeds;
private List contents; private List contents;
private List contentItems; private List contentItems;

View file

@ -66,7 +66,6 @@ public class GMLGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaceUri() * @see com.sun.syndication.io.ModuleGenerator#getNamespaceUri()
*/ */
@Override @Override
@ -76,7 +75,6 @@ public class GMLGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaces() * @see com.sun.syndication.io.ModuleGenerator#getNamespaces()
*/ */
@Override @Override
@ -86,7 +84,6 @@ public class GMLGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element) * @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element)
*/ */
@Override @Override

View file

@ -25,13 +25,17 @@ package org.rometools.feed.module.georss;
*/ */
public class GMLModuleImpl extends GeoRSSModule { public class GMLModuleImpl extends GeoRSSModule {
/**
*
*/
private static final long serialVersionUID = 1L;
public GMLModuleImpl() { public GMLModuleImpl() {
super(GeoRSSModule.class, GeoRSSModule.GEORSS_GML_URI); super(GeoRSSModule.class, GeoRSSModule.GEORSS_GML_URI);
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.feed.CopyFrom#getInterface() * @see com.sun.syndication.feed.CopyFrom#getInterface()
*/ */
@Override @Override

View file

@ -43,7 +43,6 @@ public class GMLParser implements ModuleParser {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleParser#getNamespaceUri() * @see com.sun.syndication.io.ModuleParser#getNamespaceUri()
*/ */
@Override @Override
@ -53,7 +52,6 @@ public class GMLParser implements ModuleParser {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element) * @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/ */
@Override @Override

View file

@ -31,6 +31,11 @@ import com.sun.syndication.feed.module.ModuleImpl;
* @version $Id: GeoRSSModule.java,v 1.8 2007/06/06 09:47:32 marcwick Exp $ * @version $Id: GeoRSSModule.java,v 1.8 2007/06/06 09:47:32 marcwick Exp $
*/ */
public abstract class GeoRSSModule extends ModuleImpl implements Cloneable { public abstract class GeoRSSModule extends ModuleImpl implements Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
protected AbstractGeometry geometry; protected AbstractGeometry geometry;
public static final String version = "0.9.8"; public static final String version = "0.9.8";
@ -114,7 +119,6 @@ public abstract class GeoRSSModule extends ModuleImpl implements Cloneable {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object) * @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object)
*/ */
@Override @Override

View file

@ -76,9 +76,7 @@ public class GeoRSSUtils {
/* /*
* if (geoRSSModule == null && w3cGeo != null) { geoRSSModule = w3cGeo; } else if (geoRSSModule == null && gml != null) { geoRSSModule = gml; } else if * if (geoRSSModule == null && w3cGeo != null) { geoRSSModule = w3cGeo; } else if (geoRSSModule == null && gml != null) { geoRSSModule = gml; } else if
* (geoRSSModule != null && w3cGeo != null) { // sanity check if (!geoRSSModule.getGeometry().equals(w3cGeo.getGeometry())) { throw new * (geoRSSModule != null && w3cGeo != null) { // sanity check if (!geoRSSModule.getGeometry().equals(w3cGeo.getGeometry())) { throw new
* Error("geometry of simple and w3c do not match"); } } * Error("geometry of simple and w3c do not match"); } } return geoRSSModule;
*
* return geoRSSModule;
*/ */
} }
@ -107,9 +105,7 @@ public class GeoRSSUtils {
/* /*
* if (geoRSSModule == null && w3cGeo != null) { geoRSSModule = w3cGeo; } else if (geoRSSModule == null && gml != null) { geoRSSModule = gml; } else if * if (geoRSSModule == null && w3cGeo != null) { geoRSSModule = w3cGeo; } else if (geoRSSModule == null && gml != null) { geoRSSModule = gml; } else if
* (geoRSSModule != null && w3cGeo != null) { // sanity check if (!geoRSSModule.getGeometry().equals(w3cGeo.getGeometry())) { throw new * (geoRSSModule != null && w3cGeo != null) { // sanity check if (!geoRSSModule.getGeometry().equals(w3cGeo.getGeometry())) { throw new
* Error("geometry of simple and w3c do not match"); } } * Error("geometry of simple and w3c do not match"); } } return geoRSSModule;
*
* return geoRSSModule;
*/ */
} }
} }

View file

@ -60,7 +60,6 @@ public class SimpleGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaceUri() * @see com.sun.syndication.io.ModuleGenerator#getNamespaceUri()
*/ */
@Override @Override
@ -70,7 +69,6 @@ public class SimpleGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaces() * @see com.sun.syndication.io.ModuleGenerator#getNamespaces()
*/ */
@Override @Override
@ -80,7 +78,6 @@ public class SimpleGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element) * @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element)
*/ */
@Override @Override

View file

@ -24,13 +24,17 @@ package org.rometools.feed.module.georss;
* *
*/ */
public class SimpleModuleImpl extends GeoRSSModule { public class SimpleModuleImpl extends GeoRSSModule {
/**
*
*/
private static final long serialVersionUID = 1L;
public SimpleModuleImpl() { public SimpleModuleImpl() {
super(GeoRSSModule.class, GeoRSSModule.GEORSS_GEORSS_URI); super(GeoRSSModule.class, GeoRSSModule.GEORSS_GEORSS_URI);
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.feed.CopyFrom#getInterface() * @see com.sun.syndication.feed.CopyFrom#getInterface()
*/ */
@Override @Override

View file

@ -41,7 +41,6 @@ public class SimpleParser implements ModuleParser {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleParser#getNamespaceUri() * @see com.sun.syndication.io.ModuleParser#getNamespaceUri()
*/ */
@Override @Override
@ -61,7 +60,6 @@ public class SimpleParser implements ModuleParser {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element) * @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/ */
@Override @Override

View file

@ -53,7 +53,6 @@ public class W3CGeoGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaceUri() * @see com.sun.syndication.io.ModuleGenerator#getNamespaceUri()
*/ */
@Override @Override
@ -63,7 +62,6 @@ public class W3CGeoGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaces() * @see com.sun.syndication.io.ModuleGenerator#getNamespaces()
*/ */
@Override @Override
@ -73,7 +71,6 @@ public class W3CGeoGenerator implements ModuleGenerator {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element) * @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element)
*/ */
@Override @Override

View file

@ -25,13 +25,17 @@ package org.rometools.feed.module.georss;
*/ */
public class W3CGeoModuleImpl extends GeoRSSModule { public class W3CGeoModuleImpl extends GeoRSSModule {
/**
*
*/
private static final long serialVersionUID = 1L;
public W3CGeoModuleImpl() { public W3CGeoModuleImpl() {
super(GeoRSSModule.class, GeoRSSModule.GEORSS_W3CGEO_URI); super(GeoRSSModule.class, GeoRSSModule.GEORSS_W3CGEO_URI);
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.feed.CopyFrom#getInterface() * @see com.sun.syndication.feed.CopyFrom#getInterface()
*/ */
@Override @Override

View file

@ -36,7 +36,6 @@ public class W3CGeoParser implements ModuleParser {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleParser#getNamespaceUri() * @see com.sun.syndication.io.ModuleParser#getNamespaceUri()
*/ */
@Override @Override
@ -71,7 +70,6 @@ public class W3CGeoParser implements ModuleParser {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element) * @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/ */
@Override @Override

View file

@ -16,6 +16,11 @@ package org.rometools.feed.module.georss.geometries;
*/ */
public abstract class AbstractCurve extends AbstractGeometricPrimitive { public abstract class AbstractCurve extends AbstractGeometricPrimitive {
/**
*
*/
private static final long serialVersionUID = 1L;
/** Creates a new instance of Curve */ /** Creates a new instance of Curve */
public AbstractCurve() { public AbstractCurve() {
} }

View file

@ -16,6 +16,11 @@ package org.rometools.feed.module.georss.geometries;
*/ */
public abstract class AbstractGeometricPrimitive extends AbstractGeometry { public abstract class AbstractGeometricPrimitive extends AbstractGeometry {
/**
*
*/
private static final long serialVersionUID = 1L;
/** Creates a new instance of GeometricPrimitive */ /** Creates a new instance of GeometricPrimitive */
public AbstractGeometricPrimitive() { public AbstractGeometricPrimitive() {

View file

@ -18,6 +18,11 @@ import java.io.Serializable;
*/ */
public abstract class AbstractGeometry implements Cloneable, Serializable { public abstract class AbstractGeometry implements Cloneable, Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/** Creates a new instance of Geometry */ /** Creates a new instance of Geometry */
public AbstractGeometry() { public AbstractGeometry() {
} }

View file

@ -18,6 +18,11 @@ import java.io.Serializable;
*/ */
public abstract class AbstractRing implements Cloneable, Serializable { public abstract class AbstractRing implements Cloneable, Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/** Creates a new instance of AbstractRing */ /** Creates a new instance of AbstractRing */
public AbstractRing() { public AbstractRing() {
} }

View file

@ -16,6 +16,11 @@ package org.rometools.feed.module.georss.geometries;
*/ */
public abstract class AbstractSurface extends AbstractGeometricPrimitive { public abstract class AbstractSurface extends AbstractGeometricPrimitive {
/**
*
*/
private static final long serialVersionUID = 1L;
/** Creates a new instance of Surface */ /** Creates a new instance of Surface */
public AbstractSurface() { public AbstractSurface() {
} }

View file

@ -16,6 +16,10 @@ package org.rometools.feed.module.georss.geometries;
* @author runaas * @author runaas
*/ */
public class Envelope extends AbstractGeometry { public class Envelope extends AbstractGeometry {
/**
*
*/
private static final long serialVersionUID = 1L;
protected double minLatitude, minLongitude, maxLatitude, maxLongitude; protected double minLatitude, minLongitude, maxLatitude, maxLongitude;
/** Creates a new instance of Envelope */ /** Creates a new instance of Envelope */

View file

@ -15,6 +15,10 @@ package org.rometools.feed.module.georss.geometries;
* @author runaas * @author runaas
*/ */
public final class LineString extends AbstractCurve { public final class LineString extends AbstractCurve {
/**
*
*/
private static final long serialVersionUID = 1L;
private PositionList posList; private PositionList posList;
/** Creates a new instance of LineString */ /** Creates a new instance of LineString */

View file

@ -15,6 +15,10 @@ package org.rometools.feed.module.georss.geometries;
* @author runaas * @author runaas
*/ */
public final class LinearRing extends AbstractRing { public final class LinearRing extends AbstractRing {
/**
*
*/
private static final long serialVersionUID = 1L;
private PositionList posList; private PositionList posList;
/** Creates a new instance of LinearLing */ /** Creates a new instance of LinearLing */

View file

@ -15,6 +15,10 @@ package org.rometools.feed.module.georss.geometries;
* @author runaas * @author runaas
*/ */
public final class Point extends AbstractGeometricPrimitive { public final class Point extends AbstractGeometricPrimitive {
/**
*
*/
private static final long serialVersionUID = 1L;
private Position pos; private Position pos;
/** Creates a new instance of Point */ /** Creates a new instance of Point */

View file

@ -19,6 +19,10 @@ import java.util.List;
* @author runaas * @author runaas
*/ */
public final class Polygon extends AbstractSurface implements Cloneable { public final class Polygon extends AbstractSurface implements Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
private AbstractRing exterior; private AbstractRing exterior;
private List interior; private List interior;

View file

@ -17,6 +17,10 @@ import java.io.Serializable;
* @author runaas * @author runaas
*/ */
public class Position implements Cloneable, Serializable { public class Position implements Cloneable, Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private double latitude; private double latitude;
private double longitude; private double longitude;

View file

@ -17,6 +17,10 @@ import java.io.Serializable;
* @author runaas * @author runaas
*/ */
public class PositionList implements Cloneable, Serializable { public class PositionList implements Cloneable, Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private double[] latitude; private double[] latitude;
private double[] longitude; private double[] longitude;
private int size; private int size;

View file

@ -49,6 +49,11 @@ import com.sun.syndication.feed.CopyFrom;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneable { public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
/** /**
* The URI that iTunes used for its custom tags. * The URI that iTunes used for its custom tags.
* <p> * <p>

View file

@ -51,6 +51,10 @@ import com.sun.syndication.feed.CopyFrom;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class EntryInformationImpl extends AbstractITunesObject implements EntryInformation { public class EntryInformationImpl extends AbstractITunesObject implements EntryInformation {
/**
*
*/
private static final long serialVersionUID = 1L;
private Duration duration; private Duration duration;
/** /**

View file

@ -56,6 +56,10 @@ import com.sun.syndication.feed.CopyFrom;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class FeedInformationImpl extends AbstractITunesObject implements FeedInformation { public class FeedInformationImpl extends AbstractITunesObject implements FeedInformation {
/**
*
*/
private static final long serialVersionUID = 1L;
private String ownerName; private String ownerName;
private String ownerEmailAddress; private String ownerEmailAddress;
private URL image; private URL image;

View file

@ -49,6 +49,10 @@ import java.io.Serializable;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class Category implements Serializable { public class Category implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private String name; private String name;
private Subcategory subcategory; private Subcategory subcategory;

View file

@ -52,6 +52,10 @@ import com.sun.syndication.io.impl.NumberParser;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class Duration implements Serializable { public class Duration implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
static final long SECOND = 1000; static final long SECOND = 1000;
static final long MINUTE = SECOND * 60; static final long MINUTE = SECOND * 60;
static final long HOUR = MINUTE * 60; static final long HOUR = MINUTE * 60;

View file

@ -49,6 +49,10 @@ import java.io.Serializable;
* @version $Revision: 1.2 $ * @version $Revision: 1.2 $
*/ */
public class Subcategory implements Serializable { public class Subcategory implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private String name; private String name;
/** Creates a new instance of SubCategory */ /** Creates a new instance of SubCategory */

View file

@ -67,7 +67,6 @@ public class MediaModuleParser implements ModuleParser {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleParser#getNamespaceUri() * @see com.sun.syndication.io.ModuleParser#getNamespaceUri()
*/ */
@Override @Override
@ -78,7 +77,6 @@ public class MediaModuleParser implements ModuleParser {
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element) * @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/ */
@Override @Override

View file

@ -131,7 +131,6 @@ public class OpenSearchModuleImpl extends ModuleImpl implements OpenSearchModule
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object) * @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object)
*/ */
@Override @Override
@ -152,7 +151,6 @@ public class OpenSearchModuleImpl extends ModuleImpl implements OpenSearchModule
/* /*
* (non-Javadoc) * (non-Javadoc)
*
* @see com.sun.syndication.feed.CopyFrom#getInterface() * @see com.sun.syndication.feed.CopyFrom#getInterface()
*/ */
@Override @Override

View file

@ -55,6 +55,10 @@ import com.sun.syndication.feed.impl.ToStringBean;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class PhotocastModuleImpl implements PhotocastModule { public class PhotocastModuleImpl implements PhotocastModule {
/**
*
*/
private static final long serialVersionUID = 1L;
private Date photoDate; private Date photoDate;
private Date cropDate; private Date cropDate;
private URL imageUrl; private URL imageUrl;

View file

@ -52,6 +52,10 @@ import java.util.Date;
*/ */
public class PhotoDate extends Date { public class PhotoDate extends Date {
/**
*
*/
private static final long serialVersionUID = 1L;
private static final long Y2K = 946616400531l; private static final long Y2K = 946616400531l;
private static final double DAY = 24 * 60 * 60 * 1000; private static final double DAY = 24 * 60 * 60 * 1000;

View file

@ -50,6 +50,11 @@ import com.sun.syndication.feed.impl.EqualsBean;
*/ */
public class SlashImpl implements Slash { public class SlashImpl implements Slash {
/**
*
*/
private static final long serialVersionUID = 1L;
private String section; private String section;
private String department; private String department;

View file

@ -28,6 +28,10 @@ import com.sun.syndication.feed.module.ModuleImpl;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class SimpleListExtensionImpl extends ModuleImpl implements SimpleListExtension { public class SimpleListExtensionImpl extends ModuleImpl implements SimpleListExtension {
/**
*
*/
private static final long serialVersionUID = 1L;
private String treatAs = "list"; private String treatAs = "list";
private Group[] groupFields; private Group[] groupFields;
private Sort[] sortFields; private Sort[] sortFields;

View file

@ -33,6 +33,10 @@ import com.sun.syndication.feed.impl.ObjectBean;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class SleEntryImpl implements SleEntry { public class SleEntryImpl implements SleEntry {
/**
*
*/
private static final long serialVersionUID = 1L;
private static final EntryValue[] EMPTY_VALUES = new EntryValue[0]; private static final EntryValue[] EMPTY_VALUES = new EntryValue[0];
private final ObjectBean obj = new ObjectBean(SleEntryImpl.class, this); private final ObjectBean obj = new ObjectBean(SleEntryImpl.class, this);
private EntryValue[] groupValues = EMPTY_VALUES; private EntryValue[] groupValues = EMPTY_VALUES;

View file

@ -150,6 +150,11 @@ public class SleUtility {
} }
private static class SortableList extends ArrayList { private static class SortableList extends ArrayList {
/**
*
*/
private static final long serialVersionUID = 1L;
public SortableList(final Collection c) { public SortableList(final Collection c) {
super(c); super(c);
} }

View file

@ -83,7 +83,7 @@ public class ItemParser implements com.sun.syndication.io.ModuleParser {
element.removeContent(group); element.removeContent(group);
} }
sle.setGroupValues((EntryValue[]) values.toArray(new EntryValue[values.size()])); sle.setGroupValues(values.toArray(new EntryValue[values.size()]));
values = values.size() == 0 ? values : new ArrayList<EntryValue>(); values = values.size() == 0 ? values : new ArrayList<EntryValue>();
final List<Element> sorts = new ArrayList<Element>(element.getChildren("sort", ModuleParser.TEMP)); final List<Element> sorts = new ArrayList<Element>(element.getChildren("sort", ModuleParser.TEMP));
@ -150,7 +150,7 @@ public class ItemParser implements com.sun.syndication.io.ModuleParser {
} }
} }
// System.out.println("Values created "+values.size()+" from sorts" +sorts.size()); // System.out.println("Values created "+values.size()+" from sorts" +sorts.size());
sle.setSortValues((EntryValue[]) values.toArray(new EntryValue[values.size()])); sle.setSortValues(values.toArray(new EntryValue[values.size()]));
return sle; return sle;
} }

View file

@ -79,7 +79,7 @@ public class ModuleParser implements com.sun.syndication.io.ModuleParser {
values.add(new Group(ns, elementName, label)); values.add(new Group(ns, elementName, label));
} }
sle.setGroupFields((Group[]) values.toArray(new Group[values.size()])); sle.setGroupFields(values.toArray(new Group[values.size()]));
values = values.size() == 0 ? values : new ArrayList<Object>(); values = values.size() == 0 ? values : new ArrayList<Object>();
for (final Element se : listInfo.getChildren("sort", NS)) { for (final Element se : listInfo.getChildren("sort", NS)) {
@ -92,7 +92,7 @@ public class ModuleParser implements com.sun.syndication.io.ModuleParser {
values.add(new Sort(ns, elementName, dataType, label, defaultOrder)); values.add(new Sort(ns, elementName, dataType, label, defaultOrder));
} }
sle.setSortFields((Sort[]) values.toArray(new Sort[values.size()])); sle.setSortFields(values.toArray(new Sort[values.size()]));
insertValues(sle, element.getChildren()); insertValues(sle, element.getChildren());
return sle; return sle;

View file

@ -1,7 +1,6 @@
package org.rometools.feed.module.sse; package org.rometools.feed.module.sse;
import java.util.Date; import java.util.Date;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Set; import java.util.Set;
@ -124,9 +123,9 @@ public class SSE091Generator implements DelegatingModuleGenerator {
private void generateConflicts(final Element syncElement, final List<Conflict> conflicts) { private void generateConflicts(final Element syncElement, final List<Conflict> conflicts) {
if (conflicts != null) { if (conflicts != null) {
final Element conflictsElement = new Element(Conflicts.NAME, SSEModule.SSE_NS); final Element conflictsElement = new Element(Conflicts.NAME, SSEModule.SSE_NS);
for (final Iterator<Conflict> confictIter = conflicts.iterator(); confictIter.hasNext();) { for (final Conflict conflict2 : conflicts) {
final Element conflictElement = new Element(Conflict.NAME, SSEModule.SSE_NS); final Element conflictElement = new Element(Conflict.NAME, SSEModule.SSE_NS);
final Conflict conflict = (Conflict) confictIter.next(); final Conflict conflict = conflict2;
generateAttribute(conflictElement, Conflict.BY_ATTRIBUTE, conflict.getBy()); generateAttribute(conflictElement, Conflict.BY_ATTRIBUTE, conflict.getBy());
generateAttribute(conflictElement, Conflict.VERSION_ATTRIBUTE, conflict.getVersion()); generateAttribute(conflictElement, Conflict.VERSION_ATTRIBUTE, conflict.getVersion());
generateAttribute(conflictElement, Conflict.WHEN_ATTRIBUTE, conflict.getWhen()); generateAttribute(conflictElement, Conflict.WHEN_ATTRIBUTE, conflict.getWhen());
@ -158,9 +157,8 @@ public class SSE091Generator implements DelegatingModuleGenerator {
private void generateUpdates(final Element historyElement, final List<Update> updates) { private void generateUpdates(final Element historyElement, final List<Update> updates) {
if (updates != null) { if (updates != null) {
for (final Iterator<Update> updateIter = updates.iterator(); updateIter.hasNext();) { for (final Update update : updates) {
final Element updateElement = new Element(Update.NAME, SSEModule.SSE_NS); final Element updateElement = new Element(Update.NAME, SSEModule.SSE_NS);
final Update update = updateIter.next();
generateAttribute(updateElement, Update.BY_ATTRIBUTE, update.getBy()); generateAttribute(updateElement, Update.BY_ATTRIBUTE, update.getBy());
generateAttribute(updateElement, Update.WHEN_ATTRIBUTE, update.getWhen()); generateAttribute(updateElement, Update.WHEN_ATTRIBUTE, update.getWhen());
historyElement.addContent(updateElement); historyElement.addContent(updateElement);

View file

@ -2,7 +2,6 @@ package org.rometools.feed.module.sse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.logging.Logger; import java.util.logging.Logger;
@ -119,12 +118,10 @@ public class SSE091Parser implements DelegatingModuleParser {
List<Conflict> conflicts = null; List<Conflict> conflicts = null;
final List<Element> conflictsContent = syncElement.getContent(new ContentFilter(Conflicts.NAME)); final List<Element> conflictsContent = syncElement.getContent(new ContentFilter(Conflicts.NAME));
for (final Iterator<Element> conflictsIter = conflictsContent.iterator(); conflictsIter.hasNext();) { for (final Element conflictsElement : conflictsContent) {
final Element conflictsElement = conflictsIter.next();
final List<Element> conflictContent = conflictsElement.getContent(new ContentFilter(Conflict.NAME)); final List<Element> conflictContent = conflictsElement.getContent(new ContentFilter(Conflict.NAME));
for (final Iterator<Element> conflictIter = conflictContent.iterator(); conflictIter.hasNext();) { for (final Element element : conflictContent) {
final Element conflictElement = (Element) conflictIter.next(); final Element conflictElement = element;
final Conflict conflict = new Conflict(); final Conflict conflict = new Conflict();
conflict.setBy(parseStringAttribute(conflictElement, Conflict.BY_ATTRIBUTE)); conflict.setBy(parseStringAttribute(conflictElement, Conflict.BY_ATTRIBUTE));
@ -132,8 +129,8 @@ public class SSE091Parser implements DelegatingModuleParser {
conflict.setVersion(parseIntegerAttribute(conflictElement, Conflict.VERSION_ATTRIBUTE)); conflict.setVersion(parseIntegerAttribute(conflictElement, Conflict.VERSION_ATTRIBUTE));
final List<Element> conflictItemContent = conflictElement.getContent(new ContentFilter("item")); final List<Element> conflictItemContent = conflictElement.getContent(new ContentFilter("item"));
for (final Iterator<Element> conflictItemIter = conflictItemContent.iterator(); conflictItemIter.hasNext();) { for (final Element element2 : conflictItemContent) {
final Element conflictItemElement = (Element) conflictItemIter.next(); final Element conflictItemElement = element2;
final Element root = getRoot(conflictItemElement); final Element root = getRoot(conflictItemElement);
final Item conflictItem = rssParser.parseItem(root, conflictItemElement, locale); final Item conflictItem = rssParser.parseItem(root, conflictItemElement, locale);
conflict.setItem(conflictItem); conflict.setItem(conflictItem);
@ -176,15 +173,14 @@ public class SSE091Parser implements DelegatingModuleParser {
final List<Element> filterList = element.getContent(new ContentFilter(name)); final List<Element> filterList = element.getContent(new ContentFilter(name));
Element firstContent = null; Element firstContent = null;
if (filterList != null && filterList.size() > 0) { if (filterList != null && filterList.size() > 0) {
firstContent = (Element) filterList.get(0); firstContent = filterList.get(0);
} }
return firstContent; return firstContent;
} }
private void parseUpdates(final Element historyChild, final History history, final Locale locale) { private void parseUpdates(final Element historyChild, final History history, final Locale locale) {
final List<Element> updatedChildren = historyChild.getContent(new ContentFilter(Update.NAME)); final List<Element> updatedChildren = historyChild.getContent(new ContentFilter(Update.NAME));
for (final Iterator<Element> childIter = updatedChildren.iterator(); childIter.hasNext();) { for (final Element updateChild : updatedChildren) {
final Element updateChild = childIter.next();
final Update update = new Update(); final Update update = new Update();
update.setBy(parseStringAttribute(updateChild, Update.BY_ATTRIBUTE)); update.setBy(parseStringAttribute(updateChild, Update.BY_ATTRIBUTE));
update.setWhen(parseDateAttribute(updateChild, Update.WHEN_ATTRIBUTE, locale)); update.setWhen(parseDateAttribute(updateChild, Update.WHEN_ATTRIBUTE, locale));

View file

@ -54,6 +54,10 @@ import com.sun.syndication.feed.impl.ToStringBean;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class Astronomy implements Serializable, Cloneable { public class Astronomy implements Serializable, Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
private final EqualsBean equals = new EqualsBean(Astronomy.class, this); private final EqualsBean equals = new EqualsBean(Astronomy.class, this);
private final ToStringBean toString = new ToStringBean(Astronomy.class, this); private final ToStringBean toString = new ToStringBean(Astronomy.class, this);
private Date sunrise; private Date sunrise;

View file

@ -57,6 +57,10 @@ import com.sun.syndication.feed.impl.ToStringBean;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class Atmosphere implements Serializable, Cloneable { public class Atmosphere implements Serializable, Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
private final EqualsBean equals = new EqualsBean(Atmosphere.class, this); private final EqualsBean equals = new EqualsBean(Atmosphere.class, this);
private final ToStringBean toString = new ToStringBean(Atmosphere.class, this); private final ToStringBean toString = new ToStringBean(Atmosphere.class, this);
private int humidity; private int humidity;
@ -180,6 +184,10 @@ public class Atmosphere implements Serializable, Cloneable {
} }
public static class PressureChange implements Serializable { public static class PressureChange implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
public static final PressureChange RISING = new PressureChange(1, "rising"); public static final PressureChange RISING = new PressureChange(1, "rising");
public static final PressureChange STEADY = new PressureChange(0, "steady"); public static final PressureChange STEADY = new PressureChange(0, "steady");
public static final PressureChange FALLING = new PressureChange(2, "falling"); public static final PressureChange FALLING = new PressureChange(2, "falling");

View file

@ -58,6 +58,10 @@ import com.sun.syndication.feed.impl.ToStringBean;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class Condition implements Serializable, Cloneable { public class Condition implements Serializable, Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
private final EqualsBean equals = new EqualsBean(Condition.class, this); private final EqualsBean equals = new EqualsBean(Condition.class, this);
private final ToStringBean toString = new ToStringBean(Condition.class, this); private final ToStringBean toString = new ToStringBean(Condition.class, this);
private String text; private String text;

View file

@ -286,6 +286,10 @@ import com.sun.syndication.feed.impl.EqualsBean;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class ConditionCode implements Serializable { public class ConditionCode implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private transient static Map LOOKUP = new HashMap(); /* <Integer, Condition> */ private transient static Map LOOKUP = new HashMap(); /* <Integer, Condition> */
public static final ConditionCode TORNADO = new ConditionCode(0, "tornado"); public static final ConditionCode TORNADO = new ConditionCode(0, "tornado");
public static final ConditionCode TROPICAL_STORM = new ConditionCode(1, "tropical storm"); public static final ConditionCode TROPICAL_STORM = new ConditionCode(1, "tropical storm");

View file

@ -61,6 +61,10 @@ import com.sun.syndication.feed.impl.ToStringBean;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class Forecast implements Serializable, Cloneable { public class Forecast implements Serializable, Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
private transient ToStringBean toString = new ToStringBean(Forecast.class, this); private transient ToStringBean toString = new ToStringBean(Forecast.class, this);
private transient EqualsBean equals = new EqualsBean(Forecast.class, this); private transient EqualsBean equals = new EqualsBean(Forecast.class, this);
private String day; private String day;

View file

@ -54,6 +54,10 @@ import com.sun.syndication.feed.impl.ToStringBean;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class Location implements Serializable, Cloneable { public class Location implements Serializable, Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
private transient ToStringBean toString = new ToStringBean(Location.class, this); private transient ToStringBean toString = new ToStringBean(Location.class, this);
private transient EqualsBean equals = new EqualsBean(Location.class, this); private transient EqualsBean equals = new EqualsBean(Location.class, this);
private String city; private String city;

View file

@ -59,6 +59,10 @@ import com.sun.syndication.feed.impl.ToStringBean;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class Units implements Serializable, Cloneable { public class Units implements Serializable, Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
private transient ToStringBean toString = new ToStringBean(Units.class, this); private transient ToStringBean toString = new ToStringBean(Units.class, this);
private transient EqualsBean equals = new EqualsBean(Units.class, this); private transient EqualsBean equals = new EqualsBean(Units.class, this);
private String temperature; private String temperature;

View file

@ -58,6 +58,10 @@ import com.sun.syndication.feed.impl.ToStringBean;
* @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a> * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
*/ */
public class Wind implements Serializable, Cloneable { public class Wind implements Serializable, Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
private transient ToStringBean toString = new ToStringBean(Wind.class, this); private transient ToStringBean toString = new ToStringBean(Wind.class, this);
private transient EqualsBean equals = new EqualsBean(Wind.class, this); private transient EqualsBean equals = new EqualsBean(Wind.class, this);
private int chill; private int chill;

View file

@ -72,51 +72,21 @@ public class MediaModuleTest extends AbstractTestCase {
public void xtestOriginal() throws Exception { public void xtestOriginal() throws Exception {
// //
/* /*
* //You can test with blip tv or broadcast machine * //You can test with blip tv or broadcast machine String rss = "http://blip.tv/?1=1&&skin=rss";// // String rss =
* * "http://openvision.tv/bm/rss.php?i=4"; // String rss =
* String rss = "http://blip.tv/?1=1&&skin=rss";// // String rss = "http://openvision.tv/bm/rss.php?i=4"; // String rss = * "http://api.search.yahoo.com/VideoSearchService/rss/videoSearch.xml?appid=yahoosearchvideorss&query=surfing&adult_ok=0"; URLConnection uc = new
* "http://api.search.yahoo.com/VideoSearchService/rss/videoSearch.xml?appid=yahoosearchvideorss&query=surfing&adult_ok=0"; * URL(rss).openConnection(); String contentType = uc.getContentEncoding(); WireFeedInput input = new WireFeedInput(); XmlReader xmlReader = new
* * XmlReader(uc.getInputStream(), contentType, true); Channel chnl = (Channel)input.build(xmlReader); String feedTitle = chnl.getTitle(); String
* * feedDesc = chnl.getDescription(); List items = chnl.getItems(); ListIterator li = items.listIterator(); Item item = null; Enclosure enc = null;
* URLConnection uc = new URL(rss).openConnection(); String contentType = uc.getContentEncoding(); * MediaModule mModule = null; while (li.hasNext()) { item = (Item)li.next(); enc = (Enclosure)item.getEnclosures().get(0); mModule =
* * (MediaModule)item.getModule(MediaModule.URI); List modules = item.getModules(); System.out.println("title: " + item.getTitle());
* WireFeedInput input = new WireFeedInput(); * System.out.println("module count: " + modules.size()); if (mModule != null) { Thumbnail[] mThumbs = mModule.getMediaThumbnails(); if (mThumbs !=
* * null) { for (int i = 0; i < mThumbs.length; i++) { String imgUrl = mThumbs[i].getUrl(); System.out.println("got MediaModule img " + i + ": " +
* XmlReader xmlReader = new XmlReader(uc.getInputStream(), contentType, true); * imgUrl); } } System.out.println("MediaModule title: " + mModule.getTitle()); System.out.println("MediaModule isAdult: " + mModule.isAdult()); /* if
*
* Channel chnl = (Channel)input.build(xmlReader);
*
* String feedTitle = chnl.getTitle(); String feedDesc = chnl.getDescription();
*
*
* List items = chnl.getItems();
*
* ListIterator li = items.listIterator(); Item item = null; Enclosure enc = null; MediaModule mModule = null;
*
* while (li.hasNext()) {
*
* item = (Item)li.next(); enc = (Enclosure)item.getEnclosures().get(0);
*
* mModule = (MediaModule)item.getModule(MediaModule.URI);
*
* List modules = item.getModules(); System.out.println("title: " + item.getTitle()); System.out.println("module count: " + modules.size());
*
* if (mModule != null) { Thumbnail[] mThumbs = mModule.getMediaThumbnails();
*
* if (mThumbs != null) { for (int i = 0; i < mThumbs.length; i++) { String imgUrl = mThumbs[i].getUrl(); System.out.println("got MediaModule img " + i
* + ": " + imgUrl); } }
*
* System.out.println("MediaModule title: " + mModule.getTitle()); System.out.println("MediaModule isAdult: " + mModule.isAdult()); /* if
* (mModule.getMediaContent() != null) { for (int i = 0; i < mModule.getMediaContent().length; i++) { MediaContent mc = mModule.getMediaContent()[i]; * (mModule.getMediaContent() != null) { for (int i = 0; i < mModule.getMediaContent().length; i++) { MediaContent mc = mModule.getMediaContent()[i];
* mThumbs = mc.getMediaThumbnails(); if (mThumbs != null) { for (int n = 0; n < mThumbs.length; n++) { String imgUrl = mThumbs[n].getUrl(); * mThumbs = mc.getMediaThumbnails(); if (mThumbs != null) { for (int n = 0; n < mThumbs.length; n++) { String imgUrl = mThumbs[n].getUrl();
* System.out.println("got MediaContentImage " + n + " img: " + imgUrl); } } System.out.println("MediaContent title:" + mc.getTitle()); * System.out.println("got MediaContentImage " + n + " img: " + imgUrl); } } System.out.println("MediaContent title:" + mc.getTitle());
* System.out.println("MediaContent text:" + mc.getText()); * System.out.println("MediaContent text:" + mc.getText()); } } } else { System.out.println("no MediaModule!"); } }
*
* }
*
* }
*
* } else { System.out.println("no MediaModule!"); } }
*/ */
} }
} }

View file

@ -1,13 +1,13 @@
package org.rometools.feed.module.cc.types; package org.rometools.feed.module.cc.types;
import org.junit.Before; import static org.junit.Assert.assertFalse;
import org.junit.Test;
import java.util.Random; import java.util.Random;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import static org.junit.Assert.assertFalse; import org.junit.Before;
import org.junit.Test;
/** /**
* @author Matthew Buckett * @author Matthew Buckett
@ -29,37 +29,35 @@ public class LicenseTest {
final AtomicBoolean hadException = new AtomicBoolean(false); final AtomicBoolean hadException = new AtomicBoolean(false);
// This thread keeps on adding new licenses (not very realistic but shows the bug) // This thread keeps on adding new licenses (not very realistic but shows the bug)
Thread addNew = new Thread(){ final Thread addNew = new Thread() {
@Override @Override
public void run() { public void run() {
try { try {
while (run.get()) { while (run.get()) {
License license = License.findByValue("http://creativecommons.org/licenses/"+ final License license = License.findByValue("http://creativecommons.org/licenses/" + type.incrementAndGet() + "/1");
type.incrementAndGet()+ "/1");
if (license == null) { if (license == null) {
hadProblem.set(true); hadProblem.set(true);
} }
} }
} catch (Exception e) { } catch (final Exception e) {
hadException.set(true); hadException.set(true);
} }
} }
}; };
// This thread attempts to get ones we know have already been put in. // This thread attempts to get ones we know have already been put in.
Thread getExisting = new Thread() { final Thread getExisting = new Thread() {
@Override @Override
public void run() { public void run() {
Random rnd = new Random(); final Random rnd = new Random();
try { try {
while (run.get()) { while (run.get()) {
License license = License.findByValue("http://creativecommons.org/licenses/"+ final License license = License.findByValue("http://creativecommons.org/licenses/" + rnd.nextInt(type.intValue()) + "/1");
rnd.nextInt(type.intValue())+"/1");
if (license == null) { if (license == null) {
hadProblem.set(true); hadProblem.set(true);
} }
} }
} catch (Exception e) { } catch (final Exception e) {
hadException.set(true); hadException.set(true);
} }
} }