gov.nist.nlpir.irf.de
Class DeHtml
java.lang.Object
|
+--gov.nist.nlpir.irf.InfoObj
|
+--gov.nist.nlpir.irf.de.DeString
|
+--gov.nist.nlpir.irf.de.DeHtml
- public class DeHtml
- extends DeString
- implements java.io.Serializable
This class is subclass of DeString specialized in its methods to
handle HTML-formatted text.
- Version:
- $Revision: 1.3 $
- Author:
- This software was produced by NIST, an agency of the
U.S. government, and by statute is not subject to copyright in the
United States. Recipients of this software assume all
responsibilities associated with its operation, modification and
maintenance.
- See Also:
- Serialized Form
Field Summary |
(package private) static long |
serialVersionUID
serial version universal id - put here so Java does not insert one
which may change due to revisions and make it impossible to deserialize
earlier versions of serialized objects |
Constructor Summary |
DeHtml(char[] v)
Creates a DeHtml object, assuming the given array of chars is
an HTML String. |
DeHtml(java.lang.String v)
Creates a DeHtml object given a string |
Method Summary |
void |
addHTML(java.lang.StringBuffer baseString,
int maxNrOfChar,
boolean form)
Adds the current DeHtml value to the HTML text given |
int |
compareTo(DataElem o)
Computes the score given by the comparison between this and the given
DeHtml |
boolean |
equals(java.lang.Object o)
Does the same comparison as compareTo(), but gives a boolean result. |
java.util.Vector |
getIndexingFeatures(ProxyDocument source,
IndexingModalities im,
DataElem field)
Extracts Indexing Features from DeHtml. |
void |
HTML_ShowDoc(java.lang.StringBuffer baseString)
Appends the DeHtml to the given string. |
Methods inherited from class java.lang.Object |
,
clone,
finalize,
getClass,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
serialVersionUID
static final long serialVersionUID
- serial version universal id - put here so Java does not insert one
which may change due to revisions and make it impossible to deserialize
earlier versions of serialized objects
DeHtml
public DeHtml(java.lang.String v)
- Creates a DeHtml object given a string
- Parameters:
v
- the string, which may content HTML tags.
DeHtml
public DeHtml(char[] v)
- Creates a DeHtml object, assuming the given array of chars is
an HTML String.
- Parameters:
v
- the array of char corresponding to an HTML string.
compareTo
public int compareTo(DataElem o)
- Computes the score given by the comparison between this and the given
DeHtml
- Parameters:
o
- the DeHtml this is compared to- Returns:
- the score as an int. It's the difference between the HTML
string values
- Overrides:
- compareTo in class DeString
equals
public boolean equals(java.lang.Object o)
- Does the same comparison as compareTo(), but gives a boolean result.
- Parameters:
o
- the DeHtml this is compared with- Returns:
- true if their values are equal,
false otherwise or if o is not a DeHtml - Overrides:
- equals in class DeString
getIndexingFeatures
public java.util.Vector getIndexingFeatures(ProxyDocument source,
IndexingModalities im,
DataElem field)
- Extracts Indexing Features from DeHtml.
- Parameters:
source
- object reference of source document.im
- indexing modalities to be used with this DeString.field
- the document field from which this DE came- Returns:
- vector of IndexingFeatures.
- Overrides:
- getIndexingFeatures in class DeString
addHTML
public void addHTML(java.lang.StringBuffer baseString,
int maxNrOfChar,
boolean form)
- Adds the current DeHtml value to the HTML text given
- Parameters:
baseString
- the HTML text the value will be appended tomaxNrOfChar
- maximum number of characters appended.
If 0, no limit to this numberform
- if true, the string will be used to create a form,
a common text otherwise- Returns:
- the new HTML string
- Overrides:
- addHTML in class DeString
HTML_ShowDoc
public void HTML_ShowDoc(java.lang.StringBuffer baseString)
- Appends the DeHtml to the given string.
- Parameters:
baseString
- the HTML text this will be added to.- Overrides:
- HTML_ShowDoc in class DeString