示例#1
0
 /**
  * Determines if the given type entity definition of the test cell is associated to at least one
  * of the given type entity definitions of a type cell.
  *
  * @param testCellType type entity definition of the test cell
  * @param typeCellTypes type entity definitions of a type cell
  * @return whether the entity definition is associated to at least one of the others
  */
 private boolean matchesSources(
     TypeEntityDefinition testCellType, Iterable<TypeEntityDefinition> typeCellTypes) {
   TypeDefinition def = testCellType.getDefinition();
   Filter filter = testCellType.getFilter();
   for (TypeEntityDefinition typeCellType : typeCellTypes) {
     if (DefinitionUtil.isSuperType(typeCellType.getDefinition(), def)
         && (filter == null || filter.equals(typeCellType.getFilter()))) return true;
   }
   return false;
 }
示例#2
0
 /** @see java.lang.Object#equals(java.lang.Object) */
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   ChildEntityDefinition other = (ChildEntityDefinition) obj;
   if (filter == null) {
     if (other.filter != null) return false;
   } else if (!filter.equals(other.filter)) return false;
   if (path == null) {
     if (other.path != null) return false;
   } else if (!path.equals(other.path)) return false;
   if (schemaSpace != other.schemaSpace) return false;
   if (type == null) {
     if (other.type != null) return false;
   } else if (!type.equals(other.type)) return false;
   return true;
 }