-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from aodn/feature/5854-differenciate-link-by-…
…protocol Feature/5854 differenciate link by protocol
- Loading branch information
Showing
7 changed files
with
78 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
indexer/src/main/java/au/org/aodn/esindexer/utils/LinkUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package au.org.aodn.esindexer.utils; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
/** | ||
* Protocols here are referenced from old portal project(Grails). Currently, didn't | ||
* implement all of them. Others can be added if needed. | ||
*/ | ||
@SuppressWarnings("unused") | ||
public class LinkUtils { | ||
|
||
// protocols as reference | ||
private final static List<String> WMS = Arrays.asList( | ||
"OGC:WMS-1.1.1-http-get-map", | ||
"OGC:WMS-1.3.0-http-get-map", | ||
"OGC:WMS", | ||
"IMOS:NCWMS--proto" | ||
) ; | ||
|
||
private final static List<String> WFS = Arrays.asList( | ||
"OGC:WFS-1.0.0-http-get-capabilities", | ||
"OGC:WFS-1.0.0-http-get-feature--shapefile", | ||
"OGC:WFS" | ||
); | ||
|
||
private final static List<String> DATA_FILE = Arrays.asList( | ||
"WWW:DOWNLOAD-1.0-http--download", | ||
"WWW:DOWNLOAD-1.0-http--downloadother", | ||
"WWW:DOWNLOAD-1.0-http--downloaddata", | ||
"WWW:LINK-1.0-http--downloaddata" | ||
); | ||
|
||
private final static List<String> SUPPLEMENTARY= Arrays.asList( | ||
"WWW:LINK-1.0-http--link", | ||
"WWW:LINK-1.0-http--downloaddata", | ||
"WWW:LINK-1.0-http--related", | ||
"WWW:DOWNLOAD-1.0-ftp--download" | ||
); | ||
|
||
private final static List<String> METADATA_RECORD = List.of( | ||
"WWW:LINK-1.0-http--metadata-URL" | ||
); | ||
|
||
public static boolean isWmsOrWfs (String protocol) { | ||
return protocol.startsWith("OGC:WMS") | ||
|| protocol.startsWith("OGC:WFS") | ||
|| protocol.startsWith("IMOS:NCWMS") | ||
; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters