Package org.pkl.core.runtime
Interface ReaderBase
- All Known Subinterfaces:
ModuleKey,ResourceReader
- All Known Implementing Classes:
ModuleKeys.ExternalResolver,ModuleKeys.ProjectPackage
public interface ReaderBase
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanhasElement(SecurityManager securityManager, URI elementUri) Tells if this module key or resource reader has an element atelementUri.default booleanTells if relative paths of this URI should be resolved fromURI.getFragment(), rather thanURI.getPath().booleanTells if the URIs represented by this module key or resource reader should be interpreted as hierarchical.booleanTells if this module key or resource reader supports globbing.default List<PathElement> listElements(SecurityManager securityManager, URI baseUri) List elements within a base URI.default URIresolveUri(URI baseUri, URI uri)
-
Method Details
-
hasHierarchicalUris
Tells if the URIs represented by this module key or resource reader should be interpreted as hierarchical. -
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, URI elementUri) throws IOException, SecurityManagerException, ExternalReaderProcessException 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. -
listElements
default List<PathElement> listElements(SecurityManager securityManager, URI baseUri) throws IOException, SecurityManagerException, ExternalReaderProcessException 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. -
resolveUri
- Throws:
IOExceptionSecurityManagerException
-