Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reg: runtime configurable #179

Merged
merged 12 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ jobs:
- name: build and test cadc-vosi
run: cd cadc-vosi && ../gradlew --info clean build javadoc checkstyleMain install

- name: build and test cadc-registry-server
run: cd cadc-registry-server && ../gradlew --info clean build javadoc checkstyleMain install

- name: build and test cadc-test-vosi
run: cd cadc-test-vosi && ../gradlew --info clean build javadoc install
run: cd cadc-test-vosi && ../gradlew --info clean build javadoc checkstyleMain install

- name: build reg
run: cd reg && ../gradlew --info clean build compileIntTest javadoc checkstyleMain

5 changes: 0 additions & 5 deletions cadc-registry-server/CHANGELOG.md

This file was deleted.

40 changes: 16 additions & 24 deletions cadc-registry-server/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
# cadc-registry-server
# cadc-registry-server: OBSOLETE

Simple registry implementation that provides limited support for two IVOA Registry features:
The last published version of this library is `org.opencadc:cadc-registry-server:1.1.2`.

* OAI publishing registry: uses a set of manually created and maintained static XML files
The code has been moved into the `reg` service which has been improved to allow for
runtime configuration of service behaviour and content.

* queryable runtime registry: uses simple key=value properties files to provide specific "canned queries"
## reg-resource-caps.properties
This is the canonical version of the configuration of services for the production
CADC registry service. The _live_ version used by software is:

Basically, there is no registry database per se -- these tools provide some simple or optimised front-ends to get by
without one.
https://ws.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/reg/resource-caps

## OAI Publishing Registry
The OAI publishing is not OAI-compliant but does do enough that other IVOA registries can harvest resource records.
If you are careful you can even update records such that incremental harvesting works. TODO: figure out how to correctly
"delete" records.
and returns a `key = value` (properties file) with {resourceID} = {capabilities URL}.

## Canned Lookup Queries
The canned queries supports a query that returns key=value pairs of the form {resourceID} = {URL}. The meaning depends
on which canned query (properties file) is invoked. The reg-resource-caps.properties example file is a
query for the accessURL of the VOSI-capabilities endpoint for each resource. For CADC, this is used when finding and using
web services and data collections (with aux capabilties). The reg-applications.properties file is a query result that returns
the base accessURL for browser-based UI applications. The code in this library allows one to deploy one or more such canned queries
by writing a suitable properties file. The cadc-registry (client) is written to make use of the resource-caps and
VOSI-capabilities approach.
## reg-applications.properties
This is the canonical version of the configuration of applications for the production
CADC registry service. The _live_ version used by software is:

## TODO
1. move the code from internal repository to github
2. document use of the canned query setup
3. document use the the OAI publishing setup
4. ...
5. implement a proper back end to support queries (RegTAP) and content curation
https://ws.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/reg/applications

and returns a `key = value` (properties file) with {featureID} = {access URL} for web site
(application) resources.
38 changes: 0 additions & 38 deletions cadc-registry-server/build.gradle

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion cadc-test-vosi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apply from: '../opencadc.gradle'

group = 'org.opencadc'

version = '1.0.13'
version = '1.0.14'

description = 'OpenCADC VOSI test library'
def git_url = 'https://github.com/opencadc/reg'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
******************* CANADIAN ASTRONOMY DATA CENTRE *******************
************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES **************
*
* (c) 2019. (c) 2019.
* (c) 2024. (c) 2024.
* Government of Canada Gouvernement du Canada
* National Research Council Conseil national de recherches
* Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6
Expand Down Expand Up @@ -70,31 +70,21 @@
package ca.nrc.cadc.vosi;

import ca.nrc.cadc.auth.AuthMethod;
import ca.nrc.cadc.net.HttpDownload;
import ca.nrc.cadc.reg.Standards;
import ca.nrc.cadc.reg.client.RegistryClient;
import ca.nrc.cadc.util.Log4jInit;
import ca.nrc.cadc.vosi.avail.CheckWebService;
import ca.nrc.cadc.xml.XmlUtil;
import java.net.URI;
import java.net.URL;
import java.util.List;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.jdom2.Content;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.filter.ContentFilter;
import org.junit.Assert;
import org.junit.Test;

import java.io.ByteArrayOutputStream;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;

import javax.servlet.http.HttpServletResponse;


/**
* Tests the availability of a service.
*/
Expand Down Expand Up @@ -172,8 +162,8 @@ boolean hasClientIPComment(final Element element) throws Exception {
@Override
public Content filter(final Object obj) {
final Content c = super.filter(obj);
return ((c != null) && (c.getValue().indexOf("</clientip>") > -1) &&
(c.getValue().indexOf("</clientip>") > c.getValue().indexOf("<clientip>"))) ? c : null;
return ((c != null) && (c.getValue().indexOf("</clientip>") > -1)
&& (c.getValue().indexOf("</clientip>") > c.getValue().indexOf("<clientip>"))) ? c : null;
}
});

Expand Down
Loading
Loading