Package com.adobe.epubcheck.ops
Class OPSHandler30
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.xml.sax.ext.DefaultHandler2
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler,org.xml.sax.DTDHandler,org.xml.sax.EntityResolver,org.xml.sax.ErrorHandler,org.xml.sax.ext.DeclHandler,org.xml.sax.ext.EntityResolver2,org.xml.sax.ext.LexicalHandler
- Direct Known Subclasses:
NavHandler
public class OPSHandler30 extends OPSHandler
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<PackageVocabs.ITEM_PROPERTIES>allowedPropertiesprivate static java.util.Map<java.lang.String,Vocab>ALTCSS_VOCABSprotected booleananchorNeedsTextprivate static java.util.Set<java.lang.String>DEFAULT_VOCAB_URISprivate static java.lang.StringHAS_PALPABLE_CONTENTprotected booleanhasAltorAnnotationprotected booleanhasLabelprotected booleanhasListItemprotected booleanhasViewportprotected booleaninBodyprotected booleaninMathMLprotected booleaninPictureprotected booleaninRegionBasedNavprotected booleaninSvgprivate booleanisLinearprotected booleanisOutermostSVGAlreadyProcessedprivate static java.util.Map<java.lang.String,Vocab>KNOWN_VOCAB_URISprivate java.util.Map<io.mola.galimatias.URL,java.lang.String>mediaSourcesprotected static java.util.HashSet<java.lang.String>mouseEventsprotected static java.lang.String[]mouseEventsStringsprivate java.util.Set<PackageVocabs.ITEM_PROPERTIES>requiredPropertiesprivate static java.util.Map<java.lang.String,Vocab>RESERVED_VOCABSprotected static java.util.HashSet<java.lang.String>scriptEventsprotected static java.lang.String[]scriptEventsStringsprivate static com.google.common.base.SplitterTOKENIZERprivate java.util.Map<java.lang.String,Vocab>vocabs-
Fields inherited from class com.adobe.epubcheck.ops.OPSHandler
charsCount, elementLocationStack, epubTypeInUse, hasCaption, hasCSS, hasTh, hasThead, openElements, tableDepth, textNode
-
Fields inherited from class com.adobe.epubcheck.xml.handlers.XMLHandler
context, path, report
-
-
Constructor Summary
Constructors Constructor Description OPSHandler30(ValidationContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] chars, int arg1, int arg2)private voidcheckCiteAttribute()protected voidcheckDiscouragedElements()protected voidcheckHead()protected voidcheckIFrame()protected voidcheckImage(java.lang.String attrNS, java.lang.String attr)protected voidcheckLink()protected java.lang.StringcheckMimetypeMatches(io.mola.galimatias.URL resource, java.lang.String mimetype)protected voidcheckObject()protected voidcheckOverlaysStyles()protected voidcheckProperties()protected io.mola.galimatias.URLcheckResourceURL(java.lang.String src)protected voidcheckScript()protected voidcheckSSMLPh(java.lang.String ph)protected io.mola.galimatias.URLcheckSVGFontFaceURI()protected voidcheckType(java.lang.String type)protected voidcheckTypes(java.util.Set<StructureVocab.EPUB_TYPES> types)voidendElement()protected voidendMediaElement()protected voidendObject()static java.util.HashSet<java.lang.String>getMouseEvents()static java.util.HashSet<java.lang.String>getScriptEvents()protected booleanisPalpable()protected voidprocessAnchor(XMLElement e)protected voidprocessFigure()protected voidprocessHyperlink(io.mola.galimatias.URL href)protected voidprocessInlineScripts()protected voidprocessJavascript()protected voidprocessLink()protected voidprocessMeta()private voidprocessSectioning()private voidprocessSemantics()protected voidprocessSVG()protected voidprocessTable()protected voidprocessVideo()protected voidregisterMediaResource(io.mola.galimatias.URL url, java.lang.String mimetype, boolean hasFallback)voidstartElement()private voidstartEmbed()private voidstartInput()protected voidstartMediaElement()protected voidstartMediaSource()private voidstartTrack()private voidupdatePalpableState()-
Methods inherited from class com.adobe.epubcheck.ops.OPSHandler
checkBoldItalics, checkDependentCondition, checkSymbol, checkXMLStylesheetPI, processingInstruction
-
Methods inherited from class com.adobe.epubcheck.xml.handlers.XMLHandler
currentElement, endElement, registerReference, registerReference, setDocumentLocator, startElement
-
Methods inherited from class com.adobe.epubcheck.xml.handlers.BaseURLHandler
baseURL, checkURL
-
Methods inherited from class com.adobe.epubcheck.xml.handlers.LocationHandler
location, location
-
Methods inherited from class org.xml.sax.ext.DefaultHandler2
attributeDecl, comment, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, getExternalSubset, internalEntityDecl, resolveEntity, resolveEntity, startCDATA, startDTD, startEntity
-
-
-
-
Field Detail
-
HAS_PALPABLE_CONTENT
private static final java.lang.String HAS_PALPABLE_CONTENT
- See Also:
- Constant Field Values
-
RESERVED_VOCABS
private static java.util.Map<java.lang.String,Vocab> RESERVED_VOCABS
-
ALTCSS_VOCABS
private static java.util.Map<java.lang.String,Vocab> ALTCSS_VOCABS
-
KNOWN_VOCAB_URIS
private static java.util.Map<java.lang.String,Vocab> KNOWN_VOCAB_URIS
-
DEFAULT_VOCAB_URIS
private static java.util.Set<java.lang.String> DEFAULT_VOCAB_URIS
-
TOKENIZER
private static final com.google.common.base.Splitter TOKENIZER
-
vocabs
private java.util.Map<java.lang.String,Vocab> vocabs
-
requiredProperties
private final java.util.Set<PackageVocabs.ITEM_PROPERTIES> requiredProperties
-
allowedProperties
private final java.util.Set<PackageVocabs.ITEM_PROPERTIES> allowedProperties
-
isLinear
private final boolean isLinear
-
inPicture
protected boolean inPicture
-
anchorNeedsText
protected boolean anchorNeedsText
-
inMathML
protected boolean inMathML
-
inSvg
protected boolean inSvg
-
inBody
protected boolean inBody
-
inRegionBasedNav
protected boolean inRegionBasedNav
-
isOutermostSVGAlreadyProcessed
protected boolean isOutermostSVGAlreadyProcessed
-
hasAltorAnnotation
protected boolean hasAltorAnnotation
-
hasLabel
protected boolean hasLabel
-
hasListItem
protected boolean hasListItem
-
hasViewport
protected boolean hasViewport
-
mediaSources
private java.util.Map<io.mola.galimatias.URL,java.lang.String> mediaSources
-
scriptEventsStrings
protected static final java.lang.String[] scriptEventsStrings
-
scriptEvents
protected static java.util.HashSet<java.lang.String> scriptEvents
-
mouseEventsStrings
protected static final java.lang.String[] mouseEventsStrings
-
mouseEvents
protected static java.util.HashSet<java.lang.String> mouseEvents
-
-
Constructor Detail
-
OPSHandler30
public OPSHandler30(ValidationContext context)
-
-
Method Detail
-
getScriptEvents
public static java.util.HashSet<java.lang.String> getScriptEvents()
-
getMouseEvents
public static java.util.HashSet<java.lang.String> getMouseEvents()
-
checkImage
protected void checkImage(java.lang.String attrNS, java.lang.String attr)- Overrides:
checkImagein classOPSHandler
-
checkType
protected void checkType(java.lang.String type)
-
checkTypes
protected void checkTypes(java.util.Set<StructureVocab.EPUB_TYPES> types)
-
checkSVGFontFaceURI
protected io.mola.galimatias.URL checkSVGFontFaceURI()
- Overrides:
checkSVGFontFaceURIin classOPSHandler
-
checkSSMLPh
protected void checkSSMLPh(java.lang.String ph)
-
characters
public void characters(char[] chars, int arg1, int arg2)- Specified by:
charactersin interfaceorg.xml.sax.ContentHandler- Overrides:
charactersin classOPSHandler
-
startElement
public void startElement()
- Overrides:
startElementin classOPSHandler
-
checkCiteAttribute
private void checkCiteAttribute()
-
startTrack
private void startTrack()
-
startInput
private void startInput()
-
startEmbed
private void startEmbed()
-
checkDiscouragedElements
protected void checkDiscouragedElements()
-
processInlineScripts
protected void processInlineScripts()
-
checkScript
protected void checkScript()
- Overrides:
checkScriptin classOPSHandler
-
processJavascript
protected void processJavascript()
- Overrides:
processJavascriptin classOPSHandler
-
processLink
protected void processLink()
-
processAnchor
protected void processAnchor(XMLElement e)
-
startMediaElement
protected void startMediaElement()
-
endMediaElement
protected void endMediaElement()
-
startMediaSource
protected void startMediaSource()
-
registerMediaResource
protected void registerMediaResource(io.mola.galimatias.URL url, java.lang.String mimetype, boolean hasFallback)
-
checkMimetypeMatches
protected java.lang.String checkMimetypeMatches(io.mola.galimatias.URL resource, java.lang.String mimetype)
-
processVideo
protected void processVideo()
-
processHyperlink
protected void processHyperlink(io.mola.galimatias.URL href)
- Overrides:
processHyperlinkin classOPSHandler
-
checkResourceURL
protected io.mola.galimatias.URL checkResourceURL(java.lang.String src)
-
checkObject
protected void checkObject()
- Overrides:
checkObjectin classOPSHandler
-
endObject
protected void endObject()
-
checkIFrame
protected void checkIFrame()
- Overrides:
checkIFramein classOPSHandler
-
processSVG
protected void processSVG()
-
processMeta
protected void processMeta()
-
processTable
protected void processTable()
-
processFigure
protected void processFigure()
-
processSemantics
private void processSemantics()
-
processSectioning
private void processSectioning()
-
endElement
public void endElement()
- Overrides:
endElementin classOPSHandler
-
isPalpable
protected boolean isPalpable()
-
updatePalpableState
private void updatePalpableState()
-
checkOverlaysStyles
protected void checkOverlaysStyles()
-
checkProperties
protected void checkProperties()
-
checkHead
protected void checkHead()
-
checkLink
protected void checkLink()
- Overrides:
checkLinkin classOPSHandler
-
-