JDOM
2.0.5

org.jdom2.located
Class LocatedElement

java.lang.Object
  extended by org.jdom2.Content
      extended by org.jdom2.Element
          extended by org.jdom2.located.LocatedElement
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Located, NamespaceAware, Parent

public class LocatedElement
extends Element
implements Located

This Element specialization contains the location information as parsed.

Author:
Rolf Lear
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdom2.Content
Content.CType
 
Field Summary
 
Fields inherited from class org.jdom2.Element
name, namespace
 
Fields inherited from class org.jdom2.Content
ctype, parent
 
Constructor Summary
LocatedElement(java.lang.String name)
          Create a new element with the supplied (local) name and no namespace.
LocatedElement(java.lang.String name, Namespace namespace)
          Creates a new element with the supplied (local) name and namespace.
LocatedElement(java.lang.String name, java.lang.String uri)
          Creates a new element with the supplied (local) name and a namespace given by a URI.
LocatedElement(java.lang.String name, java.lang.String prefix, java.lang.String uri)
          Creates a new element with the supplied (local) name and a namespace given by the supplied prefix and URI combination.
 
Method Summary
 int getColumn()
          Get the column (character on the line).
 int getLine()
          Get the line number
 void setColumn(int col)
          Set the column (character on the line).
 void setLine(int line)
          Set the line number
 
Methods inherited from class org.jdom2.Element
addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, canContainContent, clone, cloneContent, coalesceText, detach, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getNamespaceURI, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, getXMLBaseURI, hasAdditionalNamespaces, hasAttributes, indexOf, isAncestor, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttribute, setAttribute, setAttributes, setContent, setContent, setContent, setContent, setName, setNamespace, setText, sortAttributes, sortChildren, sortContent, sortContent, toString
 
Methods inherited from class org.jdom2.Content
equals, getCType, getDocument, getParent, getParentElement, hashCode, setParent
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jdom2.Parent
getDocument, getParent
 

Constructor Detail

LocatedElement

public LocatedElement(java.lang.String name,
                      Namespace namespace)
Creates a new element with the supplied (local) name and namespace. If the provided namespace is null, the element will have no namespace.

Parameters:
name - local name of the element
namespace - namespace for the element
Throws:
IllegalNameException - if the given name is illegal as an element name

LocatedElement

public LocatedElement(java.lang.String name)
Create a new element with the supplied (local) name and no namespace.

Parameters:
name - local name of the element
Throws:
IllegalNameException - if the given name is illegal as an element name.

LocatedElement

public LocatedElement(java.lang.String name,
                      java.lang.String uri)
Creates a new element with the supplied (local) name and a namespace given by a URI. The element will be put into the unprefixed (default) namespace.

Parameters:
name - name of the element
uri - namespace URI for the element
Throws:
IllegalNameException - if the given name is illegal as an element name or the given URI is illegal as a namespace URI

LocatedElement

public LocatedElement(java.lang.String name,
                      java.lang.String prefix,
                      java.lang.String uri)
Creates a new element with the supplied (local) name and a namespace given by the supplied prefix and URI combination.

Parameters:
name - local name of the element
prefix - namespace prefix
uri - namespace URI for the element
Throws:
IllegalNameException - if the given name is illegal as an element name, the given prefix is illegal as a namespace prefix, or the given URI is illegal as a namespace URI
Method Detail

getLine

public int getLine()
Description copied from interface: Located
Get the line number

Specified by:
getLine in interface Located
Returns:
the line number

getColumn

public int getColumn()
Description copied from interface: Located
Get the column (character on the line).

Specified by:
getColumn in interface Located
Returns:
the column

setLine

public void setLine(int line)
Description copied from interface: Located
Set the line number

Specified by:
setLine in interface Located
Parameters:
line - the line.

setColumn

public void setColumn(int col)
Description copied from interface: Located
Set the column (character on the line).

Specified by:
setColumn in interface Located
Parameters:
col - The column

JDOM
2.0.5

Copyright � 2013 Jason Hunter, Brett McLaughlin. All Rights Reserved.