company logo

DBObjectHandle :: HTMLGetFileURL - Get file url from ODABA url

The function returns the file url from the ODABA url passed to the function. The file is created, when not yet existing. The file root for creating html files must be set in Options.Documentation.DocumentTarget.

When passing refresh_opt as true, the file is recreated also in case, it does already exist.

The function returns the file url as:

    file://document_root/sub_folder/file_name.html

The rules for building html file names must be defined in a function action GetFileURL(), which must be defined in the database context. In order to create a proper html document, the function action CreateHTMLDoc() must be implemented in the database context.

Notes:

ODABA provides default html generation for reference documentation in the ODE database context db_ODE (ADKCtxi). The function actions refer to the HTMLDoc class in order to provide essential functionality. Layout and content of the web sites id defined in HTML... OSI expressions. The main logic is implemented in the VOID class, which is base type for any other class. The layout for different object types is overloaded in HTMLBody in corresponding classes.

Return value:  String object ( NString & )

Implementation details

NString DBObjectHandle  :: HTMLGetFileURL ( NString &odaba_url, logical refresh_opt=NO )
  • odaba_url - ODABA url

    An ODABA url is a mean for referring to an object in the database. Usually, the ODABA url is used for providing an HTML presentation of the referenced object.

    There are two types of ODABA url that can be passed:

    • odaba://id@loid, where loid is the object identity of the referenced object instance
    • odaba://path@access_path, where access path is a valid property or operation path.
  • refresh_opt - Refresh option

    Setting the refresh option to true (YES) will rebuild the object completely.

    Default: NO