org.ocltf.utils
Class XmiUtils

java.lang.Object
  extended byorg.ocltf.utils.XmiUtils

public class XmiUtils
extends java.lang.Object

Contains utilities for modifying/processing XMI files.

Author:
Chad Brandon

Constructor Summary
XmiUtils()
           
 
Method Summary
protected static void removeElements(org.w3c.dom.Document document, java.lang.String elementName)
          Removes the specified element name for the document.
static java.io.InputStream stripElements(java.io.InputStream xmiStream, java.lang.String[] elementNames)
          Strips elements from the passed in modelXmi and returns the model with the removed elements as an InputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmiUtils

public XmiUtils()
Method Detail

stripElements

public static java.io.InputStream stripElements(java.io.InputStream xmiStream,
                                                java.lang.String[] elementNames)
Strips elements from the passed in modelXmi and returns the model with the removed elements as an InputStream

Parameters:
xmiStream - the InputStream for the XMI.
elementNames -
Returns:
InputStream after the elements are stripped.

removeElements

protected static void removeElements(org.w3c.dom.Document document,
                                     java.lang.String elementName)
Removes the specified element name for the document.

Parameters:
document - the Document from which to remove the element having the given name.
elementName - the name of the element for which to remove if it can be found.


Copyright © 2003-2004 Chad Brandon. All Rights Reserved.