1 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 26 27 public class MimeResource extends NodeTypeImpl { 28 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 |