public class ParseResult
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static ParseResult |
failure(java.lang.String fileLocation,
java.lang.String partialContent,
Metadata partialMetadata,
java.lang.Throwable error) |
java.lang.String |
getContent()
Returns the extracted text.
|
java.lang.Throwable |
getError()
Returns the parse error, if the file was parsed unsuccessfully.
|
java.lang.String |
getErrorAsString()
Same as
getError() , but returns the complete stack trace of the error as a String . |
java.lang.String |
getFileLocation()
Returns the absolute path to the input file.
|
Metadata |
getMetadata()
Returns the extracted metadata.
|
int |
hashCode() |
boolean |
isSuccess()
Returns whether this file was parsed successfully.
|
static ParseResult |
success(java.lang.String fileLocation,
java.lang.String content) |
static ParseResult |
success(java.lang.String fileLocation,
java.lang.String content,
Metadata metadata) |
java.lang.String |
toString() |
public static ParseResult success(java.lang.String fileLocation, java.lang.String content, Metadata metadata)
public static ParseResult success(java.lang.String fileLocation, java.lang.String content)
public static ParseResult failure(java.lang.String fileLocation, java.lang.String partialContent, Metadata partialMetadata, java.lang.Throwable error)
public java.lang.String getFileLocation()
public boolean isSuccess()
public java.lang.Throwable getError()
public java.lang.String getErrorAsString()
getError()
, but returns the complete stack trace of the error as a String
.public java.lang.String getContent()
public Metadata getMetadata()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object