Package org.apache.cocoon.components.source

Examples of org.apache.cocoon.components.source.TraversableSource


        }

        sources.put(uri, source);

        if (source instanceof TraversableSource) {
            TraversableSource traversablesource = (TraversableSource) source;

            try {
                if (traversablesource.isSourceCollection() && (deep>0)) {
                    for (int i = 0; i<traversablesource.getChildSourceCount();
                        i++)
                        collectSources(sources,
                                       traversablesource.getChildSource(i),
                                       deep-1);
                }
            } catch (SourceException se) {
                getLogger().warn("Could not traverse source", se);
            }
View Full Code Here


                    }
                }
            }

            boolean isCollection = false;
            TraversableSource traversablesource = null;

            if (source instanceof TraversableSource) {
                traversablesource = (TraversableSource) source;

                isCollection = traversablesource.isSourceCollection();

                attributes.addAttribute("", COLLECTION_ATTR_NAME,
                                        COLLECTION_ATTR_NAME, "CDATA",
                                        String.valueOf(isCollection));

                String parent = traversablesource.getParentSource();

                if ((parent!=null) && (parent.length()>0)) {
                    attributes.addAttribute("", PARENT_ATTR_NAME,
                                            PARENT_ATTR_NAME, "CDATA",
                                            parent);
                }
            }

            this.contentHandler.startElement(SOURCE_NS, SOURCE_NODE_NAME,
                                             SOURCE_NODE_QNAME, attributes);

            if (this.properties && (source instanceof InspectableSource)) {
                pushLiveSourceProperties((InspectableSource) source);
            }

            if (this.properties) {
                pushComputedSourceProperties(source);
            }

            if (this.permissions) {
                try {
                    if (source instanceof RestrictableSource) {
                        pushSourcePermissions((RestrictableSource) source);
                    }
                } catch (SourceException se) {
                    if (getLogger().isDebugEnabled()) {
                        getLogger().debug("Could not retrieve source permissions",
                                          se);
                    }
                }
            }

            if (this.locks && (source instanceof LockableSource)) {
                pushSourceLocks((LockableSource) source);
            }

            if ((isCollection) && (deep>0)) {
                this.contentHandler.startElement(SOURCE_NS,
                                                 CHILDREN_NODE_NAME,
                                                 CHILDREN_NODE_QNAME,
                                                 new AttributesImpl());
                for (int i = 0; i<traversablesource.getChildSourceCount();
                    i++) {
                    try {
                        pushSourceDescription(traversablesource.getChildSource(i),
                                              deep-1);
                    } catch (SourceException se) {
                        if (getLogger().isDebugEnabled()) {
                            getLogger().debug("Could not retrieve source",
                                              se);
View Full Code Here

        }

        sources.put(uri, source);

        if (source instanceof TraversableSource) {
            TraversableSource traversablesource = (TraversableSource) source;

            try {
                if (traversablesource.isSourceCollection() && (deep>0)) {
                    for (int i = 0; i<traversablesource.getChildSourceCount();
                        i++)
                        collectSources(sources,
                                       traversablesource.getChildSource(i),
                                       deep-1);
                }
            } catch (SourceException se) {
                getLogger().warn("Could not traverse source", se);
            }
View Full Code Here

                    }
                }
            }

            boolean isCollection = false;
            TraversableSource traversablesource = null;

            if (source instanceof TraversableSource) {
                traversablesource = (TraversableSource) source;

                isCollection = traversablesource.isSourceCollection();

                attributes.addAttribute("", COLLECTION_ATTR_NAME,
                                        COLLECTION_ATTR_NAME, "CDATA",
                                        String.valueOf(isCollection));

                String parent = traversablesource.getParentSource();

                if ((parent!=null) && (parent.length()>0)) {
                    attributes.addAttribute("", PARENT_ATTR_NAME,
                                            PARENT_ATTR_NAME, "CDATA",
                                            parent);
                }
            }

            this.contentHandler.startElement(SOURCE_NS, SOURCE_NODE_NAME,
                                             SOURCE_NODE_QNAME, attributes);

            if (this.properties && (source instanceof InspectableSource)) {
                pushLiveSourceProperties((InspectableSource) source);
            }

            if (this.properties) {
                pushComputedSourceProperties(source);
            }

            if (this.permissions) {
                try {
                    if (source instanceof RestrictableSource) {
                        pushSourcePermissions((RestrictableSource) source);
                    }
                } catch (SourceException se) {
                    if (getLogger().isDebugEnabled()) {
                        getLogger().debug("Could not retrieve source permissions",
                                          se);
                    }
                }
            }

            if (this.locks && (source instanceof LockableSource)) {
                pushSourceLocks((LockableSource) source);
            }

            if ((isCollection) && (deep>0)) {
                this.contentHandler.startElement(SOURCE_NS,
                                                 CHILDREN_NODE_NAME,
                                                 CHILDREN_NODE_QNAME,
                                                 new AttributesImpl());
                for (int i = 0; i<traversablesource.getChildSourceCount();
                    i++) {
                    try {
                        pushSourceDescription(traversablesource.getChildSource(i),
                                              deep-1);
                    } catch (SourceException se) {
                        if (getLogger().isDebugEnabled()) {
                            getLogger().debug("Could not retrieve source",
                                              se);
View Full Code Here

        }

        sources.put(uri, source);

        if (source instanceof TraversableSource) {
            TraversableSource traversablesource = (TraversableSource) source;

            try {
                if (traversablesource.isSourceCollection() && (deep>0)) {
                    for (int i = 0; i<traversablesource.getChildSourceCount();
                        i++)
                        collectSources(sources,
                                       traversablesource.getChildSource(i),
                                       deep-1);
                }
            } catch (SourceException se) {
                getLogger().warn("Could not traverse source", se);
            }
View Full Code Here

                    }
                }
            }

            boolean isCollection = false;
            TraversableSource traversablesource = null;

            if (source instanceof TraversableSource) {
                traversablesource = (TraversableSource) source;

                isCollection = traversablesource.isSourceCollection();

                attributes.addAttribute("", COLLECTION_ATTR_NAME,
                                        COLLECTION_ATTR_NAME, "CDATA",
                                        String.valueOf(isCollection));

                String parent = traversablesource.getParentSource();

                if ((parent!=null) && (parent.length()>0)) {
                    attributes.addAttribute("", PARENT_ATTR_NAME,
                                            PARENT_ATTR_NAME, "CDATA",
                                            parent);
                }
            }

            this.contentHandler.startElement(SOURCE_NS, SOURCE_NODE_NAME,
                                             SOURCE_NODE_QNAME, attributes);

            if (this.properties && (source instanceof InspectableSource)) {
                pushLiveSourceProperties((InspectableSource) source);
            }

            if (this.properties) {
                pushComputedSourceProperties(source);
            }

            if (this.permissions) {
                try {
                    if (source instanceof RestrictableSource) {
                        pushSourcePermissions((RestrictableSource) source);
                    }
                } catch (SourceException se) {
                    if (getLogger().isDebugEnabled()) {
                        getLogger().debug("Could not retrieve source permissions",
                                          se);
                    }
                }
            }

            if (this.locks && (source instanceof LockableSource)) {
                pushSourceLocks((LockableSource) source);
            }

            if ((isCollection) && (deep>0)) {
                this.contentHandler.startElement(SOURCE_NS,
                                                 CHILDREN_NODE_NAME,
                                                 CHILDREN_NODE_QNAME,
                                                 new AttributesImpl());
                for (int i = 0; i<traversablesource.getChildSourceCount();
                    i++) {
                    try {
                        pushSourceDescription(traversablesource.getChildSource(i),
                                              deep-1);
                    } catch (SourceException se) {
                        if (getLogger().isDebugEnabled()) {
                            getLogger().debug("Could not retrieve source",
                                              se);
View Full Code Here

        }

        sources.put(uri, source);

        if (source instanceof TraversableSource) {
            TraversableSource traversablesource = (TraversableSource) source;

            try {
                if (traversablesource.isSourceCollection() && (deep>0)) {
                    for (int i = 0; i<traversablesource.getChildSourceCount();
                        i++)
                        collectSources(sources,
                                       traversablesource.getChildSource(i),
                                       deep-1);
                }
            } catch (SourceException se) {
                getLogger().warn("Could not traverse source", se);
            }
View Full Code Here

                    }
                }
            }

            boolean isCollection = false;
            TraversableSource traversablesource = null;

            if (source instanceof TraversableSource) {
                traversablesource = (TraversableSource) source;

                isCollection = traversablesource.isSourceCollection();

                attributes.addAttribute("", COLLECTION_ATTR_NAME,
                                        COLLECTION_ATTR_NAME, "CDATA",
                                        String.valueOf(isCollection));

                String parent = traversablesource.getParentSource();

                if ((parent!=null) && (parent.length()>0)) {
                    attributes.addAttribute("", PARENT_ATTR_NAME,
                                            PARENT_ATTR_NAME, "CDATA",
                                            parent);
                }
            }

            this.contentHandler.startElement(SOURCE_NS, SOURCE_NODE_NAME,
                                             SOURCE_NODE_QNAME, attributes);

            if (this.properties && (source instanceof InspectableSource)) {
                pushLiveSourceProperties((InspectableSource) source);
            }

            if (this.properties) {
                pushComputedSourceProperties(source);
            }

            if (this.permissions) {
                try {
                    if (source instanceof RestrictableSource) {
                        pushSourcePermissions((RestrictableSource) source);
                    }
                } catch (SourceException se) {
                    if (getLogger().isDebugEnabled()) {
                        getLogger().debug("Could not retrieve source permissions",
                                          se);
                    }
                }
            }

            if (this.locks && (source instanceof LockableSource)) {
                pushSourceLocks((LockableSource) source);
            }

            if ((isCollection) && (deep>0)) {
                this.contentHandler.startElement(SOURCE_NS,
                                                 CHILDREN_NODE_NAME,
                                                 CHILDREN_NODE_QNAME,
                                                 new AttributesImpl());
                for (int i = 0; i<traversablesource.getChildSourceCount();
                    i++) {
                    try {
                        pushSourceDescription(traversablesource.getChildSource(i),
                                              deep-1);
                    } catch (SourceException se) {
                        if (getLogger().isDebugEnabled()) {
                            getLogger().debug("Could not retrieve source",
                                              se);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.source.TraversableSource

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.