WebtopParser.java revision 23e304384f98fca4ab2e6f9f07a53465c1bfc645
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: WebtopParser.java,v 1.3 2008/06/25 05:41:29 qcheng Exp $
*
*/
/**
* Portions Copyrighted 2012 ForgeRock Inc
*/
/**
* XMLParser provides a way for applications to handle a hook into
* applications and applications and its server.
*
* @supported.all.api
*/
public class WebtopParser {
private boolean useGenericClass = false;
}
/**
* Parses and processes a Node.
*
* @param nd The Node to parse.
* @return the parsed object for the node.
* @throws Exception if node cannot be parsed or <code>ParseOutput</code>
* object cannot be instantiated.
*/
throws Exception
{
}
}
switch (ch.getNodeType()) {
case Node.ELEMENT_NODE :
break;
}
break;
default :
}
}
// lookup hash
if (useGenericClass) {
} else {
}
} else {
try {
}
}
return po;
}
/**
* Removes leading and trailing whitespace.
*
* @param s String from which to remove whitespace.
* @return String with leading and trailing whitespace removed.
*/
return s.trim();
}
/**
* Constructs a <code>WebtopParser</code> instance.
*/
public WebtopParser() {
}
/**
* Sets whether to use the default <code>GenericNode</code> as the node
* type.
*
* @param usegeneric <code>true</code> if <code>GenericNode</code> type is
* to be used.
*/
public WebtopParser(boolean usegeneric) {
}
/**
* Parses an XML document from a String variable.
*
* @param s The XML document.
* @throws Exception if there are unsupported encoding issues.
*/
try {
} catch(UnsupportedEncodingException ex) {
}
}
/**
* Parses an XML document.
*
* @param xmlin the XML document.
* @return the ParseOutput object from walking and processing the node.
* @throws Exception if there are IO or XML parsing exceptions.
*/
throws Exception
{
try {
} catch (ParserConfigurationException e) {
throw new Exception("DBG:Got ParserConfigurationException:" +
e.toString());
}
try {
} catch(SAXParseException e) {
throw new Exception("DBG:Got SAXParseException:" +
" col :" + e.getColumnNumber());
} catch (SAXException e) {
} catch (IOException ex) {
}
}
/**
* Registers a call back function.
*
* @param elemname The tag name of this node.
* @param classname The call back function.
*/
}
}
}