com.mxgraph.io.mxCodecRegistry Maven / Gradle / Ivy
/**
* $Id: mxCodecRegistry.java,v 1.24 2010-09-15 11:57:07 gaudenz Exp $
* Copyright (c) 2007, Gaudenz Alder
*/
package com.mxgraph.io;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import com.mxgraph.model.mxGraphModel.mxCollapseChange;
import com.mxgraph.model.mxGraphModel.mxGeometryChange;
import com.mxgraph.model.mxGraphModel.mxStyleChange;
import com.mxgraph.model.mxGraphModel.mxValueChange;
import com.mxgraph.model.mxGraphModel.mxVisibleChange;
/**
* Singleton class that acts as a global registry for codecs. See
* {@link mxCodec} for an example.
*/
public class mxCodecRegistry
{
/**
* Maps from constructor names to codecs.
*/
protected static Hashtable codecs = new Hashtable();
/**
* Maps from classnames to codecnames.
*/
protected static Hashtable aliases = new Hashtable();
/**
* Holds the list of known packages. Packages are used to prefix short
* class names (eg. mxCell) in XML markup.
*/
protected static List packages = new ArrayList();
// Registers the known codecs and package names
static
{
addPackage("com.mxgraph");
addPackage("com.mxgraph.util");
addPackage("com.mxgraph.model");
addPackage("com.mxgraph.view");
addPackage("java.lang");
addPackage("java.util");
register(new mxObjectCodec(new ArrayList
© 2015 - 2025 Weber Informatics LLC | Privacy Policy