001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package dev.metaschema.core.model;
007
008/**
009 * Represents a location within a resource.
010 */
011public interface IResourceLocation {
012  /**
013   * Get the line for a location within a resource.
014   *
015   * @return the line number or {@code -1} if unknown
016   */
017  int getLine();
018
019  /**
020   * Get the line column for a location within a resource.
021   *
022   * @return the column number or {@code -1} if unknown
023   */
024  int getColumn();
025
026  /**
027   * Get the zero-based character offset for a location within a resource.
028   *
029   * @return the character offset or {@code -1} if unknown
030   */
031  long getCharOffset();
032
033  /**
034   * Get the zero-based byte offset for a location within a resource.
035   *
036   * @return the byte offset or {@code -1} if unknown
037   */
038  long getByteOffset();
039}