|
Project JXTA | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.codat.Codat
Codats are container objects that can hold both data or code and are associated with a JXTA ID. The Codat class is offered as a standard way for applications and services to exchange any kind of contents via a common API and associate a unique JXTA id to these contents.
Codats are containers objects that are used to hold any kinds of objects or data. A codat can represent a file, a class file, the saved state of an application, a loadable C library. Codats are handled transparently by the JXTA platform, and are used as placeholders for any types of data. Codats hold Document that represent the data that they hold.
Codats are published in peer groups. A Codat can belong to only one peer group. Multiple copies of a codat can be made to be published in multiple peer groups.
Codats are uniquely identified via a unique CodatID. This Id is guaranteed to be unique within the JXTA world.
The core manipulates two main types of codats:
The JXTA platform defines Codat as the unit of information shared and exchanged within a JXTA group. All instances of Codats reside within a peer group. The PeerGroup content caching service provides storage and retrieval methods for codats using codatId as index.
CodatID
,
Document
,
StructuredDocument
,
StructuredTextDocument
Field Summary | |
protected Document |
doc
A JXTA Document which contains the data held by this Codat. |
protected ID |
id
Id of this Codat. |
protected ID |
metaId
Codat Id of a Codat to which this Codat is related. |
Constructor Summary | |
Codat(CodatID id,
CodatID about,
Document document)
Makes a new Codat instance from an existing Codat, with a given CodatID and a document. |
|
Codat(PeerGroupID groupID,
ID about,
Document document)
Makes a new Codat with a new CodatId given a PeerGroupID and a document. |
Method Summary | |
ID |
getCodatID()
Returns the CodatId associated with this Codat. |
Document |
getDocument()
Returns the Document associated with this Codat. |
ID |
getMetaID()
Returns Codat id of related codat associated with this metadata Codat. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ID id
CodatID
protected ID metaId
protected Document doc
Constructor Detail |
public Codat(PeerGroupID groupID, ID about, Document document) throws IOException
groupID
- PeerGroupID the group to which this
codat will belong.about
- CodatId for which this Codat is metadatadocument
- Document held by this codat.
IOException
- if there is an error accessing the document.public Codat(CodatID id, CodatID about, Document document)
id
- CodatId of the new codatabout
- CodatID for which this Codat is metadatadocument
- Document hold by this codatMethod Detail |
public ID getCodatID()
public ID getMetaID()
public Document getDocument()
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |