Package org.jdom2.located
Class LocatedElement
- java.lang.Object
-
- org.jdom2.Content
-
- org.jdom2.Element
-
- 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
-
-
Constructor Summary
Constructors Constructor Description LocatedElement(java.lang.String name)
Create a new element with the supplied (local) name and no 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.LocatedElement(java.lang.String name, Namespace namespace)
Creates a new element with the supplied (local) name and namespace.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumn()
Get the column (character on the line).int
getLine()
Get the line numbervoid
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, getAttributesSize, 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 elementnamespace
- 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 elementuri
- 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 elementprefix
- namespace prefixuri
- 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
-
getColumn
public int getColumn()
Description copied from interface:Located
Get the column (character on the line).
-
setLine
public void setLine(int line)
Description copied from interface:Located
Set the line number
-
-