Formatted code

This commit is contained in:
Patrick Gotthard 2013-10-12 15:05:57 +02:00
parent fcd6ac86c6
commit 0d15f1ca4c
66 changed files with 458 additions and 62 deletions

View file

@ -33,6 +33,7 @@ public class ActivityStreamModuleImpl implements ActivityStreamModule {
*
* @param newobject new value of object
*/
@Override
public void setObject(final ActivityObject newobject) {
object = newobject;
}
@ -42,6 +43,7 @@ public class ActivityStreamModuleImpl implements ActivityStreamModule {
*
* @return the value of object
*/
@Override
public ActivityObject getObject() {
return object;
}
@ -51,6 +53,7 @@ public class ActivityStreamModuleImpl implements ActivityStreamModule {
*
* @param newverb new value of verb
*/
@Override
public void setVerb(final Verb newverb) {
verb = newverb;
}
@ -60,22 +63,27 @@ public class ActivityStreamModuleImpl implements ActivityStreamModule {
*
* @return the value of verb
*/
@Override
public Verb getVerb() {
return verb;
}
@Override
public ActivityObject getTarget() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setTarget(final ActivityObject object) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Mood getMood() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setMood(final Mood mood) {
throw new UnsupportedOperationException("Not supported yet.");
}

View file

@ -30,18 +30,22 @@ public abstract class ActivityObject extends Entry implements HasLocation {
public abstract String getTypeIRI();
@Override
public GeoRSSModule getLocation() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setLocation(final GeoRSSModule location) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public ContactModule getAddress() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setAddress(final ContactModule address) {
throw new UnsupportedOperationException("Not supported yet.");
}

View file

@ -124,10 +124,12 @@ public class CustomTagImpl implements CustomTag {
this.value = value;
}
@Override
public String getName() {
return name;
}
@Override
public Object getValue() {
return value;
}

View file

@ -37,15 +37,18 @@ public class CustomTagsImpl implements CustomTags {
public CustomTagsImpl() {
}
@Override
public List getValues() {
values = values == null ? new ArrayList() : values;
return values;
}
@Override
public void setValues(final List values) {
this.values = values;
}
@Override
public void copyFrom(final CopyFrom object) {
final CustomTags ct = (CustomTags) object;
values = new ArrayList(ct.getValues());
@ -58,10 +61,12 @@ public class CustomTagsImpl implements CustomTags {
return cti;
}
@Override
public Class getInterface() {
return CustomTags.class;
}
@Override
public String getUri() {
return CustomTags.URI;
}

View file

@ -346,182 +346,227 @@ public class GoogleBaseImpl implements GoogleBase {
*
* @param actors
*/
@Override
public void setActors(final String[] actors) {
this.actors = actors;
}
@Override
public String[] getActors() {
return actors == null ? new String[0] : actors;
}
@Override
public void setAge(final Integer age) {
this.age = age;
}
@Override
public Integer getAge() {
return age;
}
@Override
public void setAgents(final String[] agents) {
this.agents = agents == null ? new String[0] : agents;
}
@Override
public String[] getAgents() {
return agents;
}
@Override
public void setApparelType(final String apparelType) {
this.apparelType = apparelType;
}
@Override
public String getApparelType() {
return apparelType;
}
@Override
public void setArea(final IntUnit area) {
this.area = area;
}
@Override
public IntUnit getArea() {
return area;
}
@Override
public void setArtists(final String[] artists) {
this.artists = artists;
}
@Override
public String[] getArtists() {
return artists == null ? new String[0] : artists;
}
@Override
public void setAuthors(final String[] authors) {
this.authors = authors;
}
@Override
public String[] getAuthors() {
return authors == null ? new String[0] : authors;
}
@Override
public void setBathrooms(final Float bathrooms) {
this.bathrooms = bathrooms;
}
@Override
public Float getBathrooms() {
return bathrooms;
}
@Override
public void setBedrooms(final Integer bedrooms) {
this.bedrooms = bedrooms;
}
@Override
public Integer getBedrooms() {
return bedrooms;
}
@Override
public void setBrand(final String brand) {
this.brand = brand;
}
@Override
public String getBrand() {
return brand;
}
@Override
public void setColors(final String[] color) {
this.color = color;
}
@Override
public String[] getColors() {
return color == null ? new String[0] : color;
}
@Override
public void setCondition(final String condition) {
this.condition = condition;
}
@Override
public String getCondition() {
return condition;
}
@Override
public void setCourseDateRange(final DateTimeRange courseDateRange) {
this.courseDateRange = courseDateRange;
}
@Override
public DateTimeRange getCourseDateRange() {
return courseDateRange;
}
@Override
public void setCourseNumber(final String courseNumber) {
this.courseNumber = courseNumber;
}
@Override
public String getCourseNumber() {
return courseNumber;
}
@Override
public void setCourseTimes(final String courseTimes) {
this.courseTimes = courseTimes;
}
@Override
public String getCourseTimes() {
return courseTimes;
}
@Override
public void setCurrency(final CurrencyEnumeration currency) {
this.currency = currency;
}
@Override
public CurrencyEnumeration getCurrency() {
return currency;
}
@Override
public void setDeliveryNotes(final String deliveryNotes) {
this.deliveryNotes = deliveryNotes;
}
@Override
public String getDeliveryNotes() {
return deliveryNotes;
}
@Override
public void setDeliveryRadius(final FloatUnit deliveryRadius) {
this.deliveryRadius = deliveryRadius;
}
@Override
public FloatUnit getDeliveryRadius() {
return deliveryRadius;
}
@Override
public void setEducation(final String education) {
this.education = education;
}
@Override
public String getEducation() {
return education;
}
@Override
public void setEmployer(final String employer) {
this.employer = employer;
}
@Override
public String getEmployer() {
return employer;
}
@Override
public void setEthnicities(final String[] ethnicities) {
this.ethnicities = ethnicities;
}
@Override
public String[] getEthnicities() {
return ethnicities == null ? new String[0] : ethnicities;
}
@Override
public void setEventDateRange(final DateTimeRange eventDateRange) {
this.eventDateRange = eventDateRange;
}
@Override
public DateTimeRange getEventDateRange() {
return eventDateRange;
}
@Override
public void setExpirationDate(final Date expirationDate) {
if (expirationDate != null && !(expirationDate instanceof ShortDate)) {
this.expirationDate = new ShortDate(expirationDate);
@ -530,350 +575,437 @@ public class GoogleBaseImpl implements GoogleBase {
}
}
@Override
public Date getExpirationDate() {
return expirationDate;
}
@Override
public void setExpirationDateTime(final Date expirationDateTime) {
this.expirationDateTime = expirationDateTime;
}
@Override
public Date getExpirationDateTime() {
return expirationDateTime;
}
@Override
public void setFormat(final String[] format) {
this.format = format;
}
@Override
public String[] getFormat() {
return format == null ? new String[0] : format;
}
@Override
public void setFromLocation(final String fromLocation) {
this.fromLocation = fromLocation;
}
@Override
public String getFromLocation() {
return fromLocation;
}
@Override
public void setGender(final GenderEnumeration gender) {
this.gender = gender;
}
@Override
public GenderEnumeration getGender() {
return gender;
}
@Override
public void setHoaDues(final Float hoaDues) {
this.hoaDues = hoaDues;
}
@Override
public Float getHoaDues() {
return hoaDues;
}
@Override
public void setId(final String id) {
this.id = id;
}
@Override
public String getId() {
return id;
}
@Override
public void setImageLinks(final URL[] imageLinks) {
this.imageLinks = imageLinks;
}
@Override
public URL[] getImageLinks() {
return imageLinks == null ? new URL[0] : imageLinks;
}
@Override
public void setImmigrationStatus(final String immigrationStatus) {
this.immigrationStatus = immigrationStatus;
}
@Override
public String getImmigrationStatus() {
return immigrationStatus;
}
@Override
public void setInterestedIn(final String[] interestedIn) {
this.interestedIn = interestedIn;
}
@Override
public String[] getInterestedIn() {
return interestedIn == null ? new String[0] : interestedIn;
}
@Override
public Class getInterface() {
return GoogleBase.class;
}
@Override
public void setIsbn(final String isbn) {
this.isbn = isbn;
}
@Override
public String getIsbn() {
return isbn;
}
@Override
public void setJobFunctions(final String[] jobFunctions) {
this.jobFunctions = jobFunctions;
}
@Override
public String[] getJobFunctions() {
return jobFunctions == null ? new String[0] : jobFunctions;
}
@Override
public void setJobIndustries(final String[] jobIndustries) {
this.jobIndustries = jobIndustries;
}
@Override
public String[] getJobIndustries() {
return jobIndustries == null ? new String[0] : jobIndustries;
}
@Override
public void setJobTypes(final String[] jobTypes) {
this.jobTypes = jobTypes;
}
@Override
public String[] getJobTypes() {
return jobTypes == null ? new String[0] : jobTypes;
}
@Override
public void setLabels(final String[] labels) {
this.labels = labels;
}
@Override
public String[] getLabels() {
return labels == null ? new String[0] : labels;
}
@Override
public void setLicenses(final String[] licenses) {
this.licenses = licenses;
}
@Override
public String[] getLicenses() {
return licenses == null ? new String[0] : licenses;
}
@Override
public void setListingType(final Boolean listingType) {
this.listingType = listingType;
}
@Override
public Boolean getListingType() {
return listingType;
}
@Override
public void setLocation(final String location) {
this.location = location;
}
@Override
public String getLocation() {
return location;
}
@Override
public void setMake(final String make) {
this.make = make;
}
@Override
public String getMake() {
return make;
}
@Override
public void setManufacturer(final String manufacturer) {
this.manufacturer = manufacturer;
}
@Override
public String getManufacturer() {
return manufacturer;
}
@Override
public void setManufacturerId(final String manufacturerId) {
this.manufacturerId = manufacturerId;
}
@Override
public String getManufacturerId() {
return manufacturerId;
}
@Override
public void setMaritalStatus(final String maritalStatus) {
this.maritalStatus = maritalStatus;
}
@Override
public String getMaritalStatus() {
return maritalStatus;
}
@Override
public void setMegapixels(final FloatUnit megapixels) {
this.megapixels = megapixels;
}
@Override
public FloatUnit getMegapixels() {
return megapixels;
}
@Override
public void setMemory(final FloatUnit memory) {
this.memory = memory;
}
@Override
public FloatUnit getMemory() {
return memory;
}
@Override
public void setMileage(final Integer mileage) {
this.mileage = mileage;
}
@Override
public Integer getMileage() {
return mileage;
}
@Override
public void setModel(final String model) {
this.model = model;
}
@Override
public String getModel() {
return model;
}
@Override
public void setModelNumber(final String modelNumber) {
this.modelNumber = modelNumber;
}
@Override
public String getModelNumber() {
return modelNumber;
}
@Override
public void setNameOfItemBeingReviewed(final String nameOfItemBeingReviewed) {
this.nameOfItemBeingReviewed = nameOfItemBeingReviewed;
}
@Override
public String getNameOfItemBeingReviewed() {
return nameOfItemBeingReviewed;
}
@Override
public void setNewsSource(final String newsSource) {
this.newsSource = newsSource;
}
@Override
public String getNewsSource() {
return newsSource;
}
@Override
public void setOccupation(final String occupation) {
this.occupation = occupation;
}
@Override
public String getOccupation() {
return occupation;
}
@Override
public void setOperatingSystems(final String operatingSystems) {
this.operatingSystems = operatingSystems;
}
@Override
public String getOperatingSystems() {
return operatingSystems;
}
@Override
public void setPages(final Integer pages) {
this.pages = pages;
}
@Override
public Integer getPages() {
return pages;
}
@Override
public void setPaymentAccepted(final PaymentTypeEnumeration[] paymentAccepted) {
this.paymentAccepted = paymentAccepted;
}
@Override
public PaymentTypeEnumeration[] getPaymentAccepted() {
return paymentAccepted == null ? new PaymentTypeEnumeration[0] : paymentAccepted;
}
@Override
public void setPaymentNotes(final String paymentNotes) {
this.paymentNotes = paymentNotes;
}
@Override
public String getPaymentNotes() {
return paymentNotes;
}
@Override
public void setPickup(final Boolean pickup) {
this.pickup = pickup;
}
@Override
public Boolean getPickup() {
return pickup;
}
@Override
public void setPrice(final FloatUnit price) {
this.price = price;
}
@Override
public FloatUnit getPrice() {
return price;
}
@Override
public void setPriceType(final PriceTypeEnumeration priceType) {
this.priceType = priceType;
}
@Override
public PriceTypeEnumeration getPriceType() {
return priceType;
}
@Override
public void setProcessorSpeed(final FloatUnit processorSpeed) {
this.processorSpeed = processorSpeed;
}
@Override
public FloatUnit getProcessorSpeed() {
return processorSpeed;
}
@Override
public void setProductTypes(final String[] productTypes) {
this.productTypes = productTypes;
}
@Override
public String[] getProductTypes() {
return productTypes == null ? new String[0] : productTypes;
}
@Override
public void setProgrammingLanguages(final String[] programmingLanguages) {
this.programmingLanguages = programmingLanguages;
}
@Override
public String[] getProgrammingLanguages() {
return programmingLanguages == null ? new String[0] : programmingLanguages;
}
@Override
public void setPropertyTypes(final String[] propertyTypes) {
this.propertyTypes = propertyTypes;
}
@Override
public String[] getPropertyTypes() {
return propertyTypes == null ? new String[0] : propertyTypes;
}
@Override
public void setPublicationName(final String publicationName) {
this.publicationName = publicationName;
}
@Override
public String getPublicationName() {
return publicationName;
}
@Override
public void setPublicationVolume(final String publicationVolume) {
this.publicationVolume = publicationVolume;
}
@Override
public String getPublicationVolume() {
return publicationVolume;
}
@Override
public void setPublishDate(final Date publishDate) {
if (publishDate != null && !(publishDate instanceof ShortDate)) {
this.publishDate = new ShortDate(publishDate);
@ -882,218 +1014,272 @@ public class GoogleBaseImpl implements GoogleBase {
}
}
@Override
public Date getPublishDate() {
return publishDate;
}
@Override
public void setQuantity(final Integer quantity) {
this.quantity = quantity;
}
@Override
public Integer getQuantity() {
return quantity;
}
@Override
public void setRating(final Float rating) {
this.rating = rating;
}
@Override
public Float getRating() {
return rating;
}
@Override
public void setRelatedLinks(final URL[] relatedLinks) {
this.relatedLinks = relatedLinks;
}
@Override
public URL[] getRelatedLinks() {
return relatedLinks == null ? new URL[0] : relatedLinks;
}
@Override
public void setReviewType(final String reviewType) {
this.reviewType = reviewType;
}
@Override
public String getReviewType() {
return reviewType;
}
@Override
public void setReviewerType(final String reviewerType) {
this.reviewerType = reviewerType;
}
@Override
public String getReviewerType() {
return reviewerType;
}
@Override
public void setSalary(final Float salary) {
this.salary = salary;
}
@Override
public Float getSalary() {
return salary;
}
@Override
public void setSalaryType(final PriceTypeEnumeration salaryType) {
this.salaryType = salaryType;
}
@Override
public PriceTypeEnumeration getSalaryType() {
return salaryType;
}
@Override
public void setSchoolDistrict(final String schoolDistrict) {
this.schoolDistrict = schoolDistrict;
}
@Override
public String getSchoolDistrict() {
return schoolDistrict;
}
@Override
public void setServiceType(final String serviceType) {
this.serviceType = serviceType;
}
@Override
public String getServiceType() {
return serviceType;
}
@Override
public void setSexualOrientation(final String SexualOrientation) {
this.SexualOrientation = SexualOrientation;
}
@Override
public String getSexualOrientation() {
return SexualOrientation;
}
@Override
public void setShipping(final ShippingType[] shipping) {
this.shipping = shipping;
}
@Override
public ShippingType[] getShipping() {
return shipping == null ? new ShippingType[0] : shipping;
}
@Override
public void setSize(final Size size) {
this.size = size;
}
@Override
public Size getSize() {
return size;
}
@Override
public void setSquareFootages(final IntUnit[] squareFootages) {
this.squareFootages = squareFootages;
}
@Override
public IntUnit[] getSquareFootages() {
return squareFootages == null ? new IntUnit[0] : squareFootages;
}
@Override
public void setSubjectAreas(final String[] subjectAreas) {
this.subjectAreas = subjectAreas;
}
@Override
public String[] getSubjectAreas() {
return subjectAreas == null ? new String[0] : subjectAreas;
}
@Override
public void setSubjects(final String[] subjects) {
this.subjects = subjects;
}
@Override
public String[] getSubjects() {
return subjects == null ? new String[0] : subjects;
}
@Override
public void setTaxPercent(final Float taxPercent) {
this.taxPercent = taxPercent;
}
@Override
public Float getTaxPercent() {
return taxPercent;
}
@Override
public void setTaxRegion(final String taxRegion) {
this.taxRegion = taxRegion;
}
@Override
public String getTaxRegion() {
return taxRegion;
}
@Override
public void setToLocation(final String toLocation) {
this.toLocation = toLocation;
}
@Override
public String getToLocation() {
return toLocation;
}
@Override
public void setTravelDateRange(final DateTimeRange travelDateRange) {
this.travelDateRange = travelDateRange;
}
@Override
public DateTimeRange getTravelDateRange() {
return travelDateRange;
}
@Override
public void setUniversity(final String university) {
this.university = university;
}
@Override
public String getUniversity() {
return university;
}
@Override
public void setUpc(final String upc) {
this.upc = upc;
}
@Override
public String getUpc() {
return upc;
}
@Override
public String getUri() {
return GoogleBase.URI;
}
@Override
public void setUrlOfItemBeingReviewed(final URL urlOfItemBeingReviewed) {
this.urlOfItemBeingReviewed = urlOfItemBeingReviewed;
}
@Override
public URL getUrlOfItemBeingReviewed() {
return urlOfItemBeingReviewed;
}
@Override
public void setVehicleType(final String vehicleType) {
this.vehicleType = vehicleType;
}
@Override
public String getVehicleType() {
return vehicleType;
}
@Override
public void setVin(final String vin) {
this.vin = vin;
}
@Override
public String getVin() {
return vin;
}
@Override
public void setWeight(final FloatUnit weight) {
this.weight = weight;
}
@Override
public FloatUnit getWeight() {
return weight;
}
@Override
public void setYear(final YearType year) {
this.year = year;
}
@Override
public YearType getYear() {
return year;
}
@ -1112,6 +1298,7 @@ public class GoogleBaseImpl implements GoogleBase {
}
}
@Override
public void copyFrom(final CopyFrom obj) {
if (!(obj instanceof GoogleBase)) {
return;

View file

@ -52,14 +52,17 @@ public class CustomTagGenerator implements ModuleGenerator {
public CustomTagGenerator() {
}
@Override
public String getNamespaceUri() {
return CustomTags.URI;
}
@Override
public java.util.Set getNamespaces() {
return NAMESPACES;
}
@Override
public void generate(final Module module, final Element element) {
if (!(module instanceof CustomTags)) {
return;

View file

@ -55,6 +55,7 @@ public class CustomTagParser implements ModuleParser {
public CustomTagParser() {
}
@Override
public Module parse(final Element element) {
final CustomTags module = new CustomTagsImpl();
final ArrayList tags = new ArrayList();
@ -119,6 +120,7 @@ public class CustomTagParser implements ModuleParser {
return module;
}
@Override
public String getNamespaceUri() {
return CustomTags.URI;
}

View file

@ -78,10 +78,12 @@ public class GoogleBaseGenerator implements ModuleGenerator {
super();
}
@Override
public String getNamespaceUri() {
return GoogleBase.URI;
}
@Override
public Set getNamespaces() {
final HashSet set = new HashSet();
set.add(GoogleBaseGenerator.NS);
@ -89,6 +91,7 @@ public class GoogleBaseGenerator implements ModuleGenerator {
return set;
}
@Override
public void generate(final Module module, final Element element) {
final GoogleBaseImpl mod = (GoogleBaseImpl) module;
final HashMap props2tags = new HashMap(GoogleBaseParser.PROPS2TAGS);

View file

@ -108,6 +108,7 @@ public class GoogleBaseParser implements ModuleParser {
super();
}
@Override
public Module parse(final Element element) {
final HashMap tag2pd = new HashMap();
final GoogleBaseImpl module = new GoogleBaseImpl();
@ -163,6 +164,7 @@ public class GoogleBaseParser implements ModuleParser {
return newString.toString();
}
@Override
public String getNamespaceUri() {
return GoogleBase.URI;
}

View file

@ -75,18 +75,22 @@ public class CreativeCommonsImpl implements CreativeCommons {
return array;
}
@Override
public License[] getAllLicenses() {
return allLicenses;
}
@Override
public void setAllLicenses(final License[] allLicenses) {
this.allLicenses = allLicenses;
}
@Override
public Class getInterface() {
return CreativeCommons.class;
}
@Override
public String getUri() {
return CreativeCommons.URI;
}
@ -98,6 +102,7 @@ public class CreativeCommonsImpl implements CreativeCommons {
return clone;
}
@Override
public void copyFrom(final CopyFrom object) {
final CreativeCommons source = (CreativeCommons) object;
setAllLicenses((License[]) arrayCopy(source.getAllLicenses()));
@ -111,10 +116,12 @@ public class CreativeCommonsImpl implements CreativeCommons {
return eBean.beanEquals(obj);
}
@Override
public License[] getLicenses() {
return licenses;
}
@Override
public void setLicenses(final License[] licenses) {
this.licenses = licenses;
}

View file

@ -76,6 +76,7 @@ public class CCModuleGenerator implements ModuleGenerator {
super();
}
@Override
public void generate(final Module module, final Element element) {
Element root = element;
while (root.getParentElement() != null) {
@ -88,10 +89,12 @@ public class CCModuleGenerator implements ModuleGenerator {
}
}
@Override
public Set getNamespaces() {
return NAMESPACES;
}
@Override
public String getNamespaceUri() {
return CreativeCommons.URI;
}

View file

@ -67,6 +67,7 @@ public class ModuleParserRSS1 implements ModuleParser {
public ModuleParserRSS1() {
}
@Override
public Module parse(final Element element) {
final CreativeCommonsImpl module = new CreativeCommonsImpl();
{
@ -128,6 +129,7 @@ public class ModuleParserRSS1 implements ModuleParser {
}
}
@Override
public String getNamespaceUri() {
return CreativeCommonsImpl.RSS1_URI;
}

View file

@ -65,6 +65,7 @@ public class ModuleParserRSS2 implements ModuleParser {
public ModuleParserRSS2() {
}
@Override
public Module parse(final Element element) {
final CreativeCommonsImpl module = new CreativeCommonsImpl();
// Do channel global
@ -118,6 +119,7 @@ public class ModuleParserRSS2 implements ModuleParser {
}
}
@Override
public String getNamespaceUri() {
return CreativeCommonsImpl.RSS2_URI;
}

View file

@ -66,6 +66,7 @@ public interface ContentModule extends Module {
*/
public void setEncodeds(List encodeds);
@Override
public String getUri();
public String toString(String str);

View file

@ -65,15 +65,18 @@ public class ContentModuleImpl extends com.sun.syndication.feed.module.ModuleImp
super(beanClass, uri);
}
@Override
public List getEncodeds() {
encodeds = encodeds == null ? new ArrayList() : encodeds;
return encodeds;
}
@Override
public void setEncodeds(final List encodeds) {
this.encodeds = encodeds;
}
@Override
public void copyFrom(final CopyFrom obj) {
final ContentModule cm = (ContentModule) obj;
setEncodeds(cm.getEncodeds());
@ -81,28 +84,34 @@ public class ContentModuleImpl extends com.sun.syndication.feed.module.ModuleImp
setContents(cm.getContents());
}
@Override
public Class getInterface() {
return ContentModule.class;
}
@Override
public List getContentItems() {
contentItems = contentItems == null ? new ArrayList() : contentItems;
return contentItems;
}
@Override
public void setContentItems(final List list) {
contentItems = list;
}
@Override
public List getContents() {
contents = contents == null ? new ArrayList() : contents;
return contents;
}
@Override
public void setContents(final List contents) {
this.contents = contents;
}
@Override
public String toString(final String str) {
return contentItems.toString();
}

View file

@ -74,6 +74,7 @@ public class ContentModuleGenerator implements com.sun.syndication.io.ModuleGene
public ContentModuleGenerator() {
}
@Override
public void generate(final com.sun.syndication.feed.module.Module module, final org.jdom2.Element element) {
// this is not necessary, it is done to avoid the namespace definition in every item.
Element root = element;
@ -183,10 +184,12 @@ public class ContentModuleGenerator implements com.sun.syndication.io.ModuleGene
return element;
}
@Override
public String getNamespaceUri() {
return ContentModule.URI;
}
@Override
public java.util.Set getNamespaces() {
return NAMESPACES;
}

View file

@ -66,10 +66,12 @@ public class ContentModuleParser implements com.sun.syndication.io.ModuleParser
public ContentModuleParser() {
}
@Override
public String getNamespaceUri() {
return ContentModule.URI;
}
@Override
public com.sun.syndication.feed.module.Module parse(final org.jdom2.Element element) {
boolean foundSomething = false;
final ContentModule cm = new ContentModuleImpl();

View file

@ -34,34 +34,42 @@ public class FeedBurnerImpl implements FeedBurner {
private String origLink;
private String origEnclosureLink;
@Override
public String getAwareness() {
return awareness;
}
@Override
public void setAwareness(final String awareness) {
this.awareness = awareness;
}
@Override
public String getOrigLink() {
return origLink;
}
@Override
public void setOrigLink(final String origLink) {
this.origLink = origLink;
}
@Override
public String getOrigEnclosureLink() {
return origEnclosureLink;
}
@Override
public void setOrigEnclosureLink(final String origEnclosureLink) {
this.origEnclosureLink = origEnclosureLink;
}
@Override
public String getUri() {
return FeedBurner.URI;
}
@Override
public void copyFrom(final CopyFrom object) {
final FeedBurner source = (FeedBurner) object;
setAwareness(source.getAwareness());
@ -69,6 +77,7 @@ public class FeedBurnerImpl implements FeedBurner {
setOrigEnclosureLink(source.getOrigEnclosureLink());
}
@Override
public Class getInterface() {
return FeedBurner.class;
}

View file

@ -36,10 +36,12 @@ import com.sun.syndication.io.ModuleGenerator;
public class FeedBurnerModuleGenerator implements ModuleGenerator {
private static final Namespace NS = Namespace.getNamespace("feedburner", FeedBurner.URI);
@Override
public String getNamespaceUri() {
return FeedBurner.URI;
}
@Override
public Set getNamespaces() {
final HashSet set = new HashSet();
set.add(FeedBurnerModuleGenerator.NS);
@ -47,6 +49,7 @@ public class FeedBurnerModuleGenerator implements ModuleGenerator {
return set;
}
@Override
public void generate(final Module module, final Element element) {
if (!(module instanceof FeedBurner)) {
return;

View file

@ -34,10 +34,12 @@ import com.sun.syndication.io.ModuleParser;
public class FeedBurnerModuleParser implements ModuleParser {
private static final Namespace NS = Namespace.getNamespace(FeedBurner.URI);
@Override
public String getNamespaceUri() {
return FeedBurner.URI;
}
@Override
public Module parse(final Element element) {
final FeedBurnerImpl fbi = new FeedBurnerImpl();
boolean returnObj = false;

View file

@ -69,6 +69,7 @@ public class GMLGenerator implements ModuleGenerator {
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaceUri()
*/
@Override
public String getNamespaceUri() {
return GeoRSSModule.GEORSS_GML_URI;
}
@ -78,6 +79,7 @@ public class GMLGenerator implements ModuleGenerator {
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaces()
*/
@Override
public Set getNamespaces() {
return NAMESPACES;
}
@ -87,6 +89,7 @@ public class GMLGenerator implements ModuleGenerator {
*
* @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element)
*/
@Override
public void generate(final Module module, final Element element) {
// this is not necessary, it is done to avoid the namespace definition
// in every item.

View file

@ -34,6 +34,7 @@ public class GMLModuleImpl extends GeoRSSModule {
*
* @see com.sun.syndication.feed.CopyFrom#getInterface()
*/
@Override
public Class getInterface() {
return GeoRSSModule.class;
}

View file

@ -45,6 +45,7 @@ public class GMLParser implements ModuleParser {
*
* @see com.sun.syndication.io.ModuleParser#getNamespaceUri()
*/
@Override
public String getNamespaceUri() {
return GeoRSSModule.GEORSS_GEORSS_URI;
}
@ -54,6 +55,7 @@ public class GMLParser implements ModuleParser {
*
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/
@Override
public Module parse(final Element element) {
final Module geoRssModule = parseGML(element);
return geoRssModule;

View file

@ -117,6 +117,7 @@ public abstract class GeoRSSModule extends ModuleImpl implements Cloneable {
*
* @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object)
*/
@Override
public void copyFrom(final CopyFrom obj) {
final GeoRSSModule geoRSSModule = (GeoRSSModule) obj;
geometry = geoRSSModule.getGeometry();

View file

@ -63,6 +63,7 @@ public class SimpleGenerator implements ModuleGenerator {
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaceUri()
*/
@Override
public String getNamespaceUri() {
return GeoRSSModule.GEORSS_GEORSS_URI;
}
@ -72,6 +73,7 @@ public class SimpleGenerator implements ModuleGenerator {
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaces()
*/
@Override
public Set getNamespaces() {
return NAMESPACES;
}
@ -81,6 +83,7 @@ public class SimpleGenerator implements ModuleGenerator {
*
* @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element)
*/
@Override
public void generate(final Module module, final Element element) {
// this is not necessary, it is done to avoid the namespace definition
// in every item.

View file

@ -33,6 +33,7 @@ public class SimpleModuleImpl extends GeoRSSModule {
*
* @see com.sun.syndication.feed.CopyFrom#getInterface()
*/
@Override
public Class getInterface() {
return GeoRSSModule.class;
}

View file

@ -42,6 +42,7 @@ public class SimpleParser implements ModuleParser {
*
* @see com.sun.syndication.io.ModuleParser#getNamespaceUri()
*/
@Override
public String getNamespaceUri() {
return GeoRSSModule.GEORSS_GEORSS_URI;
}
@ -61,6 +62,7 @@ public class SimpleParser implements ModuleParser {
*
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/
@Override
public Module parse(final Element element) {
final Module geoRssModule = parseSimple(element);
return geoRssModule;

View file

@ -56,6 +56,7 @@ public class W3CGeoGenerator implements ModuleGenerator {
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaceUri()
*/
@Override
public String getNamespaceUri() {
return GeoRSSModule.GEORSS_W3CGEO_URI;
}
@ -65,6 +66,7 @@ public class W3CGeoGenerator implements ModuleGenerator {
*
* @see com.sun.syndication.io.ModuleGenerator#getNamespaces()
*/
@Override
public Set getNamespaces() {
return NAMESPACES;
}
@ -74,6 +76,7 @@ public class W3CGeoGenerator implements ModuleGenerator {
*
* @see com.sun.syndication.io.ModuleGenerator#generate(com.sun.syndication.feed.module.Module, org.jdom2.Element)
*/
@Override
public void generate(final Module module, final Element element) {
// this is not necessary, it is done to avoid the namespace definition
// in every item.

View file

@ -34,6 +34,7 @@ public class W3CGeoModuleImpl extends GeoRSSModule {
*
* @see com.sun.syndication.feed.CopyFrom#getInterface()
*/
@Override
public Class getInterface() {
return GeoRSSModule.class;
}

View file

@ -37,6 +37,7 @@ public class W3CGeoParser implements ModuleParser {
*
* @see com.sun.syndication.io.ModuleParser#getNamespaceUri()
*/
@Override
public String getNamespaceUri() {
return GeoRSSModule.GEORSS_W3CGEO_URI;
}
@ -71,6 +72,7 @@ public class W3CGeoParser implements ModuleParser {
*
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/
@Override
public Module parse(final Element element) {
final Module geoRssModule = parseW3C(element);
return geoRssModule;

View file

@ -79,6 +79,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @param obj Object to copy from
*/
@Override
public abstract void copyFrom(CopyFrom obj);
/**
@ -86,6 +87,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @return Class of the Interface for this module.
*/
@Override
public Class getInterface() {
return getClass();
}
@ -95,6 +97,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @return "http://www.itunes.com/dtds/podcast-1.0.dtd"
*/
@Override
public String getUri() {
return AbstractITunesObject.URI;
}
@ -112,6 +115,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @return Returns the author string for this feed or entry
*/
@Override
public String getAuthor() {
return author;
}
@ -121,6 +125,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @param author Sets the author string for this feed or entry
*/
@Override
public void setAuthor(final String author) {
this.author = author;
}
@ -130,6 +135,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @return Boolean as to whether to block this feed or entry
*/
@Override
public boolean getBlock() {
return block;
}
@ -139,6 +145,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @param block Boolean as to whether to block this feed or entry
*/
@Override
public void setBlock(final boolean block) {
this.block = block;
}
@ -148,6 +155,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @return Boolean as to whether this feed or entry contains adult content
*/
@Override
public boolean getExplicit() {
return explicit;
}
@ -157,6 +165,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @param explicit Boolean as to whether this feed or entry contains adult content
*/
@Override
public void setExplicit(final boolean explicit) {
this.explicit = explicit;
}
@ -168,6 +177,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @return A list of keywords for this feed or entry
*/
@Override
public String[] getKeywords() {
return keywords == null ? new String[0] : keywords;
}
@ -179,6 +189,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @param keywords A list of keywords for this feed or enty
*/
@Override
public void setKeywords(final String[] keywords) {
this.keywords = keywords;
}
@ -188,6 +199,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @return A subtitle for this feed or entry
*/
@Override
public String getSubtitle() {
return subtitle;
}
@ -197,6 +209,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @param subtitle A subtitle for this feed or entry
*/
@Override
public void setSubtitle(final String subtitle) {
this.subtitle = subtitle;
}
@ -206,6 +219,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @return A subtitle for this feed or entry
*/
@Override
public String getSummary() {
return summary;
}
@ -215,6 +229,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
*
* @param summary A subtitle for this feed or entry
*/
@Override
public void setSummary(final String summary) {
this.summary = summary;
}

View file

@ -64,6 +64,7 @@ public class EntryInformationImpl extends AbstractITunesObject implements EntryI
*
* @return Returns the Duration object for this Item
*/
@Override
public Duration getDuration() {
return duration;
}
@ -73,6 +74,7 @@ public class EntryInformationImpl extends AbstractITunesObject implements EntryI
*
* @param duration Sets the Duration object for this Item
*/
@Override
public void setDuration(final Duration duration) {
this.duration = duration;
}

View file

@ -72,6 +72,7 @@ public class FeedInformationImpl extends AbstractITunesObject implements FeedInf
*
* @return The parent categories for this feed
*/
@Override
public List getCategories() {
return categories == null ? (categories = new ArrayList()) : categories;
}
@ -81,6 +82,7 @@ public class FeedInformationImpl extends AbstractITunesObject implements FeedInf
*
* @param categories The parent categories for this feed
*/
@Override
public void setCategories(final List categories) {
this.categories = categories;
}
@ -90,6 +92,7 @@ public class FeedInformationImpl extends AbstractITunesObject implements FeedInf
*
* @return Returns the owner name for the feed
*/
@Override
public String getOwnerName() {
return ownerName;
}
@ -99,6 +102,7 @@ public class FeedInformationImpl extends AbstractITunesObject implements FeedInf
*
* @param ownerName Sets the owner name for the feed
*/
@Override
public void setOwnerName(final String ownerName) {
this.ownerName = ownerName;
}
@ -108,6 +112,7 @@ public class FeedInformationImpl extends AbstractITunesObject implements FeedInf
*
* @return Returns the owner email address for the feed.
*/
@Override
public String getOwnerEmailAddress() {
return ownerEmailAddress;
}
@ -117,6 +122,7 @@ public class FeedInformationImpl extends AbstractITunesObject implements FeedInf
*
* @param ownerEmailAddress Sets the owner email address for the feed.
*/
@Override
public void setOwnerEmailAddress(final String ownerEmailAddress) {
this.ownerEmailAddress = ownerEmailAddress;
}
@ -128,6 +134,7 @@ public class FeedInformationImpl extends AbstractITunesObject implements FeedInf
*
* @return Returns the URL for the image.
*/
@Override
public URL getImage() {
return image;
}
@ -139,6 +146,7 @@ public class FeedInformationImpl extends AbstractITunesObject implements FeedInf
*
* @param image Sets the URL for the image.
*/
@Override
public void setImage(final URL image) {
this.image = image;
}

View file

@ -69,6 +69,7 @@ public class ITunesGenerator implements ModuleGenerator {
public ITunesGenerator() {
}
@Override
public void generate(final Module module, final Element element) {
Element root = element;
@ -164,6 +165,7 @@ public class ITunesGenerator implements ModuleGenerator {
*
* @return set of Namespace objects.
*/
@Override
public java.util.Set getNamespaces() {
return SET;
}
@ -173,6 +175,7 @@ public class ITunesGenerator implements ModuleGenerator {
*
* @return Returns the namespace URI this module handles.
*/
@Override
public String getNamespaceUri() {
return AbstractITunesObject.URI;
}

View file

@ -75,10 +75,12 @@ public class ITunesParser implements ModuleParser {
public void setParser(final WireFeedParser feedParser) {
}
@Override
public String getNamespaceUri() {
return AbstractITunesObject.URI;
}
@Override
public com.sun.syndication.feed.module.Module parse(final org.jdom2.Element element) {
AbstractITunesObject module = null;

View file

@ -66,6 +66,7 @@ public class MediaEntryModuleImpl extends MediaModuleImpl implements MediaEntryM
*
* @return MediaContent items for the entry
*/
@Override
public MediaContent[] getMediaContents() {
return mediaContents;
}
@ -84,6 +85,7 @@ public class MediaEntryModuleImpl extends MediaModuleImpl implements MediaEntryM
*
* @return MediaGroups for the entry
*/
@Override
public MediaGroup[] getMediaGroups() {
return mediaGroups;
}

View file

@ -57,6 +57,7 @@ public class MediaModuleImpl extends ModuleImpl implements MediaModule, Serializ
super(clazz, uri);
}
@Override
public Class getInterface() {
return MediaModule.class;
}
@ -75,6 +76,7 @@ public class MediaModuleImpl extends ModuleImpl implements MediaModule, Serializ
*
* @return Metadata for a feed.
*/
@Override
public Metadata getMetadata() {
return metadata;
}
@ -93,6 +95,7 @@ public class MediaModuleImpl extends ModuleImpl implements MediaModule, Serializ
*
* @return Player for a feed.
*/
@Override
public PlayerReference getPlayer() {
return player;
}
@ -111,6 +114,7 @@ public class MediaModuleImpl extends ModuleImpl implements MediaModule, Serializ
return m;
}
@Override
public void copyFrom(final CopyFrom obj) {
final MediaModule m = (MediaModule) obj;
metadata = (Metadata) m.getMetadata().clone();

View file

@ -52,14 +52,17 @@ public class MediaModuleGenerator implements ModuleGenerator {
NAMESPACES.add(NS);
}
@Override
public String getNamespaceUri() {
return MediaModule.URI;
}
@Override
public Set getNamespaces() {
return NAMESPACES;
}
@Override
public void generate(final Module module, final Element element) {
if (module instanceof MediaModule) {
final MediaModule m = (MediaModule) module;

View file

@ -69,6 +69,7 @@ public class MediaModuleParser implements ModuleParser {
*
* @see com.sun.syndication.io.ModuleParser#getNamespaceUri()
*/
@Override
public String getNamespaceUri() {
// TODO Auto-generated method stub
return MediaModule.URI;
@ -79,6 +80,7 @@ public class MediaModuleParser implements ModuleParser {
*
* @see com.sun.syndication.io.ModuleParser#parse(org.jdom2.Element)
*/
@Override
public Module parse(final Element mmRoot) {
MediaModuleImpl mod = null;

View file

@ -29,24 +29,20 @@ import com.sun.syndication.feed.atom.Link;
public interface OpenSearchResponse {
/**
* # totalResults the maximum number of results available for these search
* terms
* # totalResults the maximum number of results available for these search terms
*
* * Restrictions: An integer greater than or equal to 0. * Default: The
* number of items that were returned in this set of results. *
* Requirements: May appear zero or one time.
* * Restrictions: An integer greater than or equal to 0. * Default: The number of items that were returned in this set of results. * Requirements: May
* appear zero or one time.
*
* @param totalResults A positive integer value.
*/
public void setTotalResults(int totalResults);
/**
* # totalResults the maximum number of results available for these search
* terms
* # totalResults the maximum number of results available for these search terms
*
* * Restrictions: An integer greater than or equal to 0. * Default: The
* number of items that were returned in this set of results. *
* Requirements: May appear zero or one time.
* * Restrictions: An integer greater than or equal to 0. * Default: The number of items that were returned in this set of results. * Requirements: May
* appear zero or one time.
*
* @return a positive integer value.
*/
@ -55,8 +51,7 @@ public interface OpenSearchResponse {
/**
* # startIndex the index of the first item returned in the result.
*
* * Restrictions: An integer greater than or equal to 1. * Note: The first
* result is 1. * Default: 1 * Requirements: May appear zero or one time.
* * Restrictions: An integer greater than or equal to 1. * Note: The first result is 1. * Default: 1 * Requirements: May appear zero or one time.
*
* @param startIndex int value >= 1.
*/
@ -65,32 +60,27 @@ public interface OpenSearchResponse {
/**
* # startIndex the index of the first item returned in the result.
*
* * Restrictions: An integer greater than or equal to 1. * Note: The first
* result is 1. * Default: 1 * Requirements: May appear zero or one time.
* * Restrictions: An integer greater than or equal to 1. * Note: The first result is 1. * Default: 1 * Requirements: May appear zero or one time.
*
* @return int value >= 1.
*/
public int getStartIndex();
/**
* # itemsPerPage the maximum number of items that can appear in one page
* of results.
* # itemsPerPage the maximum number of items that can appear in one page of results.
*
* * Restrictions: An integer greater than or equal to 1. * Default: The
* number of items that were returned in this set of results. *
* Requirements: May appear zero or one time.
* * Restrictions: An integer greater than or equal to 1. * Default: The number of items that were returned in this set of results. * Requirements: May
* appear zero or one time.
*
* @param itemsPerPage int value >= 1.
*/
public void setItemsPerPage(int itemsPerPage);
/**
* # itemsPerPage the maximum number of items that can appear in one page
* of results.
* # itemsPerPage the maximum number of items that can appear in one page of results.
*
* * Restrictions: An integer greater than or equal to 1. * Default: The
* number of items that were returned in this set of results. *
* Requirements: May appear zero or one time.
* * Restrictions: An integer greater than or equal to 1. * Default: The number of items that were returned in this set of results. * Requirements: May
* appear zero or one time.
*
* @return int value >= 1
*/
@ -99,10 +89,8 @@ public interface OpenSearchResponse {
/**
* # link a reference back to the OpenSearch Description file
*
* * Attributes: This is a clone of the link element in Atom, including
* href, hreflang, rel, and type attributes. * Restrictions: The rel
* attribute must equal search. * Note: New in version 1.1. * Requirements:
* May appear zero or one time.
* * Attributes: This is a clone of the link element in Atom, including href, hreflang, rel, and type attributes. * Restrictions: The rel attribute must
* equal search. * Note: New in version 1.1. * Requirements: May appear zero or one time.
*
* @param link link to the open search spec.
*/
@ -111,10 +99,8 @@ public interface OpenSearchResponse {
/**
* # link a reference back to the OpenSearch Description file
*
* * Attributes: This is a clone of the link element in Atom, including
* href, hreflang, rel, and type attributes. * Restrictions: The rel
* attribute must equal search. * Note: New in version 1.1. * Requirements:
* May appear zero or one time.
* * Attributes: This is a clone of the link element in Atom, including href, hreflang, rel, and type attributes. * Restrictions: The rel attribute must
* equal search. * Note: New in version 1.1. * Requirements: May appear zero or one time.
*
* @return link to the opensearch spec.
*/
@ -122,26 +108,22 @@ public interface OpenSearchResponse {
// list of OSResponseQuery interfaces
/**
* <code>Query</code> in an OpenSearch Response, can be used both to echo
* back the original query and to suggest new searches. Please see the <a
* <code>Query</code> in an OpenSearch Response, can be used both to echo back the original query and to suggest new searches. Please see the <a
* href="../query/">OpenSearch Query specification</a> for more information.
* <ul>
* <li>Note: <em>New in version 1.1.</em></li>
* <li>Requirements: May appear zero or more times. Note that the Q is
* capitalized.</li>
* <li>Requirements: May appear zero or more times. Note that the Q is capitalized.</li>
*
* @param query List of OSQuery objects.
*/
public void setQueries(List<OSQuery> query);
/**
* <code>Query</code> in an OpenSearch Response, can be used both to echo
* back the original query and to suggest new searches. Please see the <a
* <code>Query</code> in an OpenSearch Response, can be used both to echo back the original query and to suggest new searches. Please see the <a
* href="../query/">OpenSearch Query specification</a> for more information.
* <ul>
* <li>Note: <em>New in version 1.1.</em></li>
* <li>Requirements: May appear zero or more times. Note that the Q is
* capitalized.</li>
* <li>Requirements: May appear zero or more times. Note that the Q is capitalized.</li>
*
* @return A list of OSQuery objects.
*/

View file

@ -20,8 +20,7 @@ import java.io.Serializable;
import com.sun.syndication.feed.impl.ObjectBean;
/**
* @author Michael W. Nassif (enrouteinc@gmail.com) Class representation of the
* Query object (Response portion so far)
* @author Michael W. Nassif (enrouteinc@gmail.com) Class representation of the Query object (Response portion so far)
*/
public class OSQuery implements Cloneable, Serializable {
private static final long serialVersionUID = 3818092699440612477L;
@ -49,8 +48,7 @@ public class OSQuery implements Cloneable, Serializable {
* <p>
*
* @return a clone of the object.
* @throws CloneNotSupportedException thrown if an element of the object
* cannot be cloned.
* @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
*
*/
@Override
@ -59,8 +57,7 @@ public class OSQuery implements Cloneable, Serializable {
}
/**
* Indicates whether some other object is "equal to" this one as defined by
* the Object equals() method.
* Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
* <p>
*
* @param other he reference object with which to compare.

View file

@ -32,8 +32,7 @@ import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleGenerator;
/**
* @author Michael W. Nassif (enrouteinc@gmail.com) OpenSearch implementation of
* ModuleGenerator
* @author Michael W. Nassif (enrouteinc@gmail.com) OpenSearch implementation of ModuleGenerator
*/
public class OpenSearchModuleGenerator implements ModuleGenerator {
@ -53,16 +52,13 @@ public class OpenSearchModuleGenerator implements ModuleGenerator {
}
/**
* Returns a set with all the URIs (JDOM Namespace elements) this module
* generator uses.
* Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
* <p/>
* It is used by the the feed generators to add their namespace definition
* in the root element of the generated document (forward-missing of Java
* 5.0 Generics).
* It is used by the the feed generators to add their namespace definition in the root element of the generated document (forward-missing of Java 5.0
* Generics).
* <p/>
*
* @return a set with all the URIs (JDOM Namespace elements) this module
* generator uses.
* @return a set with all the URIs (JDOM Namespace elements) this module generator uses.
*/
@Override
public Set<Namespace> getNamespaces() {
@ -89,7 +85,7 @@ public class OpenSearchModuleGenerator implements ModuleGenerator {
final List<OSQuery> queries = osm.getQueries();
for (OSQuery query : queries) {
for (final OSQuery query : queries) {
if (query != null) {
element.addContent(generateQueryElement(query));
}

View file

@ -27,8 +27,7 @@ import com.sun.syndication.feed.module.Module;
import com.sun.syndication.feed.module.ModuleImpl;
/**
* @author Michael W. Nassif (enrouteinc@gmail.com) OpenSearch Module
* implementation
* @author Michael W. Nassif (enrouteinc@gmail.com) OpenSearch Module implementation
*/
public class OpenSearchModuleImpl extends ModuleImpl implements OpenSearchModule, Serializable {
private static final long serialVersionUID = -5257107642509731500L;
@ -132,6 +131,7 @@ public class OpenSearchModuleImpl extends ModuleImpl implements OpenSearchModule
/*
* (non-Javadoc)
*
* @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object)
*/
@Override
@ -152,6 +152,7 @@ public class OpenSearchModuleImpl extends ModuleImpl implements OpenSearchModule
/*
* (non-Javadoc)
*
* @see com.sun.syndication.feed.CopyFrom#getInterface()
*/
@Override

View file

@ -33,8 +33,7 @@ import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleParser;
/**
* @author Michael W. Nassif (enrouteinc@gmail.com) OpenSearch implementation of
* the ModuleParser class
* @author Michael W. Nassif (enrouteinc@gmail.com) OpenSearch implementation of the ModuleParser class
*/
public class OpenSearchModuleParser implements ModuleParser {

View file

@ -65,46 +65,57 @@ public class PhotocastModuleImpl implements PhotocastModule {
public PhotocastModuleImpl() {
}
@Override
public Date getPhotoDate() {
return photoDate;
}
@Override
public void setPhotoDate(final Date photoDate) {
this.photoDate = photoDate;
}
@Override
public Date getCropDate() {
return cropDate;
}
@Override
public void setCropDate(final Date cropDate) {
this.cropDate = cropDate;
}
@Override
public URL getImageUrl() {
return imageUrl;
}
@Override
public void setImageUrl(final URL imageUrl) {
this.imageUrl = imageUrl;
}
@Override
public URL getThumbnailUrl() {
return thumbnailUrl;
}
@Override
public void setThumbnailUrl(final URL thumbnailUrl) {
this.thumbnailUrl = thumbnailUrl;
}
@Override
public Metadata getMetadata() {
return metadata;
}
@Override
public void setMetadata(final Metadata metadata) {
this.metadata = metadata;
}
@Override
public void copyFrom(final CopyFrom obj) {
final PhotocastModule pm = (PhotocastModule) obj;
setPhotoDate(pm.getPhotoDate() == null ? null : (Date) pm.getPhotoDate().clone());
@ -126,10 +137,12 @@ public class PhotocastModuleImpl implements PhotocastModule {
return pm;
}
@Override
public String getUri() {
return PhotocastModule.URI;
}
@Override
public Class getInterface() {
return PhotocastModule.class;
}

View file

@ -69,6 +69,7 @@ public class Generator implements ModuleGenerator {
super();
}
@Override
public void generate(final Module module, final Element element) {
if (!(module instanceof PhotocastModule)) {
return;
@ -92,10 +93,12 @@ public class Generator implements ModuleGenerator {
element.addContent(e);
}
@Override
public Set getNamespaces() {
return Generator.NAMESPACES;
}
@Override
public String getNamespaceUri() {
return PhotocastModule.URI;
}

View file

@ -75,6 +75,7 @@ public class Parser implements ModuleParser {
public Parser() {
}
@Override
public Module parse(final Element element) {
if (element.getName().equals("channel") || element.getName().equals("feed")) {
return new PhotocastModuleImpl();
@ -132,6 +133,7 @@ public class Parser implements ModuleParser {
return pm;
}
@Override
public String getNamespaceUri() {
return PhotocastModule.URI;
}

View file

@ -62,38 +62,47 @@ public class SlashImpl implements Slash {
public SlashImpl() {
}
@Override
public String getSection() {
return section;
}
@Override
public void setSection(final String section) {
this.section = section;
}
@Override
public String getDepartment() {
return department;
}
@Override
public void setDepartment(final String department) {
this.department = department;
}
@Override
public Integer getComments() {
return comments;
}
@Override
public void setComments(final Integer comments) {
this.comments = comments;
}
@Override
public Integer[] getHitParade() {
return hitParade == null ? new Integer[0] : hitParade;
}
@Override
public void setHitParade(final Integer[] hitParade) {
this.hitParade = hitParade;
}
@Override
public void copyFrom(final CopyFrom object) {
final Slash source = (Slash) object;
setHitParade(arrayCopy(source.getHitParade()));
@ -109,6 +118,7 @@ public class SlashImpl implements Slash {
return si;
}
@Override
public String getUri() {
return Slash.URI;
}
@ -126,6 +136,7 @@ public class SlashImpl implements Slash {
return array;
}
@Override
public Class getInterface() {
return Slash.class;
}

View file

@ -63,6 +63,7 @@ public class SlashModuleGenerator implements ModuleGenerator {
public SlashModuleGenerator() {
}
@Override
public void generate(final Module module, final Element element) {
if (!(module instanceof Slash)) {
return;
@ -97,12 +98,14 @@ public class SlashModuleGenerator implements ModuleGenerator {
return element;
}
@Override
public java.util.Set getNamespaces() {
final HashSet set = new HashSet();
set.add(SlashModuleGenerator.NS);
return set;
}
@Override
public String getNamespaceUri() {
return Slash.URI;
}

View file

@ -65,10 +65,12 @@ public class SlashModuleParser implements ModuleParser {
super();
}
@Override
public String getNamespaceUri() {
return Slash.URI;
}
@Override
public Module parse(final Element element) {
final SlashImpl si = new SlashImpl();
Element tag = element.getChild("hit_parade", SlashModuleParser.NS);

View file

@ -37,10 +37,12 @@ public class SimpleListExtensionImpl extends ModuleImpl implements SimpleListExt
super(SimpleListExtensionImpl.class, SimpleListExtension.URI);
}
@Override
public void setGroupFields(final Group[] groupFields) {
this.groupFields = groupFields;
}
@Override
public Group[] getGroupFields() {
return groupFields;
}
@ -53,22 +55,27 @@ public class SimpleListExtensionImpl extends ModuleImpl implements SimpleListExt
*
* @return the interface the copyFrom works on.
*/
@Override
public Class getInterface() {
return SimpleListExtension.class;
}
@Override
public void setSortFields(final Sort[] sortFields) {
this.sortFields = sortFields;
}
@Override
public Sort[] getSortFields() {
return sortFields;
}
@Override
public void setTreatAs(final String treatAs) {
this.treatAs = treatAs;
}
@Override
public String getTreatAs() {
return treatAs;
}
@ -95,6 +102,7 @@ public class SimpleListExtensionImpl extends ModuleImpl implements SimpleListExt
*
* @param obj the instance to copy properties from.
*/
@Override
public void copyFrom(final CopyFrom obj) {
final SimpleListExtension sle = (SimpleListExtension) obj;
setGroupFields(sle.getGroupFields().clone());

View file

@ -43,6 +43,7 @@ public class SleEntryImpl implements SleEntry {
super();
}
@Override
public EntryValue getGroupByElement(final Group element) {
final EntryValue[] values = getGroupValues();
final LabelNamespaceElement compare = new LabelNamespaceElement(element.getLabel(), element.getNamespace(), element.getElement());
@ -59,6 +60,7 @@ public class SleEntryImpl implements SleEntry {
this.groupValues = groupValues == null ? EMPTY_VALUES : groupValues;
}
@Override
public EntryValue[] getGroupValues() {
return groupValues;
}
@ -71,10 +73,12 @@ public class SleEntryImpl implements SleEntry {
*
* @return the interface the copyFrom works on.
*/
@Override
public Class getInterface() {
return SleEntry.class;
}
@Override
public EntryValue getSortByElement(final Sort element) {
System.out.println("Looking for value for " + element.getLabel() + " from " + sortValues.length);
final EntryValue[] values = getSortValues();
@ -94,6 +98,7 @@ public class SleEntryImpl implements SleEntry {
this.sortValues = sortValues;
}
@Override
public EntryValue[] getSortValues() {
return sortValues;
}
@ -104,6 +109,7 @@ public class SleEntryImpl implements SleEntry {
*
* @return URI of the module.
*/
@Override
public String getUri() {
return ModuleParser.TEMP.getURI();
}
@ -124,6 +130,7 @@ public class SleEntryImpl implements SleEntry {
*
* @param obj the instance to copy properties from.
*/
@Override
public void copyFrom(final CopyFrom obj) {
final SleEntry entry = (SleEntry) obj;
setGroupValues(entry.getGroupValues().clone());

View file

@ -121,6 +121,7 @@ public class SleUtility {
}
private static class GroupStrategy implements ValueStrategy {
@Override
public Comparable getValue(final Extendable o, final Object value) {
Comparable oc = null;
@ -135,6 +136,7 @@ public class SleUtility {
}
private static class SortStrategy implements ValueStrategy {
@Override
public Comparable getValue(final Extendable o, final Object value) {
Comparable oc = null;
try {

View file

@ -50,6 +50,7 @@ public class ItemParser implements com.sun.syndication.io.ModuleParser {
*
* @return the namespace URI.
*/
@Override
public String getNamespaceUri() {
return ModuleParser.TEMP.getURI();
}
@ -61,6 +62,7 @@ public class ItemParser implements com.sun.syndication.io.ModuleParser {
* @param element the XML node (JDOM element) to extract module information from.
* @return a module instance, <b>null</b> if the element did not have module information.
*/
@Override
public Module parse(final Element element) {
final SleEntryImpl sle = new SleEntryImpl();
ArrayList values = new ArrayList();

View file

@ -41,6 +41,7 @@ public class ModuleGenerator implements com.sun.syndication.io.ModuleGenerator {
*
* @return the namespace URI.
*/
@Override
public String getNamespaceUri() {
return SimpleListExtension.URI;
}
@ -54,6 +55,7 @@ public class ModuleGenerator implements com.sun.syndication.io.ModuleGenerator {
*
* @return a set with all the URIs (JDOM Namespace elements) this module generator uses.
*/
@Override
public Set getNamespaces() {
return NAMESPACES;
}
@ -65,6 +67,7 @@ public class ModuleGenerator implements com.sun.syndication.io.ModuleGenerator {
* @param module the module to inject into the XML node (JDOM element).
* @param element the XML node to inject the module metadata to.
*/
@Override
public void generate(final Module module, final Element element) {
if (!(module instanceof SimpleListExtension)) {
return;

View file

@ -48,6 +48,7 @@ public class ModuleParser implements com.sun.syndication.io.ModuleParser {
*
* @return the namespace URI.
*/
@Override
public String getNamespaceUri() {
return SimpleListExtension.URI;
}
@ -59,6 +60,7 @@ public class ModuleParser implements com.sun.syndication.io.ModuleParser {
* @param element the XML node (JDOM element) to extract module information from.
* @return a module instance, <b>null</b> if the element did not have module information.
*/
@Override
public Module parse(final Element element) {
if (element.getChild("treatAs", NS) == null) {
return null;

View file

@ -52,6 +52,7 @@ public class DateValue implements EntryValue {
*
* @return
*/
@Override
public String getElement() {
return element;
}
@ -68,6 +69,7 @@ public class DateValue implements EntryValue {
*
* @return
*/
@Override
public String getLabel() {
return label;
}
@ -84,6 +86,7 @@ public class DateValue implements EntryValue {
*
* @return
*/
@Override
public Comparable getValue() {
return value;
}
@ -113,6 +116,7 @@ public class DateValue implements EntryValue {
return "[Namespace: " + namespace + " Element:" + element + " Label:" + label + " Value:" + value + "]";
}
@Override
public Namespace getNamespace() {
return namespace;
}

View file

@ -43,6 +43,7 @@ public class NumberValue implements EntryValue {
this.element = element;
}
@Override
public String getElement() {
return element;
}
@ -51,6 +52,7 @@ public class NumberValue implements EntryValue {
this.label = label;
}
@Override
public String getLabel() {
return label;
}
@ -59,6 +61,7 @@ public class NumberValue implements EntryValue {
this.value = value;
}
@Override
public Comparable getValue() {
return value;
}
@ -89,6 +92,7 @@ public class NumberValue implements EntryValue {
return "[Element:" + element + " Label:" + label + " Value:" + value + "]";
}
@Override
public Namespace getNamespace() {
return namespace;
}

View file

@ -41,6 +41,7 @@ public class StringValue implements EntryValue {
this.element = element;
}
@Override
public String getElement() {
return element;
}
@ -49,6 +50,7 @@ public class StringValue implements EntryValue {
this.label = label;
}
@Override
public String getLabel() {
return label;
}
@ -57,6 +59,7 @@ public class StringValue implements EntryValue {
this.value = value;
}
@Override
public Comparable getValue() {
return value;
}
@ -87,6 +90,7 @@ public class StringValue implements EntryValue {
return "[Namespace: " + namespace + " Element:" + element + " Label:" + label + " Value:" + value + "]";
}
@Override
public Namespace getNamespace() {
return namespace;
}

View file

@ -34,10 +34,12 @@ public class SSE091Generator implements DelegatingModuleGenerator {
public SSE091Generator() {
}
@Override
public void setFeedGenerator(final WireFeedGenerator feedGenerator) {
parentGenerator = (RSS20Generator) feedGenerator;
}
@Override
public String getNamespaceUri() {
return SSEModule.SSE_SCHEMA_URI;
}
@ -51,10 +53,12 @@ public class SSE091Generator implements DelegatingModuleGenerator {
*
* @return a set with all the URIs (JDOM Namespace elements) this module generator uses.
*/
@Override
public Set getNamespaces() {
return SSEModule.NAMESPACES;
}
@Override
public void generate(final Module module, final Element element) {
if (!(module instanceof SSEModule)) {
return;

View file

@ -41,14 +41,17 @@ public class SSE091Parser implements DelegatingModuleParser {
public SSE091Parser() {
}
@Override
public void setFeedParser(final WireFeedParser feedParser) {
rssParser = (RSS20Parser) feedParser;
}
@Override
public String getNamespaceUri() {
return SSEModule.SSE_SCHEMA_URI;
}
@Override
public Module parse(final org.jdom2.Element element) {
SSEModule sseModule = null;
final String name = element.getName();
@ -239,6 +242,7 @@ public class SSE091Parser implements DelegatingModuleParser {
this.name = name;
}
@Override
public Object filter(final Object object) {
return object instanceof Element && name.equals(((Element) object).getName());
}

View file

@ -27,10 +27,12 @@ public abstract class SSEModule implements Module {
NAMESPACES = Collections.unmodifiableSet(nss);
}
@Override
public String getUri() {
return SSE_SCHEMA_URI;
}
@Override
public Class getInterface() {
return getClass();
}
@ -51,5 +53,6 @@ public abstract class SSEModule implements Module {
return clone;
}
@Override
public abstract void copyFrom(CopyFrom obj);
}

View file

@ -65,10 +65,12 @@ public class YWeatherModuleImpl extends ModuleImpl implements YWeatherEntryModul
super(YWeatherModuleImpl.class, YWeatherModule.URI);
}
@Override
public Class getInterface() {
return CopyFromInterface.class;
}
@Override
public void copyFrom(final CopyFrom o) {
final YWeatherModuleImpl from = (YWeatherModuleImpl) o;
setAstronomy(from.getAstronomy() != null ? (Astronomy) from.getAstronomy().clone() : null);
@ -90,58 +92,72 @@ public class YWeatherModuleImpl extends ModuleImpl implements YWeatherEntryModul
}
}
@Override
public Location getLocation() {
return location;
}
@Override
public void setLocation(final Location location) {
this.location = location;
}
@Override
public Astronomy getAstronomy() {
return astronomy;
}
@Override
public void setAstronomy(final Astronomy astronomy) {
this.astronomy = astronomy;
}
@Override
public Units getUnits() {
return units;
}
@Override
public void setUnits(final Units units) {
this.units = units;
}
@Override
public Condition getCondition() {
return condition;
}
@Override
public void setCondition(final Condition condition) {
this.condition = condition;
}
@Override
public Forecast[] getForecasts() {
return forecasts;
}
@Override
public void setForecasts(final Forecast[] forecasts) {
this.forecasts = forecasts;
}
@Override
public Wind getWind() {
return wind;
}
@Override
public void setWind(final Wind wind) {
this.wind = wind;
}
@Override
public Atmosphere getAtmosphere() {
return atmosphere;
}
@Override
public void setAtmosphere(final Atmosphere atmosphere) {
this.atmosphere = atmosphere;
}

View file

@ -65,6 +65,7 @@ public class WeatherModuleGenerator implements ModuleGenerator {
public WeatherModuleGenerator() {
}
@Override
public void generate(final Module module, final Element element) {
if (!(module instanceof YWeatherModuleImpl)) {
return;
@ -201,6 +202,7 @@ public class WeatherModuleGenerator implements ModuleGenerator {
return element;
}
@Override
public java.util.Set getNamespaces() {
final HashSet set = new HashSet();
set.add(WeatherModuleGenerator.NS);
@ -208,6 +210,7 @@ public class WeatherModuleGenerator implements ModuleGenerator {
return set;
}
@Override
public String getNamespaceUri() {
return YWeatherModule.URI;
}

View file

@ -77,10 +77,12 @@ public class WeatherModuleParser implements ModuleParser {
super();
}
@Override
public String getNamespaceUri() {
return YWeatherModule.URI;
}
@Override
public Module parse(final Element element) {
final YWeatherModuleImpl module = new YWeatherModuleImpl();
final Element location = element.getChild("location", WeatherModuleParser.NS);

View file

@ -64,12 +64,12 @@ public class MediaModuleTest extends AbstractTestCase {
final SyndFeed feed2 = getSyndFeed(new File("target/" + j + ".xml"));
for (int i = 0; i < entries.size(); i++) {
BufferedWriter b = new BufferedWriter(new FileWriter("target/" + j + "a.txt"));
b.write("" + ((SyndEntry) entries.get(i)).getModule(MediaModule.URI));
b.write("" + entries.get(i).getModule(MediaModule.URI));
b.close();
b = new BufferedWriter(new FileWriter("target/" + j + "b.txt"));
b.write("" + feed2.getEntries().get(i).getModule(MediaModule.URI));
b.close();
assertEquals(((SyndEntry) entries.get(i)).getModule(MediaModule.URI), feed2.getEntries().get(i).getModule(MediaModule.URI));
assertEquals(entries.get(i).getModule(MediaModule.URI), feed2.getEntries().get(i).getModule(MediaModule.URI));
}
}
}