Class DocumentXpp3Reader
java.lang.Object
org.apache.maven.doxia.document.io.xpp3.DocumentXpp3Reader
Class DocumentXpp3Reader.
- Version:
- $Revision$ $Date$
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIf set the parser will be loaded with all single characters from the XHTML specification.Field contentTransformer. -
Constructor Summary
ConstructorsConstructorDescriptionDocumentXpp3Reader(DocumentXpp3Reader.ContentTransformer contentTransformer) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancheckFieldWithDuplicate(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, String tagName, String alias, Set parsed) Method checkFieldWithDuplicate.private voidcheckUnknownAttribute(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, String attribute, String tagName, boolean strict) Method checkUnknownAttribute.private voidcheckUnknownElement(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method checkUnknownElement.booleanReturns the state of the "add default entities" flag.private booleangetBooleanValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser) Method getBooleanValue.private booleangetBooleanValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, String defaultValue) Method getBooleanValue.private bytegetByteValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method getByteValue.private chargetCharacterValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser) Method getCharacterValue.private DategetDateValue(String s, String attribute, String dateFormat, org.codehaus.plexus.util.xml.pull.XmlPullParser parser) Method getDateValue.private DategetDateValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser) Method getDateValue.private doublegetDoubleValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method getDoubleValue.private floatgetFloatValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method getFloatValue.private intgetIntegerValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method getIntegerValue.private longgetLongValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method getLongValue.private StringgetRequiredAttributeValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method getRequiredAttributeValue.private shortgetShortValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method getShortValue.private StringMethod getTrimmedValue.private StringinterpolatedTrimmed(String value, String context) Method interpolatedTrimmed.private intnextTag(org.codehaus.plexus.util.xml.pull.XmlPullParser parser) Method nextTag.private DocumentAuthorparseDocumentAuthor(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method parseDocumentAuthor.private DocumentCoverparseDocumentCover(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method parseDocumentCover.private DocumentHyperlinkBehaviourparseDocumentHyperlinkBehaviour(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method parseDocumentHyperlinkBehaviour.private DocumentMetaparseDocumentMeta(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method parseDocumentMeta.private DocumentModelparseDocumentModel(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method parseDocumentModel.private DocumentStatisticparseDocumentStatistic(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method parseDocumentStatistic.private DocumentTemplateparseDocumentTemplate(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method parseDocumentTemplate.private DocumentTOCparseDocumentTOC(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method parseDocumentTOC.private DocumentTOCItemparseDocumentTOCItem(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method parseDocumentTOCItem.read(InputStream in) Method read.read(InputStream in, boolean strict) Method read.read(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) Method read.voidsetAddDefaultEntities(boolean addDefaultEntities) Sets the state of the "add default entities" flag.
-
Field Details
-
addDefaultEntities
private boolean addDefaultEntitiesIf 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
Field contentTransformer.
-
-
Constructor Details
-
DocumentXpp3Reader
public DocumentXpp3Reader() -
DocumentXpp3Reader
-
-
Method Details
-
checkFieldWithDuplicate
private boolean checkFieldWithDuplicate(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, String tagName, String alias, Set parsed) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException Method checkFieldWithDuplicate.- Parameters:
parser- a parser object.tagName- a tagName object.alias- a alias object.parsed- a parsed 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, String attribute, String tagName, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException Method checkUnknownAttribute.- Parameters:
parser- a parser object.attribute- a attribute object.tagName- a tagName object.strict- a strict object.- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.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, IOException Method checkUnknownElement.- Parameters:
parser- a parser object.strict- a strict object.- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.IOException- IOException if any.
-
getAddDefaultEntities
public boolean getAddDefaultEntities()Returns the state of the "add default entities" flag.- Returns:
- boolean
-
getBooleanValue
private boolean getBooleanValue(String s, 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.attribute- a attribute object.parser- a parser object.- Returns:
- boolean
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getBooleanValue
private boolean getBooleanValue(String s, String attribute, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, String defaultValue) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException Method getBooleanValue.- Parameters:
s- a s object.attribute- a attribute object.parser- a parser object.defaultValue- a defaultValue object.- Returns:
- boolean
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getByteValue
private byte getByteValue(String s, 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.attribute- a attribute object.parser- a parser object.strict- a strict object.- Returns:
- byte
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getCharacterValue
private char getCharacterValue(String s, 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.attribute- a attribute object.parser- a parser object.- Returns:
- char
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getDateValue
private Date getDateValue(String s, 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.attribute- a attribute object.parser- a parser object.- Returns:
- Date
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getDateValue
private Date getDateValue(String s, String attribute, 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.attribute- a attribute object.dateFormat- a dateFormat object.parser- a parser object.- Returns:
- Date
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getDoubleValue
private double getDoubleValue(String s, 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.attribute- a attribute object.parser- a parser object.strict- a strict object.- Returns:
- double
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getFloatValue
private float getFloatValue(String s, 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.attribute- a attribute object.parser- a parser object.strict- a strict object.- Returns:
- float
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getIntegerValue
private int getIntegerValue(String s, 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.attribute- a attribute object.parser- a parser object.strict- a strict object.- Returns:
- int
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getLongValue
private long getLongValue(String s, 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.attribute- a attribute object.parser- a parser object.strict- a strict object.- Returns:
- long
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getRequiredAttributeValue
private String getRequiredAttributeValue(String s, 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.attribute- a attribute object.parser- a parser object.strict- a strict object.- Returns:
- String
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getShortValue
private short getShortValue(String s, 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.attribute- a attribute object.parser- a parser object.strict- a strict object.- Returns:
- short
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
getTrimmedValue
Method getTrimmedValue.- Parameters:
s- a s object.- Returns:
- String
-
interpolatedTrimmed
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 IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method nextTag.- Parameters:
parser- a parser object.- Returns:
- int
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
read
public DocumentModel read(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method read.- Parameters:
parser- a parser object.strict- a strict object.- Returns:
- DocumentModel
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
read
public DocumentModel read(Reader reader, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException - Parameters:
reader- a reader object.strict- a strict object.- Returns:
- DocumentModel
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.- See Also:
-
read
public DocumentModel read(Reader reader) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException - Parameters:
reader- a reader object.- Returns:
- DocumentModel
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.- See Also:
-
read
public DocumentModel read(InputStream in, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method read.- Parameters:
in- a in object.strict- a strict object.- Returns:
- DocumentModel
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
read
public DocumentModel read(InputStream in) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method read.- Parameters:
in- a in object.- Returns:
- DocumentModel
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
parseDocumentAuthor
private DocumentAuthor parseDocumentAuthor(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method parseDocumentAuthor.- Parameters:
parser- a parser object.strict- a strict object.- Returns:
- DocumentAuthor
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
parseDocumentCover
private DocumentCover parseDocumentCover(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method parseDocumentCover.- Parameters:
parser- a parser object.strict- a strict object.- Returns:
- DocumentCover
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
parseDocumentHyperlinkBehaviour
private DocumentHyperlinkBehaviour parseDocumentHyperlinkBehaviour(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method parseDocumentHyperlinkBehaviour.- Parameters:
parser- a parser object.strict- a strict object.- Returns:
- DocumentHyperlinkBehaviour
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
parseDocumentMeta
private DocumentMeta parseDocumentMeta(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method parseDocumentMeta.- Parameters:
parser- a parser object.strict- a strict object.- Returns:
- DocumentMeta
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
parseDocumentModel
private DocumentModel parseDocumentModel(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method parseDocumentModel.- Parameters:
parser- a parser object.strict- a strict object.- Returns:
- DocumentModel
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
parseDocumentStatistic
private DocumentStatistic parseDocumentStatistic(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method parseDocumentStatistic.- Parameters:
parser- a parser object.strict- a strict object.- Returns:
- DocumentStatistic
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
parseDocumentTOC
private DocumentTOC parseDocumentTOC(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method parseDocumentTOC.- Parameters:
parser- a parser object.strict- a strict object.- Returns:
- DocumentTOC
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
parseDocumentTOCItem
private DocumentTOCItem parseDocumentTOCItem(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method parseDocumentTOCItem.- Parameters:
parser- a parser object.strict- a strict object.- Returns:
- DocumentTOCItem
- Throws:
IOException- IOException if any.org.codehaus.plexus.util.xml.pull.XmlPullParserException- XmlPullParserException if any.
-
parseDocumentTemplate
private DocumentTemplate parseDocumentTemplate(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, boolean strict) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException Method parseDocumentTemplate.- Parameters:
parser- a parser object.strict- a strict object.- Returns:
- DocumentTemplate
- Throws:
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.
-