org.sapia.archie.strategy
Class FindRootStrategy

java.lang.Object
  extended by org.sapia.archie.strategy.FindRootStrategy
All Implemented Interfaces:
LookupStrategy

public class FindRootStrategy
extends java.lang.Object
implements LookupStrategy

A lookup strategy that is meant to return the root Node of a given node hierarchy.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Constructor Summary
FindRootStrategy()
           
 
Method Summary
 java.lang.Object lookup(Name n, Node from)
          Returns the root Node of the hierarchy of which the given "from" Node is part.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindRootStrategy

public FindRootStrategy()
Method Detail

lookup

public java.lang.Object lookup(Name n,
                               Node from)
                        throws NotFoundException,
                               ProcessingException
Returns the root Node of the hierarchy of which the given "from" Node is part.

Specified by:
lookup in interface LookupStrategy
Parameters:
n - the Name of the value to lookup.
from - the Node from which the search starts.
Returns:
the Object that corresponds to the given name.
Throws:
NotFoundException - if no object is found for the given name.
ProcessingException - if a problem occurs while performing the lookup.
See Also:
LookupStrategy.lookup(Name, Node)


Copyright © 2010 Sapia OSS. All Rights Reserved.