org.openxri.store
Interface StoreLookup

All Known Subinterfaces:
Store, StoreBetterLookup, StoreResettable
All Known Implementing Classes:
AbstractStore, DatabaseStore, NullStore

public interface StoreLookup

Author:
=chetan, =peacekeeper

Method Summary
 SubSegment findRootSubSegment(java.lang.String namespace)
          Finds a root subsegment with a given name.
 SubSegment findSubSegment(Authority authority, java.lang.String name)
          Finds a subsegment with a given authority and name.
 Authority getSubSegmentAuthority(SubSegment subSegment)
          Returns the authority of this subsegment.
 Authority getSubSegmentParentAuthority(SubSegment subSegment)
          Returns the authority of this subsegment.
 Authority localLookup(XRIAuthority authorityPath)
          This method iterates through all subsegments of the given authority path and returns its final authority.
 

Method Detail

findRootSubSegment

SubSegment findRootSubSegment(java.lang.String namespace)
                              throws StoreException
Finds a root subsegment with a given name.

Parameters:
namespace - The namespace (root subsegment) to look for.
Returns:
The found root subsegment, or null if it could not be found.
Throws:
StoreException

findSubSegment

SubSegment findSubSegment(Authority authority,
                          java.lang.String name)
                          throws StoreException
Finds a subsegment with a given authority and name.

Parameters:
authority - The authority to look for.
name - The subsegment name to look for.
Returns:
The found subsegment, or null if it could not be found.
Throws:
StoreException

getSubSegmentParentAuthority

Authority getSubSegmentParentAuthority(SubSegment subSegment)
                                       throws StoreException
Returns the authority of this subsegment.

Parameters:
subSegment - subsegment
Returns:
The authority for this subsegment; null if this store has no authority for the subsegment
Throws:
StoreException

getSubSegmentAuthority

Authority getSubSegmentAuthority(SubSegment subSegment)
                                 throws StoreException
Returns the authority of this subsegment.

Parameters:
subSegment - subsegment
Returns:
The authority for this subsegment; null if this store has no authority for the subsegment
Throws:
StoreException

localLookup

Authority localLookup(XRIAuthority authorityPath)
                      throws StoreException
This method iterates through all subsegments of the given authority path and returns its final authority. This only works if all subsegments are part of this store and if the whole authority path is in one of its root namespaces.

Parameters:
authorityPath - The XRI authority path to resolve
Returns:
The matching authority or null
Throws:
StoreException


Copyright © 2005-2012. All Rights Reserved.