public class ReportInfo extends Object implements XmlSerializable
ReportInfo
class encapsulates the body of a REPORT request.
RFC 3253 the top Xml element
being the name of the requested report. In addition a Depth header may
be present (default value: DavConstants.DEPTH_0
).Constructor and Description |
---|
ReportInfo(Element reportElement,
int depth)
Create a new
ReportInfo object from the given Xml element. |
ReportInfo(ReportType type)
Create a new
ReportInfo |
ReportInfo(ReportType type,
int depth)
Create a new
ReportInfo |
ReportInfo(ReportType type,
int depth,
DavPropertyNameSet propertyNames)
Create a new
ReportInfo |
ReportInfo(String typeLocalName,
Namespace typeNamespace)
Create a new
ReportInfo |
ReportInfo(String typelocalName,
Namespace typeNamespace,
int depth,
DavPropertyNameSet propertyNames)
Create a new
ReportInfo |
Modifier and Type | Method and Description |
---|---|
boolean |
containsContentElement(String localName,
Namespace namespace)
Indicates whether this info contains an element with the given name/namespace.
|
Element |
getContentElement(String localName,
Namespace namespace)
Retrieves the Xml element with the given name/namespace that is a child
of this info.
|
List<Element> |
getContentElements(String localName,
Namespace namespace)
Returns a list containing all child Xml elements of this info that have
the specified name/namespace.
|
int |
getDepth()
Returns the depth field.
|
DavPropertyNameSet |
getPropertyNameSet()
Returns a
DavPropertyNameSet providing the property names present
in an eventual DavConstants.XML_PROP child element. |
String |
getReportName()
Name of the report type that will be / has been requested.
|
void |
setContentElement(Element contentElement)
Add the specified Xml element as child of this info.
|
Element |
toXml(Document document)
Returns the xml representation of the implementing object as
Element . |
public ReportInfo(ReportType type)
ReportInfo
type
- public ReportInfo(ReportType type, int depth)
ReportInfo
type
- depth
- public ReportInfo(ReportType type, int depth, DavPropertyNameSet propertyNames)
ReportInfo
type
- depth
- propertyNames
- public ReportInfo(String typeLocalName, Namespace typeNamespace)
ReportInfo
typeLocalName
- typeNamespace
- public ReportInfo(String typelocalName, Namespace typeNamespace, int depth, DavPropertyNameSet propertyNames)
ReportInfo
typelocalName
- typeNamespace
- depth
- propertyNames
- public ReportInfo(Element reportElement, int depth) throws DavException
ReportInfo
object from the given Xml element.reportElement
- depth
- Depth value as retrieved from the DavConstants.HEADER_DEPTH
.DavException
- if the report element is null
.public int getDepth()
public String getReportName()
public boolean containsContentElement(String localName, Namespace namespace)
localName
- namespace
- public Element getContentElement(String localName, Namespace namespace)
null
is returned. If
multiple elements with the same name exist, the first one is returned.localName
- namespace
- null
public List<Element> getContentElements(String localName, Namespace namespace)
localName
- namespace
- public void setContentElement(Element contentElement)
contentElement
- public DavPropertyNameSet getPropertyNameSet()
DavPropertyNameSet
providing the property names present
in an eventual DavConstants.XML_PROP
child element. If no such
child element is present an empty set is returned.DavPropertyNameSet
providing the property names present
in an eventual DAV:prop
child element or an empty set.public Element toXml(Document document)
XmlSerializable
Element
. The given Document
is used
as factory and represents the owner document
of the returned DOM element.toXml
in interface XmlSerializable
document
- XmlSerializable.toXml(Document)
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.