From: Ole Streicher <olebole@debian.org>
Date: Wed, 15 Feb 2017 14:52:08 +0100
Subject: Remove HDX references

---
 src/main/uk/ac/starlink/array/BridgeNDArray.java | 78 ------------------------
 src/main/uk/ac/starlink/array/NDArray.java       | 12 ----
 2 files changed, 90 deletions(-)

diff --git a/src/main/uk/ac/starlink/array/BridgeNDArray.java b/src/main/uk/ac/starlink/array/BridgeNDArray.java
index d07bd20..6a6dc42 100644
--- a/src/main/uk/ac/starlink/array/BridgeNDArray.java
+++ b/src/main/uk/ac/starlink/array/BridgeNDArray.java
@@ -3,9 +3,6 @@ package uk.ac.starlink.array;
 import java.io.IOException;
 import java.net.URL;
 import java.net.URI;
-import uk.ac.starlink.hdx.HdxFacade;
-import uk.ac.starlink.hdx.HdxException;
-import uk.ac.starlink.hdx.HdxResourceType;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -159,79 +156,4 @@ public class BridgeNDArray extends DefaultArrayDescription implements NDArray {
         return buf.toString();
     }
 
-    /**
-     * Obtains a {@link uk.ac.starlink.hdx.HdxFacade} which can
-     * represent this object.
-     *
-     * @param hdxType the registered type which indicates which Hdx
-     * type this facade is representing as a DOM element.  This may
-     * not be <code>null</code> nor {@link HdxResourceType#NONE}.
-     */
-    public HdxFacade getHdxFacade( HdxResourceType hdxType ) {
-        return new BridgeNDArrayHdxFacade( hdxType );
-    }
-    
-    protected class BridgeNDArrayHdxFacade
-            extends uk.ac.starlink.hdx.AbstractHdxFacade {
-        /*
-         * Implement the DOMFacade by creating a DOM using
-         * HdxElements, and caching it.
-         * Implement setAttribute by calling setAttribute on the top
-         * element of that cached DOM.
-         *
-         * XXX Is this sufficient?  Can this become out of date?  Are
-         * the attributes purely for information, or should they modify
-         * instance variables of the BridgeNDArray?
-         */
-        private HdxResourceType type;
-        //private Document cachedDoc;
-
-        public BridgeNDArrayHdxFacade( HdxResourceType type ) {
-            if ( type == null
-                || type == HdxResourceType.NONE )
-                throw new IllegalArgumentException
-                        ( "BridgeNDArrayDOMFacade: type is null or NONE" );
-            this.type = type;
-        }
-        
-        public Object synchronizeElement( Element el, Object memento ) 
-                throws HdxException {
-            /*
-             * ignore memento -- this Array can't be changed
-             * (interface NDArray has no mutator methods), so if the
-             * given element has children then it can only be because
-             * we've been here before.
-             */
-            if ( el.hasAttributes() )
-                return null;
-            
-            if ( ! el.getTagName().equals( type.xmlName() ) )
-                // The world has gone mad -- this shouldn't happen
-                throw new HdxException
-                        ( "synchronizeElement given element <"
-                          + el.getTagName()
-                          + ">, not <"
-                          + type.xmlName()
-                          + "> as expected" );
-
-            if ( url != null ) {
-                el.setAttribute( "uri", url.toString() );
-            }
-
-            return null;
-        }
-
-        public Object getObject( Element el ) 
-                throws HdxException {
-            if ( type != HdxResourceType.match( el ) )
-                throw new HdxException
-                        ( "getObject asked to realise bad type "
-                         + el.getTagName() );
-            return BridgeNDArray.this;
-        }
-
-        public HdxResourceType getHdxResourceType() {
-            return type;
-        }
-    }
 }
diff --git a/src/main/uk/ac/starlink/array/NDArray.java b/src/main/uk/ac/starlink/array/NDArray.java
index eea69e1..48a6461 100644
--- a/src/main/uk/ac/starlink/array/NDArray.java
+++ b/src/main/uk/ac/starlink/array/NDArray.java
@@ -191,16 +191,4 @@ public interface NDArray extends ArrayDescription {
      */
     void close() throws IOException;
 
-    /**
-     * Obtains a DOMFacade representing this array.
-     *
-     * <p>Since the array does not `know' which type of element it is
-     * representing, this must be passed to it when the
-     * <code>DOMFacade</code> is created.
-     *
-     * @param hdxType the type of the element which this array is
-     * to represent
-     */
-    uk.ac.starlink.hdx.HdxFacade getHdxFacade
-            (uk.ac.starlink.hdx.HdxResourceType hdxType);
 }
