org.milyn.edisax.registry
Class DefaultMappingsRegistry

java.lang.Object
  extended by org.milyn.edisax.registry.AbstractMappingsRegistry
      extended by org.milyn.edisax.registry.DefaultMappingsRegistry
All Implemented Interfaces:
MappingsRegistry

public class DefaultMappingsRegistry
extends AbstractMappingsRegistry

Default implementation of MappingsRegistry. Default implementation loading EDIFACT models based on the specified list of model files which could be provided either via constructor or via addModelReferences(String, URI) method.

Author:
zubairov

Field Summary
 
Fields inherited from class org.milyn.edisax.registry.AbstractMappingsRegistry
content
 
Constructor Summary
DefaultMappingsRegistry(EdifactModel... models)
          Constructor mostly used for tests
DefaultMappingsRegistry(String mappingModelFiles, URI baseURI)
          Loading mapping model out of ZIP file
 
Method Summary
 void addModelReferences(String models, URI baseURI)
          Add references to the lookup list.
protected  Map<String,EdifactModel> demandLoading(String[] nameComponents)
          This method load all mapping models which are declared in modelReferences map and returns them all back.
 
Methods inherited from class org.milyn.edisax.registry.AbstractMappingsRegistry
getMappingModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMappingsRegistry

public DefaultMappingsRegistry(EdifactModel... models)
Constructor mostly used for tests

Parameters:
models -

DefaultMappingsRegistry

public DefaultMappingsRegistry(String mappingModelFiles,
                               URI baseURI)
                        throws EDIConfigurationException,
                               IOException,
                               SAXException
Loading mapping model out of ZIP file

Parameters:
string -
baseURI -
Throws:
SAXException
IOException
EDIConfigurationException
Method Detail

addModelReferences

public void addModelReferences(String models,
                               URI baseURI)
Add references to the lookup list.

Parameters:
references -

demandLoading

protected Map<String,EdifactModel> demandLoading(String[] nameComponents)
                                          throws EDIConfigurationException,
                                                 IOException,
                                                 SAXException
This method load all mapping models which are declared in modelReferences map and returns them all back. It is actually ignoring nameComponents parameter because no on-demand loading is happening here.

Specified by:
demandLoading in class AbstractMappingsRegistry
Parameters:
nameComponents -
Returns:
Throws:
SAXException
IOException
EDIConfigurationException


Copyright © 2018. All rights reserved.