1 29 30 package com.caucho.jcr.base; 31 32 import javax.jcr.nodetype.NodeDefinition; 33 import javax.jcr.nodetype.NodeType; 34 35 38 public class BaseNodeDefinition 39 extends BaseItemDefinition 40 implements NodeDefinition { 41 42 private NodeType []_requiredPrimaryTypes = new NodeType[0]; 43 44 private NodeType _defaultPrimaryType; 45 46 private boolean _allowsSameNameSiblings; 47 48 public BaseNodeDefinition(String name, NodeType type) 49 { 50 super(name, type); 51 } 52 53 56 public NodeType[] getRequiredPrimaryTypes() 57 { 58 return _requiredPrimaryTypes; 59 } 60 61 64 public void setRequiredPrimaryTypes(NodeType []types) 65 { 66 _requiredPrimaryTypes = types; 67 } 68 69 72 public NodeType getDefaultPrimaryType() 73 { 74 return _defaultPrimaryType; 75 } 76 77 80 public void setDefaultPrimaryType(NodeType type) 81 { 82 _defaultPrimaryType = type; 83 } 84 85 88 public boolean allowsSameNameSiblings() 89 { 90 return _allowsSameNameSiblings; 91 } 92 93 96 public void setAllowsSameNameSiblings(boolean isAllowed) 97 { 98 _allowsSameNameSiblings = isAllowed; 99 } 100 } 101 | Popular Tags |