<jcr='http://www.jcp.org/jcr/1.0'>
<mix='http://www.jcp.org/jcr/mix/1.0'>
<nt='http://www.jcp.org/jcr/nt/1.0'>
<slv='http://www.silverpeas.com/jcr/1.0'>


/* Mixin ownable */
[slv:ownable]
  mixin
  - slv:owner (STRING)

/* Mixin commentable */
[slv:commentable]
  mixin
  - slv:comment (STRING)

[slv:simpleDocument] >  nt:folder, mix:referenceable, slv:ownable, slv:commentable
  - slv:foreignKey (STRING) 
  - slv:instanceId (STRING) MANDATORY
  - slv:versioned (BOOLEAN)  = 'false'
  - slv:public (BOOLEAN) = 'true'
  - slv:oldSilverpeasId (LONG)  = '-1'
  - slv:order (LONG) = '0' IGNORE
  - slv:expiryDate (DATE)
  - slv:alertDate (DATE)
  - slv:reservationDate (DATE)
  - slv:status (STRING)
  - slv:clone (STRING) IGNORE
  - slv:major (LONG) = '0'
  - slv:minor (LONG) = '0'
  + slv:simpleAttachment PRIMARY

[slv:simpleAttachment] >  nt:folder, mix:language, mix:created, mix:lastModified, mix:title
  - slv:name (STRING) MANDATORY
  - slv:creationDate (DATE) MANDATORY
  - slv:creator (STRING) MANDATORY
  - slv:xmlFormId (STRING)
  - slv:size (LONG) = '0' MANDATORY
  - jcr:mimeType (STRING) MANDATORY

/* XML Forms data */
[slv:xmlFormData] >  nt:unstructured

/*  XML Forms */
[slv:xmlForm] >  nt:folder, mix:referenceable
  - slv:lang (STRING) = 'fr' mandatory
  - slv:foreignKey (STRING)  mandatory /* sb_formtemplate_template.templateid */
  + slv:data (slv:xmlFormData)

/*  Document versions */
[slv:documentAttachment] > nt:folder, mix:referenceable, mix:versionable
  - slv:author (LONG)
  - slv:lang (STRING) = 'fr' mandatory
  - slv:creationDate (DATE) mandatory
  - slv:name (STRING) /* logical name */
  - slv:description (STRING) /* comments */
  - slv:type (LONG)
  - slv:status (LONG)
  - slv:major (LONG) = '0'
  - slv:minor (LONG) = '0'
  - slv:workingCopy (BOOLEAN) = 'true'
  + jcr:content primary  

/*  Document are the versionning document used in kmelia */
[slv:document] > nt:folder, mix:referenceable
  - slv:name (STRING)
  - slv:description (STRING)
  - slv:info (STRING)
  - slv:status (STRING)
  - slv:owner (LONG)
  - slv:foreignKey (STRING)
  - slv:expiryDate (DATE)
  - slv:alertDate (DATE)
  - slv:reservationDate (DATE) /* A valider*/
  - slv:workListType (LONG)
  - slv:workListOrder (LONG)
  + slv:documentAttachment primary

/*  Attachment translations */
[slv:i18nAttachment] > nt:folder, mix:referenceable
  - slv:author (STRING)
  - slv:lang (STRING) = 'fr' mandatory
  - slv:creationDate (DATE) mandatory
  - slv:name (STRING) /* logical name */
  - slv:title (STRING) /* title */
  - slv:description (STRING) /* info */
  - slv:size (LONG)
  + jcr:content primary
  
/*  Attachment are the attachment used in kmelia */
[slv:attachment] > nt:folder, mix:referenceable, mix:versionable
  - slv:order (LONG) = '0'
  - slv:type (STRING) /* Description used to get the group of the attachment */
  - slv:worker (STRING)
  - slv:foreignKey (STRING)
  - slv:lang (STRING) = 'fr' mandatory
  - slv:context (STRING)
  - slv:expiryDate (DATE)
  - slv:alertDate (DATE)
  - slv:reservationDate (DATE)
  - slv:clone (STRING) /* A voir */
  - slv:translations (REFERENCE) multiple < slv:i18nAttachment

[slv:i18nPublication] > nt:folder, mix:referenceable
  - slv:name (STRING) mandatory
  - slv:description (STRING)
  - slv:lang (STRING) = 'fr' mandatory
  - slv:keywords (STRING)

/*  Publication are the publication used in kmelia */
[slv:publication] > nt:folder, mix:referenceable
  - slv:creationDate (DATE) mandatory
  - slv:author (STRING)
  - slv:creator (STRING) mandatory
  - slv:importance (LONG) = '0' mandatory
  - slv:content (STRING)
  - slv:status (STRING)
  - slv:lang (STRING) = 'fr' mandatory  
  - slv:version (STRING)
  - slv:startDate (DATE) mandatory
  - slv:endDate (DATE) mandatory
  - slv:icon (STRING)
  - jcr:mimeType (STRING)
  - slv:updateDate (DATE)
  - slv:updatedBy (STRING)
  - slv:validatedBy (STRING)
  - slv:validationDate (DATE)
  - slv:validators (STRING)
  - slv:deleted (BOOLEAN) = 'false'
  - slv:template (STRING) /* infoId */
  - slv:clone (REFERENCE) < slv:publication 
  - slv:translations (REFERENCE) multiple < slv:i18nPublication

/* Links between a Node and its publications */
[slv:link] > nt:folder, mix:referenceable
  - slv:creationDate (DATE)
  - slv:author (LONG) 
  - slv:type (STRING) mandatory
  - slv:publication (REFERENCE) < slv:publication

[slv:i18nTheme] > nt:folder, mix:referenceable
  - slv:name (STRING) mandatory
  - slv:description (STRING)
  - slv:lang (STRING) = 'fr' mandatory  

/*  Nodes are the themes used in kmelia */
[slv:theme] > nt:folder, mix:referenceable
  - slv:creationDate (DATE) mandatory
  - slv:author (LONG) mandatory
  - slv:order (LONG) = '0'
  - slv:modelid (STRING)
  - slv:rightsdependson (STRING) = '-1' mandatory
  - slv:type (STRING)
  - slv:status (STRING)
  - slv:translations (REFERENCE) multiple < slv:i18nTheme
  - slv:links (REFERENCE) multiple < slv:link
  + * (nt:folder)

/*  Kmelia instance node */
[slv:kmelia] > nt:folder, mix:referenceable
  + * (nt:folder)
  
  /*  Blog instance node */
[slv:blog] > nt:folder, mix:referenceable
  + * (nt:folder)
  
/* Quick Info instance node */
[slv:quickInfo] > nt:folder, mix:referenceable
  + * (nt:folder)

/* News Edito instance node */
[slv:newsEdito] > nt:folder, mix:referenceable
  + * (nt:folder)
  
/* Forum instance node */
[slv:forum] > nt:folder, mix:referenceable
  + * (nt:folder)
  
/* Gallery instance node */
[slv:gallery] > nt:folder, mix:referenceable
  + * (nt:folder)
  
/* Question/Reply instance node */
[slv:questionReply] > nt:folder, mix:referenceable
  + * (nt:folder)
  
/* WebSites instance node */
[slv:webSites] > nt:folder, mix:referenceable
  + * (nt:folder)