Package uk.ac.starlink.votable.datalink
Class ServiceDescriptorFactory
java.lang.Object
uk.ac.starlink.votable.datalink.ServiceDescriptorFactory
Contains methods to parse service descriptor elements in a VOTable document.
- Since:
- 7 Dec 2017
- Author:
- Mark Taylor
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateServiceDescriptor
(VOElement resourceEl) Parses a DOM element as a ServiceDescriptor.createServiceParam
(ParamElement paramEl) Parses a VOTable DOM element as a ServiceParam.Reads ServiceDescriptor descendants of a given element.readTableServiceDescriptors
(TableElement tableEl) Locates all the service descriptors that correspond to a given TABLE element.
-
Constructor Details
-
ServiceDescriptorFactory
public ServiceDescriptorFactory()
-
-
Method Details
-
readAllServiceDescriptors
Reads ServiceDescriptor descendants of a given element. These are constructed from any RESOURCE element with with @type="meta" and @utype="adhoc:service".- Parameters:
el
- container element- Returns:
- list of zero or more service descriptors found
-
readTableServiceDescriptors
Locates all the service descriptors that correspond to a given TABLE element.This is not elegant. We are looking for SDs in the following positions:
SomeElement RESOURCE TABLE RESOURCE-with-ServiceDescriptor
orRESOURCE TABLE RESOURCE-with-ServiceDescriptor
but we don't know which. First, find the widest scope within which an SD for this tableEl might be found. That is the parent of this TABLE's RESOURCE parent. Then, look for all the SDs in this scope, but discount any which have TABLE siblings apart from the supplied tableEl.- Parameters:
tableEl
- target TABLE element- Returns:
- service descriptors corresponding to
tableEl
-
createServiceDescriptor
Parses a DOM element as a ServiceDescriptor. The supplied element will normally be a RESOURCE with with @type="meta" and utype="adhoc:service".- Parameters:
resourceEl
- DOM element- Returns:
- service descriptor
-
createServiceParam
Parses a VOTable DOM element as a ServiceParam. The supplied PARAM element will normally be a child of a GROUP element with @name="inputParams".- Parameters:
paramEl
- PARAM element- Returns:
- serviceParam object
-