Exemplo n.º 1
0
 @Override
 public String toString() {
   StringBuilder buffer = new StringBuilder("Mined info for " + articleID_);
   // Standing
   if (!standing_.isEmpty()) buffer.append("\nStanding: " + standing_);
   if (infoboxType_ != null) buffer.append("\nInfobox type: " + infoboxType_);
   // Parentage
   if (!concreteAssertions_.isEmpty())
     buffer.append("\nConcrete parentage assertions: " + concreteParentageAssertions_);
   return buffer.toString();
 }
Exemplo n.º 2
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + articleID_;
   result = prime * result + ((assertions_ == null) ? 0 : assertions_.hashCode());
   result = prime * result + ((concreteAssertions_ == null) ? 0 : concreteAssertions_.hashCode());
   result = prime * result + ((infoboxType_ == null) ? 0 : infoboxType_.hashCode());
   result = prime * result + minedTypes_;
   result = prime * result + ((standing_ == null) ? 0 : standing_.hashCode());
   return result;
 }
Exemplo n.º 3
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   MinedInformation other = (MinedInformation) obj;
   if (articleID_ != other.articleID_) return false;
   if (assertions_ == null) {
     if (other.assertions_ != null) return false;
   } else if (!assertions_.equals(other.assertions_)) return false;
   if (concreteAssertions_ == null) {
     if (other.concreteAssertions_ != null) return false;
   } else if (!concreteAssertions_.equals(other.concreteAssertions_)) return false;
   if (infoboxType_ == null) {
     if (other.infoboxType_ != null) return false;
   } else if (!infoboxType_.equals(other.infoboxType_)) return false;
   if (minedTypes_ != other.minedTypes_) return false;
   if (standing_ == null) {
     if (other.standing_ != null) return false;
   } else if (!standing_.equals(other.standing_)) return false;
   return true;
 }
Exemplo n.º 4
0
 public void addStandingInformation(WeightedStanding standing) throws Exception {
   standing_.mergeInformation(standing);
   isModified_ = true;
 }
Exemplo n.º 5
0
 public void addStandingInformation(
     TermStanding standing, double weight, HeuristicProvenance provenance) {
   standing_.addStanding(provenance, standing, weight);
   isModified_ = true;
 }