001package org.hl7.fhir.r4.utils.formats;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023
024public class XmlLocationData {
025
026         public static final String LOCATION_DATA_KEY = "locationDataKey";
027
028   private final String systemId;
029   private final int startLine;
030   private final int startColumn;
031   private final int endLine;
032   private final int endColumn;
033
034   public XmlLocationData(String systemId, int startLine,
035           int startColumn, int endLine, int endColumn) {
036       super();
037       this.systemId = systemId;
038       this.startLine = startLine;
039       this.startColumn = startColumn;
040       this.endLine = endLine;
041       this.endColumn = endColumn;
042   }
043
044   public String getSystemId() {
045       return systemId;
046   }
047
048   public int getStartLine() {
049       return startLine;
050   }
051
052   public int getStartColumn() {
053       return startColumn;
054   }
055
056   public int getEndLine() {
057       return endLine;
058   }
059
060   public int getEndColumn() {
061       return endColumn;
062   }
063
064   @Override
065   public String toString() {
066       return getSystemId() + "[line " + startLine + ":"
067               + startColumn + " to line " + endLine + ":"
068               + endColumn + "]";
069   }
070}