com.bigllc.retsiq.metadata
Class MetadataOverlayModel

java.lang.Object
  extended by com.bigllc.retsiq.metadata.MetadataOverlayModel

public class MetadataOverlayModel
extends java.lang.Object

This class allows an overlay sparse metadata to be overlaid onto a base working copy. It also allows the differences to be generated as a sparse metadata model. The base should not be modified. Changes should be made to the model that is retrieved from getModel on this class.

Author:
Marc G. Smith

Constructor Summary
MetadataOverlayModel(MetadataSystem base)
          Deprecated. 
MetadataOverlayModel(MetadataSystem base, MetadataSystem overlay)
          Deprecated. 
MetadataOverlayModel(MetadataSystem base, MetadataSystem overlay, com.bigllc.retsiq.api.RETSConstants.Version version)
          Construct a model from the base metadata with the overlay applied.
MetadataOverlayModel(MetadataSystem base, com.bigllc.retsiq.api.RETSConstants.Version version)
          Construct a new overlay model with no changes applied.
 
Method Summary
 MetadataModel getModel()
          Get the constructed base and overlay metadata.
 MetadataSystem getOverlayMetadata()
          Get the overlay metadata.
 MetadataSystem getSystem()
          Get the system node for the constructed base and overlay metadata.
static void main(java.lang.String[] args)
           
 void writeOverlay(java.io.OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataOverlayModel

@Deprecated
public MetadataOverlayModel(MetadataSystem base)
Deprecated. 

Construct a new overlay model with no changes applied.


MetadataOverlayModel

@Deprecated
public MetadataOverlayModel(MetadataSystem base,
                                       MetadataSystem overlay)
Deprecated. 

Construct a model from the base metadata with the overlay applied.


MetadataOverlayModel

public MetadataOverlayModel(MetadataSystem base,
                            com.bigllc.retsiq.api.RETSConstants.Version version)
Construct a new overlay model with no changes applied.


MetadataOverlayModel

public MetadataOverlayModel(MetadataSystem base,
                            MetadataSystem overlay,
                            com.bigllc.retsiq.api.RETSConstants.Version version)
Construct a model from the base metadata with the overlay applied.

Method Detail

getModel

public MetadataModel getModel()
Get the constructed base and overlay metadata.


getSystem

public MetadataSystem getSystem()
Get the system node for the constructed base and overlay metadata.


getOverlayMetadata

public MetadataSystem getOverlayMetadata()
Get the overlay metadata. This is generated dynamically on every call. Changes made to the source metadata will not be reflected in this metadata after a call.

Returns:
metadata reflecting the differences between the base and the current metadata model

writeOverlay

public void writeOverlay(java.io.OutputStream out)
                  throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception