public class MTag extends Tag implements IWithITSAttributes
| Modifier and Type | Field and Description |
|---|---|
protected net.sf.okapi.lib.xliff2.core.MTagCommon |
mc |
static java.lang.String |
TYPE_DEFAULT
Default type of a marker.
|
| Constructor and Description |
|---|
MTag(MTag opposite)
Creates a new opening or closing tag for a marker.
|
MTag(MTag original,
MTag opposite)
Copy constructor.
|
MTag(java.lang.String id,
java.lang.String type)
Creates a new opening tag for a marker.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Tag tag)
Indicates if this tag is equal to another.
|
java.lang.String |
getId()
Gets the id for the code or annotation using this tag.
|
ITSItems |
getITSItems()
Gets the ITS items associated with this object.
|
java.lang.String |
getRef()
Gets the URI reference for this marker.
|
java.lang.Boolean |
getTranslate()
Gets the translate property for this marker.
|
java.lang.String |
getType()
Gets the type of the code or marker this tag represents.
|
java.lang.String |
getValue()
Gets the value for this marker.
|
boolean |
hasITSItem()
Indicates if the object has at least one ITS item.
|
boolean |
isCode()
Indicates if this tag is for a code (
CTag). |
boolean |
isMarker()
Indicates if this tag is for a marker (
MTag). |
void |
setITSItems(ITSItems itsItems)
Sets the list of the ITS items associated with this object.
|
void |
setRef(java.lang.String ref)
Sets the URI reference for this marker (for both opening/closing tags).
|
void |
setTranslate(java.lang.Boolean translate)
Sets the translate property for this marker (for both opening/closing tags).
|
void |
setType(java.lang.String type)
Sets the type of the code or marker (for both opening/closing tags).
|
void |
setValue(java.lang.String value)
sets the value for this marker (for both opening/closing tags).
|
getTagType, toStringgetExtAttributes, getExtAttributeValue, hasExtAttribute, setExtAttributespublic static final java.lang.String TYPE_DEFAULT
protected net.sf.okapi.lib.xliff2.core.MTagCommon mc
public MTag(java.lang.String id,
java.lang.String type)
id - the ID of the new marker.type - the type of the new marker (can be null for the default type).public MTag(MTag opposite)
opposite - the counterpart tag to connect to this new opening or closing tag.public java.lang.String getId()
TaggetId in interface IWithITSAttributesgetId in class Tagpublic java.lang.String getType()
Tagpublic void setType(java.lang.String type)
Tagpublic java.lang.String getRef()
public void setRef(java.lang.String ref)
ref - the new URI reference for this marker (can be null).public java.lang.String getValue()
public void setValue(java.lang.String value)
value - the new value for this marker.public java.lang.Boolean getTranslate()
public void setTranslate(java.lang.Boolean translate)
translate - the new translate property (can be null).public boolean equals(Tag tag)
TagUse the == operator to test if two tags are the same.
tag - the other tag to compare to this one.public boolean isMarker()
TagMTag).public boolean isCode()
TagCTag).public boolean hasITSItem()
IWithITSAttributeshasITSItem in interface IWithITSAttributespublic ITSItems getITSItems()
IWithITSAttributesgetITSItems in interface IWithITSAttributespublic void setITSItems(ITSItems itsItems)
IWithITSAttributessetITSItems in interface IWithITSAttributesitsItems - the new items to set.