org.apache.wicket.markup
Interface IMarkup


public interface IMarkup

Holds markup as a resource (the stream that the markup came from) and a list of MarkupElements (the markup itself).

Author:
Jonathan Locke, Juergen Donnerstag
See Also:
MarkupElement, ComponentTag, RawMarkup

Method Summary
 int findComponentIndex(String path, String id)
          Find the markup element index of the component with 'path'
 MarkupElement get(int index)
          For Wicket it would be sufficient for this method to be package protected.
 String getEncoding()
          Gets the markup encoding.
 MarkupResourceStream getResource()
          Gets the resource that contains this markup
 String getWicketNamespace()
          Get the wicket namespace valid for this specific markup
 String getXmlDeclaration()
          Return the XML declaration string, in case if found in the markup.
 int size()
          For Wicket it would be sufficient for this method to be package protected.
 String toDebugString()
           
 String toString()
           
 

Method Detail

findComponentIndex

int findComponentIndex(String path,
                       String id)
Find the markup element index of the component with 'path'

Parameters:
path - The component path expression
id - The component's id to search for
Returns:
-1, if not found

get

MarkupElement get(int index)
For Wicket it would be sufficient for this method to be package protected. However to allow wicket-bench easy access to the information ...

Parameters:
index - Index into markup list
Returns:
Markup element

getEncoding

String getEncoding()
Gets the markup encoding. A markup encoding may be specified in a markup file with an XML encoding specifier of the form <?xml ... encoding="..." ?>.

Returns:
Encoding, or null if not found.

getResource

MarkupResourceStream getResource()
Gets the resource that contains this markup

Returns:
The resource where this markup came from

getWicketNamespace

String getWicketNamespace()
Get the wicket namespace valid for this specific markup

Returns:
wicket namespace

getXmlDeclaration

String getXmlDeclaration()
Return the XML declaration string, in case if found in the markup.

Returns:
Null, if not found.

size

int size()
For Wicket it would be sufficient for this method to be package protected. However to allow wicket-bench easy access to the information ...

Returns:
Number of markup elements

toDebugString

String toDebugString()
Returns:
String representation of markup list

toString

String toString()
Overrides:
toString in class Object
Returns:
String representation of markup list


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.