Top Description Fields Constructors Methods
org.jdom2.located

public Class LocatedElement

extends Element
implements Located
Class Inheritance
All Implemented Interfaces
org.jdom2.located.Located
Imports
org.jdom2.Element, .IllegalNameException, .Namespace

This Element specialization contains the location information as parsed.
Author
Rolf Lear

Field Summary

Modifier and TypeField and Description
private int
private int
private static final long
Inherited from org.jdom2.Element:
namenamespace

Constructor Summary

AccessConstructor and Description
public
LocatedElement(final String
local name of the element
name
,
final Namespace
namespace for the element
namespace
)

Creates a new element with the supplied (local) name and namespace.

public
LocatedElement(final String
local name of the element
name
)

Create a new element with the supplied (local) name and no namespace.

public
LocatedElement(final String
name of the element
name
,
final String
namespace URI for the element
uri
)

Creates a new element with the supplied (local) name and a namespace given by a URI.

public
LocatedElement(final String
local name of the element
name
,
final String
namespace prefix
prefix
,
final String
namespace URI for the element
uri
)

Creates a new element with the supplied (local) name and a namespace given by the supplied prefix and URI combination.

Method Summary

Modifier and TypeMethod and Description
public int
getColumn()

Implements org.jdom2.located.Located.getColumn.

Get the column (character on the line).
public int
getLine()

Implements org.jdom2.located.Located.getLine.

Get the line number
public void
setColumn(int
The column
col
)

Implements org.jdom2.located.Located.setColumn.

Set the column (character on the line).
public void
setLine(int
the line.
line
)

Implements org.jdom2.located.Located.setLine.

Set the line number
Inherited from org.jdom2.Element:
addContentaddContentaddContentaddContentaddContentaddNamespaceDeclarationcanContainContentclonecloneContentcoalesceTextdetachgetAdditionalNamespacesgetAttributegetAttributegetAttributesgetAttributesSizegetAttributeValuegetAttributeValuegetAttributeValuegetAttributeValuegetChildgetChildgetChildrengetChildrengetChildrengetChildTextgetChildTextgetChildTextNormalizegetChildTextNormalizegetChildTextTrimgetChildTextTrimgetContentgetContentgetContentgetContentSizegetDescendantsgetDescendantsgetNamegetNamespacegetNamespacegetNamespacePrefixgetNamespacesInheritedgetNamespacesInScopegetNamespacesIntroducedgetNamespaceURIgetQualifiedNamegetTextgetTextNormalizegetTextTrimgetValuegetXMLBaseURIhasAdditionalNamespaceshasAttributesindexOfisAncestorisRootElementremoveAttributeremoveAttributeremoveAttributeremoveChildremoveChildremoveChildrenremoveChildrenremoveContentremoveContentremoveContentremoveContentremoveNamespaceDeclarationsetAttributesetAttributesetAttributesetAttributessetContentsetContentsetContentsetContentsetNamesetNamespacesetTextsortAttributessortChildrensortContentsortContenttoString

Field Detail

colback to summary
private int col
lineback to summary
private int line
serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.jdom2.Element.serialVersionUID.

JDOM2 Serialization. In this case, DocType is simple.

Constructor Detail

LocatedElementback to summary
public LocatedElement(final String name, final 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:String

local name of the element

namespace:Namespace

namespace for the element

Exceptions
IllegalNameException:
if the given name is illegal as an element name
LocatedElementback to summary
public LocatedElement(final String name)

Create a new element with the supplied (local) name and no namespace.

Parameters
name:String

local name of the element

Exceptions
IllegalNameException:
if the given name is illegal as an element name.
LocatedElementback to summary
public LocatedElement(final String name, final 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:String

name of the element

uri:String

namespace URI for the element

Exceptions
IllegalNameException:
if the given name is illegal as an element name or the given URI is illegal as a namespace URI
LocatedElementback to summary
public LocatedElement(final String name, final String prefix, final String uri)

Creates a new element with the supplied (local) name and a namespace given by the supplied prefix and URI combination.

Parameters
name:String

local name of the element

prefix:String

namespace prefix

uri:String

namespace URI for the element

Exceptions
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

getColumnback to summary
public int getColumn()

Implements org.jdom2.located.Located.getColumn.

Doc from org.jdom2.located.Located.getColumn.

Get the column (character on the line).

Returns:int

the column

Annotations
@Override
getLineback to summary
public int getLine()

Implements org.jdom2.located.Located.getLine.

Doc from org.jdom2.located.Located.getLine.

Get the line number

Returns:int

the line number

Annotations
@Override
setColumnback to summary
public void setColumn(int col)

Implements org.jdom2.located.Located.setColumn.

Doc from org.jdom2.located.Located.setColumn.

Set the column (character on the line).

Parameters
col:int

The column

Annotations
@Override
setLineback to summary
public void setLine(int line)

Implements org.jdom2.located.Located.setLine.

Doc from org.jdom2.located.Located.setLine.

Set the line number

Parameters
line:int

the line.

Annotations
@Override