/** * <b>DOM</b>: Implements {@link DocumentView#getDefaultView()}. * @return a ViewCSS object. */ public AbstractView getDefaultView() { if (defaultView == null) { ExtensibleDOMImplementation impl; impl = (ExtensibleDOMImplementation)implementation; defaultView = impl.createViewCSS(this); } return defaultView; }
/** * Creates a new DOMImplementation. */ public ExtensibleDOMImplementation() { for (Object o : getDomExtensions()) { DomExtension de = (DomExtension) o; de.registerTags(this); } }
} catch (ClassNotFoundException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.class", new Object[] { pn })); } catch (InstantiationException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.creation", new Object[] { pn })); } catch (IllegalAccessException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.access", new Object[] { pn })); } catch (NoSuchMethodException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.access", new Object[] { pn })); } catch (InvocationTargetException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.access", new Object[] { pn })); CSSEngine result = createCSSEngine(doc, ctx, ep, vms, sms); doc.setCSSEngine(result); return result;
/** * Implements the behavior of Document.createElementNS() for this * DOM implementation. */ public Element createElementNS(AbstractDocument document, String namespaceURI, String qualifiedName) { if (SVGConstants.SVG_NAMESPACE_URI.equals(namespaceURI)) { String name = DOMUtilities.getLocalName(qualifiedName); ElementFactory ef = (ElementFactory)factories.get(name); if (ef != null) return ef.create(DOMUtilities.getPrefix(qualifiedName), document); throw document.createDOMException (DOMException.NOT_FOUND_ERR, "invalid.element", new Object[] { namespaceURI, qualifiedName }); } return super.createElementNS(document, namespaceURI, qualifiedName); }
/** * <b>DOM</b>: Implements {@link * DOMImplementation#createDocumentType(String,String,String)}. */ public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) { if (qualifiedName == null) { qualifiedName = ""; } int test = XMLUtilities.testXMLQName(qualifiedName); if ((test & XMLUtilities.IS_XML_10_NAME) == 0) { throw new DOMException (DOMException.INVALID_CHARACTER_ERR, formatMessage("xml.name", new Object[] { qualifiedName })); } if ((test & XMLUtilities.IS_XML_10_QNAME) == 0) { throw new DOMException (DOMException.INVALID_CHARACTER_ERR, formatMessage("invalid.qname", new Object[] { qualifiedName })); } return new GenericDocumentType(qualifiedName, publicId, systemId); }
di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_REGULAR_POLYGON_TAG, new BatikRegularPolygonElementFactory()); di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_STAR_TAG, new BatikStarElementFactory()); di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_HISTOGRAM_NORMALIZATION_TAG, new BatikHistogramNormalizationElementFactory()); di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_COLOR_SWITCH_TAG, new ColorSwitchElementFactory()); di.registerCustomElementFactory (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_TEXT_TAG, new FlowTextElementFactory()); di.registerCustomElementFactory (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_DIV_TAG, new FlowDivElementFactory());
} catch (ClassNotFoundException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.class", new Object[] { pn })); } catch (InstantiationException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.creation", new Object[] { pn })); } catch (IllegalAccessException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.access", new Object[] { pn })); } catch (NoSuchMethodException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.access", new Object[] { pn })); } catch (InvocationTargetException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.access", new Object[] { pn })); CSSEngine result = createCSSEngine(doc, ctx, ep, vms, sms); doc.setCSSEngine(result); return result;
/** * Implements the behavior of Document.createElementNS() for this * DOM implementation. */ public Element createElementNS(AbstractDocument document, String namespaceURI, String qualifiedName) { if (SVGConstants.SVG_NAMESPACE_URI.equals(namespaceURI)) { String name = DOMUtilities.getLocalName(qualifiedName); ElementFactory ef = factories.get(name); if (ef != null) return ef.create(DOMUtilities.getPrefix(qualifiedName), document); throw document.createDOMException (DOMException.NOT_FOUND_ERR, "invalid.element", new Object[] { namespaceURI, qualifiedName }); } return super.createElementNS(document, namespaceURI, qualifiedName); }
/** * <b>DOM</b>: Implements DOMImplementation#createDocumentType(String,String,String). */ public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) { if (qualifiedName == null) { qualifiedName = ""; } int test = XMLUtilities.testXMLQName(qualifiedName); if ((test & XMLUtilities.IS_XML_10_NAME) == 0) { throw new DOMException (DOMException.INVALID_CHARACTER_ERR, formatMessage("xml.name", new Object[] { qualifiedName })); } if ((test & XMLUtilities.IS_XML_10_QNAME) == 0) { throw new DOMException (DOMException.INVALID_CHARACTER_ERR, formatMessage("invalid.qname", new Object[] { qualifiedName })); } return new GenericDocumentType(qualifiedName, publicId, systemId); }
di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_REGULAR_POLYGON_TAG, new BatikRegularPolygonElementFactory()); di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_STAR_TAG, new BatikStarElementFactory()); di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_HISTOGRAM_NORMALIZATION_TAG, new BatikHistogramNormalizationElementFactory()); di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_COLOR_SWITCH_TAG, new ColorSwitchElementFactory()); di.registerCustomElementFactory (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_TEXT_TAG, new FlowTextElementFactory()); di.registerCustomElementFactory (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_DIV_TAG, new FlowDivElementFactory());
} catch (ClassNotFoundException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.class", new Object[] { pn })); } catch (InstantiationException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.creation", new Object[] { pn })); } catch (IllegalAccessException e) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, formatMessage("css.parser.access", new Object[] { pn })); CSSEngine result = createCSSEngine(doc, ctx, ep, vms, sms); doc.setCSSEngine(result); return result;
/** * Creates a new DOMImplementation. */ public ExtensibleDOMImplementation() { Iterator iter = getDomExtensions().iterator(); while(iter.hasNext()) { DomExtension de = (DomExtension)iter.next(); de.registerTags(this); } }
/** * <b>DOM</b>: Implements {@link DocumentView#getDefaultView()}. * @return a ViewCSS object. */ public AbstractView getDefaultView() { if (defaultView == null) { ExtensibleDOMImplementation impl; impl = (ExtensibleDOMImplementation)implementation; defaultView = impl.createViewCSS(this); } return defaultView; }
/** * Implements the behavior of Document.createElementNS() for this * DOM implementation. */ public Element createElementNS(AbstractDocument document, String namespaceURI, String qualifiedName) { if (SVGConstants.SVG_NAMESPACE_URI.equals(namespaceURI)) { String name = DOMUtilities.getLocalName(qualifiedName); ElementFactory ef = (ElementFactory)factories.get(name); if (ef != null) return ef.create(DOMUtilities.getPrefix(qualifiedName), document); throw document.createDOMException (DOMException.NOT_FOUND_ERR, "invalid.element", new Object[] { namespaceURI, qualifiedName }); } return super.createElementNS(document, namespaceURI, qualifiedName); }
/** * <b>DOM</b>: Implements DOMImplementation#createDocumentType(String,String,String). */ public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) { if (qualifiedName == null) { qualifiedName = ""; } int test = XMLUtilities.testXMLQName(qualifiedName); if ((test & XMLUtilities.IS_XML_10_NAME) == 0) { throw new DOMException (DOMException.INVALID_CHARACTER_ERR, formatMessage("xml.name", new Object[] { qualifiedName })); } if ((test & XMLUtilities.IS_XML_10_QNAME) == 0) { throw new DOMException (DOMException.INVALID_CHARACTER_ERR, formatMessage("invalid.qname", new Object[] { qualifiedName })); } return new GenericDocumentType(qualifiedName, publicId, systemId); }
di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_REGULAR_POLYGON_TAG, new BatikRegularPolygonElementFactory()); di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_STAR_TAG, new BatikStarElementFactory()); di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_HISTOGRAM_NORMALIZATION_TAG, new BatikHistogramNormalizationElementFactory()); di.registerCustomElementFactory (BATIK_EXT_NAMESPACE_URI, BATIK_EXT_COLOR_SWITCH_TAG, new ColorSwitchElementFactory()); di.registerCustomElementFactory (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_TEXT_TAG, new FlowTextElementFactory()); di.registerCustomElementFactory (BATIK_12_NAMESPACE_URI, BATIK_EXT_FLOW_DIV_TAG, new FlowDivElementFactory());
/** * Creates a new DOMImplementation. */ public ExtensibleDOMImplementation() { for (Object o : getDomExtensions()) { DomExtension de = (DomExtension) o; de.registerTags(this); } }
/** * <b>DOM</b>: Implements {@link DocumentView#getDefaultView()}. * @return a ViewCSS object. */ public AbstractView getDefaultView() { if (defaultView == null) { ExtensibleDOMImplementation impl; impl = (ExtensibleDOMImplementation)implementation; defaultView = impl.createViewCSS(this); } return defaultView; }