KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > jcr > impl > core > nodetype > nt > MimeResource


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5
6 package org.exoplatform.services.jcr.impl.core.nodetype.nt;
7
8
9 import javax.jcr.nodetype.NodeType;
10 import javax.jcr.nodetype.NodeDef;
11
12
13 import javax.jcr.version.OnParentVersionAction;
14 import org.exoplatform.services.jcr.impl.core.nodetype.NodeTypeImpl;
15 import org.exoplatform.services.jcr.impl.core.nodetype.mix.Referenceable;
16 import javax.jcr.nodetype.PropertyDef;
17 import org.exoplatform.services.jcr.impl.core.nodetype.PropertyDefImpl;
18 import javax.jcr.PropertyType;
19
20 /**
21  * Created by The eXo Platform SARL .
22  *
23  * @author <a HREF="mailto:geaz@users.sourceforge.net">Gennady Azarenkov</a>
24  * @version $Id: File.java,v 1.2 2004/07/08 23:36:48 benjmestrallet Exp $
25  */

26
27 public class MimeResource extends NodeTypeImpl {
28 //(String name, String declaringNodeType, int requiredType,
29
// String valueConstraint, Value defaultValue, boolean autoCreate, boolean mandatory,
30
// int onVersion, boolean readOnly, boolean primaryItem, boolean multiple)
31

32   public MimeResource() {
33
34     this.name = "nt:mimeResource";
35     this.mixin = false;
36     this.declaredSupertypes = new NodeType[2];
37     this.declaredSupertypes[0] = new Base();
38     this.declaredSupertypes[1] = new Referenceable();
39     this.declaredPropertyDefs = new PropertyDef[4];
40
41     this.declaredPropertyDefs[0] = new PropertyDefImpl("jcr:encoding", null, PropertyType.STRING,
42         null, null, false, false,
43         OnParentVersionAction.COPY, false, false, false);
44     this.declaredPropertyDefs[1] = new PropertyDefImpl("jcr:mimetype", null, PropertyType.STRING,
45         null, null, true, true,
46         OnParentVersionAction.COPY, false, false, false);
47     this.declaredPropertyDefs[2] = new PropertyDefImpl("jcr:data", null, PropertyType.BINARY,
48         null, null, true, true,
49         OnParentVersionAction.COPY, false, true, false);
50     this.declaredPropertyDefs[3] = new PropertyDefImpl("jcr:lastModified", null, PropertyType.DATE,
51         null, null, false, true,
52         OnParentVersionAction.IGNORE, false, false, false);
53
54   }
55
56 }
57
Popular Tags