org.apache.jackrabbit.core.query
Class PropertyTypeRegistry

java.lang.Object
  extended byorg.apache.jackrabbit.core.query.PropertyTypeRegistry
All Implemented Interfaces:
NodeTypeRegistryListener

public class PropertyTypeRegistry
extends Object
implements NodeTypeRegistryListener

The PropertyTypeRegistry keeps track of registered node type definitions and its property types. It provides a fast type lookup for a given property name.


Nested Class Summary
static class PropertyTypeRegistry.TypeMapping
           
 
Constructor Summary
PropertyTypeRegistry(NodeTypeRegistry reg)
          Creates a new PropertyTypeRegistry instance.
 
Method Summary
 PropertyTypeRegistry.TypeMapping[] getPropertyTypes(QName propName)
          Returns an array of type mappings for a given property name propName.
 void nodeTypeRegistered(QName ntName)
          Called when a node type has been registered.
 void nodeTypeReRegistered(QName ntName)
          Called when a node type has been re-registered.
 void nodeTypeUnregistered(QName ntName)
          Called when a node type has been deregistered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyTypeRegistry

public PropertyTypeRegistry(NodeTypeRegistry reg)
Creates a new PropertyTypeRegistry instance. This instance is *not* registered as listener to the NodeTypeRegistry in the constructor!

Parameters:
reg - the NodeTypeRegistry where to read the property type information.
Method Detail

getPropertyTypes

public PropertyTypeRegistry.TypeMapping[] getPropertyTypes(QName propName)
Returns an array of type mappings for a given property name propName. If propName is not defined as a property in any registered node type an empty array is returned.

Parameters:
propName - the name of the property.
Returns:
an array of TypeMapping instances.

nodeTypeRegistered

public void nodeTypeRegistered(QName ntName)
Description copied from interface: NodeTypeRegistryListener
Called when a node type has been registered.

Specified by:
nodeTypeRegistered in interface NodeTypeRegistryListener
Parameters:
ntName - name of the node type that has been registered

nodeTypeReRegistered

public void nodeTypeReRegistered(QName ntName)
Description copied from interface: NodeTypeRegistryListener
Called when a node type has been re-registered.

Specified by:
nodeTypeReRegistered in interface NodeTypeRegistryListener
Parameters:
ntName - name of the node type that has been registered

nodeTypeUnregistered

public void nodeTypeUnregistered(QName ntName)
Description copied from interface: NodeTypeRegistryListener
Called when a node type has been deregistered.

Specified by:
nodeTypeUnregistered in interface NodeTypeRegistryListener
Parameters:
ntName - name of the node type that has been unregistered


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