Class DecorationXpp3Reader
- java.lang.Object
-
- org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Reader
-
public class DecorationXpp3Reader extends java.lang.Object
Class DecorationXpp3Reader.- Version:
- $Revision$ $Date$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DecorationXpp3Reader.ContentTransformer
-
Field Summary
Fields Modifier and Type Field Description private boolean
addDefaultEntities
If set the parser will be loaded with all single characters from the XHTML specification.DecorationXpp3Reader.ContentTransformer
contentTransformer
Field contentTransformer.
-
Constructor Summary
Constructors Constructor Description DecorationXpp3Reader()
DecorationXpp3Reader(DecorationXpp3Reader.ContentTransformer contentTransformer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
checkFieldWithDuplicate(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, java.lang.String tagName, java.lang.String alias, java.util.Set parsed)
Method checkFieldWithDuplicate.private void
checkUnknownAttribute(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, java.lang.String attribute, java.lang.String tagName, boolean strict)
Method checkUnknownAttribute.private void
checkUnknownElement(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method checkUnknownElement.boolean
getAddDefaultEntities()
Returns the state of the "add default entities" flag.private boolean
getBooleanValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser)
Method getBooleanValue.private boolean
getBooleanValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, java.lang.String defaultValue)
Method getBooleanValue.private byte
getByteValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method getByteValue.private char
getCharacterValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser)
Method getCharacterValue.private java.util.Date
getDateValue(java.lang.String s, java.lang.String attribute, java.lang.String dateFormat, org.codehaus.plexus.util.xml.pull.XmlPullParser parser)
Method getDateValue.private java.util.Date
getDateValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser)
Method getDateValue.private double
getDoubleValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method getDoubleValue.private float
getFloatValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method getFloatValue.private int
getIntegerValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method getIntegerValue.private long
getLongValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method getLongValue.private java.lang.String
getRequiredAttributeValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method getRequiredAttributeValue.private short
getShortValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method getShortValue.private java.lang.String
getTrimmedValue(java.lang.String s)
Method getTrimmedValue.private java.lang.String
interpolatedTrimmed(java.lang.String value, java.lang.String context)
Method interpolatedTrimmed.private int
nextTag(org.codehaus.plexus.util.xml.pull.XmlPullParser parser)
Method nextTag.private Banner
parseBanner(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method parseBanner.private Body
parseBody(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method parseBody.private DecorationModel
parseDecorationModel(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method parseDecorationModel.private LinkItem
parseLinkItem(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method parseLinkItem.private Logo
parseLogo(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method parseLogo.private Menu
parseMenu(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method parseMenu.private MenuItem
parseMenuItem(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method parseMenuItem.private PublishDate
parsePublishDate(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method parsePublishDate.private Skin
parseSkin(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method parseSkin.private Version
parseVersion(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method parseVersion.DecorationModel
read(java.io.InputStream in)
Method read.DecorationModel
read(java.io.InputStream in, boolean strict)
Method read.DecorationModel
read(java.io.Reader reader)
DecorationModel
read(java.io.Reader reader, boolean strict)
DecorationModel
read(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict)
Method read.void
setAddDefaultEntities(boolean addDefaultEntities)
Sets the state of the "add default entities" flag.
-
-
-
Field Detail
-
addDefaultEntities
private boolean addDefaultEntities
If set the parser will be loaded with all single characters from the XHTML specification. The entities used:- http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent
- http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent
- http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent
-
contentTransformer
public final DecorationXpp3Reader.ContentTransformer contentTransformer
Field contentTransformer.
-
-
Constructor Detail
-
DecorationXpp3Reader
public DecorationXpp3Reader()
-
DecorationXpp3Reader
public DecorationXpp3Reader(DecorationXpp3Reader.ContentTransformer contentTransformer)
-
-
Method Detail
-
checkFieldWithDuplicate
private boolean checkFieldWithDuplicate(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, java.lang.String tagName, java.lang.String alias, java.util.Set parsed) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method checkFieldWithDuplicate.- Parameters:
parser
- a parser object.parsed
- a parsed object.alias
- a alias object.tagName
- a tagName object.- Returns:
- boolean
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
checkUnknownAttribute
private void checkUnknownAttribute(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, java.lang.String attribute, java.lang.String tagName, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, java.io.IOException
Method checkUnknownAttribute.- Parameters:
parser
- a parser object.strict
- a strict object.tagName
- a tagName object.attribute
- a attribute object.- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.java.io.IOException
- IOException if any.
-
checkUnknownElement
private void checkUnknownElement(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, java.io.IOException
Method checkUnknownElement.- Parameters:
parser
- a parser object.strict
- a strict object.- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.java.io.IOException
- IOException if any.
-
getAddDefaultEntities
public boolean getAddDefaultEntities()
Returns the state of the "add default entities" flag.- Returns:
- boolean
-
getBooleanValue
private boolean getBooleanValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getBooleanValue.- Parameters:
s
- a s object.parser
- a parser object.attribute
- a attribute object.- Returns:
- boolean
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getBooleanValue
private boolean getBooleanValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, java.lang.String defaultValue) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getBooleanValue.- Parameters:
s
- a s object.defaultValue
- a defaultValue object.parser
- a parser object.attribute
- a attribute object.- Returns:
- boolean
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getByteValue
private byte getByteValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getByteValue.- Parameters:
s
- a s object.strict
- a strict object.parser
- a parser object.attribute
- a attribute object.- Returns:
- byte
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getCharacterValue
private char getCharacterValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getCharacterValue.- Parameters:
s
- a s object.parser
- a parser object.attribute
- a attribute object.- Returns:
- char
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getDateValue
private java.util.Date getDateValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getDateValue.- Parameters:
s
- a s object.parser
- a parser object.attribute
- a attribute object.- Returns:
- Date
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getDateValue
private java.util.Date getDateValue(java.lang.String s, java.lang.String attribute, java.lang.String dateFormat, org.codehaus.plexus.util.xml.pull.XmlPullParser parser) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getDateValue.- Parameters:
s
- a s object.parser
- a parser object.dateFormat
- a dateFormat object.attribute
- a attribute object.- Returns:
- Date
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getDoubleValue
private double getDoubleValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getDoubleValue.- Parameters:
s
- a s object.strict
- a strict object.parser
- a parser object.attribute
- a attribute object.- Returns:
- double
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getFloatValue
private float getFloatValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getFloatValue.- Parameters:
s
- a s object.strict
- a strict object.parser
- a parser object.attribute
- a attribute object.- Returns:
- float
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getIntegerValue
private int getIntegerValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getIntegerValue.- Parameters:
s
- a s object.strict
- a strict object.parser
- a parser object.attribute
- a attribute object.- Returns:
- int
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getLongValue
private long getLongValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getLongValue.- Parameters:
s
- a s object.strict
- a strict object.parser
- a parser object.attribute
- a attribute object.- Returns:
- long
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getRequiredAttributeValue
private java.lang.String getRequiredAttributeValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getRequiredAttributeValue.- Parameters:
s
- a s object.strict
- a strict object.parser
- a parser object.attribute
- a attribute object.- Returns:
- String
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getShortValue
private short getShortValue(java.lang.String s, java.lang.String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method getShortValue.- Parameters:
s
- a s object.strict
- a strict object.parser
- a parser object.attribute
- a attribute object.- Returns:
- short
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
getTrimmedValue
private java.lang.String getTrimmedValue(java.lang.String s)
Method getTrimmedValue.- Parameters:
s
- a s object.- Returns:
- String
-
interpolatedTrimmed
private java.lang.String interpolatedTrimmed(java.lang.String value, java.lang.String context)
Method interpolatedTrimmed.- Parameters:
value
- a value object.context
- a context object.- Returns:
- String
-
nextTag
private int nextTag(org.codehaus.plexus.util.xml.pull.XmlPullParser parser) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method nextTag.- Parameters:
parser
- a parser object.- Returns:
- int
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
read
public DecorationModel read(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method read.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- DecorationModel
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
read
public DecorationModel read(java.io.Reader reader, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
- Parameters:
reader
- a reader object.strict
- a strict object.- Returns:
- DecorationModel
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.- See Also:
ReaderFactory.newXmlReader(java.io.InputStream)
-
read
public DecorationModel read(java.io.Reader reader) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
- Parameters:
reader
- a reader object.- Returns:
- DecorationModel
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.- See Also:
ReaderFactory.newXmlReader(java.io.InputStream)
-
read
public DecorationModel read(java.io.InputStream in, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method read.- Parameters:
in
- a in object.strict
- a strict object.- Returns:
- DecorationModel
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
read
public DecorationModel read(java.io.InputStream in) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method read.- Parameters:
in
- a in object.- Returns:
- DecorationModel
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
parseBanner
private Banner parseBanner(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method parseBanner.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- Banner
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
parseBody
private Body parseBody(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method parseBody.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- Body
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
parseDecorationModel
private DecorationModel parseDecorationModel(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method parseDecorationModel.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- DecorationModel
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
parseLinkItem
private LinkItem parseLinkItem(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method parseLinkItem.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- LinkItem
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
parseLogo
private Logo parseLogo(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method parseLogo.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- Logo
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
parseMenu
private Menu parseMenu(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method parseMenu.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- Menu
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
parseMenuItem
private MenuItem parseMenuItem(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method parseMenuItem.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- MenuItem
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
parsePublishDate
private PublishDate parsePublishDate(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method parsePublishDate.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- PublishDate
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
parseSkin
private Skin parseSkin(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method parseSkin.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- Skin
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
parseVersion
private Version parseVersion(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws java.io.IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
Method parseVersion.- Parameters:
parser
- a parser object.strict
- a strict object.- Returns:
- Version
- Throws:
java.io.IOException
- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException
- XmlPullParserException if any.
-
setAddDefaultEntities
public void setAddDefaultEntities(boolean addDefaultEntities)
Sets the state of the "add default entities" flag.- Parameters:
addDefaultEntities
- a addDefaultEntities object.
-
-