org.openid4java.discovery.html
Class CyberNekoDOMHtmlParser

java.lang.Object
  extended by org.openid4java.discovery.html.CyberNekoDOMHtmlParser
All Implemented Interfaces:
HtmlParser

public class CyberNekoDOMHtmlParser
extends java.lang.Object
implements HtmlParser

A HtmlParser implementation using the DOMParser of CyberNeko HTML.

Since:
0.9.4
Author:
Sutra Zhou
See Also:
OpenID4JavaDOMParser

Field Summary
private static org.apache.commons.logging.Log _log
           
private static boolean DEBUG
           
 
Constructor Summary
CyberNekoDOMHtmlParser()
           
 
Method Summary
private  org.apache.html.dom.HTMLDocumentImpl parseDocument(java.lang.String htmlData)
           
 void parseHtml(java.lang.String htmlData, HtmlResult result)
          Parses the HTML data and stores in the result the discovered openid information.
private  void setResult(java.lang.String rel, java.lang.String href, HtmlResult result)
          Set the result from rel and href that parsed from node link.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

private static final org.apache.commons.logging.Log _log

DEBUG

private static final boolean DEBUG
Constructor Detail

CyberNekoDOMHtmlParser

public CyberNekoDOMHtmlParser()
Method Detail

parseHtml

public void parseHtml(java.lang.String htmlData,
                      HtmlResult result)
               throws DiscoveryException
Description copied from interface: HtmlParser
Parses the HTML data and stores in the result the discovered openid information.

Specified by:
parseHtml in interface HtmlParser
Parameters:
htmlData - HTML data obtained from the URL identifier.
result - The HTML result.
Throws:
DiscoveryException

parseDocument

private org.apache.html.dom.HTMLDocumentImpl parseDocument(java.lang.String htmlData)
                                                    throws DiscoveryException
Throws:
DiscoveryException

setResult

private void setResult(java.lang.String rel,
                       java.lang.String href,
                       HtmlResult result)
                throws DiscoveryException
Set the result from rel and href that parsed from node link.

Parameters:
rel - the rel
href - the href
result - the result to set
Throws:
DiscoveryException - if the value has been setted yet, that is to say, find more than one entries with the same name(attribute value of rel).


Copyright 2006-2008 Sxip Identity Corporation