com.ca.commons.datamodel.standard
Class DataModelBuilderImpl

java.lang.Object
  extended by com.ca.commons.datamodel.standard.DataModelBuilderImpl
All Implemented Interfaces:
DataModelBuilder
Direct Known Subclasses:
DataModelEditorImpl

public class DataModelBuilderImpl
extends Object
implements DataModelBuilder

This class handles the composition of any number of model fragments (JAXB beans) into a single non-JAXB merged image of the model. The JAXB beans are hidden, rather then adding extra functionality via specialised entries in a JAXB factory, so that the simplest possible programmatic interface is exposed to the client developers.


Field Summary
protected  com.ca.commons.datamodel.standard.DataModelImpl dataModel
           
static DataModelProperty debugProp
           
protected  boolean editor
           
static Logger logger
           
protected  Collection<DataModelSource> sources
           
 
Fields inherited from interface com.ca.commons.datamodel.DataModelBuilder
metadataMismatchLogger
 
Constructor Summary
DataModelBuilderImpl()
           
 
Method Summary
 DataModelValue convertValueFromXML(com.ca.commons.datamodel.standard.DataModelNamespaceImpl ns, SimpleValue xmlType)
           
protected  DataModelSource getCurrentSource()
          Only defined while this builder is processing a source.
 DataModel getDataModel()
           
 Collection<DataModelSource> getSources()
          List of DataModelSource, in order they were merged.
 boolean isEditor()
           
 void mergeFragment(DataModelSource source)
          Used to read in a fragment containing values which aren't going to edited, either because the client application is read-only or because this fragment is static as far as it is concerned.
protected  void notifyPropertyValueChange(com.ca.commons.datamodel.standard.DataModelPropertyImpl prop)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debugProp

public static DataModelProperty debugProp

logger

public static final Logger logger

sources

protected final Collection<DataModelSource> sources

dataModel

protected final com.ca.commons.datamodel.standard.DataModelImpl dataModel

editor

protected boolean editor
Constructor Detail

DataModelBuilderImpl

public DataModelBuilderImpl()
Method Detail

getDataModel

public DataModel getDataModel()
Specified by:
getDataModel in interface DataModelBuilder

getSources

public Collection<DataModelSource> getSources()
List of DataModelSource, in order they were merged.


isEditor

public boolean isEditor()

getCurrentSource

protected DataModelSource getCurrentSource()
Only defined while this builder is processing a source.


mergeFragment

public void mergeFragment(DataModelSource source)
                   throws IOException,
                          javax.xml.bind.JAXBException
Description copied from interface: DataModelBuilder
Used to read in a fragment containing values which aren't going to edited, either because the client application is read-only or because this fragment is static as far as it is concerned.

Specified by:
mergeFragment in interface DataModelBuilder
Parameters:
source - Read-only source from which datamodel fragment should be read.
Throws:
IOException
javax.xml.bind.JAXBException

convertValueFromXML

public DataModelValue convertValueFromXML(com.ca.commons.datamodel.standard.DataModelNamespaceImpl ns,
                                          SimpleValue xmlType)

notifyPropertyValueChange

protected void notifyPropertyValueChange(com.ca.commons.datamodel.standard.DataModelPropertyImpl prop)
                                  throws DataModelMismatchException
Throws:
DataModelMismatchException


Created 2011-07-14 13:27 EST