All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.uci.ics.jung.io.graphml.AbstractMetadata Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2008, The JUNG Authors
 *
 * All rights reserved.
 *
 * This software is open-source under the BSD license; see either
 * "license.txt" or
 * https://github.com/jrtom/jung/blob/master/LICENSE for a description.
 */

package edu.uci.ics.jung.io.graphml;

import java.util.HashMap;
import java.util.Map;

/**
 * Abstract base class for metadata - implements the property functionality
 * 
 * @author Nathan Mittler - [email protected]
 */
public abstract class AbstractMetadata implements Metadata {

    final private Map properties = new HashMap();
    
    public Map getProperties() {
        return properties;
    }
    
    public String getProperty(String key) {
        return properties.get(key);
    }
    
    public String setProperty(String key, String value) {
        return properties.put(key, value);
    }
    
    public void addData(DataMetadata data) {
        properties.put(data.getKey(), data.getValue());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy