eu.planets_project.services.validate
Class ValidateResult.Builder

java.lang.Object
  extended by eu.planets_project.services.validate.ValidateResult.Builder
Enclosing class:
ValidateResult

public static final class ValidateResult.Builder
extends java.lang.Object

Builder for ValidateResult instances.


Constructor Summary
ValidateResult.Builder(java.net.URI thisFormat, ServiceReport report)
           
ValidateResult.Builder(ValidateResult validateResult)
           
 
Method Summary
 ValidateResult.Builder addError(int linenumber, java.lang.String error)
          Adds a error for a specified line number in the file.
 ValidateResult.Builder addError(java.lang.String error)
          Adds a error for line number -1, ie.
 ValidateResult.Builder addWarning(int linenumber, java.lang.String warning)
          Adds a warning for a specified line number in the file.
 ValidateResult.Builder addWarning(java.lang.String warning)
          Adds a warning for line number -1, ie.
 ValidateResult build()
           
 ValidateResult.Builder ofThisFormat(boolean ofThisFormat)
           
 ValidateResult.Builder properties(java.util.List<Property> properties)
           
 ValidateResult.Builder report(ServiceReport report)
           
 ValidateResult.Builder thisFormat(java.net.URI thisFormat)
           
 ValidateResult.Builder validInRegardToThisFormat(boolean validInRegardToThisFormat)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidateResult.Builder

public ValidateResult.Builder(ValidateResult validateResult)
Parameters:
validateResult - The instance to create a new instance from

ValidateResult.Builder

public ValidateResult.Builder(java.net.URI thisFormat,
                              ServiceReport report)
Parameters:
thisFormat - The identification result format
report - The identification report
Method Detail

build

public ValidateResult build()
Returns:
The validate result

ofThisFormat

public ValidateResult.Builder ofThisFormat(boolean ofThisFormat)
Parameters:
ofThisFormat - See #ofThisFormat
Returns:
The builder, for cascaded calls

validInRegardToThisFormat

public ValidateResult.Builder validInRegardToThisFormat(boolean validInRegardToThisFormat)
Parameters:
validInRegardToThisFormat - See #validInRegardToThisFormat
Returns:
The builder, for cascaded calls

thisFormat

public ValidateResult.Builder thisFormat(java.net.URI thisFormat)
Parameters:
thisFormat - See #thisFormat
Returns:
The builder, for cascaded calls

report

public ValidateResult.Builder report(ServiceReport report)
Parameters:
report - See #report
Returns:
The builder, for cascaded calls

properties

public ValidateResult.Builder properties(java.util.List<Property> properties)
Parameters:
properties - See #properties
Returns:
The builder, for cascaded calls

addWarning

public ValidateResult.Builder addWarning(int linenumber,
                                         java.lang.String warning)
Adds a warning for a specified line number in the file.

Parameters:
linenumber - The offending line
warning - The warning description
Returns:
The builder, for cascaded calls
See Also:
warnings

addWarning

public ValidateResult.Builder addWarning(java.lang.String warning)
Adds a warning for line number -1, ie. for the entire file.

Parameters:
warning - the description of the warning
Returns:
The builder, for cascaded calls
See Also:
warnings

addError

public ValidateResult.Builder addError(int linenumber,
                                       java.lang.String error)
Adds a error for a specified line number in the file. Remember to also mark the file as not ofThisFormat or not validInRegardToThisFormat

Parameters:
linenumber - the offending line
error - The error description
Returns:
The builder, for cascaded calls
See Also:
errors, ofThisFormat, validInRegardToThisFormat

addError

public ValidateResult.Builder addError(java.lang.String error)
Adds a error for line number -1, ie. for the entire file

Parameters:
error - the description of the error
Returns:
The builder, for cascaded calls
See Also:
addError(int, String)


Copyright © 2007-2010 The Planets Consortium. All Rights Reserved.