de.tuberlin.cs.flp.jspwiki.plugin.wikiarchive
|
|||
public static
String
|
CONTENT_SUFFIX |
||
public static
String
|
CONTENT_TYPE |
||
protected static
Properties
|
DEFAULT_ENTRIES Default BibTeX-entries to labels mapping.
|
||
protected static
Map
|
DEFAULT_ENTRIES_OPTIONS Default entries to options-map mapping.
|
||
protected static
Properties
|
DEFAULT_FORMATS |
||
protected static
Properties
|
DEFAULT_TYPES Default BibTeX-type to labels mapping.
|
||
protected
Properties
|
entries |
||
protected
Map
|
entriesOptions |
||
protected
Properties
|
formats |
||
protected
Properties
|
types |
|
|||
private static
void
|
__initializer()
|
||
private
Map
|
allEntries(Map m)
|
||
protected static
void
|
appendToken(StreamTokenizer st, StringBuffer sb)
Appends the current token to a StringBuffer.
|
||
protected static
String
|
bibtexEntry(String key, Object val)
Generated a field entry string inside a BibTeX entry.
|
||
protected static
String
|
braceBlock(StreamTokenizer st)
Parses a block enclosed in curly braces "{" and "}".
Returns the complete string inside the block. Nested curly braces are
possible and will be returned as part of the string.
|
||
protected
ArchiveEntryBibTeX
|
convertEntry(ArchiveEntry entry)
|
||
public
void
|
createEntry(Object data, ArchiveEntry entry)
Creates a new archive entry in the data source handled by this ArchiveIOHandler.
@param plugin The WikiArcive plugin.
|
||
protected
String
|
entry2bibtex(ArchiveEntryBibTeX entry)
Generate a single BibTeX entry string.
|
||
private static
int
|
findNextQuoteChar(char[] c, int pos)
Finds the next occurrence of a quote char " inside a char[]-array,
starting from a specified position.
|
||
public
String
|
getContentSuffix()
Content type for export via HTTP.
|
||
public
String
|
getContentType()
Content type for export via HTTP.
|
||
public
Properties
|
getEntries()
|
||
public
Properties
|
getEntryOptions(String entryName)
|
||
public
Properties
|
getFormats()
|
||
public
Properties
|
getTypes()
Get BibTeX-type to labels mapping. Keys of the properties-map are BibTeX type names (values for field 'type'),
values are (language-specific) label string that are used in Wiki pages.
|
||
public
void
|
init(WikiEngine engine, Map config)
Init.
|
||
public
boolean
|
isEntryOptional(String entryName)
|
||
public
boolean
|
isType(String type)
|
||
protected static
void
|
optional(StreamTokenizer st, char c)
Optionally allows a token to be the current token. If this token is the current one, skip to next token.
|
||
protected
Map
|
parseAll(Object data)
Retrieves all archive entries from the data source.
|
||
public
String
|
performIO(boolean io, Archive archive, Object data, int mode, Collection exceptions)
Perform either input from the
Archive model interface
into the data source handled by this ArchiveIOHandler.
@param plugin The WikiArchive plugin. |
||
protected static
void
|
putDefaults(Properties p, String[] s)
Puts an array of strings into the Properties-object,
buy using each array member both as key and value for each entry.
This is used for initializing dummy-properties.
|
||
private static
String
|
removeLineBreaksInQuotedStrings(String s)
Removes all line breaks inside quoted strings and replaces them with a single blank each.
This avoids quoted multi-line-strings, which are not not supported by StreamTokenizer.
|
||
protected
void
|
replaceEntry(Object data, ArchiveEntry newEntryA, ArchiveEntry oldEntryA)
Replaces an archive entry in the data source handled by this ArchiveIOHandler.
@param plugin The WikiArcive plugin.
|
||
protected static
void
|
require(StreamTokenizer st, String tok)
Tests if the tokenizer's current token matches a specified string.
|
||
protected static
void
|
require(StreamTokenizer st, char tok)
Tests if the tokenizer's current token matches a specified character.
|
||
protected static
void
|
syntax(StreamTokenizer st)
Sets the tokenizer's syntax for parsing BibTeX.
|
||
protected
String
|
translateKey(String key, boolean fromTo)
|
||
protected
Map
|
translateKeys(Map m, boolean fromTo)
Converts the key names of Map m from/to label-strings.
This uses label strings specified as parameters.
|
||
protected
String
|
translateType(String name, boolean fromTo)
Converts a BibTeX type name from or to its label-string.
This uses label string specified as parameters.
|
||
protected static
String
|
until(StreamTokenizer st, char tok)
Returns all tokens until another token occurs, concatenated as one string.
|
|
|||
|
|||
|
|||
Tagged Values | |
static
|
false
|
documentation#author
|
Jens Gulden
|
documentation#version
|
0.2.0
|
|
public static final
String CONTENT_SUFFIX
public static final
String CONTENT_TYPE
protected static
Properties DEFAULT_ENTRIES
Attribute Tagged Values | |
documentation#see
|
#entries
|
protected static
Map DEFAULT_ENTRIES_OPTIONS
Attribute Tagged Values | |
documentation#see
|
#entriesOptions
|
protected static
Properties DEFAULT_FORMATS
Attribute Tagged Values | |
documentation#see
|
#formats
|
protected static
Properties DEFAULT_TYPES
Attribute Tagged Values | |
documentation#see
|
#types
|
protected
Properties entries
protected
Map entriesOptions
protected
Properties formats
protected
Properties types
|
private static
void __initializer()
m
-
protected static
void appendToken(StreamTokenizer st, StringBuffer sb)
st
- The stream tokenizer.
sb
- The string buffer.
protected static
String
bibtexEntry(String key, Object val)
key
- The field's name.
val
- The field's value.
protected static
String
braceBlock(StreamTokenizer st)
Method Tagged Values | |
documentation#throws
|
IOException if an i/o error occurs
|
st
- The stream tokenizer.
protected
ArchiveEntryBibTeX
convertEntry(ArchiveEntry entry)
entry
-
public
void createEntry(Object data, ArchiveEntry entry)
data
- The data source handled by this ArchiveIOHandler.
entry
- The entry.
protected
String
entry2bibtex(ArchiveEntryBibTeX entry)
entry
- The entry to output as BibTeX.
private static
int findNextQuoteChar(char[] c, int pos)
c
- The char array.
pos
- The start position.
public
String
getContentSuffix()
public
String
getContentType()
public
Properties
getEntries()
public
Properties
getEntryOptions(String entryName)
entryName
-
public
Properties
getFormats()
public
Properties
getTypes()
Method Tagged Values | |
documentation#see
|
#types
|
public
void init(WikiEngine engine, Map config)
engine
-
config
-
public
boolean isEntryOptional(String entryName)
entryName
-
public
boolean isType(String type)
type
- The type.
protected static
void optional(StreamTokenizer st, char c)
Method Tagged Values | |
documentation#throws
|
IOException if an i/o error occurs
|
st
- The stream tokenizer.
c
- The token that may optionally occur.
protected
Map
parseAll(Object data)
Method Tagged Values | |
documentation#throws
|
IOException if an i/o error occurs
|
data
- The data source handled by this ArchiveIOHandler.
public
String
performIO(boolean io, Archive archive, Object data, int mode, Collection exceptions)
Archive
model interface
into the data source handled by this ArchiveIOHandler.
@param plugin The WikiArchive plugin.Method Tagged Values | |
documentation#throws
|
IOException if an i/o error occurs
|
io
- Switch between input or output mode, Archive
model interface.
archive
- The Archive
model interface.
data
- The data source handled by this ArchiveIOHandler.
mode
- The processing mode. This is a bit mask with:exceptions
- Collection of entry names that should be treated as exceptions to the behaviour specified by mode
. (Not used.)
protected static
void putDefaults(Properties p, String[] s)
p
- The properties.
s
- The string array.
private static
String
removeLineBreaksInQuotedStrings(String s)
s
- The string.
protected
void replaceEntry(Object data, ArchiveEntry newEntryA, ArchiveEntry oldEntryA)
data
- The data source handled by this ArchiveIOHandler.
newEntryA
- The new entry.
oldEntryA
- The old entry.
protected static
void require(StreamTokenizer st, String tok)
Method Tagged Values | |
documentation#throws
|
IOException If the token does not match.
|
st
- The stream tokenizer.
tok
- The token to test match with.
protected static
void require(StreamTokenizer st, char tok)
Method Tagged Values | |
documentation#throws
|
IOException If the token does not match.
|
st
- The stream tokenizer.
tok
- The token to test match with.
protected static
void syntax(StreamTokenizer st)
st
- The stream tokenizer.
protected
String
translateKey(String key, boolean fromTo)
key
-
fromTo
-
protected
Map
translateKeys(Map m, boolean fromTo)
m
- The map.
fromTo
- If
protected
String
translateType(String name, boolean fromTo)
Method Tagged Values | |
documentation#see
|
#types
|
name
- The name or label.
fromTo
- If
protected static
String
until(StreamTokenizer st, char tok)
Method Tagged Values | |
documentation#throws
|
IOException if an i/o error occurs
|
st
- The stream tokenizer.
tok
- The token until which other tokens should be concatenated to the result string.
|
public
ArchiveEntryBibTeX ArchiveEntryBibTeX
[1..1]
protected
ArchiveHandlerBibTeX archiveHandler
[1..1] navigable
Association Tagged Values | |
gentleware-initialValue
|
|