io.jhdf.api.Link Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jhdf Show documentation
Show all versions of jhdf Show documentation
A pure Java HDF5 library
The newest version!
/*
* This file is part of jHDF. A pure Java library for accessing HDF5 files.
*
* https://jhdf.io
*
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
package io.jhdf.api;
import io.jhdf.exceptions.HdfBrokenLinkException;
/**
* HDF5 links interface. Used for soft (symbolic) links and external links
*
* @author James Mudd
*/
public interface Link extends Node {
/**
* Resolves the link and returns the {@link Node} the link points to. If
* {@link #isBrokenLink()} returns true
calling this method will
* throw.
*
* @return the {@link Node} this link points to
* @throws HdfBrokenLinkException if the link is broken
*/
Node getTarget();
/**
* Gets the path this link points to, obtaining it will not require the link to
* be resolved.
*
* @return the path this link points to
*/
String getTargetPath();
/**
* Checks if the link is valid i.e can be resolved.
*
* @return true
if the link is broken (i.e. cannot be resolved)
*/
boolean isBrokenLink();
}