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

net.anotheria.asg.generator.meta.MetaFederationModule Maven / Gradle / Ivy

The newest version!
package net.anotheria.asg.generator.meta;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * 

MetaFederationModule class.

* * @author another * @version $Id: $Id */ public class MetaFederationModule extends MetaModule { private List federatedModules; private Map> mappings; /** *

Constructor for MetaFederationModule.

*/ public MetaFederationModule(){ this(null); } /** *

Constructor for MetaFederationModule.

* * @param name a {@link java.lang.String} object. */ public MetaFederationModule(String name){ super(name); setStorageType( StorageType.FEDERATION); federatedModules = new ArrayList(); mappings = new HashMap>(); } /** *

addFederatedModule.

* * @param aKey a {@link java.lang.String} object. * @param aName a {@link java.lang.String} object. */ public void addFederatedModule(String aKey, String aName){ federatedModules.add(new FederatedModuleDef(aKey, aName)); } /** *

Getter for the field federatedModules.

* * @return a {@link java.util.List} object. */ public List getFederatedModules() { return federatedModules; } /** *

Setter for the field federatedModules.

* * @param federatedModules a {@link java.util.List} object. */ public void setFederatedModules(List federatedModules) { this.federatedModules = federatedModules; } /** *

addMapping.

* * @param mapping a {@link net.anotheria.asg.generator.meta.FederatedDocumentMapping} object. */ public void addMapping(FederatedDocumentMapping mapping){ List mappingsForDocument = mappings.get(mapping.getSourceDocument()); if (mappingsForDocument==null){ mappingsForDocument = new ArrayList(); mappings.put(mapping.getSourceDocument(), mappingsForDocument); } mappingsForDocument.add(mapping); } /** *

getMappingsForDocument.

* * @param documentName a {@link java.lang.String} object. * @return a {@link java.util.List} object. */ public List getMappingsForDocument(String documentName){ List ret = mappings.get(documentName); return ret == null ? new ArrayList() : ret; } /** {@inheritDoc} */ @Override public boolean equals(Object o) { return super.equals(o); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy