com.bbn.swede.core
Class ElementTypeVisitor

java.lang.Object
  extended bycom.bbn.swede.core.ElementTypeVisitor
All Implemented Interfaces:
IOWLElementVisitor

public class ElementTypeVisitor
extends Object
implements IOWLElementVisitor

An OWL element visitor for collecting OWL resources of a specific type. The visit(IOWLElement) method simply checks the current element against the type specified at construction and appends it to the list if it matches.

Author:
tself

Constructor Summary
ElementTypeVisitor(Class c, List list)
          Constructs a new ElementTypeVisitor.
 
Method Summary
 boolean visit(IOWLElement element)
          Visits the given OWL element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementTypeVisitor

public ElementTypeVisitor(Class c,
                          List list)
Constructs a new ElementTypeVisitor. Elements that match the specified type will be appended to the supplied list.

Parameters:
c - The Java class to match against
list - The list to populate with matching elements
Method Detail

visit

public boolean visit(IOWLElement element)
Description copied from interface: IOWLElementVisitor
Visits the given OWL element.

Specified by:
visit in interface IOWLElementVisitor
Parameters:
element - The element to visit
Returns:
true if the element's children should be visited; false if they should be skipped.


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.