Class Segment
Basic unit of translatable content.
Inheritance
Inherited Members
Namespace: Sdl.Core.Bcm.BcmModel
Assembly: Sdl.Core.Bcm.BcmModel.dll
Syntax
public class Segment : MarkupDataContainer, ICloneable<MarkupData>
Constructors
Segment()
Initializes a new instance of the Segment class.
Declaration
public Segment()
Segment(String)
Initializes a new instance of the Segment class.
Declaration
public Segment(string segmentNumber)
Parameters
Type | Name | Description |
---|---|---|
System.String | segmentNumber | The segment number. |
Segment(String, ConfirmationLevel)
Initializes a new instance of the Segment class.
Declaration
public Segment(string segmentNumber, ConfirmationLevel confirmationLevel)
Parameters
Type | Name | Description |
---|---|---|
System.String | segmentNumber | The segment number. |
ConfirmationLevel | confirmationLevel | The confirmation level. |
Properties
AlignmentData
Gets or sets the alignment data.
Declaration
public AlignmentData AlignmentData { get; set; }
Property Value
Type | Description |
---|---|
AlignmentData | The alignment data. |
Remarks
Used by the alignment processing.
CharacterCount
Gets or sets the character count.
Declaration
public int CharacterCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The character count. |
ConfirmationLevel
Gets or sets the confirmation level (translation status).
Declaration
public ConfirmationLevel ConfirmationLevel { get; set; }
Property Value
Type | Description |
---|---|
ConfirmationLevel | The confirmation level (translation status). |
IsLocked
Gets or sets a value indicating whether this instance is locked for editing.
Declaration
public bool IsLocked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SegmentNumber
Gets or sets the segment number.
Declaration
public string SegmentNumber { get; set; }
Property Value
Type | Description |
---|---|
System.String | The segment number. |
SiblingSegment
Gets the sibling segment.
Declaration
public Segment SiblingSegment { get; }
Property Value
Type | Description |
---|---|
Segment | The sibling segment. |
Remarks
If this is the source segment, it retrieves the target (and the other way around)
Tokens
Gets or sets the tokens.
Declaration
public List<Token> Tokens { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Token> | The tokens. |
Remarks
Used by the tokenization process.
TranslationOrigin
Gets or sets the translation origin (translation source information).
Declaration
public TranslationOrigin TranslationOrigin { get; set; }
Property Value
Type | Description |
---|---|
TranslationOrigin | The translation origin. |
Type
Gets the type of MarkupData.
Declaration
protected override string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String | The type. |
Overrides
WordCount
Gets or sets the word count.
Declaration
public int WordCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The word count. |
Methods
AcceptVisitor(BcmVisitor)
Accepts a visitor of type BcmVisitor.
Declaration
public override void AcceptVisitor(BcmVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
BcmVisitor | visitor | The BcmVisitor used to visit this item. |
Overrides
Clone()
Clones this instance.
Declaration
public Segment Clone()
Returns
Type | Description |
---|---|
Segment | A deep clone of this instance. |
CloneWithoutChildren()
Creates a clone of this instance, without any children elements.
Declaration
public override MarkupDataContainer CloneWithoutChildren()
Returns
Type | Description |
---|---|
MarkupDataContainer | A clone of this instance, without any children elements. |
Overrides
Equals(MarkupData)
Indicates whether the current object is equal to another object of the same type.
Declaration
public override bool Equals(MarkupData other)
Parameters
Type | Name | Description |
---|---|---|
MarkupData | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |
Overrides
Equals(Object)
Performs a deep-equals comparison.
System.Object.Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance. |
Overrides
ToString()
Converts to string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |
Overrides
UniqueClone()
Clones this instance, setting a new unique id.
Declaration
public Segment UniqueClone()
Returns
Type | Description |
---|---|
Segment | A deep clone of this instance, with a new unique id. |