<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.springframework.org/schema/integration/feed"
			xmlns:xsd="http://www.w3.org/2001/XMLSchema"
			xmlns:tool="http://www.springframework.org/schema/tool"
			xmlns:integration="http://www.springframework.org/schema/integration"
			targetNamespace="http://www.springframework.org/schema/integration/feed"
			elementFormDefault="qualified">

	<xsd:import namespace="http://www.springframework.org/schema/beans"/>
	<xsd:import namespace="http://www.springframework.org/schema/integration"
				schemaLocation="https://www.springframework.org/schema/integration/spring-integration.xsd"/>

	<xsd:element name="inbound-channel-adapter">
		<xsd:annotation>
			<xsd:documentation><![CDATA[
				Configures a 'SourcePollingChannelAdapter' Endpoint for the
				'org.springframework.integration.feed.inbound.FeedEntryMessageSource' that
				takes a feed URL (either RSS or ATOM) and responds to updates.
				Each Message will be sent to the provided channel with a feed entry as its payload.
			]]></xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attribute name="id" type="xsd:string" use="required">
				<xsd:annotation>
					<xsd:documentation>
						The bean id of this Polling Endpoint; the MessageSource is also registered with this id
						plus a suffix '.source'; also used as the
						MetaDataStore key with suffix '.' + feedUrl - The URL for an RSS or ATOM feed.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="channel" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
						</tool:annotation>
					</xsd:appinfo>
					<xsd:documentation>
						Identifies the channel attached to this adapter, to which messages will be sent.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attributeGroup ref="integration:smartLifeCycleAttributeGroup"/>
			<xsd:attribute name="url" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						The URL for an RSS or ATOM feed.
						Mutually exclusive with `resource`.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="resource">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a org.springframework.core.io.Resource instance - a Feed XML source.
						Mutually exclusive with 'url'.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.core.io.Resource"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="feed-input" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a SyndFeedInput instance - a Feed XML parser.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="com.rometools.rome.io.SyndFeedInput"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="metadata-store" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a MetadataStore instance for storing metadata associated with
						the retrieved feeds. If the implementation is persistent, it can help to
						prevent duplicates between restarts. If shared, it can help coordinate multiple
						instances of an adapter across different processes.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.integration.metadata.MetadataStore"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="preserve-wire-feed" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						A flag to indication if 'WireFeed' should be preserved in the target 'SyndFeed'.
						Defaults 'false'.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:union memberTypes="xsd:boolean xsd:string"/>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

</xsd:schema>
