001/* 002 * (C) Copyright 2016 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Thibaud Arguillere 018 * Miguel Nixo 019 */ 020package org.nuxeo.ecm.platform.pdf; 021 022/** 023 * Utility class storing information about a link in the PDF. 024 * <p> 025 * Notice the <code>url</code> member is not strictly referencing a URL, nor an URI etc. It is a String value, as 026 * originally stored in the PDF. 027 * 028 * @since 8.10 029 */ 030public class LinkInfo { 031 032 private int page; 033 034 private String subType; 035 036 private String text; 037 038 private String link; 039 040 public LinkInfo(int page, String subType, String text, String link) { 041 this.page = page; 042 this.subType = subType; 043 this.text = text; 044 this.link = link; 045 } 046 047 public int getPage() { 048 return page; 049 } 050 051 public String getSubType() { 052 return subType; 053 } 054 055 public String getText() { 056 return text; 057 } 058 059 public String getLink() { 060 return link; 061 } 062 063 public String toString() { 064 return "Page " + page + ", subType: " + subType + "Text: " + text + ", link: " + link; 065 } 066 067}