 	init(_ resource: Resource) {
 		self.resource = resource
 		self.isLoaded = true
+	}
+	
+	// MARK: NSCoding
+	
+	public required init(coder: NSCoder) {
+		self.isLoaded = coder.decodeBoolForKey("isLoaded")
+		self.resource = coder.decodeObjectForKey("resource") as? Resource
+
+		if let type = coder.decodeObjectForKey("linkType") as? String {
+			self.link = (href: coder.decodeObjectForKey("linkHref") as? NSURL, type: type, id: coder.decodeObjectForKey("linkID") as? String)
+		}
+	}
+	
+	public func encodeWithCoder(coder: NSCoder) {
+		coder.encodeBool(self.isLoaded, forKey: "isLoaded")
+		coder.encodeObject(self.resource, forKey: "resource")
+		
+		if let link = self.link {
+			coder.encodeObject(link.href, forKey: "linkHref")
+			coder.encodeObject(link.type, forKey: "linkType")
+			coder.encodeObject(link.id, forKey: "linkID")
+		}
 	}
 	
 	// MARK: Printable

	public init(id: String) {
		super.init()
		self.id = id
	}
	
	


//MARK: -

public class ResourceCollection: NSObject, NSCoding, ArrayLiteralConvertible, SequenceType, Printable, Paginatable {
	/// Whether the resources for this collection are loaded
	public var isLoaded: Bool
	
