Interface NodeContext

All Known Implementing Classes:
NodeContextImpl

public interface NodeContext
Meta information about a node:
  • JCR path
  • file system path of the file which defined the node
  • optionally line and column in the the file which defined the node
  • Method Details

    • getNodePath

      @NotNull @NotNull String getNodePath()
      Returns:
      the JCR node path
    • getFilePath

      @NotNull @NotNull Path getFilePath()
      Returns:
      the file path relative to jcr_root
    • getBasePath

      @NotNull @NotNull Path getBasePath()
      Returns:
      the absolute file path of jcr_root (base for getFilePath())
    • getLine

      default int getLine()
      Returns:
      the line where the serialization of the node was found, 0 for unspecified. This is only set for a node context originating from a DocView XML file.
      Since:
      3.7.0
    • getColumn

      default int getColumn()
      Returns:
      the column where the serialization of the node was found, 0 for unspecified. This is only set for a node context originating from a DocView XML file.
      Since:
      3.7.0
    • getJcrName

      @NotNull default @NotNull String getJcrName(@NotNull @NotNull Name name)
      Returns a readable String from the given name object. The return value's format depends on the actual underlying context.
      Parameters:
      name - the name object
      Returns:
      the JCR qualified name or as fallback the JCR expanded name from the given name object
      Since:
      3.8.0