/** * @deprecated Please use the {@link OMXMLBuilderFactory} API. */ public StAXOMBuilder(InputStream inStream) throws XMLStreamException { this(StAXUtils.createXMLStreamReader(inStream)); }
/** * Get a cached {@link XMLInputFactory} instance using the specified * configuration and the default cache policy. * * @param configuration * the configuration applied to the requested factory * @return an {@link XMLInputFactory} instance. */ public static XMLInputFactory getXMLInputFactory(StAXParserConfiguration configuration) { return getXMLInputFactory(configuration, isFactoryPerClassLoader); }
/** * Get a cached {@link XMLOutputFactory} instance using the specified * configuration and the default cache policy. * * @param configuration * the configuration applied to the requested factory * @return an {@link XMLOutputFactory} instance. */ public static XMLOutputFactory getXMLOutputFactory(StAXWriterConfiguration configuration) { return getXMLOutputFactory(configuration, isFactoryPerClassLoader); }
/** * If the input string is valid xml, this method will convert it into an OMElement and * return back. Otherwise returns null. */ public static OMElement getOMFromXML(String text) { try { return AXIOMUtil.stringToOM(text); } catch (Exception ignore) { return null; } } }
/** * Creates an InputNode. * * @param graph */ public StreamSourceNode(Graph graph) { super(graph); this.label = UUIDGenerator.getUUID(); }
private String getContentTransferEncoding(String contentType) { if (useCTEBase64 && !CommonUtils.isTextualPart(contentType)) { return "base64"; } else { return "binary"; } }
/** * Turn a prefix:local qname string into a proper QName, evaluating it in the OMElement context * unprefixed qnames resolve to the local namespace * * @param qname prefixed qname string to resolve * @return Returns null for any failure to extract a qname. */ public QName resolveQName(String qname) { ElementHelper helper = new ElementHelper(this); return helper.resolveQName(qname); }
/** * @deprecated The algorithm used by this method is incorrect. See <a * href="https://issues.apache.org/jira/browse/AXIOM-356">AXIOM-356</a> for more * details. */ public QName resolveQName(String qname) { return resolveQName(qname, true); }
/** * @return count of bytes read */ public long length() throws IOException { if (localStream == null) { detach(); } return count; }
/** * This method is an overloaded method for getting the expanded name namespaceURI followed by * the local name for OMElement * * @param element * @return Returns the expanded name of OMElement */ public String getExpandedName(OMElement element) { return internalGetExpandedName(element); }
/** * @deprecated use {@link #getContentID(XMLStreamReader)} instead (see AXIOM-129) */ public static String getContentID(XMLStreamReader parser, String charsetEncoding) { return getContentID(parser); }
/** * Writes the om to a log.debug. * This method assumes optimized mtom attachments * Also calculates the length of the message. * @param om OMElement * @param log Log * @return length of entire message */ public static long logDebug(OMElement om, Log log) { return logDebug(om, log, Integer.MAX_VALUE); }
public static OMElement convertToAnyType(String s) { try { return AXIOMUtil.stringToOM(s); } catch (XMLStreamException e) { return null; } }
/** * @deprecated use {@link #createXMLStreamReader(StAXParserConfiguration, InputStream)} * with {@link StAXParserConfiguration#STANDALONE} */ public static XMLStreamReader createNetworkDetachedXMLStreamReader(InputStream in) throws XMLStreamException { return createXMLStreamReader(StAXParserConfiguration.STANDALONE, in); }
/** * @deprecated use {@link #getXMLInputFactory(StAXParserConfiguration)} with * {@link StAXParserConfiguration#STANDALONE} */ public static XMLInputFactory getNetworkDetachedXMLInputFactory() { return getXMLInputFactory(StAXParserConfiguration.STANDALONE); }
/** * Get a cached {@link XMLOutputFactory} instance using the default * configuration and cache policy (i.e. one instance per class loader). * * @return an {@link XMLOutputFactory} instance. */ public static XMLOutputFactory getXMLOutputFactory() { return getXMLOutputFactory(null, isFactoryPerClassLoader); }
/** * This method is an overloaded method for getting the expanded name namespaceURI followed by * the local name for OMAttribute * * @param attribute * @return Returns the expanded name of the OMAttribute */ public String getExpandedName(OMAttribute attribute) { return internalGetExpandedName(attribute); }
/** * @deprecated use {@link #createXMLStreamReader(StAXParserConfiguration, Reader)} * with {@link StAXParserConfiguration#STANDALONE} */ public static XMLStreamReader createNetworkDetachedXMLStreamReader(Reader in) throws XMLStreamException { return createXMLStreamReader(StAXParserConfiguration.STANDALONE, in); }
/** * Get a cached {@link XMLInputFactory} instance using the default * configuration and cache policy (i.e. one instance per class loader). * * @return an {@link XMLInputFactory} instance. */ public static XMLInputFactory getXMLInputFactory() { return getXMLInputFactory(null, isFactoryPerClassLoader); }
/** * @deprecated use {@link #createXMLStreamReader(StAXParserConfiguration, InputStream, String)} * with {@link StAXParserConfiguration#STANDALONE} */ public static XMLStreamReader createNetworkDetachedXMLStreamReader(InputStream in, String encoding) throws XMLStreamException { return createXMLStreamReader(StAXParserConfiguration.STANDALONE, in, encoding); }