edu.jhu.hlt.concrete.validation.ValidatableMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of concrete-validation Show documentation
Show all versions of concrete-validation Show documentation
Validation library for use with Concrete-Java
/*
* Copyright 2012-2016 Johns Hopkins University HLTCOE. All rights reserved.
* See LICENSE in the project root directory.
*/
package edu.jhu.hlt.concrete.validation;
import edu.jhu.hlt.concrete.AnnotationMetadata;
import edu.jhu.hlt.concrete.Communication;
/**
*
*/
public class ValidatableMetadata extends AbstractAnnotation {
/**
* @param annotation
*/
public ValidatableMetadata(AnnotationMetadata annotation) {
super(annotation);
}
@Override
protected boolean isValidWithComm(Communication c) {
// Metadata is independent of the attached communication
return this.isValid();
}
@Override
public boolean isValid() {
return this.printStatus("Tool must be set", this.annotation.isSetTool())
&& this.printStatus("Timestamp must be set", this.annotation.isSetTimestamp());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy