function CeltxDocument () {
}


CeltxDocument.prototype = {
  QueryInterface: function (aIID) {
    if (aIID.equals(Components.interfaces.nsISupports) ||
        aIID.equals(Components.interfaces.celtxIDocument))
      return this;
    throw Components.results.NS_ERROR_NO_INTERFACE;
  },


  _project: null,
  _resource: null,


  init: function (aProject, aResource) {
    this._project = aProject;
    this._resource = aResource;
  },


  get project () {
    return this._project;
  },


  get resource () {
    return this._resource;
  },


  get title () {
    var ds = this.project.ds;
    var titlearc = getRDFService().GetResource(Cx.NS_DC + "title");
    return getRDFString(ds, this.resource, titlearc);
  },
  set title (val) {
    var ds = this.project.ds;
    var titlearc = getRDFService().GetResource(Cx.NS_DC + "title");
    setRDFString(ds, this.resource, titlearc, val);
    return val;
  }
};
