001: /**
002: * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999.
003: *
004: * This program is free software; you can redistribute it and/or modify
005: * it under the terms of the latest version of the GNU Lesser General
006: * Public License as published by the Free Software Foundation;
007: *
008: * This program is distributed in the hope that it will be useful,
009: * but WITHOUT ANY WARRANTY; without even the implied warranty of
010: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
011: * GNU Lesser General Public License for more details.
012: *
013: * You should have received a copy of the GNU Lesser General Public License
014: * along with this program (LICENSE.txt); if not, write to the Free Software
015: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
016: */package org.jamwiki.utils;
017:
018: /**
019: * Utility method used in processing Wiki links.
020: */
021: public class WikiLink {
022:
023: private static final WikiLogger logger = WikiLogger
024: .getLogger(WikiLink.class.getName());
025: /** Indicator that the link requires special handling, such as links starting with a colon. */
026: private boolean colon = false;
027: /** Article name, not including namespace. */
028: private String article = null;
029: /** Link destination, including namespace. */
030: private String destination = null;
031: /** Namespace prefix for the link. */
032: private String namespace = null;
033: /** Link query paramters. */
034: private String query = null;
035: /** Link section (ie #section). */
036: private String section = null;
037: /** Link text. */
038: private String text = null;
039:
040: /**
041: *
042: */
043: public WikiLink() {
044: }
045:
046: /**
047: *
048: */
049: public String getArticle() {
050: return this .article;
051: }
052:
053: /**
054: *
055: */
056: public void setArticle(String article) {
057: this .article = article;
058: }
059:
060: /**
061: *
062: */
063: public boolean getColon() {
064: return this .colon;
065: }
066:
067: /**
068: *
069: */
070: public void setColon(boolean colon) {
071: this .colon = colon;
072: }
073:
074: /**
075: *
076: */
077: public String getDestination() {
078: return this .destination;
079: }
080:
081: /**
082: *
083: */
084: public void setDestination(String destination) {
085: this .destination = destination;
086: }
087:
088: /**
089: *
090: */
091: public String getNamespace() {
092: return this .namespace;
093: }
094:
095: /**
096: *
097: */
098: public void setNamespace(String namespace) {
099: this .namespace = namespace;
100: }
101:
102: /**
103: *
104: */
105: public String getQuery() {
106: return this .query;
107: }
108:
109: /**
110: *
111: */
112: public void setQuery(String query) {
113: this .query = query;
114: }
115:
116: /**
117: *
118: */
119: public String getSection() {
120: return this .section;
121: }
122:
123: /**
124: *
125: */
126: public void setSection(String section) {
127: this .section = section;
128: }
129:
130: /**
131: *
132: */
133: public String getText() {
134: return this .text;
135: }
136:
137: /**
138: *
139: */
140: public void setText(String text) {
141: this.text = text;
142: }
143: }
|