Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ch.uzh.ifi.attempto.ape
Class Message

    java.lang.Object
      ch.uzh.ifi.attempto.ape.Message

    public class Message

extends java.lang.Object

This class represents a warning or error message of the ACE parser.

Author:
  Tobias Kuhn, Kaarel Kaljurand

Constructor Summary
`Message(java.lang.String importance, java.lang.String type, java.lang.Integer sentenceId, java.lang.Integer tokenId, java.lang.String value, java.lang.String repair)` Creates a new Message object.

Method Summary
`java.lang.String` | `getRepair()` Returns an suggestion how to react on the error or warning.
`java.lang.Integer` | `getSentenceId()` Returns the sentence number that locates the reason for the error/warning message.
`java.lang.Integer` | `getTokenId()` Returns the token number that locates the reason for the error/warning message.
`java.lang.String` | `getType()` Returns the type of the error/warning message.
`java.lang.String` | `getValue()` Returns the value of the error/warning message.
`boolean` | `isError()` Returns true if this message is an error message, or false if it is only a warning message.
`java.lang.String` | `toString()` Returns a pretty-printed error/warning message.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Message

    public Message(java.lang.String importance,
                   java.lang.String type,
                   java.lang.Integer sentenceId,
                   java.lang.Integer tokenId,
                   java.lang.String value,
                   java.lang.String repair)

  Creates a new Message object. All the relevant information for the message must be passed as arguments to this constructor.

  Parameters:
    `importance` - The importance of the message, e.g. "error", "warning"
    `type` - The type of the message, e.g. "sentence", "token"
    `sentenceId` - The number of the problematic sentence, or `null` if unknown
    `tokenId` - The number of the problematic token, or `null` if unknown
    `value` - The value of the message (e.g. a misspelled word)
    `repair` - The description that helps to resolve the error or warning

Method Detail

### isError

    public boolean isError()

  Returns true if this message is an error message, or false if it is only a warning message.

  Returns:
    true if this is an error message.

### getType

    public java.lang.String getType()

  Returns the type of the error/warning message.

  Returns:
    The type of the message.

### getSentenceId

    public java.lang.Integer getSentenceId()

  Returns the sentence number that locates the reason for the error/warning message. In some cases, this can be null.

  Returns:
    The sentence number.

### getTokenId

    public java.lang.Integer getTokenId()

  Returns the token number that locates the reason for the error/warning message. In some cases, this can be null.

  Returns:
    The token number.

### getValue

    public java.lang.String getValue()

  Returns the value of the error/warning message. This is for example the word that caused the error or warning.

  Returns:
    The value of the message.

### getRepair

    public java.lang.String getRepair()

  Returns an suggestion how to react on the error or warning.

  Returns:
    Suggestion how to react on the error/warning.

### toString

    public java.lang.String toString()

  Returns a pretty-printed error/warning message.

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2008, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch)