protected Element insertProsodySettings(Element insertHere,FeatureSet featureSet){
  if (insertHere == null || featureSet == null)   throw new NullPointerException("I thoroughly dislike getting null arguments!");
  boolean haveProsodyInfo=false;
  for (  String att : XML2UttBase.PROSODY_ATTRIBUTES) {
    if (featureSet.getString(att) != null) {
      haveProsodyInfo=true;
      break;
    }
  }
  if (!haveProsodyInfo) {
    return null;
  }
  Document doc=insertHere.getOwnerDocument();
  Element prosody=MaryXML.createElement(doc,MaryXML.PROSODY);
  insertHere.appendChild(prosody);
  for (  String att : XML2UttBase.PROSODY_ATTRIBUTES) {
    String val=featureSet.getString(att);
    if (val != null) {
      prosody.setAttribute(att,val);
    }
  }
  return prosody;
}

protected Element insertProsodySettings ( Element insertHere , FeatureSet featureSet ) { if ( insertHere == null || featureSet == null ) throw new NullPointerException ( "I thoroughly dislike getting null arguments!" ) ; boolean haveProsodyInfo = false ; for ( String att : XML2UttBase . PROSODY_ATTRIBUTES ) { if ( featureSet . getString ( att ) != null ) { haveProsodyInfo = true ; break ; } } if ( ! haveProsodyInfo ) { return null ; } Document doc = insertHere . getOwnerDocument ( ) ; Element prosody = MaryXML . createElement ( doc , MaryXML . PROSODY ) ; insertHere . appendChild ( prosody ) ; for ( String att : XML2UttBase . PROSODY_ATTRIBUTES ) { String val = featureSet . getString ( att ) ; if ( val != null ) { prosody . setAttribute ( att , val ) ; } } return prosody ; }
for a given utterance or token , see if there are any prosodic settings defined , and if so , create a corresponding prosody element as a child of inserthere .
