Class AbstractHyperlinkWriterModel
java.lang.Object
org.docx4j.convert.out.common.writer.AbstractHyperlinkWriterModel
- All Implemented Interfaces:
ConversionHyperlinkHandler.Model
public class AbstractHyperlinkWriterModel
extends Object
implements ConversionHyperlinkHandler.Model
Model for the hyperlink tag.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringSpecifies 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 Nodeprotected StringSpecifies a location in the target of the hyperlink that has no bookmarks.protected booleanOnly avaiable if the information is read from a relationship.protected StringSpecifies the ID of the relationship whose target shall be used as the target for this hyperlink.protected Stringfield-argument of the Hyperlink field or the targetUri of the relationship.protected StringSpecifies a frame within the parent HTML frameset for the target of the parent hyperlink when one exists.protected StringSpecifies a string which can be surfaced in a user interface as associated with the parent hyperlink. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild(AbstractWmlConversionContext conversionContext, Object node, Node content) Default build method, get's called with a P.Hyperlink.voidbuild(AbstractWmlConversionContext conversionContext, FldSimpleModel fldSimpleModel, Node content) Custom build method, get's used with a FldSimpleModel in those cases where the hyperlink is defined within a FieldSpecifies 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.Specifies a location in the target of the hyperlink that has no bookmarks.getRId()Specifies the ID of the relationship whose target shall be used as the target for this hyperlink.field-argument of the Hyperlink field or the targetUri of the relationship.Specifies a frame within the parent HTML frameset for the target of the parent hyperlink when one exists.Specifies a string which can be surfaced in a user interface as associated with the parent hyperlink.booleanOnly avaiable if the information is read from a relationship.voidvoidsetDocLocation(String docLocation) voidsetExternal(boolean external) voidvoidvoidsetTgtFrame(String tgtFrame) voidsetTooltip(String tooltip) toString()
-
Field Details
-
-
target
field-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
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. -
docLocation
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. -
rId
Specifies the ID of the relationship whose target shall be used as the target for this hyperlink. -
tgtFrame
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" -
tooltip
Specifies 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, Object node, Node content) throws TransformerException Default build method, get's called with a P.Hyperlink.- Throws:
TransformerException
-
build
public void build(AbstractWmlConversionContext conversionContext, FldSimpleModel fldSimpleModel, Node content) throws TransformerException Custom build method, get's used with a FldSimpleModel in those cases where the hyperlink is defined within a Field- Throws:
TransformerException
-
getExternalTarget
-
getInternalTarget
-
getTarget
Description copied from interface:ConversionHyperlinkHandler.Modelfield-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:
getTargetin interfaceConversionHyperlinkHandler.Model
-
setTarget
- Specified by:
setTargetin interfaceConversionHyperlinkHandler.Model
-
isExternal
public boolean isExternal()Description copied from interface:ConversionHyperlinkHandler.ModelOnly avaiable if the information is read from a relationship. Otherwise always false.- Specified by:
isExternalin interfaceConversionHyperlinkHandler.Model
-
setExternal
public void setExternal(boolean external) - Specified by:
setExternalin interfaceConversionHyperlinkHandler.Model
-
getAnchor
Description copied from interface:ConversionHyperlinkHandler.ModelSpecifies 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:
getAnchorin interfaceConversionHyperlinkHandler.Model
-
setAnchor
- Specified by:
setAnchorin interfaceConversionHyperlinkHandler.Model
-
getDocLocation
Description copied from interface:ConversionHyperlinkHandler.ModelSpecifies 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:
getDocLocationin interfaceConversionHyperlinkHandler.Model
-
setDocLocation
- Specified by:
setDocLocationin interfaceConversionHyperlinkHandler.Model
-
getRId
Description copied from interface:ConversionHyperlinkHandler.ModelSpecifies the ID of the relationship whose target shall be used as the target for this hyperlink.- Specified by:
getRIdin interfaceConversionHyperlinkHandler.Model
-
setRId
- Specified by:
setRIdin interfaceConversionHyperlinkHandler.Model
-
getTgtFrame
Description copied from interface:ConversionHyperlinkHandler.ModelSpecifies 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:
getTgtFramein interfaceConversionHyperlinkHandler.Model
-
setTgtFrame
- Specified by:
setTgtFramein interfaceConversionHyperlinkHandler.Model
-
getTooltip
Description copied from interface:ConversionHyperlinkHandler.ModelSpecifies a string which can be surfaced in a user interface as associated with the parent hyperlink. corresponds to switch \o field-argument- Specified by:
getTooltipin interfaceConversionHyperlinkHandler.Model
-
setTooltip
- Specified by:
setTooltipin interfaceConversionHyperlinkHandler.Model
-
getContent
- Specified by:
getContentin interfaceConversionHyperlinkHandler.Model
-
toString
-