cytoscape.visual.mappings
Class MappingFactory
java.lang.Object
cytoscape.visual.mappings.MappingFactory
public class MappingFactory
- extends Object
This class provides a static factory method for constructing an instance
of ObjectMapping as specified by a Properties object and other arguments.
Since there are currently only a few types of mappings known, it's easiest
to simply check each case and construct the right mapping without going
through a dynamic class-discovery instantiation process. If the number of
mappings ever gets out of hand, we can always switch to a dynamic algorithm.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MappingFactory
public MappingFactory()
newMapping
public static ObjectMapping newMapping(Properties props,
String baseKey,
ValueParser parser,
Object defObj,
byte mapType)
- Attempt to construct an instance of ObjectMapping as defined by
the supplied arguments. Checks the value of a recognized key in
the Properties argument against a list of known Mappings. If found,
constructs the Mapping object and then customizes it by calling its
applyProperties method.
getProperties
public static Properties getProperties(ObjectMapping m,
String baseKey)
- Gets a description of the supplied ObjectMapping as properties.
This method calls the getProperties() method of the ObjectMapping
argument and then adds a property to identify the mapping class,
in a form recognized by the newMapping method.
Copyright 2010 Cytoscape Consortium. All rights reserved.