Package org.pkl.core.runtime
Interface ReaderBase
-
- All Known Subinterfaces:
ModuleKey,ResourceReader
public interface ReaderBase
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanhasElement(SecurityManager securityManager, java.net.URI elementUri)Tells if this module key or resource reader has an element atelementUri.default booleanhasFragmentPaths()Tells if relative paths of this URI should be resolved fromURI.getFragment(), rather thanURI.getPath().booleanhasHierarchicalUris()Tells if the URIs represented by this module key or resource reader should be interpreted as hierarchical.booleanisGlobbable()Tells if this module key or resource reader supports globbing.default java.util.List<PathElement>listElements(SecurityManager securityManager, java.net.URI baseUri)List elements within a base URI.default java.net.URIresolveUri(java.net.URI baseUri, java.net.URI uri)
-
-
-
Method Detail
-
hasHierarchicalUris
boolean hasHierarchicalUris()
Tells if the URIs represented by this module key or resource reader should be interpreted as hierarchical.
-
isGlobbable
boolean isGlobbable()
Tells if this module key or resource reader supports globbing.
-
hasFragmentPaths
default boolean hasFragmentPaths()
Tells if relative paths of this URI should be resolved fromURI.getFragment(), rather thanURI.getPath().
-
hasElement
default boolean hasElement(SecurityManager securityManager, java.net.URI elementUri) throws java.io.IOException, SecurityManagerException
Tells if this module key or resource reader has an element atelementUri.This method only needs to be implemented if
hasHierarchicalUris()returns true, and if eitherisGlobbable()orModuleKey.isLocal()returns true.- Throws:
java.io.IOExceptionSecurityManagerException
-
listElements
default java.util.List<PathElement> listElements(SecurityManager securityManager, java.net.URI baseUri) throws java.io.IOException, SecurityManagerException
List elements within a base URI.This method is called by the
GlobResolverwhen resolving glob expressions ifisGlobbable()returns true.This method does not need to be implemented if
isGlobbable()returns false.If
hasHierarchicalUris()returns false,URIis effectively an empty URI and should be ignored. In this case, this method is expected to list all elements represented by this reader.- Throws:
java.io.IOExceptionSecurityManagerException
-
resolveUri
default java.net.URI resolveUri(java.net.URI baseUri, java.net.URI uri) throws java.io.IOException, SecurityManagerException- Throws:
java.io.IOExceptionSecurityManagerException
-
-