/** * @param name Name of the property to set * @param value Value to set property to. * * @return True, if the specified property was <b>succesfully</b> * set to specified value; false if its value was not changed */ public boolean setProperty(String name, Object value) { boolean ok = mConfig.setProperty(name, value); /* To make [WSTX-50] work fully dynamically (i.e. allow * setting BASE_URL after stream reader has been constructed) * need to force */ if (ok && WstxInputProperties.P_BASE_URL.equals(name)) { // Easiest to just access from config: may come in as a String etc mInput.overrideSource(mConfig.getBaseURL()); } return ok; }
protected XMLStreamReader2 createSR(File f, boolean forER, boolean autoCloseInput) throws XMLStreamException { ReaderConfig cfg = createPrivateConfig(); try { /* 18-Nov-2008, TSa: If P_BASE_URL is set, and File reference is * relative, let's resolve against base... */ if (!f.isAbsolute()) { URL base = cfg.getBaseURL(); if (base != null) { URL src = new URL(base, f.getPath()); return createSR(cfg, SystemId.construct(src), URLUtil.inputStreamFromURL(src), forER, autoCloseInput); } } final SystemId systemId = SystemId.construct(f.toURL()); return createSR(cfg, systemId, new FileInputStream(f), forER, autoCloseInput); } catch (IOException ie) { throw new WstxIOException(ie); } }
URL src = cfg.getBaseURL();
/** * Factory method used for creating the main-level document reader * source. */ public static BranchingReaderSource constructDocumentSource (ReaderConfig cfg, InputBootstrapper bs, String pubId, SystemId sysId, Reader r, boolean realClose) { /* To resolve [WSTX-50] need to ensure that P_BASE_URL overrides * the defaults if/as necessary */ URL url = cfg.getBaseURL(); if (url != null) { sysId = SystemId.construct(url); } BranchingReaderSource rs = new BranchingReaderSource(cfg, pubId, sysId, r, realClose); if (bs != null) { rs.setInputOffsets(bs.getInputTotal(), bs.getInputRow(), -bs.getInputColumn()); } return rs; }
/** * @param name Name of the property to set * @param value Value to set property to. * * @return True, if the specified property was <b>succesfully</b> * set to specified value; false if its value was not changed */ @Override public boolean setProperty(String name, Object value) { boolean ok = mConfig.setProperty(name, value); /* To make [WSTX-50] work fully dynamically (i.e. allow * setting BASE_URL after stream reader has been constructed) * need to force */ if (ok && WstxInputProperties.P_BASE_URL.equals(name)) { // Easiest to just access from config: may come in as a String etc mInput.overrideSource(mConfig.getBaseURL()); } return ok; }
/** * @param name Name of the property to set * @param value Value to set property to. * * @return True, if the specified property was <b>succesfully</b> * set to specified value; false if its value was not changed */ public boolean setProperty(String name, Object value) { boolean ok = mConfig.setProperty(name, value); /* To make [WSTX-50] work fully dynamically (i.e. allow * setting BASE_URL after stream reader has been constructed) * need to force */ if (ok && WstxInputProperties.P_BASE_URL.equals(name)) { // Easiest to just access from config: may come in as a String etc mInput.overrideSource(mConfig.getBaseURL()); } return ok; }
/** * @param name Name of the property to set * @param value Value to set property to. * * @return True, if the specified property was <b>succesfully</b> * set to specified value; false if its value was not changed */ @Override public boolean setProperty(String name, Object value) { boolean ok = mConfig.setProperty(name, value); /* To make [WSTX-50] work fully dynamically (i.e. allow * setting BASE_URL after stream reader has been constructed) * need to force */ if (ok && WstxInputProperties.P_BASE_URL.equals(name)) { // Easiest to just access from config: may come in as a String etc mInput.overrideSource(mConfig.getBaseURL()); } return ok; }
/** * @param name Name of the property to set * @param value Value to set property to. * * @return True, if the specified property was <b>succesfully</b> * set to specified value; false if its value was not changed */ @Override public boolean setProperty(String name, Object value) { boolean ok = mConfig.setProperty(name, value); /* To make [WSTX-50] work fully dynamically (i.e. allow * setting BASE_URL after stream reader has been constructed) * need to force */ if (ok && WstxInputProperties.P_BASE_URL.equals(name)) { // Easiest to just access from config: may come in as a String etc mInput.overrideSource(mConfig.getBaseURL()); } return ok; }
protected XMLStreamReader2 createSR(File f, boolean forER, boolean autoCloseInput) throws XMLStreamException { ReaderConfig cfg = createPrivateConfig(); try { /* 18-Nov-2008, TSa: If P_BASE_URL is set, and File reference is * relative, let's resolve against base... */ if (!f.isAbsolute()) { URL base = cfg.getBaseURL(); if (base != null) { URL src = new URL(base, f.getPath()); return createSR(cfg, SystemId.construct(src), URLUtil.inputStreamFromURL(src), forER, autoCloseInput); } } final SystemId systemId = SystemId.construct(f.toURL()); return createSR(cfg, systemId, new FileInputStream(f), forER, autoCloseInput); } catch (IOException ie) { throw new WstxIOException(ie); } }
@SuppressWarnings("resource") protected XMLStreamReader2 createSR(File f, boolean forER, boolean autoCloseInput) throws XMLStreamException { ReaderConfig cfg = createPrivateConfig(); try { /* 18-Nov-2008, TSa: If P_BASE_URL is set, and File reference is * relative, let's resolve against base... */ if (!f.isAbsolute()) { URL base = cfg.getBaseURL(); if (base != null) { URL src = new URL(base, f.getPath()); return createSR(cfg, SystemId.construct(src), URLUtil.inputStreamFromURL(src), forER, autoCloseInput); } } final SystemId systemId = SystemId.construct(URLUtil.toURL(f)); return createSR(cfg, systemId, new FileInputStream(f), forER, autoCloseInput); } catch (IOException ie) { throw new WstxIOException(ie); } }
@SuppressWarnings("resource") protected XMLStreamReader2 createSR(File f, boolean forER, boolean autoCloseInput) throws XMLStreamException { ReaderConfig cfg = createPrivateConfig(); try { /* 18-Nov-2008, TSa: If P_BASE_URL is set, and File reference is * relative, let's resolve against base... */ if (!f.isAbsolute()) { URL base = cfg.getBaseURL(); if (base != null) { URL src = new URL(base, f.getPath()); return createSR(cfg, SystemId.construct(src), URLUtil.inputStreamFromURL(src), forER, autoCloseInput); } } final SystemId systemId = SystemId.construct(URLUtil.toURL(f)); return createSR(cfg, systemId, new FileInputStream(f), forER, autoCloseInput); } catch (IOException ie) { throw new WstxIOException(ie); } }
@SuppressWarnings("resource") protected XMLStreamReader2 createSR(File f, boolean forER, boolean autoCloseInput) throws XMLStreamException { ReaderConfig cfg = createPrivateConfig(); try { /* 18-Nov-2008, TSa: If P_BASE_URL is set, and File reference is * relative, let's resolve against base... */ if (!f.isAbsolute()) { URL base = cfg.getBaseURL(); if (base != null) { URL src = new URL(base, f.getPath()); return createSR(cfg, SystemId.construct(src), URLUtil.inputStreamFromURL(src), forER, autoCloseInput); } } final SystemId systemId = SystemId.construct(URLUtil.toURL(f)); return createSR(cfg, systemId, new FileInputStream(f), forER, autoCloseInput); } catch (IOException ie) { throw new WstxIOException(ie); } }
URL src = cfg.getBaseURL();
return getUndeclaredEntityResolver(); case PROP_BASE_URL: return getBaseURL(); case PROP_INPUT_PARSING_MODE: return getInputParsingMode();
/** * Factory method used for creating the main-level document reader * source. */ public static BranchingReaderSource constructDocumentSource (ReaderConfig cfg, InputBootstrapper bs, String pubId, SystemId sysId, Reader r, boolean realClose) { /* To resolve [WSTX-50] need to ensure that P_BASE_URL overrides * the defaults if/as necessary */ URL url = cfg.getBaseURL(); if (url != null) { sysId = SystemId.construct(url); } BranchingReaderSource rs = new BranchingReaderSource(cfg, pubId, sysId, r, realClose); if (bs != null) { rs.setInputOffsets(bs.getInputTotal(), bs.getInputRow(), -bs.getInputColumn()); } return rs; }
/** * Factory method used for creating the main-level document reader * source. */ public static BranchingReaderSource constructDocumentSource (ReaderConfig cfg, InputBootstrapper bs, String pubId, SystemId sysId, Reader r, boolean realClose) { /* To resolve [WSTX-50] need to ensure that P_BASE_URL overrides * the defaults if/as necessary */ URL url = cfg.getBaseURL(); if (url != null) { sysId = SystemId.construct(url); } BranchingReaderSource rs = new BranchingReaderSource(cfg, pubId, sysId, r, realClose); if (bs != null) { rs.setInputOffsets(bs.getInputTotal(), bs.getInputRow(), -bs.getInputColumn()); } return rs; }
/** * Factory method used for creating the main-level document reader * source. */ public static BranchingReaderSource constructDocumentSource (ReaderConfig cfg, InputBootstrapper bs, String pubId, SystemId sysId, Reader r, boolean realClose) { /* To resolve [WSTX-50] need to ensure that P_BASE_URL overrides * the defaults if/as necessary */ URL url = cfg.getBaseURL(); if (url != null) { sysId = SystemId.construct(url); } BranchingReaderSource rs = new BranchingReaderSource(cfg, pubId, sysId, r, realClose); if (bs != null) { rs.setInputOffsets(bs.getInputTotal(), bs.getInputRow(), -bs.getInputColumn()); } return rs; }
/** * Factory method used for creating the main-level document reader * source. */ public static BranchingReaderSource constructDocumentSource (ReaderConfig cfg, InputBootstrapper bs, String pubId, SystemId sysId, Reader r, boolean realClose) { /* To resolve [WSTX-50] need to ensure that P_BASE_URL overrides * the defaults if/as necessary */ URL url = cfg.getBaseURL(); if (url != null) { sysId = SystemId.construct(url); } BranchingReaderSource rs = new BranchingReaderSource(cfg, pubId, sysId, r, realClose); if (bs != null) { rs.setInputOffsets(bs.getInputTotal(), bs.getInputRow(), -bs.getInputColumn()); } return rs; }
URL src = mConfig.getBaseURL();
URL src = mConfig.getBaseURL();