API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.web.view. JOTPatternReplacer View Javadoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

/**
------------------------------------
JOTWiki          Thibaut Colar
tcolar-wiki AT colar DOT net
Licence at http://www.jotwiki.net
------------------------------------
 */
package net.jot.web.view;
import net.jot.utils.JOTHTMLUtilities;

/**
 * Generic "Replacer" Object, that is used to define a replacement pattern.
 * This is an utility object used by text parsers
 * @author tcolar
 */
public class JOTPatternReplacer {
	public static final int AUTOMATIC = -1;
	boolean encodeContent=true;
	boolean parseContent=true;
	boolean lineBreaks=true;
	boolean removeContent=false;
	String open=null;
	String close=null;
	String head="";
	String tail="";
	//int openLength=0;
	//int closeLength=0;
    int encoding=JOTHTMLUtilities.ENCODE_ALL & ~JOTHTMLUtilities.ENCODE_LINE_BREAKS;
	
	/*public int getCloseLength() {
		return closeLength;
	}
	public void setCloseLength(int closeLength) {
		this.closeLength = closeLength;
	}
	public int getOpenLength() {
		return openLength;
	}
	public void setOpenLength(int openLength) {
		this.openLength = openLength;
	}*/
	public JOTPatternReplacer(String open,String close)
	{
		this.open=open;
		this.close=close;
		//this.openLength=open.length();
		//this.closeLength=close.length();
	}
	public JOTPatternReplacer(String open,String close,String head, String tail)
	{
		this.open=open;
		this.close=close;
		//this.openLength=open.length();
		//this.closeLength=close.length();
		this.tail=tail;
		this.head=head;		
	}
	public String getClose() {
		return close;
	}
	public void setClose(String close) {
		this.close = close;
	}
	public boolean isEncodeContent() {
		return encodeContent;
	}
	public void setEncodeContent(boolean encodeContent) {
		this.encodeContent = encodeContent;
	}
	public String getHead() {
		return head;
	}
	public void setHead(String head) {
		this.head = head;
	}
	public String getOpen() {
		return open;
	}
	public void setOpen(String open) {
		this.open = open;
	}
	public boolean isParseContent() {
		return parseContent;
	}
	public void setParseContent(boolean parseContent) {
		this.parseContent = parseContent;
	}
	public String getTail() {
		return tail;
	}
	public void setTail(String tail) {
		this.tail = tail;
	}
	public boolean isLineBreaks() {
		return lineBreaks;
	}
	public void setLineBreaks(boolean lineBreaks) {
		this.lineBreaks = lineBreaks;
	}
	public boolean isRemoveContent() {
		return removeContent;
	}
	public void setRemoveContent(boolean removeContent) {
		this.removeContent = removeContent;
	}

    public int getEncoding()
    {
        return encoding;
    }

    public void setEncoding(int encoding)
    {
        this.encoding = encoding;
    }
	
}

Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar