IRISLIB database
Html Class Reference
Inheritance diagram for Html:
Collaboration diagram for Html:

Public Member Functions

_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnNew (_.Library.String params)
 Make sure the PPG is empty.
 
_.Library.Status BufferString (_.Library.String data)
 Buffer data in the PPG.
 
_.Library.Status Convert ()
 
_.Library.String NextConvertedPart ()
 Loop through the PPG again and return processed strings.
 
_.Library.Status SetParams (_.Library.String params)
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Static Public Member Functions

_.Library.String StripHTML (_.Library.String pText, _.Library.Boolean pUnescape, _.Library.String pSkipTags, _.Library.Boolean pBreakLines, _.Library.Status pSC)
 Utility method to strip HTML tags from the supplied string. More...
 
- Static Public Member Functions inherited from Converter
_.Library.List GetMetadataKeys (_.Library.String params)
 If the Converter extracts metadata, this method should return a list of keys of the metadata fields that are. More...
 
_.Library.String Test (_.Library.String pInput, _.Library.List pParams, _.Library.Status pSC)
 Utility method to test a converter class. More...
 

Public Attributes

 BreakLines
   More...
 
 SkipTags
   More...
 
 Unescape
   More...
 
- Public Attributes inherited from Converter
 Params
   More...
 

Additional Inherited Members

- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Detailed Description

This is a sample implementation for <class>iKnow.Source.Converter</class>, designed to weed out HTML tags from plain text input. Data is first buffered into a process-private global and stripped of HTML in the <method>Convert</method> call.

Converter parameters:

  1. Unescape As <class>Boolean</class>: set to 1 to unescape HTML special characters such as converting "&amp;amp;" to "&amp;" (default = 1)
  2. SkipTags As <class>String</class>: comma-separated list of tags whose content (text nested between the start and end tag) is to be left out (default = "script,style")
  3. BreakLines As <class>Boolean</class>: whether or not to insert double line breaks for non-inline tags (such as p, br, td, ...), in order for the iKnow engine to split sentences at those positions (default = 1)

Member Function Documentation

◆ OnClose()

_.Library.Status OnClose ( )

This callback method is invoked by the <METHOD>Close</METHOD> method to.

provide notification that the current object is being closed.

The return value of this method is ignored.

Reimplemented from RegisteredObject.

◆ Convert()

_.Library.Status Convert ( )

Loop through buffered data and strip off HTML tags. Reset the pointer in the root

PPG node at the end, for <method>NextConverterdPart</method> to know where to start.

Reimplemented from Converter.

◆ SetParams()

_.Library.Status SetParams ( _.Library.String  params)

Utility method called by the <class>iKnow.Source.Processor</class> and <class>iKnow.Source.Loader</class>

logic to register any new or changed parameter values.

Reimplemented from Converter.

◆ StripHTML()

_.Library.String StripHTML ( _.Library.String  pText,
_.Library.Boolean  pUnescape,
_.Library.String  pSkipTags,
_.Library.Boolean  pBreakLines,
_.Library.Status  pSC 
)
static

Utility method to strip HTML tags from the supplied string.

See the class documentation

for more details on the available parameters.

Member Data Documentation

◆ BreakLines

BreakLines

 

 

◆ SkipTags

SkipTags

 

 

◆ Unescape

Unescape