UriSavingArgs

Inheritance: java.lang.Object

public class UriSavingArgs

Provides information and controls for customizing how a resource URI is written during document-to-Markdown conversion.

An instance of this class is created for each resource and can be used to override the default URI or file name.

Call #setResourceFileUri(String).setResourceFileUri(String) to change the URI that appears in the Markdown output. If no override is set, the library uses the default resourceFileUri .

Example:


 // Inside a custom URI export callback
 args.setResourceFileUri("https://cdn.example.com/assets/" + args.getResourceFileName());
 

Constructors

Methods

Method Description
getResourceFileName() Gets the default file name (without path) generated by the library for this resource.
getResourceFileUri() Gets the default resource URI that the library would write into the Markdown output.
getResourceFileNameOutput() Gets the overridden file name set by the caller, or null if no override was specified.
getResourceFileUriOutput() Gets the overridden URI set by #setResourceFileUri(String).setResourceFileUri(String), or null if no override was specified.
setResourceFileUri(String resourceFileUri) Overrides the URI that will be written to the Markdown output for this resource.

UriSavingArgs(String resourceFileName, String resourceFileUri)

public UriSavingArgs(String resourceFileName, String resourceFileUri)

Parameters:

Parameter Type Description
resourceFileName java.lang.String
resourceFileUri java.lang.String

getResourceFileName()

public String getResourceFileName()

Gets the default file name (without path) generated by the library for this resource.

Returns: java.lang.String

getResourceFileUri()

public String getResourceFileUri()

Gets the default resource URI that the library would write into the Markdown output.

Returns: java.lang.String

getResourceFileNameOutput()

public String getResourceFileNameOutput()

Gets the overridden file name set by the caller, or null if no override was specified.

Returns: java.lang.String

getResourceFileUriOutput()

public String getResourceFileUriOutput()

Gets the overridden URI set by #setResourceFileUri(String).setResourceFileUri(String), or null if no override was specified.

Returns: java.lang.String

setResourceFileUri(String resourceFileUri)

public void setResourceFileUri(String resourceFileUri)

Overrides the URI that will be written to the Markdown output for this resource.

Parameters:

Parameter Type Description
resourceFileUri java.lang.String the new URI to use (for example, a CDN URL or an absolute path)