Early work on new modules.

This commit is contained in:
kebernet 2011-04-02 01:31:26 +00:00
parent 6988e05ac7
commit 2b22b5f9ef
12 changed files with 64 additions and 15 deletions

View file

@ -17,10 +17,19 @@
package org.rometools.feed.module.activitystreams; package org.rometools.feed.module.activitystreams;
import org.rometools.feed.module.activitystreams.types.ActivityObject;
import org.rometools.feed.module.activitystreams.types.Verb;
/** /**
* *
* @author robert.cooper * @author robert.cooper
*/ */
public interface ActivityStreamModule { public interface ActivityStreamModule {
public Verb getVerb();
public void setVerb(Verb verb);
public ActivityObject getObject();
public void setObject(ActivityObject object);
} }

View file

@ -1,12 +1,12 @@
/* /*
* Copyright 2011 robert.cooper. * Copyright 2011 robert.cooper.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -14,13 +14,53 @@
* limitations under the License. * limitations under the License.
* under the License. * under the License.
*/ */
package org.rometools.feed.module.activitystreams; package org.rometools.feed.module.activitystreams;
import org.rometools.feed.module.activitystreams.types.ActivityObject;
import org.rometools.feed.module.activitystreams.types.Verb;
/** /**
* *
* @author robert.cooper * @author robert.cooper
*/ */
public class ActivityStreamModuleImpl { public class ActivityStreamModuleImpl implements ActivityStreamModule {
private ActivityObject object;
private Verb verb;
/**
* Set the value of object
*
* @param newobject new value of object
*/
public void setObject(ActivityObject newobject) {
this.object = newobject;
}
/**
* Get the value of object
*
* @return the value of object
*/
public ActivityObject getObject() {
return this.object;
}
/**
* Set the value of verb
*
* @param newverb new value of verb
*/
public void setVerb(Verb newverb) {
this.verb = newverb;
}
/**
* Get the value of verb
*
* @return the value of verb
*/
public Verb getVerb() {
return this.verb;
}
} }

View file

@ -23,7 +23,7 @@ import com.sun.syndication.feed.atom.Entry;
* *
* @author robert.cooper * @author robert.cooper
*/ */
public abstract class AbstractObject extends Entry { public abstract class ActivityObject extends Entry {
public abstract String getTypeIRI(); public abstract String getTypeIRI();

View file

@ -45,7 +45,7 @@ package org.rometools.feed.module.activitystreams.types;
*</dl></blockquote> *</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Article extends AbstractObject { public class Article extends ActivityObject {
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {
return "http://activitystrea.ms/schema/1.0/article"; return "http://activitystrea.ms/schema/1.0/article";

View file

@ -42,7 +42,7 @@ package org.rometools.feed.module.activitystreams.types;
*</dl> *</dl>
* @author robert.cooper * @author robert.cooper
*/ */
public class Audio extends AbstractObject { public class Audio extends ActivityObject {
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {

View file

@ -77,7 +77,7 @@ import com.sun.syndication.feed.atom.Link;
*</dl></blockquote> *</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Bookmark extends AbstractObject { public class Bookmark extends ActivityObject {
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {

View file

@ -51,7 +51,7 @@ package org.rometools.feed.module.activitystreams.types;
*</dl></blockquote> *</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Comment extends AbstractObject { public class Comment extends ActivityObject {
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {

View file

@ -47,7 +47,7 @@ package org.rometools.feed.module.activitystreams.types;
*</dl></blockquote> *</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class File extends AbstractObject { public class File extends ActivityObject {
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {

View file

@ -38,7 +38,7 @@ package org.rometools.feed.module.activitystreams.types;
*</dl></blockquote> *</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Folder extends AbstractObject{ public class Folder extends ActivityObject{
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {

View file

@ -28,7 +28,7 @@ package org.rometools.feed.module.activitystreams.types;
* @author robert.cooper * @author robert.cooper
*/ */
public class List extends AbstractObject public class List extends ActivityObject
{ {
@Override @Override

View file

@ -49,7 +49,7 @@ package org.rometools.feed.module.activitystreams.types;
*</dl></blockquote> *</dl></blockquote>
* @author robert.cooper * @author robert.cooper
*/ */
public class Note extends AbstractObject { public class Note extends ActivityObject {
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {

View file

@ -45,7 +45,7 @@ import com.sun.syndication.feed.atom.Link;
*</dl></blockquote> *</dl></blockquote>
@author robert.cooper @author robert.cooper
*/ */
public class Person extends AbstractObject { public class Person extends ActivityObject {
@Override @Override
public String getTypeIRI() { public String getTypeIRI() {