Esri Geoportal Server
1.0

com.esri.gpt.control.search.browse
Class TocItem

java.lang.Object
  extended by com.esri.gpt.control.search.browse.TocItem

public class TocItem
extends Object

Represents an item within a table of contents.


Constructor Summary
TocItem()
          Default constructor
 
Method Summary
 List<TocItem> getChildren()
          Gets the children.
 String getName()
          Gets the name.
 String getQuery()
          Gets the query string (rest).
 String getResourceKey()
          Gets the UI property bundle resource key.
 String getType()
          Gets the type (for TOC image display).
 boolean hasChildren()
          Determines whether or not this property has children.
 void invalidate()
          Invalidates the item.
 boolean isValid()
          Gets the flag indicating whether or not the item is valid.
 void lookupName(MessageBroker msgBroker)
          Looks up the item name based upon the UI property bundle resource key.
static TocItem makeItemInstance(TocContext context, String className)
          Makes a TocItem instance based upon a class name.
 void processItemNode(TocContext context, Node node)
          Processes a TOC item node.
 void setChildren(List<TocItem> children)
          Sets the children.
 void setName(String name)
          Sets the name.
 void setQuery(String query)
          Sets the query string (rest).
 void setResourceKey(String resourceKey)
          Sets the UI property bundle resource key.
 void setType(String type)
          Sets the type (for TOC image display).
 void toJson(PrintWriter writer, int depth, boolean isLast)
          Writes a JSON representation of the property.
 void toXml(PrintWriter writer, int depth)
          Writes an XML representation of the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TocItem

public TocItem()
Default constructor

Method Detail

getChildren

public List<TocItem> getChildren()
Gets the children.

Returns:
the children

setChildren

public void setChildren(List<TocItem> children)
Sets the children.

Parameters:
children - the children

getName

public String getName()
Gets the name.

Returns:
the name

setName

public void setName(String name)
Sets the name.

Parameters:
name - the name

getQuery

public String getQuery()
Gets the query string (rest).

Returns:
the name

setQuery

public void setQuery(String query)
Sets the query string (rest).

Parameters:
query - query string

getResourceKey

public String getResourceKey()
Gets the UI property bundle resource key.

Returns:
the resource key

setResourceKey

public void setResourceKey(String resourceKey)
Sets the UI property bundle resource key.

Parameters:
resourceKey - the resource key

getType

public String getType()
Gets the type (for TOC image display).

Returns:
the type

setType

public void setType(String type)
Sets the type (for TOC image display).

Parameters:
type - the type

hasChildren

public boolean hasChildren()
Determines whether or not this property has children.

Returns:
true if this property has children

invalidate

public void invalidate()
Invalidates the item.


isValid

public boolean isValid()
Gets the flag indicating whether or not the item is valid.

Returns:
true if the item is valid

lookupName

public void lookupName(MessageBroker msgBroker)
Looks up the item name based upon the UI property bundle resource key.

Parameters:
msgBroker - the message broker

makeItemInstance

public static TocItem makeItemInstance(TocContext context,
                                       String className)
                                throws ClassNotFoundException,
                                       InstantiationException,
                                       IllegalAccessException
Makes a TocItem instance based upon a class name.

Parameters:
context - the operation context
className - the fully qualified class name
Returns:
the instance
Throws:
ClassNotFoundException - if the class was not found
InstantiationException - if the class could not be instantiated
IllegalAccessException - if the class could not be accessed

processItemNode

public void processItemNode(TocContext context,
                            Node node)
                     throws Exception
Processes a TOC item node.

Parameters:
context - the operation context
node - the item node
Throws:
Exception - if an exception occurs

toJson

public void toJson(PrintWriter writer,
                   int depth,
                   boolean isLast)
            throws IOException
Writes a JSON representation of the property.

Parameters:
writer - the writer
depth - the depth of the parent
Throws:
IOException - if an exception occurs

toXml

public void toXml(PrintWriter writer,
                  int depth)
           throws IOException
Writes an XML representation of the property.

Parameters:
writer - the writer
depth - the depth of the parent
Throws:
IOException - if an exception occurs

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.