Class AbstractHyperlinkWriterModel
java.lang.Object
org.docx4j.convert.out.common.writer.AbstractHyperlinkWriterModel
- All Implemented Interfaces:
ConversionHyperlinkHandler.Model
public class AbstractHyperlinkWriterModel extends java.lang.Object implements ConversionHyperlinkHandler.Model
Model for the hyperlink tag.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
anchor
Specifies the name of a bookmark in the current document which shall be the target of this hyperlink.
If this attribute is omitted, then the default behavior shall be to navigate to the start of the document.protected org.w3c.dom.Node
content
protected java.lang.String
docLocation
Specifies a location in the target of the hyperlink that has no bookmarks.protected boolean
external
Only avaiable if the information is read from a relationship.protected java.lang.String
rId
Specifies the ID of the relationship whose target shall be used as the target for this hyperlink.protected java.lang.String
target
field-argument of the Hyperlink field or the targetUri of the relationship.protected java.lang.String
tgtFrame
Specifies a frame within the parent HTML frameset for the target of the parent hyperlink when one exists.protected java.lang.String
tooltip
Specifies a string which can be surfaced in a user interface as associated with the parent hyperlink. -
Constructor Summary
Constructors Constructor Description AbstractHyperlinkWriterModel()
-
Method Summary
Modifier and Type Method Description void
build(AbstractWmlConversionContext conversionContext, java.lang.Object node, org.w3c.dom.Node content)
Default build method, get's called with a P.Hyperlink.void
build(AbstractWmlConversionContext conversionContext, FldSimpleModel fldSimpleModel, org.w3c.dom.Node content)
Custom build method, get's used with a FldSimpleModel in those cases where the hyperlink is defined within a Fieldjava.lang.String
getAnchor()
Specifies the name of a bookmark in the current document which shall be the target of this hyperlink.
If this attribute is omitted, then the default behavior shall be to navigate to the start of the document.org.w3c.dom.Node
getContent()
java.lang.String
getDocLocation()
Specifies a location in the target of the hyperlink that has no bookmarks.java.lang.String
getExternalTarget()
java.lang.String
getInternalTarget()
java.lang.String
getRId()
Specifies the ID of the relationship whose target shall be used as the target for this hyperlink.java.lang.String
getTarget()
field-argument of the Hyperlink field or the targetUri of the relationship.java.lang.String
getTgtFrame()
Specifies a frame within the parent HTML frameset for the target of the parent hyperlink when one exists.java.lang.String
getTooltip()
Specifies a string which can be surfaced in a user interface as associated with the parent hyperlink.boolean
isExternal()
Only avaiable if the information is read from a relationship.void
setAnchor(java.lang.String anchor)
void
setDocLocation(java.lang.String docLocation)
void
setExternal(boolean external)
void
setRId(java.lang.String rId)
void
setTarget(java.lang.String target)
void
setTgtFrame(java.lang.String tgtFrame)
void
setTooltip(java.lang.String tooltip)
java.lang.String
toString()
-
Field Details
-
content
protected org.w3c.dom.Node content -
target
protected java.lang.String targetfield-argument of the Hyperlink field or the targetUri of the relationship. corresponds to switch \l field-argument, the \l switch might be omitted. -
external
protected boolean externalOnly avaiable if the information is read from a relationship. Otherwise always false. -
anchor
protected java.lang.String anchorSpecifies the name of a bookmark in the current document which shall be the target of this hyperlink.
If this attribute is omitted, then the default behavior shall be to navigate to the start of the document. If a hyperlink target is also specified using the r:id attribute, then this attribute shall be ignored. -
docLocation
protected java.lang.String docLocationSpecifies a location in the target of the hyperlink that has no bookmarks. The method by which the contents of this attribute are linked to document text is outside the scope of ECMA-376. -
rId
protected java.lang.String rIdSpecifies the ID of the relationship whose target shall be used as the target for this hyperlink. -
tgtFrame
protected java.lang.String tgtFrameSpecifies a frame within the parent HTML frameset for the target of the parent hyperlink when one exists. corresponds to switch \t field-argument corresponds to switch \n with tgtFrame = "_blank" -
tooltip
protected java.lang.String tooltipSpecifies a string which can be surfaced in a user interface as associated with the parent hyperlink. corresponds to switch \o field-argument
-
-
Constructor Details
-
AbstractHyperlinkWriterModel
public AbstractHyperlinkWriterModel()
-
-
Method Details
-
build
public void build(AbstractWmlConversionContext conversionContext, java.lang.Object node, org.w3c.dom.Node content) throws javax.xml.transform.TransformerExceptionDefault build method, get's called with a P.Hyperlink.- Throws:
javax.xml.transform.TransformerException
-
build
public void build(AbstractWmlConversionContext conversionContext, FldSimpleModel fldSimpleModel, org.w3c.dom.Node content) throws javax.xml.transform.TransformerExceptionCustom build method, get's used with a FldSimpleModel in those cases where the hyperlink is defined within a Field- Throws:
javax.xml.transform.TransformerException
-
getExternalTarget
public java.lang.String getExternalTarget() -
getInternalTarget
public java.lang.String getInternalTarget() -
getTarget
public java.lang.String getTarget()Description copied from interface:ConversionHyperlinkHandler.Model
field-argument of the Hyperlink field or the targetUri of the relationship. corresponds to switch \l field-argument, the \l switch might be omitted.- Specified by:
getTarget
in interfaceConversionHyperlinkHandler.Model
-
setTarget
public void setTarget(java.lang.String target)- Specified by:
setTarget
in interfaceConversionHyperlinkHandler.Model
-
isExternal
public boolean isExternal()Description copied from interface:ConversionHyperlinkHandler.Model
Only avaiable if the information is read from a relationship. Otherwise always false.- Specified by:
isExternal
in interfaceConversionHyperlinkHandler.Model
-
setExternal
public void setExternal(boolean external)- Specified by:
setExternal
in interfaceConversionHyperlinkHandler.Model
-
getAnchor
public java.lang.String getAnchor()Description copied from interface:ConversionHyperlinkHandler.Model
Specifies the name of a bookmark in the current document which shall be the target of this hyperlink.
If this attribute is omitted, then the default behavior shall be to navigate to the start of the document. If a hyperlink target is also specified using the r:id attribute, then this attribute shall be ignored.- Specified by:
getAnchor
in interfaceConversionHyperlinkHandler.Model
-
setAnchor
public void setAnchor(java.lang.String anchor)- Specified by:
setAnchor
in interfaceConversionHyperlinkHandler.Model
-
getDocLocation
public java.lang.String getDocLocation()Description copied from interface:ConversionHyperlinkHandler.Model
Specifies a location in the target of the hyperlink that has no bookmarks. The method by which the contents of this attribute are linked to document text is outside the scope of ECMA-376.- Specified by:
getDocLocation
in interfaceConversionHyperlinkHandler.Model
-
setDocLocation
public void setDocLocation(java.lang.String docLocation)- Specified by:
setDocLocation
in interfaceConversionHyperlinkHandler.Model
-
getRId
public java.lang.String getRId()Description copied from interface:ConversionHyperlinkHandler.Model
Specifies the ID of the relationship whose target shall be used as the target for this hyperlink.- Specified by:
getRId
in interfaceConversionHyperlinkHandler.Model
-
setRId
public void setRId(java.lang.String rId)- Specified by:
setRId
in interfaceConversionHyperlinkHandler.Model
-
getTgtFrame
public java.lang.String getTgtFrame()Description copied from interface:ConversionHyperlinkHandler.Model
Specifies a frame within the parent HTML frameset for the target of the parent hyperlink when one exists. corresponds to switch \t field-argument corresponds to switch \n with tgtFrame = "_blank"- Specified by:
getTgtFrame
in interfaceConversionHyperlinkHandler.Model
-
setTgtFrame
public void setTgtFrame(java.lang.String tgtFrame)- Specified by:
setTgtFrame
in interfaceConversionHyperlinkHandler.Model
-
getTooltip
public java.lang.String getTooltip()Description copied from interface:ConversionHyperlinkHandler.Model
Specifies a string which can be surfaced in a user interface as associated with the parent hyperlink. corresponds to switch \o field-argument- Specified by:
getTooltip
in interfaceConversionHyperlinkHandler.Model
-
setTooltip
public void setTooltip(java.lang.String tooltip)- Specified by:
setTooltip
in interfaceConversionHyperlinkHandler.Model
-
getContent
public org.w3c.dom.Node getContent()- Specified by:
getContent
in interfaceConversionHyperlinkHandler.Model
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-