org.apache.jackrabbit.core.nodetype
Interface ItemDef

All Known Subinterfaces:
NodeDef, PropDef
All Known Implementing Classes:
ItemDefImpl, NodeDefImpl, PropDefImpl

public interface ItemDef

ItemDef is the internal representation of an item definition. It refers to QNames only and is thus isolated from session-specific namespace mappings.

See Also:
ItemDefinition

Field Summary
static QName ANY_NAME
          The special wildcard name used as the name of residual item definitions.
static ItemDef[] EMPTY_ARRAY
           
 
Method Summary
 boolean definesNode()
          Determines whether this item definition defines a node.
 boolean definesResidual()
          Determines whether this item definition defines a residual set of child items.
 QName getDeclaringNodeType()
          Gets the name of the declaring node type.
 QName getName()
          Gets the name of the child item.
 int getOnParentVersion()
          Gets the 'onParentVersion' attribute of the item.
 boolean isAutoCreated()
          Determines whether the item is 'autoCreated'.
 boolean isMandatory()
          Determines whether the item is 'mandatory'.
 boolean isProtected()
          Determines whether the item is 'protected'.
 

Field Detail

EMPTY_ARRAY

public static final ItemDef[] EMPTY_ARRAY

ANY_NAME

public static final QName ANY_NAME
The special wildcard name used as the name of residual item definitions.

Method Detail

getName

public QName getName()
Gets the name of the child item.

Returns:
the name of the child item.

getDeclaringNodeType

public QName getDeclaringNodeType()
Gets the name of the declaring node type.

Returns:
the name of the declaring node type.

isAutoCreated

public boolean isAutoCreated()
Determines whether the item is 'autoCreated'.

Returns:
the 'autoCreated' flag.

getOnParentVersion

public int getOnParentVersion()
Gets the 'onParentVersion' attribute of the item.

Returns:
the 'onParentVersion' attribute.

isProtected

public boolean isProtected()
Determines whether the item is 'protected'.

Returns:
the 'protected' flag.

isMandatory

public boolean isMandatory()
Determines whether the item is 'mandatory'.

Returns:
the 'mandatory' flag.

definesResidual

public boolean definesResidual()
Determines whether this item definition defines a residual set of child items. This is equivalent to calling getName().equals(ANY_NAME).

Returns:
true if this definition defines a residual set; false otherwise.

definesNode

public boolean definesNode()
Determines whether this item definition defines a node.

Returns:
true if this is a node definition; false otherwise (i.e. it is a property definition).


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.