/** * Equals if two has have same values * * @param o * @return true if equals */ @Override public boolean equals(Object o) { if (this == o) { return true; } if (!( o instanceof QueryBindingItem )) { return false; } final QueryBindingItem qbi = (QueryBindingItem) o; return new EqualsBuilder() .appendSuper(super.equals(o)) .append(query, qbi.query) .isEquals(); }
/** * Return a hash code of this object * * @return hash code */ @Override public int hashCode() { return new HashCodeBuilder(21, 51) .appendSuper(super.hashCode()) .append(terms) .toHashCode(); }
public void checkArchetypeTermBindingsValidity(Archetype archetype, List<ValidationError> errors) { List<OntologyBinding> termBindings = archetype.getOntology().getTermBindingList(); ValidationError error = null; if (termBindings != null) { for (OntologyBinding binding : termBindings) { for (OntologyBindingItem obi : binding.getBindingList()) { if (obi.getCode().startsWith("at")) { // bound to an atcode if (archetype.getOntology().termDefinition(archetype.getOriginalLanguage().getCodeString(), obi.getCode()) == null) { error = new ValidationError(ErrorType.WITB, "ATCODE", obi.getCode()); errors.add(error); } } else { // bound to a complete path if (!archetype.physicalPaths().contains(obi.getCode())) { error = new ValidationError(ErrorType.WITB, "PATH", obi.getCode()); errors.add(error); } } } } } }
/** * Return a hash code of this object * * @return hash code */ @Override public int hashCode() { return new HashCodeBuilder(19, 49) .appendSuper(super.hashCode()) .append(query) .toHashCode(); }
/** * Equals if two has have same values * * @param o * @return true if equals */ @Override public boolean equals(Object o) { if (this == o) { return true; } if (!( o instanceof QueryBindingItem )) { return false; } final QueryBindingItem qbi = (QueryBindingItem) o; return new EqualsBuilder() .appendSuper(super.equals(o)) .append(query, qbi.query) .isEquals(); }
/** * Return a hash code of this object * * @return hash code */ @Override public int hashCode() { return new HashCodeBuilder(21, 51) .appendSuper(super.hashCode()) .append(terms) .toHashCode(); }
/** * Equals if two has have same values * * @param o * @return true if equals */ @Override public boolean equals(Object o) { if (this == o) { return true; } if (!( o instanceof TermBindingItem )) { return false; } final TermBindingItem tbi = (TermBindingItem) o; return new EqualsBuilder() .appendSuper(super.equals(o)) .append(terms, tbi.terms) .isEquals(); }
/** * Return a hash code of this object * * @return hash code */ @Override public int hashCode() { return new HashCodeBuilder(19, 49) .appendSuper(super.hashCode()) .append(query) .toHashCode(); }
/** * Equals if two has have same values * * @param o * @return true if equals */ @Override public boolean equals(Object o) { if (this == o) { return true; } if (!( o instanceof TermBindingItem )) { return false; } final TermBindingItem tbi = (TermBindingItem) o; return new EqualsBuilder() .appendSuper(super.equals(o)) .append(terms, tbi.terms) .isEquals(); }