Cytoscape 3.0.1 API
Class AbstractConfigDirPropsReader

  extended by
All Implemented Interfaces:

public abstract class AbstractConfigDirPropsReader
extends Object
implements CyProperty<Properties>

An abstract implementation of CyProperty<Properties> that attempts to read the specified properties file first from the jar file running this code and then appends any properties found in the local configuration directory to that properties object. The config directory used is CyProperty.DEFAULT_PROPS_CONFIG_DIR.
This class must be extended so that it will read from the proper jar file. In general simply implementing a constructor should be sufficient:

        public class PropsReader extends AbstractConfigDirPropsReader {
                PropsReader(String s, SavePolicy sp) {

Cytoscape Backwards Compatibility (Abstract Class): This class is abstract and meant to be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.

Nested Class Summary
Nested classes/interfaces inherited from interface
Field Summary
protected  String name
          The name of this CyProperty.
protected  Properties props
          The Properties object created for this class.
protected  CyProperty.SavePolicy savePolicy
          The SavePolicy of this CyProperty.
Fields inherited from interface
Constructor Summary
AbstractConfigDirPropsReader(String name, String propFileName, CyProperty.SavePolicy savePolicy)
          Creates a new AbstractConfigDirPropsReader object.
Method Summary
 String getName()
          Returns the name of the CyProperty.
 Properties getProperties()
          Return a property object.
 Class<? extends Properties> getPropertyType()
          Returns the type of the property object.
 CyProperty.SavePolicy getSavePolicy()
          Returns the CyProperty.SavePolicy of the CyProperty.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected final String name
The name of this CyProperty.


protected final Properties props
The Properties object created for this class.


protected final CyProperty.SavePolicy savePolicy
The SavePolicy of this CyProperty.

Constructor Detail


public AbstractConfigDirPropsReader(String name,
                                    String propFileName,
                                    CyProperty.SavePolicy savePolicy)
Creates a new AbstractConfigDirPropsReader object.

name - The name of this CyProperty.
propFileName - The name of the java.util.Properties file to read.
savePolicy - The save policy for this CyProperty. This value MUST be either CyProperty.SavePolicy.CONFIG_DIR or CyProperty.SavePolicy.SESSION_FILE_AND_CONFIG_DIR so that we can reasonably expect to find a properties file in the configuration directory. If you'd like to use a different SavePolicy, then consider using SimpleCyProperty instead.
Method Detail


public String getName()
Returns the name of the CyProperty.

Specified by:
getName in interface CyProperty<Properties>
The name of the CyProperty.


public CyProperty.SavePolicy getSavePolicy()
Returns the CyProperty.SavePolicy of the CyProperty.

Specified by:
getSavePolicy in interface CyProperty<Properties>
the CyProperty.SavePolicy of the CyProperty.


public Properties getProperties()
Return a property object.

Specified by:
getProperties in interface CyProperty<Properties>
A property object of type P.


public Class<? extends Properties> getPropertyType()
Returns the type of the property object.

Specified by:
getPropertyType in interface CyProperty<Properties>
the type of the property object.

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.