com.hfg.xml.XMLNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com_hfg Show documentation
Show all versions of com_hfg Show documentation
com.hfg xml, html, svg, and bioinformatics utility library
package com.hfg.xml;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.io.Writer;
import java.util.Set;
//------------------------------------------------------------------------------
/**
Interface for an XML node. See XMLTag for an implementation.
@author J. Alex Taylor, hairyfatguy.com
*/
//------------------------------------------------------------------------------
// com.hfg XML/HTML Coding Library
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
// [email protected]
//------------------------------------------------------------------------------
public interface XMLNode extends XMLContainer
{
//--------------------------------------------------------------------------
public boolean isEmptyTag();
//---------------------------------------------------------------------------
public XMLNode setTagName(String inName);
//---------------------------------------------------------------------------
public String getTagName();
//---------------------------------------------------------------------------
public void verifyTagName(String inTagName);
//---------------------------------------------------------------------------
public void verifyTagName(XMLName inTagName);
//---------------------------------------------------------------------------
public XMLNamespace getNamespace();
//---------------------------------------------------------------------------
public XMLNode setNamespace(XMLNamespace inValue);
//---------------------------------------------------------------------------
public XMLNode setAttribute(String inAttributeName, Object inValue);
//---------------------------------------------------------------------------
public XMLNode setAttribute(XMLName inAttributeName, Object inValue);
//---------------------------------------------------------------------------
public XMLNode setAttribute(XMLAttribute inAttribute);
//---------------------------------------------------------------------------
/**
Takes a Collection of XMLAttribute objects as input.
@param inAttributes the attributes to add to the xml node
*/
public void setAttributes(Collection inAttributes);
//---------------------------------------------------------------------------
public XMLAttribute getAttribute(String inAttributeName);
//---------------------------------------------------------------------------
public XMLAttribute getAttribute(XMLName inAttributeName);
//---------------------------------------------------------------------------
public String getAttributeValue(String inAttributeName);
//---------------------------------------------------------------------------
public String getAttributeValue(XMLName inAttributeName);
//---------------------------------------------------------------------------
/**
Returns a Set of XMLAttribute objects.
@return the attribute objects from this XML node
*/
public Collection getAttributes();
//---------------------------------------------------------------------------
public boolean hasAttribute(String inAttributeName);
//---------------------------------------------------------------------------
public boolean hasAttribute(XMLName inAttributeName);
//---------------------------------------------------------------------------
public XMLAttribute removeAttribute(String inAttributeName);
//---------------------------------------------------------------------------
public XMLAttribute removeAttribute(XMLName inAttributeName);
//---------------------------------------------------------------------------
public List extends XMLNode> findNodesByAttributeValue(String inAttribute, String inValue);
//---------------------------------------------------------------------------
public List extends XMLNode> findNodesByAttributeValue(XMLName inAttribute, String inValue);
//---------------------------------------------------------------------------
public void toIndentedXML(Writer inWriter, int inInitialIndentLevel, int inIndentSize, XMLNamespaceSet inDeclaredNamespaces);
//---------------------------------------------------------------------------
public void replaceCharacterEntities();
}