Package org.apache.commons.net.nntp
Class Article
java.lang.Object
org.apache.commons.net.nntp.Article
- All Implemented Interfaces:
Threadable
This is a class that contains the basic state needed for message retrieval and threading. With thanks to Jamie Zawinski (jwz@jwz.org)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHeaderField(String name, String val) Deprecated.voidaddReference(String msgId) Adds a message-id to the list of messages that this message references (i.e.private voidintDeprecated.longgetDate()getFrom()String[]Returns the MessageId references as an array of StringsbooleanisDummy()String[]static voidprintThread(Article article) Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.static voidprintThread(Article article, int depth) Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.static voidprintThread(Article article, int depth, PrintStream ps) Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.static voidprintThread(Article article, PrintStream ps) Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.voidsetArticleId(String string) voidsetArticleNumber(int a) Deprecated.voidsetArticleNumber(long l) voidsetChild(Threadable child) voidvoidvoidsetNext(Threadable next) voidsetSubject(String string) private voidAttempts to parse the subject line for some typical reply signatures, and strip them outbooleantoString()
-
Field Details
-
articleNumber
private long articleNumber -
subject
-
date
-
articleId
-
simplifiedSubject
-
from
-
references
-
isReply
private boolean isReply -
kid
-
next
-
-
Constructor Details
-
Article
public Article()
-
-
Method Details
-
printThread
Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.- Parameters:
article- the root of the article 'tree'- Since:
- 3.4
-
printThread
Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.- Parameters:
article- the root of the article 'tree'depth- the current tree depth
-
printThread
Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.- Parameters:
article- the root of the article 'tree'depth- the current tree depthps- the PrintStream to use- Since:
- 3.4
-
printThread
Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.- Parameters:
article- the root of the article 'tree'ps- the PrintStream to use- Since:
- 3.4
-
addHeaderField
Deprecated. -
addReference
Adds a message-id to the list of messages that this message references (i.e. replies to)- Parameters:
msgId- the message id to add
-
flushSubjectCache
private void flushSubjectCache() -
getArticleId
-
getArticleNumber
Deprecated. -
getArticleNumberLong
public long getArticleNumberLong() -
getDate
-
getFrom
-
getReferences
Returns the MessageId references as an array of Strings- Returns:
- an array of message-ids
-
getSubject
-
isDummy
public boolean isDummy()- Specified by:
isDummyin interfaceThreadable
-
makeDummy
- Specified by:
makeDummyin interfaceThreadable
-
messageThreadId
- Specified by:
messageThreadIdin interfaceThreadable
-
messageThreadReferences
- Specified by:
messageThreadReferencesin interfaceThreadable
-
setArticleId
-
setArticleNumber
Deprecated. -
setArticleNumber
public void setArticleNumber(long l) -
setChild
- Specified by:
setChildin interfaceThreadable
-
setDate
-
setFrom
-
setNext
- Specified by:
setNextin interfaceThreadable
-
setSubject
-
simplifiedSubject
- Specified by:
simplifiedSubjectin interfaceThreadable
-
simplifySubject
private void simplifySubject()Attempts to parse the subject line for some typical reply signatures, and strip them out -
subjectIsReply
public boolean subjectIsReply()- Specified by:
subjectIsReplyin interfaceThreadable
-
toString
-