private void writeSourceSinkDomPair(SourceSinkDomPair pair,Document document,Element rootElement){
  final Element pairElement;
  final Element sourceSinkElement;
switch (pair.getType()) {
case SourceDomPair:
    pairElement=document.createElement("sourcedompair");
  sourceSinkElement=document.createElement("source");
break;
case SinkDomPair:
pairElement=document.createElement("sinkdompair");
sourceSinkElement=document.createElement("sink");
break;
default :
throw new RuntimeException("Invalid source/sink domain pair type");
}
rootElement.appendChild(pairElement);
pairElement.appendChild(sourceSinkElement);
writeSourceSinkSpec(pair.getSourceOrSink(),document,sourceSinkElement);
writeDomainSpec(pair.getDomain(),document,pairElement);
}

private void writeSourceSinkDomPair ( SourceSinkDomPair pair , Document document , Element rootElement ) { final Element pairElement ; final Element sourceSinkElement ; switch ( pair . getType ( ) ) { case SourceDomPair : pairElement = document . createElement ( "sourcedompair" ) ; sourceSinkElement = document . createElement ( "source" ) ; break ; case SinkDomPair : pairElement = document . createElement ( "sinkdompair" ) ; sourceSinkElement = document . createElement ( "sink" ) ; break ; default : throw new RuntimeException ( "Invalid source/sink domain pair type" ) ; } rootElement . appendChild ( pairElement ) ; pairElement . appendChild ( sourceSinkElement ) ; writeSourceSinkSpec ( pair . getSourceOrSink ( ) , document , sourceSinkElement ) ; writeDomainSpec ( pair . getDomain ( ) , document , pairElement ) ; }
writes out a source or sink domain pair
