|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.webSvr.catalogue.TrailData
public final class TrailData
Immutable representation of data for one trail/sequence of exhibits and commentary. These instances are not intended to be persisted, so the class does not implement java.io.Serializable.
| Field Summary | |
|---|---|
java.util.List<Tuple.Pair<Name,Compact7BitString>> |
body
Body of trail (immutable); never null nor empty. |
static int |
MAX_TITLE_LEN
Maximum title length in raw bytes/characters; strictly positive. |
Compact7BitString |
title
Title for trail (immutable); never null nor empty. |
| Constructor Summary | |
|---|---|
private |
TrailData(Compact7BitString title,
java.util.List<Tuple.Pair<Name,Compact7BitString>> body)
Create instance from pre-parsed data. |
| Method Summary | |
|---|---|
static TrailData |
parseFromByteStream(java.io.InputStream in)
Parse an instance from a 7-bit XHTML-safe ASCII text byte stream. |
static TrailData |
readTrailFromExhibit(SimpleExhibitPipelineIF dataSource,
Name.ExhibitFull trailExhibitName,
SimpleLoggerIF log)
Read trail data from specified trail exhibit (full) name, or null if not available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_TITLE_LEN
public final Compact7BitString title
public final java.util.List<Tuple.Pair<Name,Compact7BitString>> body
| Constructor Detail |
|---|
private TrailData(Compact7BitString title,
java.util.List<Tuple.Pair<Name,Compact7BitString>> body)
title - 7-bit XHTML-safe markup-free (except for UNICODE character entities);
non-null, non-empty, no longer than MAX_TITLE_LEN characters/bytesbody - sequence of exhibit short names (and Name) with associated (7-bit XHTML-safe) texts
(either but not both of each pair may be null, and neither of any pair can be empty);
non-null, non-empty| Method Detail |
|---|
public static TrailData parseFromByteStream(java.io.InputStream in)
throws java.io.IOException
This does not close its input stream.
Should be able to parse input with UNIX (\r aka LF) or Windows (\r\n aka CRLF) line termination, or even a mixture.
The first line must start "@ " followed by the HTML-safe title.
Each image/exhibit to be inserted should be on a line starting "* " followed by the exhibit short name and then an optional space and HTML-safe comment. The exhibit short names are held as Name values and are only checked for syntax.
Each blank (whitespace-only) line is treated as a paragraph boundary.
in - 7-bit ASCII line-oriented input stream; non-null
java.io.IOException - in case of input error
java.lang.IllegalArgumentException - in case of corrupt input too garbled to handle
public static final TrailData readTrailFromExhibit(SimpleExhibitPipelineIF dataSource,
Name.ExhibitFull trailExhibitName,
SimpleLoggerIF log)
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||