Class TLfnThemeMetadataTraverser

java.lang.Object
com.luciad.fusion.tilestore.metadata.TLfnThemeMetadataTraverser

public class TLfnThemeMetadataTraverser extends Object
The traverser is used to traverse a theme's resources. The traverser is to be used in conjunction with a Visitor.

The visitor can conveniently perform a depth-first traversal of the entire theme's resource graph by calling the traverse(com.luciad.fusion.tilestore.metadata.TLfnThemeMetadata, com.luciad.fusion.tilestore.metadata.ALfnResourceMetadataVisitor) method from ALfnResourceMetadataVisitor.visit(TLfnThemeMetadata). The traverser will visit each resource in the theme exactly once, avoiding duplicates and loops introduced by nested themes.

The traverser relies on a resolver to traverse to referenced resources. Unresolved resources are ignored (not visited).

Since:
10.0
See Also:
  • Constructor Details

    • TLfnThemeMetadataTraverser

      public TLfnThemeMetadataTraverser(ILfnResourceMetadataResolver aResolver)
      Creates a traverser to traverse a theme's resource model, using a resolver.
      Parameters:
      aResolver - the resolver to use.
  • Method Details

    • traverse

      public void traverse(TLfnThemeMetadata aTheme, ALfnResourceMetadataVisitor aVisitor)
      Traverses a theme and lets the visitor visit each directly referenced resource that has not yet been encountered by this traverser. The given theme itself will not be visited. Traversing will silently ignore any resources for which the resolver throws. Such resources will not be visited and traversing will skip to the next resource.
      Parameters:
      aTheme - the theme to traverse
      aVisitor - the visitor