All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.jhu.hlt.concrete.validation.ValidatableSituationMention Maven / Gradle / Ivy

There is a newer version: 4.15.0
Show newest version
/*
 * Copyright 2012-2015 Johns Hopkins University HLTCOE. All rights reserved.
 * This software is released under the 2-clause BSD license.
 * See LICENSE in the project root directory.
 */
package edu.jhu.hlt.concrete.validation;

import edu.jhu.hlt.concrete.Communication;
import edu.jhu.hlt.concrete.SituationMention;

/**
 * @author max
 *
 */
public class ValidatableSituationMention extends AbstractAnnotation {

  /**
   * @param annotation
   */
  public ValidatableSituationMention(SituationMention annotation) {
    super(annotation);
  }

  /* (non-Javadoc)
   * @see edu.jhu.hlt.concrete.validation.AbstractAnnotation#isValidWithComm(edu.jhu.hlt.concrete.Communication)
   */
  @Override
  protected boolean isValidWithComm(Communication c) {
    // TODO Auto-generated method stub
    return false;
  }

  /* (non-Javadoc)
   * @see edu.jhu.hlt.concrete.validation.AbstractAnnotation#isValid()
   */
  @Override
  public boolean isValid() {
    // TODO Auto-generated method stub
    boolean init = this.validateUUID(this.annotation.getUuid())
        && this.printStatus("ArgumentList must be set", this.annotation.isSetArgumentList())
        && this.printStatus("Argument list must not be empty", this.annotation.getArgumentListSize() > 0)
        && this.printStatus("SituationType must be set", this.annotation.isSetSituationType());
    if (!init) return false;
    else {
      // String st = this.annotation.getSituationType();
      // if (st == "Event")
      //   return this.printStatus("If SituationType == EVENT, EventType must be set.", this.annotation.isSetEventType());
      // else if (st == "State")
      //   return this.printStatus("If SituationType == STATE, StateType must be set.", this.annotation.isSetStateType());
      // else
        return true;
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy