org.shredzone.flattr4j.model
Class Resource

java.lang.Object
  extended by org.shredzone.flattr4j.model.Resource
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Activity, Category, Flattr, Language, SearchResult, Thing, User

public class Resource
extends Object
implements Serializable

A generic Flattr resource.

Since:
2.0
Author:
Richard "Shred" Körber
See Also:
Serialized Form

Field Summary
protected  FlattrObject data
           
 
Constructor Summary
Resource(FlattrObject data)
          Creates a new resource.
 
Method Summary
 FlattrObject toFlattrObject()
          Returns the resource as FlattrObject, for further processing.
 String toJSON()
          Returns the resource contents as JSON string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected FlattrObject data
Constructor Detail

Resource

public Resource(FlattrObject data)
Creates a new resource.

Parameters:
data - FlattrObject containing the resource data
Method Detail

toJSON

public String toJSON()
Returns the resource contents as JSON string.


toFlattrObject

public FlattrObject toFlattrObject()
Returns the resource as FlattrObject, for further processing.

Do not use the returned FlattrObject for modifying the resource contents. The behaviour might be unpredictable.



Copyright © 2010-2012. All Rights Reserved.