Package com.adobe.epubcheck.vocab
Class PrefixDeclarationParser
- java.lang.Object
-
- com.adobe.epubcheck.vocab.PrefixDeclarationParser
-
public class PrefixDeclarationParser extends java.lang.ObjectUtility to parse a prefix declaration attribute into a map of prefixes to URI strings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classPrefixDeclarationParser.State
-
Field Summary
Fields Modifier and Type Field Description private static java.util.EnumSet<PrefixDeclarationParser.State>FINAL_STATES
-
Constructor Summary
Constructors Constructor Description PrefixDeclarationParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.util.List<java.lang.String>consume(java.io.Reader reader, int c, PrefixDeclarationParser.State state)static java.util.Map<java.lang.String,java.lang.String>parsePrefixMappings(java.lang.String value, Report report, EPUBLocation location)Parses a prefix declaration attribute into a map of prefixes to URI strings.private static intskip(java.io.Reader reader, int c, com.google.common.base.CharMatcher skipped, com.google.common.base.CharMatcher stopping)
-
-
-
Field Detail
-
FINAL_STATES
private static java.util.EnumSet<PrefixDeclarationParser.State> FINAL_STATES
-
-
Method Detail
-
parsePrefixMappings
public static java.util.Map<java.lang.String,java.lang.String> parsePrefixMappings(java.lang.String value, Report report, EPUBLocation location)Parses a prefix declaration attribute into a map of prefixes to URI strings.- Parameters:
value- the string to parse (typically from aprefixattribute.report- to report errors on the fly.location- the location of attribute in the validated file.- Returns:
- a map of prefixes to URI strings.
-
consume
private static java.util.List<java.lang.String> consume(java.io.Reader reader, int c, PrefixDeclarationParser.State state) throws java.io.IOException- Throws:
java.io.IOException
-
skip
private static int skip(java.io.Reader reader, int c, com.google.common.base.CharMatcher skipped, com.google.common.base.CharMatcher stopping) throws java.io.IOException- Throws:
java.io.IOException
-
-