Deprecated API removed.
1.1 --- a/mdr/jmiutils/src/org/netbeans/lib/jmi/xmi/XMISaxReaderImpl.java Sun May 02 08:39:52 2004 +0000
1.2 +++ b/mdr/jmiutils/src/org/netbeans/lib/jmi/xmi/XMISaxReaderImpl.java Sun May 02 15:14:17 2004 +0000
1.3 @@ -12,20 +12,19 @@
1.4 */
1.5 package org.netbeans.lib.jmi.xmi;
1.6
1.7 -import org.netbeans.api.mdr.XMIReader;
1.8 -import org.xml.sax.SAXException;
1.9 -import javax.xml.parsers.ParserConfigurationException;
1.10 import java.io.IOException;
1.11 import java.io.InputStream;
1.12 +import java.net.MalformedURLException;
1.13 +import java.net.URL;
1.14 +import java.util.Collection;
1.15 import javax.jmi.reflect.RefPackage;
1.16 -import java.util.Collection;
1.17 -import org.netbeans.lib.jmi.util.DebugException;
1.18 -import java.net.URL;
1.19 -import java.net.MalformedURLException;
1.20 import javax.jmi.xmi.MalformedXMIException;
1.21 +import javax.jmi.xmi.XmiReader;
1.22 +import javax.xml.parsers.ParserConfigurationException;
1.23 import org.netbeans.lib.jmi.util.Logger;
1.24 +import org.xml.sax.SAXException;
1.25
1.26 -public class XMISaxReaderImpl extends XMIReader {
1.27 +public class XMISaxReaderImpl implements XmiReader {
1.28
1.29 /** Creates new XMISaxReaderImpl */
1.30 public XMISaxReaderImpl () {
1.31 @@ -52,18 +51,6 @@
1.32 return read (new URL(uri), new RefPackage[] {extent}, null);
1.33 }
1.34
1.35 - public Collection read (String uri, RefPackage[] extents)
1.36 - throws IOException, MalformedXMIException {
1.37 - // [PENDING] correct this code to throw exceptions correctly
1.38 - try {
1.39 - return read (new URL(uri), extents, null);
1.40 - } catch (MalformedURLException e) {
1.41 - IOException ne = new IOException(e.toString());
1.42 - Logger.getDefault().annotate(ne, e);
1.43 - throw ne;
1.44 - }
1.45 - }
1.46 -
1.47 private Collection read (URL url, RefPackage[] extents, String encoding)
1.48 throws IOException, MalformedXMIException {
1.49 // [PENDING] correct this code to throw exceptions correctly
2.1 --- a/mdr/jmiutils/src/org/netbeans/lib/jmi/xmi/XMIWriterImpl.java Sun May 02 08:39:52 2004 +0000
2.2 +++ b/mdr/jmiutils/src/org/netbeans/lib/jmi/xmi/XMIWriterImpl.java Sun May 02 15:14:17 2004 +0000
2.3 @@ -12,31 +12,16 @@
2.4 */
2.5 package org.netbeans.lib.jmi.xmi;
2.6
2.7 -import java.io.*;
2.8 -import java.util.*;
2.9 -import java.net.URL;
2.10 +import java.io.IOException;
2.11 +import java.io.OutputStream;
2.12 +import java.util.Collection;
2.13 +import javax.jmi.reflect.RefPackage;
2.14 +import javax.jmi.xmi.XmiWriter;
2.15
2.16 -import org.xml.sax.ContentHandler;
2.17 -import org.xml.sax.SAXException;
2.18 -import org.xml.sax.helpers.AttributesImpl;
2.19 -
2.20 -import org.netbeans.lib.jmi.util.DebugException;
2.21 -import org.netbeans.api.xmi.*;
2.22 -
2.23 -import javax.jmi.reflect.*;
2.24 -import javax.jmi.model.*;
2.25 -
2.26 -public class XMIWriterImpl extends org.netbeans.api.mdr.XMIWriter {
2.27 +public class XMIWriterImpl implements XmiWriter {
2.28
2.29 private DelegatingWriter writer = new DelegatingWriter ();
2.30
2.31 - public XMIWriterImpl() {
2.32 - }
2.33 -
2.34 - public XMIOutputConfig getConfiguration() {
2.35 - return writer.getConfiguration ();
2.36 - }
2.37 -
2.38 public void write(OutputStream stream, RefPackage extent, String xmiVersion) throws IOException {
2.39 writer.write (stream, extent, xmiVersion);
2.40 }
2.41 @@ -44,13 +29,4 @@
2.42 public void write(OutputStream stream, Collection objects, String xmiVersion) throws IOException {
2.43 writer.write (stream, objects, xmiVersion);
2.44 }
2.45 -
2.46 - public void write(OutputStream stream, RefPackage extent) {
2.47 - try {
2.48 - writer.write (stream, extent, null);
2.49 - } catch (IOException e) {
2.50 - // [PENDING]
2.51 - }
2.52 - }
2.53 -
2.54 }