org.geotools.graph.io.standard
Class AbstractReaderWriter

java.lang.Object
  extended byorg.geotools.graph.io.standard.AbstractReaderWriter
All Implemented Interfaces:
GraphReaderWriter
Direct Known Subclasses:
DBReaderWriter, SerializedReaderWriter, TextfileReaderWriter

public abstract class AbstractReaderWriter
extends java.lang.Object
implements GraphReaderWriter

An abstract implementation of the GraphReaderWriter interface.

Author:
Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net

Field Summary
static java.lang.String BUILDER
          GraphBuilder property key
static java.lang.String EDGES
          Edge write / read flag
static java.lang.String GENERATOR
          GraphGenerator property key
static java.lang.String NODES
          Node write / read flag
 
Constructor Summary
AbstractReaderWriter()
          Constructs an AbstractReaderWriter.
 
Method Summary
 java.lang.Object getProperty(java.lang.String name)
          Returns a property for the reader/writer.
 void setProperty(java.lang.String name)
          Sets a property.
 void setProperty(java.lang.String name, java.lang.Object obj)
          Sets a property for the reader/writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.graph.io.GraphReaderWriter
read, write
 

Field Detail

GENERATOR

public static final java.lang.String GENERATOR
GraphGenerator property key

See Also:
Constant Field Values

BUILDER

public static final java.lang.String BUILDER
GraphBuilder property key

See Also:
Constant Field Values

NODES

public static final java.lang.String NODES
Node write / read flag

See Also:
Constant Field Values

EDGES

public static final java.lang.String EDGES
Edge write / read flag

See Also:
Constant Field Values
Constructor Detail

AbstractReaderWriter

public AbstractReaderWriter()
Constructs an AbstractReaderWriter.

Method Detail

setProperty

public void setProperty(java.lang.String name)
Sets a property. Some properties dont have values associated with them, they are just set, and unset.

Parameters:
name - Name of property

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object obj)
Description copied from interface: GraphReaderWriter
Sets a property for the reader/writer.

Specified by:
setProperty in interface GraphReaderWriter
Parameters:
name - Name of the property.
obj - Value of the property.
See Also:
GraphReaderWriter.setProperty(String, Object)

getProperty

public java.lang.Object getProperty(java.lang.String name)
Description copied from interface: GraphReaderWriter
Returns a property for the reader/writer. This method will return null if the property has not been set with a call to setProperty(String,Object).

Specified by:
getProperty in interface GraphReaderWriter
Parameters:
name - Name of the property.
Returns:
Value of the property or null if the property is undefined.
See Also:
GraphReaderWriter.getProperty(String)


Copyright © GeoTools. All Rights Reserved.