Package org.javastro.ivoa.registry.tap
Class RegTapLoader
java.lang.Object
org.javastro.ivoa.registry.tap.RegTapLoader
- All Implemented Interfaces:
RelationalRecordSink
Loads the XML registry content into the RegTAP relational tables using the RegTAPDM library.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordSnapshot of the progress of the (most recent) load job.static enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResource(String resourceXml) Add or replace a single resource.voidaddResource(Node resourceXml) Add or replace a single resource.booleancancel()Requests cancellation; the job stops after the current batch.voiddeleteResource(String identifier) Remove the resource with the given identifier.booleanincrementalUpdate(String xml) start()Starts a background load.status()
-
Constructor Details
-
RegTapLoader
public RegTapLoader()
-
-
Method Details
-
status
-
start
Starts a background load.- Throws:
IllegalStateException- if a load is already in progress
-
cancel
public boolean cancel()Requests cancellation; the job stops after the current batch. -
addResource
Description copied from interface:RelationalRecordSinkAdd or replace a single resource.- Specified by:
addResourcein interfaceRelationalRecordSink- Parameters:
resourceXml- anri:Resourcesdocument containing exactly oneri:Resource.- Throws:
Exception- if the resource cannot be stored; the failure affects only this resource.
-
addResource
Description copied from interface:RelationalRecordSinkAdd or replace a single resource.- Specified by:
addResourcein interfaceRelationalRecordSink- Parameters:
resourceXml- DOM of ari:Resource.- Throws:
Exception- if the resource cannot be stored; the failure affects only this resource.
-
deleteResource
Description copied from interface:RelationalRecordSinkRemove the resource with the given identifier.- Specified by:
deleteResourcein interfaceRelationalRecordSink- Parameters:
identifier- the IVOA identifier.
-
incrementalUpdate
- Throws:
Exception
-