More work on AS module.
This commit is contained in:
parent
2b22b5f9ef
commit
4c06511fe5
33 changed files with 971 additions and 46 deletions
|
@ -18,6 +18,7 @@
|
|||
package org.rometools.feed.module.activitystreams;
|
||||
|
||||
import org.rometools.feed.module.activitystreams.types.ActivityObject;
|
||||
import org.rometools.feed.module.activitystreams.types.Mood;
|
||||
import org.rometools.feed.module.activitystreams.types.Verb;
|
||||
|
||||
/**
|
||||
|
@ -32,4 +33,11 @@ public interface ActivityStreamModule {
|
|||
public ActivityObject getObject();
|
||||
public void setObject(ActivityObject object);
|
||||
|
||||
public ActivityObject getTarget();
|
||||
public void setTarget(ActivityObject object);
|
||||
|
||||
public Mood getMood();
|
||||
public void setMood(Mood mood);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.rometools.feed.module.activitystreams;
|
||||
|
||||
import org.rometools.feed.module.activitystreams.types.ActivityObject;
|
||||
import org.rometools.feed.module.activitystreams.types.Mood;
|
||||
import org.rometools.feed.module.activitystreams.types.Verb;
|
||||
|
||||
|
||||
|
@ -63,4 +64,20 @@ public class ActivityStreamModuleImpl implements ActivityStreamModule {
|
|||
public Verb getVerb() {
|
||||
return this.verb;
|
||||
}
|
||||
|
||||
public ActivityObject getTarget() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
public void setTarget(ActivityObject object) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
public Mood getMood() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
public void setMood(Mood mood) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,15 +18,31 @@
|
|||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
import com.sun.syndication.feed.atom.Entry;
|
||||
|
||||
import org.rometools.feed.module.georss.GeoRSSModule;
|
||||
import org.rometools.feed.module.portablecontacts.ContactModule;
|
||||
/**
|
||||
*
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public abstract class ActivityObject extends Entry {
|
||||
public abstract class ActivityObject extends Entry implements HasLocation {
|
||||
|
||||
|
||||
public abstract String getTypeIRI();
|
||||
|
||||
public GeoRSSModule getLocation() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
public void setLocation(GeoRSSModule location) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
public ContactModule getAddress(){
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
public void setAddress(ContactModule address){
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
|
||||
/**
|
||||
* <p>The "audio" Object type represents audio content.
|
||||
*</p>
|
||||
|
@ -43,14 +43,17 @@ package org.rometools.feed.module.activitystreams.types;
|
|||
* @author robert.cooper
|
||||
*/
|
||||
public class Audio extends ActivityObject {
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/audio";
|
||||
}
|
||||
|
||||
|
||||
private String embedCode;
|
||||
private String streamLink;
|
||||
|
||||
/**
|
||||
* Set the value of embedCode
|
||||
*
|
||||
* @param newembedCode new value of embedCode
|
||||
*/
|
||||
public void setEmbedCode(String newembedCode) {
|
||||
this.embedCode = newembedCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of embedCode
|
||||
|
@ -62,17 +65,14 @@ public class Audio extends ActivityObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the value of embedCode
|
||||
* Set the value of streamLink
|
||||
*
|
||||
* @param newembedCode new value of embedCode
|
||||
* @param newstreamLink new value of streamLink
|
||||
*/
|
||||
public void setEmbedCode(String newembedCode) {
|
||||
this.embedCode = newembedCode;
|
||||
public void setStreamLink(String newstreamLink) {
|
||||
this.streamLink = newstreamLink;
|
||||
}
|
||||
|
||||
|
||||
private String streamLink;
|
||||
|
||||
/**
|
||||
* Get the value of streamLink
|
||||
*
|
||||
|
@ -82,13 +82,8 @@ public class Audio extends ActivityObject {
|
|||
return this.streamLink;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of streamLink
|
||||
*
|
||||
* @param newstreamLink new value of streamLink
|
||||
*/
|
||||
public void setStreamLink(String newstreamLink) {
|
||||
this.streamLink = newstreamLink;
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/audio";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
/**
|
||||
* <p>The "event" object type represents an event that occurs in a
|
||||
* certain place during a particular interval of time.
|
||||
*</p>
|
||||
*<p>The object type URL for the "event" object type is <tt>http://activitystrea.ms/schema/1.0/event</tt>.
|
||||
*</p>
|
||||
*<p>An event has the following additional components:
|
||||
*</p>
|
||||
*<p></p>
|
||||
*<blockquote class="text"><dl>
|
||||
*<dt>Start Date and Time</dt>
|
||||
*<dd>The date and time that the
|
||||
* event begins. Represented in JSON as a property called <tt>startTime</tt> whose value is JSON string
|
||||
* containing a W3CDTF timestamp. [TODO: Reference W3CDTF spec.]
|
||||
* [TODO: Include prose describing how to represent just a date vs.
|
||||
* a date and time.]
|
||||
*</dd>
|
||||
*<dt>End Date and Time</dt>
|
||||
*<dd>The date and time that the event
|
||||
* ends. Represented in JSON as a property called <tt>endTime</tt> whose value is JSON string
|
||||
* containing a W3CDTF timestamp. [TODO: Reference W3CDTF spec.]
|
||||
* [TODO: Include prose describing how to represent just a date vs.
|
||||
* a date and time.]
|
||||
*</dd>
|
||||
*</dl></blockquote>
|
||||
*
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Event extends ActivityObject {
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/event";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
import org.rometools.feed.module.georss.GeoRSSModule;
|
||||
import org.rometools.feed.module.portablecontacts.ContactModule;
|
||||
|
||||
/**
|
||||
* <p>Location is a concept which can be used inside the atom:entry
|
||||
* level, atom:author and activity:object. Location can be specified
|
||||
* via geographic coordinates, a street address, a free-form location
|
||||
* name or a combination of these. Geographic coordinates should be
|
||||
* included as a geo:point element as described by the GeoRSS
|
||||
* specification. Addresses should be included using a poco:address
|
||||
* element defined at Portable Contacts specification. The entry level
|
||||
* location represents the location of the author at the time the
|
||||
* activity was performed. The author level location represents the
|
||||
* primary location of the author. Finally, the location within other
|
||||
* objects represents the physical location of those objects. All
|
||||
* location fields are optional. For free form addresses use the
|
||||
* poco:formatted field.
|
||||
*</p>
|
||||
*<p><a class='info' href='#location-poco'>Figure 1<span> (</span><span class='info'>Location Example</span><span>)</span></a>
|
||||
*</p>
|
||||
*<p><br /><hr class="insert" />
|
||||
*<a name="location-poco"></a>
|
||||
*</p>
|
||||
*<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre><entry>
|
||||
* <id>tag:world:activity:1212121212121</id>
|
||||
* <title>Rob liked Goldeberg's Deli</title>
|
||||
* <author>
|
||||
* <name>Rob Dolin</name>
|
||||
* <id>tag:world:person:1212121212121</id>
|
||||
* <link rel="alternate" type="text/html" href="http://robdolin.com" />
|
||||
* <poco:address>
|
||||
* <poco:locality>Marina del Rey</poco:locality>
|
||||
* <poco:region>CA</poco:region>
|
||||
* <poco:postalCode>90292</poco:postalCode>
|
||||
* <poco:country>US</poco:country>
|
||||
* </poco:address>
|
||||
* </author>
|
||||
* <activity:object>
|
||||
* <activity:object-type>http://activitystrea.ms/schema/1.0/place</object-type>
|
||||
* <id>tag:world:place:1212121212121</id>
|
||||
* <title>Goldberg's Deli</title>
|
||||
* <link rel="alternate" type="text/html" href="http://www.deli.com" />
|
||||
* <geo:point>33.9777 -118.4351</geo:point>
|
||||
* <poco:address>
|
||||
* <poco:streetAddress>14016 Bora Bora Way</poco:streetAddress>
|
||||
* <poco:locality>Marina del Rey</poco:locality>
|
||||
* <poco:region>CA</poco:region>
|
||||
* <poco:postalCode>90292</poco:postalCode>
|
||||
* <poco:country>US</poco:country>
|
||||
* </poco:address>
|
||||
* </activity:object>
|
||||
* <geo:point>33.9777 -119.4351</geo:point>
|
||||
* <activity:verb>http://activitystrea.ms/schema/1.0/like</activity:verb>
|
||||
*</entry></pre></div><p>
|
||||
*<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Figure 1: Location Example </b></font><br /></td></tr></table><hr class="insert" />
|
||||
*
|
||||
*</p>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public interface HasLocation {
|
||||
|
||||
|
||||
public GeoRSSModule getLocation();
|
||||
|
||||
public void setLocation(GeoRSSModule location);
|
||||
|
||||
public ContactModule getAddress();
|
||||
|
||||
public void setAddress(ContactModule address);
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*<p>Mood describes the mood of the user when the activity was
|
||||
* performed. This is usually collected via an extra field in the user
|
||||
* interface used to perform the activity. For the purpose of this
|
||||
* schema, a mood is a freeform, short mood keyword or phrase along
|
||||
* with an optional mood icon image.
|
||||
*</p>
|
||||
*<p>Moods are included via a mood element in the namespace <tt>http://activitystrea.ms/context/</tt>.
|
||||
*</p>
|
||||
*<p>The content of the mood element is the mood keyword or
|
||||
* phrase.
|
||||
*</p>
|
||||
*<p>The mood element may have an optional <tt>icon</tt>
|
||||
* attribute which contains the URL of a mood icon image. The mood icon
|
||||
* image SHOULD be small and appropriate to be displayed alongside the
|
||||
* mood keyword at a normal text size.
|
||||
*</p>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Mood {
|
||||
private String iconUrl;
|
||||
private String text;
|
||||
|
||||
/**
|
||||
* Set the value of iconUrl
|
||||
*
|
||||
* @param newiconUrl new value of iconUrl
|
||||
*/
|
||||
public void setIconUrl(String newiconUrl) {
|
||||
this.iconUrl = newiconUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of iconUrl
|
||||
*
|
||||
* @return the value of iconUrl
|
||||
*/
|
||||
public String getIconUrl() {
|
||||
return this.iconUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of text
|
||||
*
|
||||
* @param newtext new value of text
|
||||
*/
|
||||
public void setText(String newtext) {
|
||||
this.text = newtext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of text
|
||||
*
|
||||
* @return the value of text
|
||||
*/
|
||||
public String getText() {
|
||||
return this.text;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
/**
|
||||
* <p>The "photo" object type represents a graphical still image.
|
||||
*</p>
|
||||
*<p>The "photo" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/photo</tt>.
|
||||
*</p>
|
||||
*<p>A photo has the following additional components:
|
||||
*</p>
|
||||
*<p></p>
|
||||
*<blockquote class="text"><dl>
|
||||
*<dt>Thumbnail</dt>
|
||||
*<dd>A link to a thumbnail version of the
|
||||
* image. Represented by the Representative Image component of the
|
||||
* base Object Construct. Processors MAY ignore thumbnails that are
|
||||
* of an inappropriate size for their user interface.
|
||||
*</dd>
|
||||
*<dt>Larger Image</dt>
|
||||
*<dd>A Media Link Construct linking to a
|
||||
* larger -- ideally, full-size -- version of the photo intended
|
||||
* for standalone viewing. Represented in JSON as a property named
|
||||
* <tt>fullImage</tt> whose value is a JSON
|
||||
* object with properties as defined in [TODO: xref the JSON
|
||||
* serialization of a Media Link Construct].
|
||||
*</dd>
|
||||
*</dl></blockquote>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Photo extends ActivityObject {
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/photo";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
/**
|
||||
* <p>The "photo album" object type represents a collection of
|
||||
* images.
|
||||
*</p>
|
||||
*<p>The "photo album" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/photo-album</tt>.
|
||||
*</p>
|
||||
*<p>The photo album has the following additional components:
|
||||
*</p>
|
||||
*<p></p>
|
||||
*<blockquote class="text"><dl>
|
||||
*<dt>Preview Image Link</dt>
|
||||
*<dd>A Media Link Construct
|
||||
* describing an image file that can be used as a preview image for
|
||||
* the album. Represented by the Representative Image component of
|
||||
* the base Object Construct. Processors MAY ignore thumbnails that
|
||||
* are of an inappropriate size for their user interface.
|
||||
*</dd>
|
||||
*</dl></blockquote>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class PhotoAlbum extends ActivityObject {
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/photo-album";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
/**
|
||||
* <p>The "place" object type represents a location on Earth.
|
||||
*</p>
|
||||
*<p>The "place" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/place</tt>.
|
||||
*</p>
|
||||
*<p>A place has the following additional components:
|
||||
*</p>
|
||||
*<p></p>
|
||||
*<blockquote class="text"><dl>
|
||||
*<dt>Latitude</dt>
|
||||
*<dd>The latitude of the place as a point on
|
||||
* Earth. Represented in JSON as a property named <tt>latitude</tt> whose value is a JSON number
|
||||
* containing a decimal representation of the latitude in
|
||||
* degrees.
|
||||
*</dd>
|
||||
*<dt>Longitude</dt>
|
||||
*<dd>The longitude of the place as a point on
|
||||
* Earth. Represented in JSON as a property named <tt>longitude</tt> whose value is a JSON number
|
||||
* containing a decimal representation of the longitude in
|
||||
* degrees.
|
||||
*</dd>
|
||||
*</dl></blockquote>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Place extends ActivityObject {
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/place";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
/**
|
||||
*
|
||||
*<p>The "playlist" object type represents an ordered list of
|
||||
* time-based media items, such as video and audio objects.
|
||||
*</p>
|
||||
*<p>The "playlist" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/playlist</tt>.
|
||||
*</p>
|
||||
*<p>A playlist has no additional components.
|
||||
*</p>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Playlist extends ActivityObject {
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/playlist";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
/**
|
||||
* <p>The "product" object type represents a commercial good or
|
||||
* service.
|
||||
*</p>
|
||||
*<p>The "product" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/product</tt>.
|
||||
*</p>
|
||||
*<p>A product has the following additional components:
|
||||
*</p>
|
||||
*<p></p>
|
||||
*<blockquote class="text"><dl>
|
||||
*<dt>Thumbnail</dt>
|
||||
*<dd>A link to a thumbnail-sized image that
|
||||
* contains a photo of the product. Represented by the
|
||||
* Representative Image component of the base Object Construct.
|
||||
* Processors MAY ignore thumbnails that are of an inappropriate
|
||||
* size for their user interface.
|
||||
*</dd>
|
||||
*<dt>Larger Image</dt>
|
||||
*<dd>A Media Link Construct linking to a
|
||||
* larger -- ideally, full-size -- version of the photo of the
|
||||
* product. Represented in JSON as a property named <tt>fullImage</tt> whose value is a JSON object with
|
||||
* properties as defined in [TODO: xref the JSON serialization of a
|
||||
* Media Link Construct].
|
||||
*</dd>
|
||||
*</dl></blockquote>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Product extends ActivityObject {
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/product";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
/**
|
||||
* <p>The "review" object type represents a primarily prose-based
|
||||
* commentary on another object.
|
||||
*</p>
|
||||
*<p>The "review" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/review</tt>.
|
||||
*</p>
|
||||
*<p>A review has the following additional components:
|
||||
*</p>
|
||||
*<p></p>
|
||||
*<blockquote class="text"><dl>
|
||||
*<dt>Title</dt>
|
||||
*<dd>The title of the review. Represented by the
|
||||
* Name component of the base Object Construct. Many systems do not
|
||||
* have the concept of a title for a review; such systems MUST omit
|
||||
* the Name component. Processors SHOULD refer to such reviews as
|
||||
* simply being "a review", with appropriate localization, if they
|
||||
* are to be described in a sentence.
|
||||
*</dd>
|
||||
*<dt>Content</dt>
|
||||
*<dd>The content of the comment. Represented in
|
||||
* JSON as a property called <tt>content</tt>
|
||||
* whose value is a JSON string containing a fragment of HTML that
|
||||
* represents the content. Publishers SHOULD include any markup
|
||||
* necessary to achieve a similar presentation to that on the
|
||||
* publisher's own HTML pages, including any links that the service
|
||||
* automatically adds. Processors MAY remove all HTML markup and
|
||||
* consider the comment to be plain text.
|
||||
*</dd>
|
||||
*<dt>Reviewed Object</dt>
|
||||
*<dd>The Object Construct representing
|
||||
* the item that this review applies to. Represented as the In
|
||||
* Reply To Object component of the base Object Construct.
|
||||
*</dd>
|
||||
*<dt>Rating</dt>
|
||||
*<dd>A rating for the item, given as a number
|
||||
* between 1.0 and 5.0 inclusive with one decimal place of
|
||||
* precision. Represented in JSON as a property called <tt>rating</tt> whose value is a JSON number giving
|
||||
* the rating.
|
||||
*</dd>
|
||||
*</dl></blockquote>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Review extends ActivityObject {
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/review";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
/**
|
||||
* <p>The "service" Object type represents a website, personal website
|
||||
* or blog, business, brand, or other entity that performs some kind of
|
||||
* work for other entities, people, or services, or acts as kind of
|
||||
* container for other objects.
|
||||
*</p>
|
||||
*<p>The "service" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/service</tt>.
|
||||
*</p>
|
||||
*<p>A service has the following additional components:
|
||||
*</p>
|
||||
*<p></p>
|
||||
*<blockquote class="text"><dl>
|
||||
*<dt>icon</dt>
|
||||
*<dd>A Media Link Construct representing a link to
|
||||
* a small image representing the service. Represented in JSON as a
|
||||
* property named <tt>icon</tt> whose value is a
|
||||
* JSON object with properties as defined in [TODO: xref the JSON
|
||||
* serialization of a Media Link Construct]. The linked image MUST
|
||||
* have an aspect ratio of one (horizontal) to one (vertical) and
|
||||
* SHOULD be suitable for presentation at a small size.
|
||||
*</dd>
|
||||
*</dl></blockquote>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Service extends ActivityObject {
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/service";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
|
||||
/**
|
||||
* <p>The "song" Object type represents a song or a recording of a
|
||||
* song.
|
||||
*</p>
|
||||
*<p>Objects of type Song might contain information about the song or
|
||||
* recording, or they might contain some representation of the
|
||||
* recording itself. In the latter case, the song SHOULD also be
|
||||
* annotated with the "audio" object type as described in <a class='info' href='#audio'>Section 3.2.2<span> (</span><span class='info'>Audio</span><span>)</span></a> and use its properties. This type should only
|
||||
* be used when the publisher can guarantee that the object is a song
|
||||
* rather than merely a generic audio stream.
|
||||
*</p>
|
||||
*<p>The Object type URL for the "song" Object type is <tt>http://activitystrea.ms/schema/1.0/song</tt>.
|
||||
*</p>
|
||||
*<p>A song has no additional components.
|
||||
*</p>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Song extends ActivityObject {
|
||||
private Audio audio;
|
||||
|
||||
/**
|
||||
* Set the value of audio
|
||||
*
|
||||
* @param newaudio new value of audio
|
||||
*/
|
||||
public void setAudio(Audio newaudio) {
|
||||
this.audio = newaudio;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of audio
|
||||
*
|
||||
* @return the value of audio
|
||||
*/
|
||||
public Audio getAudio() {
|
||||
return this.audio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/song";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
/**
|
||||
* <p>The "status" Object type represents a human-readable update of
|
||||
* the author's situation, mood, location or other status.
|
||||
*</p>
|
||||
*<p>A status is similar in structure to a note, but carries the
|
||||
* additional meaning that the content is primarily describing
|
||||
* something its author is doing, feeling or experiencing.
|
||||
*</p>
|
||||
*<p>A consumers MAY consider the content of the most recent status
|
||||
* object it encountered to be the user's current status, unless the
|
||||
* most recent status update is old. When a status becomes too old is
|
||||
* not defined by this specification.
|
||||
*</p>
|
||||
*<p>The "status" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/status</tt>.
|
||||
*</p>
|
||||
*<p>A status has the same components as a note.
|
||||
*</p>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Status extends ActivityObject {
|
||||
|
||||
@Override
|
||||
public String getTypeIRI() {
|
||||
return "http://activitystrea.ms/schema/1.0/status";
|
||||
}
|
||||
|
||||
}
|
|
@ -10,15 +10,12 @@
|
|||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* See the icense for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -129,9 +126,61 @@ public enum Verb {
|
|||
*
|
||||
* The "update" Verb is identified by the URI http://activitystrea.ms/schema/1.0/update.
|
||||
*/
|
||||
UPDATE("http://activitystrea.ms/schema/1.0/update");
|
||||
UPDATE("http://activitystrea.ms/schema/1.0/update"),
|
||||
/**
|
||||
*
|
||||
*<p>The "positive RSVP" verb indicates that the actor has made a
|
||||
* positive RSVP for the object. This specification only defines the
|
||||
* meaning of this verb when its object is an event (see <a class='info' href='#event'>Section 4.2.1<span> (</span><span class='info'>Event</span><span>)</span></a>), though implementors SHOULD be prepared to
|
||||
* handle other object types as meaning MAY be provided by extension
|
||||
* specifications.
|
||||
*</p>
|
||||
*<p>The use of this Verb is only appropriate when the RSVP was
|
||||
* created by an explicit action by the actor. It is not appropriate to
|
||||
* use this verb when a user has been added as an attendee by an event
|
||||
* organiser or administrator.
|
||||
*</p>
|
||||
*<p>The verb URI for the "positive RSVP" Verb is <tt>http://activitystrea.ms/schema/1.0/rsvp-yes</tt>.
|
||||
*</p>
|
||||
*/
|
||||
RSVP_YES("http://activitystrea.ms/schema/1.0/rsvp-yes"),
|
||||
/**
|
||||
* <p>The "possible RSVP" verb indicates that the actor has made a
|
||||
* possible RSVP for the object. This specification only defines the
|
||||
* meaning of this verb when its object is an event (see <a class='info' href='#event'>Section 4.2.1<span> (</span><span class='info'>Event</span><span>)</span></a>), though implementors SHOULD be prepared to
|
||||
* handle other object types as meaning MAY be provided by extension
|
||||
* specifications.
|
||||
*</p>
|
||||
*<p>The use of this Verb is only appropriate when the RSVP was
|
||||
* created by an explicit action by the actor. It is not appropriate to
|
||||
* use this verb when a user has been added as an attendee by an event
|
||||
* organiser or administrator.
|
||||
*</p>
|
||||
*<p>The verb URI for the "possible RSVP" Verb is <tt>http://activitystrea.ms/schema/1.0/rsvp-maybe</tt>.
|
||||
*</p>
|
||||
*/
|
||||
RSVP_MAYBE("http://activitystrea.ms/schema/1.0/rsvp-maybe"),
|
||||
/**
|
||||
* <p>The "negative RSVP" verb indicates that the actor has made a
|
||||
* negative RSVP for the object. This specification only defines the
|
||||
* meaning of this verb when its object is an event (see <a class='info' href='#event'>Section 4.2.1<span> (</span><span class='info'>Event</span><span>)</span></a>), though implementors SHOULD be prepared to
|
||||
* handle other object types as meaning MAY be provided by extension
|
||||
* specifications.
|
||||
*</p>
|
||||
*<p>The use of this Verb is only appropriate when the RSVP was
|
||||
* created by an explicit action by the actor. It is not appropriate to
|
||||
* use this verb when a user has been added as an attendee by an event
|
||||
* organiser or administrator.
|
||||
*</p>
|
||||
*<p>The verb URI for the "negative RSVP" Verb is <tt>http://activitystrea.ms/schema/1.0/rsvp-no</tt>.
|
||||
*</p>
|
||||
*/
|
||||
RSVP_NO("http://activitystrea.ms/schema/1.0/rsvp-no");
|
||||
private final String iri;
|
||||
|
||||
/**
|
||||
* @param iri
|
||||
*/
|
||||
Verb(final String iri){
|
||||
this.iri = iri;
|
||||
}
|
||||
|
@ -140,7 +189,11 @@ public enum Verb {
|
|||
public String toString(){
|
||||
return iri;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param iri
|
||||
* @return
|
||||
*/
|
||||
public static Verb fromIRI(String iri){
|
||||
for(Verb v: Verb.values()){
|
||||
if(v.toString().equals(iri)){
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.activitystreams.types;
|
||||
|
||||
/**
|
||||
* <p>The "video" Object type represents video content, which usually
|
||||
* consists of a motion picture track and an audio track.
|
||||
*</p>
|
||||
*<p>The "video" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/video</tt>.
|
||||
*</p>
|
||||
*<p>A video has the following additional components:
|
||||
*</p>
|
||||
*<p></p>
|
||||
*<blockquote class="text"><dl>
|
||||
*<dt>Video Stream Link</dt>
|
||||
*<dd>A Media Link Construct linking
|
||||
* to the video content itself. Represented in JSON as a property
|
||||
* called <tt>stream</tt> whose value is a JSON
|
||||
* object with properties as defined in [TODO: xref the JSON
|
||||
* serialization of a Media Link Construct]
|
||||
*</dd>
|
||||
*<dt>Embed Code</dt>
|
||||
*<dd>An HTML fragment that, when embedded in
|
||||
* an HTML page, will provide an interactive player UI for the
|
||||
* video stream. Represented in JSON as a property called <tt>embedCode</tt> whose value is a JSON string
|
||||
* containing the fragment of HTML.
|
||||
*</dd>
|
||||
*</dl></blockquote>
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Video {
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.atomthread;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public interface ThreadModule {
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
http://www.ietf.org/rfc/rfc4685.txt
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
package org.rometools.feed.module.base;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -43,11 +44,12 @@ public class CustomTagsImpl implements CustomTags {
|
|||
this.values = values;
|
||||
}
|
||||
|
||||
public void copyFrom(Object object) {
|
||||
public void copyFrom(CopyFrom object) {
|
||||
CustomTags ct = (CustomTags) object;
|
||||
this.values = new ArrayList( ct.getValues() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() {
|
||||
CustomTagsImpl cti = new CustomTagsImpl();
|
||||
cti.values = new ArrayList( this.values );
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
*/
|
||||
package org.rometools.feed.module.base;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.impl.EqualsBean;
|
||||
|
||||
import org.rometools.feed.module.base.types.CloneableType;
|
||||
|
@ -1102,6 +1103,7 @@ public class GoogleBaseImpl implements GoogleBase {
|
|||
}
|
||||
|
||||
//TODO: Finish
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
try {
|
||||
GoogleBaseImpl gbi = new GoogleBaseImpl();
|
||||
|
@ -1114,7 +1116,7 @@ public class GoogleBaseImpl implements GoogleBase {
|
|||
}
|
||||
}
|
||||
|
||||
public void copyFrom(Object obj) {
|
||||
public void copyFrom(CopyFrom obj) {
|
||||
if(!(obj instanceof GoogleBase)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
package org.rometools.feed.module.cc;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.impl.EqualsBean;
|
||||
import com.sun.syndication.feed.impl.ToStringBean;
|
||||
import org.rometools.feed.module.cc.types.License;
|
||||
|
@ -95,7 +96,7 @@ public class CreativeCommonsImpl implements CreativeCommons {
|
|||
return clone;
|
||||
}
|
||||
|
||||
public void copyFrom(Object object) {
|
||||
public void copyFrom(CopyFrom object) {
|
||||
CreativeCommons source = (CreativeCommons) object;
|
||||
this.setAllLicenses( (License[]) arrayCopy( source.getAllLicenses() ));
|
||||
this.setLicenses( source.getLicenses() );
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
*/
|
||||
package org.rometools.feed.module.itunes;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -75,7 +77,7 @@ public abstract class AbstractITunesObject implements ITunes, java.lang.Cloneabl
|
|||
* Defined by the ROME module API
|
||||
* @param obj Object to copy from
|
||||
*/
|
||||
public abstract void copyFrom(Object obj);
|
||||
public abstract void copyFrom(CopyFrom obj);
|
||||
|
||||
/**
|
||||
* Defined by the ROME API
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
*/
|
||||
package org.rometools.feed.module.itunes;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import org.rometools.feed.module.itunes.types.Duration;
|
||||
|
||||
|
||||
|
@ -77,7 +78,7 @@ public class EntryInformationImpl extends AbstractITunesObject implements EntryI
|
|||
* Defined by the ROME module API
|
||||
* @param obj Object to copy from
|
||||
*/
|
||||
public void copyFrom(Object obj) {
|
||||
public void copyFrom(CopyFrom obj) {
|
||||
EntryInformationImpl info = (EntryInformationImpl) obj;
|
||||
this.setAuthor(info.getAuthor());
|
||||
this.setBlock(info.getBlock());
|
||||
|
|
|
@ -40,10 +40,10 @@
|
|||
*
|
||||
*/
|
||||
package org.rometools.feed.module.itunes;
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
@ -137,7 +137,7 @@ public class FeedInformationImpl extends AbstractITunesObject implements FeedInf
|
|||
* Required by the ROME API
|
||||
* @param obj object to copy property values from
|
||||
*/
|
||||
public void copyFrom(Object obj) {
|
||||
public void copyFrom(CopyFrom obj) {
|
||||
FeedInformationImpl info = (FeedInformationImpl) obj;
|
||||
this.setAuthor(info.getAuthor());
|
||||
this.setBlock(info.getBlock());
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
package org.rometools.feed.module.mediarss;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sun.syndication.feed.module.ModuleImpl;
|
||||
|
@ -102,7 +103,7 @@ public class MediaModuleImpl extends ModuleImpl implements MediaModule, Serializ
|
|||
return m;
|
||||
}
|
||||
|
||||
public void copyFrom(Object obj) {
|
||||
public void copyFrom(CopyFrom obj) {
|
||||
MediaModule m = (MediaModule) obj;
|
||||
this.metadata = (Metadata) m.getMetadata().clone();
|
||||
this.player = m.getPlayer();
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
package org.rometools.feed.module.photocast;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.impl.EqualsBean;
|
||||
import com.sun.syndication.feed.impl.ToStringBean;
|
||||
import org.rometools.feed.module.photocast.types.Metadata;
|
||||
|
@ -106,7 +107,7 @@ public class PhotocastModuleImpl implements PhotocastModule {
|
|||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public void copyFrom(Object obj) {
|
||||
public void copyFrom(CopyFrom obj) {
|
||||
PhotocastModule pm = (PhotocastModule) obj;
|
||||
this.setPhotoDate((pm.getPhotoDate() == null) ? null
|
||||
: (Date) pm.getPhotoDate()
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.portablecontacts;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public interface ContactModule {
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright 2011 robert.cooper.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.rometools.feed.module.portablecontacts.types;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robert.cooper
|
||||
*/
|
||||
public class Address {
|
||||
|
||||
}
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
package org.rometools.feed.module.sle;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.module.ModuleImpl;
|
||||
import org.rometools.feed.module.sle.types.Group;
|
||||
import org.rometools.feed.module.sle.types.Sort;
|
||||
|
@ -94,7 +95,7 @@ public class SimpleListExtensionImpl extends ModuleImpl implements SimpleListExt
|
|||
*
|
||||
* @param obj the instance to copy properties from.
|
||||
*/
|
||||
public void copyFrom(Object obj) {
|
||||
public void copyFrom(CopyFrom obj) {
|
||||
SimpleListExtension sle = (SimpleListExtension) obj;
|
||||
this.setGroupFields((Group[]) sle.getGroupFields().clone());
|
||||
this.setSortFields((Sort[]) sle.getSortFields().clone());
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
*/
|
||||
package org.rometools.feed.module.sle;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.impl.ObjectBean;
|
||||
import org.rometools.feed.module.sle.io.*;
|
||||
import org.rometools.feed.module.sle.io.LabelNamespaceElement;
|
||||
import org.rometools.feed.module.sle.types.EntryValue;
|
||||
import org.rometools.feed.module.sle.types.Group;
|
||||
import org.rometools.feed.module.sle.types.Sort;
|
||||
import org.jdom.Namespace;
|
||||
|
||||
/**This is a <b>parse only</b> module that holds the values of enternal fields declared in the SLE module.
|
||||
* These will <b>not</b> be persisted on an output() call, <b>nor</b> will changing a value here change a
|
||||
|
@ -123,7 +123,7 @@ public class SleEntryImpl implements SleEntry {
|
|||
*
|
||||
* @param obj the instance to copy properties from.
|
||||
*/
|
||||
public void copyFrom(Object obj) {
|
||||
public void copyFrom(CopyFrom obj) {
|
||||
SleEntry entry = (SleEntry) obj;
|
||||
this.setGroupValues((EntryValue[]) entry.getGroupValues().clone());
|
||||
this.setSortValues((EntryValue[]) entry.getSortValues().clone());
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
<title>KCRW.com</title>
|
||||
<url>http://www.kcrw.com/images/kcrw_logo_small.gif</url>
|
||||
<link>http://www.kcrw.com/</link>
|
||||
<width>-1</width>
|
||||
<height>-1</height>
|
||||
</image>
|
||||
<item>
|
||||
<title>China's Big Visit; Big Changes at the White House; Golly Gee, Gas Prices!</title>
|
||||
|
|
Loading…
Reference in a new issue