uk.ac.starlink.hdx
Interface HdxContainer


public interface HdxContainer

An HdxContainer is the Java representation of an HDX object.

This interface should be regarded as rather provisional at present.


Method Summary
 Object get(HdxResourceType type)
          Returns a single object of the given type from the HDX.
 Element getDOM(URI base)
          Obtains a DOM representing the HDX.
 List getList(HdxResourceType type)
          Returns a list of objects from the Hdx.
 Source getSource(URI base)
          Obtains a Source representing the HDX.
 

Method Detail

getList

List getList(HdxResourceType type)
Returns a list of objects from the Hdx. The objects returned will be of the Java type returned by HdxResourceType.getConstructedClass(), if that is non-null.

Parameters:
type - the type of object to return
Returns:
a List of objects of the required type. If there are no appropriate objects available, it returns an empty list.

get

Object get(HdxResourceType type)
Returns a single object of the given type from the HDX. If there is more than one, this will return any one of them. The object returned will be of the Java type returned by HdxResourceType.getConstructedClass(), if that is non-null.

Parameters:
type - the type of object to return
Returns:
an object of the required type, or null if there is no appropriate object in the HDX

getDOM

Element getDOM(URI base)
Obtains a DOM representing the HDX.

The XML in general may contain URIs, for instance referencing the array components of the NDX. How these are written is determined by the base parameter; URIs will be written as relative URIs relative to base if this is possible (e.g. if they share a part of their path). If there is no common part of the path, including the case in which base is null, then an absolute reference will be written.

Returns:
an Element which is the document element of a DOM representing the HDX

getSource

Source getSource(URI base)
Obtains a Source representing the HDX. The resulting Source is equivalent to the DOM returned by getDOM(java.net.URI).

The XML in general may contain URIs, for instance referencing the array components of the NDX. How these are written is determined by the base parameter; URIs will be written as relative URIs relative to base if this is possible (e.g. if they share a part of their path). If there is no common part of the path, including the case in which base is null, then an absolute reference will be written.

Returns:
a Source which represents the HDX.


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.