XNGR XML Browser

org.xngr
Class XProperties

java.lang.Object
  extended byorg.xngr.XProperties

public class XProperties
extends Object

The class that can be used by the service to set properties. A fixed set of properties are already set by the eXchaNGeR application,

"service.home", the home/installation directory of the service.

The following properties are the same as defined in the service.xml file.

"service.version", the version of the service.
"service.author", the author of the service.
"service.copyright", the copyright information for the service.
"service.description", the service description.
"service.reference", the service reference, normally a URL.
"service.title", the service title.

Version:
$Revision: 1.2 $, $Date: 2002/11/29 12:39:27 $
Author:
Edwin Dankert

Constructor Summary
XProperties()
          Creates an empty properties list.
XProperties(String[][] properties)
          Creates a properties list with initial property values.
 
Method Summary
 String get(String key)
          Gets a property for a specific key.
 String[][] getProperties()
          Returns all the properties as an array of key value pairs.
 void put(String key, String value)
          Sets a property for a specific key.
 void setProperties(String[][] props)
          Sets all the properties as an array of key, value pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XProperties

public XProperties()
Creates an empty properties list.


XProperties

public XProperties(String[][] properties)
Creates a properties list with initial property values. Where properties[X][0] is the key and properties[X][1] is the value for the key.

Parameters:
properties - a list of properties.
Method Detail

get

public String get(String key)
Gets a property for a specific key.

Parameters:
key - the key for the property.
Returns:
the value of the property, will return null if the key cannot be found

put

public void put(String key,
                String value)
Sets a property for a specific key.

Parameters:
key - the key for the property.
value - the value of the property.

setProperties

public void setProperties(String[][] props)
Sets all the properties as an array of key, value pairs. Where properties[X][0] is the key and properties[X][1] is the value for the key.

Parameters:
props - the array of key value pairs.

getProperties

public String[][] getProperties()
Returns all the properties as an array of key value pairs. where properties[X][0] is the key and properties[X][1] is the value for the key.

Returns:
an array of key value pairs.

XNGR XML Browser

Copyright © 2002 - 2005, Edwin Dankert, All Rights Reserved