org.tridas.io.exceptions
Class ConversionWarning

java.lang.Object
  extended by org.tridas.io.exceptions.ConversionWarning

public class ConversionWarning
extends Object

A conversion warning is used to record when an issue has been detected during the conversion of a file from or to the Tridas classes.

Author:
peterbrewer

Nested Class Summary
static class ConversionWarning.WarningType
          Warning types that can be raised
 
Constructor Summary
ConversionWarning(ConversionWarning.WarningType warningType, String warningMessage)
          Raise a warning about an aspect of the data conversion
ConversionWarning(ConversionWarning.WarningType warningType, String warningMessage, String problemField)
          Raise a warning about an aspect of the data conversion
 
Method Summary
 String getField()
          Get the field that this warning applies to
 String getMessage()
          Get the message for the warning
 ConversionWarning.WarningType getWarningType()
          Get the type of warning
 String toString()
           
 String toStringWithField()
          Get the warning message including the field involved if possible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConversionWarning

public ConversionWarning(ConversionWarning.WarningType warningType,
                         String warningMessage)
Raise a warning about an aspect of the data conversion

Parameters:
warningType - The type of warning
warningMessage - The warning message

ConversionWarning

public ConversionWarning(ConversionWarning.WarningType warningType,
                         String warningMessage,
                         String problemField)
Raise a warning about an aspect of the data conversion

Parameters:
warningType - The type of warning
warningMessage - The warning message
problemField - The field where the problem comes from
Method Detail

getWarningType

public ConversionWarning.WarningType getWarningType()
Get the type of warning

Returns:

getMessage

public String getMessage()
Get the message for the warning

Returns:

getField

public String getField()
Get the field that this warning applies to

Returns:

toString

public String toString()
Overrides:
toString in class Object

toStringWithField

public String toStringWithField()
Get the warning message including the field involved if possible

Returns:


Copyright © 2011. All Rights Reserved.