Package net.sf.okapi.common.annotation
Class IssueAnnotation
- java.lang.Object
-
- net.sf.okapi.common.resource.InlineAnnotation
-
- net.sf.okapi.common.annotation.GenericAnnotation
-
- net.sf.okapi.common.annotation.IssueAnnotation
-
- All Implemented Interfaces:
Cloneable,IAnnotation,IPersistentAnnotation
public class IssueAnnotation extends GenericAnnotation
-
-
Field Summary
-
Fields inherited from class net.sf.okapi.common.resource.InlineAnnotation
CLASSNAME_SEPARATOR, data
-
-
Constructor Summary
Constructors Constructor Description IssueAnnotation()IssueAnnotation(GenericAnnotation ann)IssueAnnotation(IssueType issueType, String comment, double severity, String segId, int srcStart, int srcEnd, int trgStart, int trgEnd, List<Code> codes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfromString(String storage)Initializes this annotation from a storage string originally obtained fromInlineAnnotation.toString().StringgetCodes()Gets the string list of the codes for this issue.String[]getCodesAsArray()List<Code>getCodesAsList()StringgetComment()booleangetEnabled()IssueTypegetIssueType()StringgetITSType()StringgetProfileRef()StringgetSegId()doublegetSeverity()intgetSourceEnd()intgetSourceStart()intgetTargetEnd()intgetTargetStart()voidsetCodes(String codes)voidsetCodes(List<Code> codes)voidsetComment(String comment)voidsetEnabled(boolean enabled)voidsetIssueType(IssueType issueType)Sets the issue type and its corresponding ITS type mapping.voidsetITSType(String itsType)voidsetProfileRef(String profileRef)voidsetSegId(String segId)voidsetSeverity(double severity)voidsetSourcePosition(Integer start, Integer end)voidsetTargetPosition(Integer start, Integer end)StringtoString()Gets a storage string representation of the whole annotation that can be used for serialization.-
Methods inherited from class net.sf.okapi.common.annotation.GenericAnnotation
addAnnotation, addAnnotation, addAnnotation, clone, createFromString, getBoolean, getDouble, getFieldCount, getInteger, getNames, getString, getType, getValue, remove, setBoolean, setDouble, setFields, setInteger, setString
-
Methods inherited from class net.sf.okapi.common.resource.InlineAnnotation
getData, setData
-
-
-
-
Constructor Detail
-
IssueAnnotation
public IssueAnnotation()
-
IssueAnnotation
public IssueAnnotation(IssueType issueType, String comment, double severity, String segId, int srcStart, int srcEnd, int trgStart, int trgEnd, List<Code> codes)
-
IssueAnnotation
public IssueAnnotation(GenericAnnotation ann)
-
-
Method Detail
-
getIssueType
public IssueType getIssueType()
-
setIssueType
public void setIssueType(IssueType issueType)
Sets the issue type and its corresponding ITS type mapping. To override the default mapping, usesetITSType(String).- Parameters:
issueType- the issue type to set.
-
getITSType
public String getITSType()
-
setITSType
public void setITSType(String itsType)
-
getSegId
public String getSegId()
-
setSegId
public void setSegId(String segId)
-
getSourceStart
public int getSourceStart()
-
getSourceEnd
public int getSourceEnd()
-
getTargetStart
public int getTargetStart()
-
getTargetEnd
public int getTargetEnd()
-
getEnabled
public boolean getEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
getSeverity
public double getSeverity()
-
setSeverity
public void setSeverity(double severity)
-
getComment
public String getComment()
-
setComment
public void setComment(String comment)
-
getCodes
public String getCodes()
Gets the string list of the codes for this issue.- Returns:
- the string list of the codes for this issue.
-
getCodesAsArray
public String[] getCodesAsArray()
-
setCodes
public void setCodes(String codes)
-
getProfileRef
public String getProfileRef()
-
setProfileRef
public void setProfileRef(String profileRef)
-
toString
public String toString()
Description copied from class:InlineAnnotationGets a storage string representation of the whole annotation that can be used for serialization.- Specified by:
toStringin interfaceIAnnotation- Overrides:
toStringin classGenericAnnotation- Returns:
- The storage string representation of this annotation.
-
fromString
public void fromString(String storage)
Description copied from class:InlineAnnotationInitializes this annotation from a storage string originally obtained fromInlineAnnotation.toString().- Specified by:
fromStringin interfaceIPersistentAnnotation- Overrides:
fromStringin classGenericAnnotation- Parameters:
storage- The storage string to use for the initialization.
-
-