Example #1
0
 /**
  * Recursively finds a class matching the given URI.
  *
  * @param uri
  */
 public Class findClass(URI uri) {
   if (this.uri.equals(uri)) {
     return this;
   } else {
     for (Class c : this.children) {
       Class found = c.findClass(uri);
       if (found != null) {
         return found;
       }
     }
   }
   return null;
 }
Example #2
0
 /**
  * Recursively finds a class matching the given ID.
  *
  * @param id
  */
 public Class findClass(String id) {
   if (this.id.equals(id)) {
     return this;
   } else {
     for (Class c : this.children) {
       Class found = c.findClass(id);
       if (found != null) {
         return found;
       }
     }
   }
   return null;
 }