Package org.apache.cxf.staxutils

Examples of org.apache.cxf.staxutils.DocumentDepthProperties


                    int totalElementCount = totalElementCountStr != null
                        ? Integer.valueOf(totalElementCountStr) : -1;
                    int elementLevel = elementLevelStr != null ? Integer.valueOf(elementLevelStr) : -1;
                    int innerElementCount = innerElementCountStr != null
                        ? Integer.valueOf(innerElementCountStr) : -1;
                    return new DocumentDepthProperties(totalElementCount, elementLevel, innerElementCount);
                } catch (Exception ex) {
                    throw new InternalServerErrorException(ex);
                }
            }
        }
View Full Code Here


                    int totalElementCount = totalElementCountStr != null
                        ? Integer.valueOf(totalElementCountStr) : -1;
                    int elementLevel = elementLevelStr != null ? Integer.valueOf(elementLevelStr) : -1;
                    int innerElementCount = innerElementCountStr != null
                        ? Integer.valueOf(innerElementCountStr) : -1;
                    return new DocumentDepthProperties(totalElementCount, elementLevel, innerElementCount);
                } catch (Exception ex) {
                    throw new InternalServerErrorException(ex);
                }
            }
        }
View Full Code Here

                                                            inAppendMap,
                                                            true);
    }
   
    protected XMLStreamReader createDepthReaderIfNeeded(XMLStreamReader reader, InputStream is) {
        DocumentDepthProperties props = getDepthProperties();
        if (props != null && props.isEffective()) {
            reader = TransformUtils.createNewReaderIfNeeded(reader, is);
            return new DepthRestrictingStreamReader(reader, props);
        }
        return reader;
    }
View Full Code Here

                                                            inAppendMap,
                                                            true);
    }
   
    protected XMLStreamReader createDepthReaderIfNeeded(XMLStreamReader reader, InputStream is) {
        DocumentDepthProperties props = getDepthProperties();
        if (props != null && props.isEffective()) {
            reader = TransformUtils.createNewReaderIfNeeded(reader, is);
            return new DepthRestrictingStreamReader(reader, props);
        }
        return reader;
    }
View Full Code Here

                    int totalElementCount = totalElementCountStr != null
                        ? Integer.valueOf(totalElementCountStr) : -1;
                    int elementLevel = elementLevelStr != null ? Integer.valueOf(elementLevelStr) : -1;
                    int innerElementCount = innerElementCountStr != null
                        ? Integer.valueOf(innerElementCountStr) : -1;
                    return new DocumentDepthProperties(totalElementCount, elementLevel, innerElementCount);
                } catch (Exception ex) {
                    throw new WebApplicationException(ex);
                }
            }
        }
View Full Code Here

                                                            inAppendMap,
                                                            true);
    }
   
    protected XMLStreamReader createDepthReaderIfNeeded(XMLStreamReader reader, InputStream is) {
        DocumentDepthProperties props = getDepthProperties();
        if (props != null && props.isEffective()) {
            reader = TransformUtils.createNewReaderIfNeeded(reader, is);
            return new DepthRestrictingStreamReader(reader, props);
        }
        return reader;
    }
View Full Code Here

                    int totalElementCount = totalElementCountStr != null
                        ? Integer.valueOf(totalElementCountStr) : -1;
                    int elementLevel = elementLevelStr != null ? Integer.valueOf(elementLevelStr) : -1;
                    int innerElementCount = innerElementCountStr != null
                        ? Integer.valueOf(innerElementCountStr) : -1;
                    return new DocumentDepthProperties(totalElementCount, elementLevel, innerElementCount);
                } catch (Exception ex) {
                    throw new WebApplicationException(ex);
                }
            }
        }
View Full Code Here

                                                            inAppendMap,
                                                            true);
    }
   
    protected XMLStreamReader createDepthReaderIfNeeded(XMLStreamReader reader, InputStream is) {
        DocumentDepthProperties props = getDepthProperties();
        if (props != null && props.isEffective()) {
            reader = TransformUtils.createNewReaderIfNeeded(reader, is);
            return new DepthRestrictingStreamReader(reader, props);
        }
        return reader;
    }
View Full Code Here

                    int totalElementCount = totalElementCountStr != null
                        ? Integer.valueOf(totalElementCountStr) : -1;
                    int elementLevel = elementLevelStr != null ? Integer.valueOf(elementLevelStr) : -1;
                    int innerElementCount = innerElementCountStr != null
                        ? Integer.valueOf(innerElementCountStr) : -1;
                    return new DocumentDepthProperties(totalElementCount, elementLevel, innerElementCount);
                } catch (Exception ex) {
                    throw new WebApplicationException(ex);
                }
            }
        }
View Full Code Here

    public void setIgnoreEmptyArrayValues(boolean ignoreEmptyArrayElements) {
        this.ignoreEmptyArrayValues = ignoreEmptyArrayElements;
    }

    protected DocumentDepthProperties getDepthProperties() {
        DocumentDepthProperties depthProperties = super.getDepthProperties();
        if (depthProperties != null) {
            return depthProperties;
        }
        if (getContext() != null) {
            String totalElementCountStr = (String)getContext().getContextualProperty(
                DocumentDepthProperties.TOTAL_ELEMENT_COUNT);
            String innerElementCountStr = (String)getContext().getContextualProperty(
                DocumentDepthProperties.INNER_ELEMENT_COUNT);
            String elementLevelStr = (String)getContext().getContextualProperty(
                DocumentDepthProperties.INNER_ELEMENT_LEVEL);
            if (totalElementCountStr != null || innerElementCountStr != null || elementLevelStr != null) {
                try {
                    int totalElementCount = totalElementCountStr != null
                        ? Integer.valueOf(totalElementCountStr) : -1;
                    int elementLevel = elementLevelStr != null ? Integer.valueOf(elementLevelStr) : -1;
                    int innerElementCount = innerElementCountStr != null
                        ? Integer.valueOf(innerElementCountStr) : -1;
                    return new DocumentDepthProperties(totalElementCount, elementLevel, innerElementCount);
                } catch (Exception ex) {
                    throw ExceptionUtils.toInternalServerErrorException(ex, null);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.cxf.staxutils.DocumentDepthProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.