JXTA

net.jxta.codat
Class Codat

java.lang.Object
  extended by net.jxta.codat.Codat
Direct Known Subclasses:
Metadata

public class Codat
extends Object

The common container for managing content within JXTA. A Codat consists of:

See Also:
CodatID, Document

Constructor Summary
Codat(CodatID id, CodatID about, Document document)
          Constructs a Codat instance for an existing Codat given it's CodatID and a document.
Codat(PeerGroupID groupID, CodatID about, Document document)
          Constructs a Codat instance with a new CodatId given a PeerGroupID and a Document.
 
Method Summary
 ID getCodatID()
          Returns the CodatID of this Codat.
 Document getDocument()
          Returns a Document containing the data of this Codat.
 ID getMetaID()
          Returns the CodatID of an associated Codat for which this Codat is metadata or null if there is no associated Codat.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Codat

public Codat(PeerGroupID groupID,
             CodatID about,
             Document document)
      throws IOException
Constructs a Codat instance with a new CodatId given a PeerGroupID and a Document.

Parameters:
groupID - The peer group to which this Codat will belong.
about - The CodatID of an associated Codat for which this Codat is metadata or null if there is no associated Codat.
document - Document which contains the content data for this Codat.
Throws:
IOException - if there is an error accessing the document.

Codat

public Codat(CodatID id,
             CodatID about,
             Document document)
Constructs a Codat instance for an existing Codat given it's CodatID and a document.

This implementation does not verify that the CodatID matches the provided Document.

Parameters:
id - CodatId of the new Codat.
about - CodatID of an associated Codat for which this Codat is metadata.
document - Document which contains the content data for this Codat.
Method Detail

getCodatID

public ID getCodatID()
Returns the CodatID of this Codat.

Returns:
The CodatID of this Codat.

getMetaID

public ID getMetaID()
Returns the CodatID of an associated Codat for which this Codat is metadata or null if there is no associated Codat.

Returns:
CodatID The CodatID of an associated Codat for which this Codat is metadata or null if there is no associated Codat.

getDocument

public Document getDocument()
Returns a Document containing the data of this Codat.

Returns:
A Document containing the data of this Codat.

JXSE