<!--
  DTD for fr.imag.adele.bundle.wireadminbinder descriptor DTD

  Organization : Universite Joseph Fourier, IMAG/LSR/ADELE, Grenoble, France
  Author : Didier Donsez
  Date : March 2, 2004
  Last Update: November 17, 2004
-->
<!--
<!ENTITY %descriptionatt "description CDATA #IMPLIED">
<!ENTITY %idatt "id CDATA #IMPLIED">
<!ENTITY %filteratt "filter CDATA #REQUIRED">
-->

<!ELEMENT wireadminbinder (wireapp+)>
<!ATTLIST  wireadminbinder
	description CDATA #IMPLIED
>

<!--
WireApp describes a list of related wiresets

wireadmin-servicepid is the service.pid properties of the wire admin that manages this application
-->
<!ELEMENT wireapp (wireset+)>
<!ATTLIST  wireapp
	id CDATA #IMPLIED
	description CDATA #IMPLIED
>

<!--
WireSet describes a set of wires created between producers and consumers

producers-filter: the LDAP filter to select a subset of registered producers
	service.pid could be use to select only one producer
	Examples of one producer:
			producers-filter="(service.pid=fr.imag.adele.osgi.util.clock)"
	Examples of many producers:
			producers-filter="(service.pid=fr.imag.adele.*)"
			producers-filter="(wireadmin.producer.flavors=org.osgi.position.Position)"
	
consumers-filter: the LDAP filter to select a subset of registered consumers
	service.pid could be use to select only one consumer
	Examples of many consumer:
			consumers-filter="(service.pid=fr.imag.adele.osgi.util.consumerservlet)"
	Examples of many consumers:
			consumers-filter="(service.pid=fr.imag.adele.*)"
			consumers-filter="(wireadmin.consumer.flavors=org.osgi.position.Position)"	
	
removepolicy indicates what to do with the wire when the producer or the consumer is unregistered
	removepolicy="keepAlive" : the wire is keep alive when the producer or the consumer are unregistered. 	
	removepolicy="whileProducer" : the wire is deleted when the producer is unregistered.
	removepolicy="whileConsumer" : the wire is deleted when the consumer is unregistered.
	removepolicy="ifDisconnected" : the wire is deleted when the producer or the consumer are unregistered (ie the wire is "disconnected")

TODO : in fact, this could be not relevant
manage="own" : manages (remove) only the wires created by the wireadminbinder
manage="other" : manages (remove) all wires
-->
<!ELEMENT wireset (property*)>
<!ATTLIST  wireset
	id CDATA #IMPLIED
	description CDATA #IMPLIED
	producers-filter CDATA #REQUIRED
	consumers-filter CDATA #REQUIRED
	removepolicy (keepAlive|whileProducer|whileConsumer|ifDisconnected) 'keepAlive'
>

<!--
property describes a wire-creation property
	Example for OSGi Spec R3, 16.7 Wire Flow Control

	Filtering by Time (16.7.1)
	<property
		name="wireadmin.filter"
		type="java.lang.String"
		value="(wirevalue.elapsed>=2000)"/>
	Filtering by Change (16.7.2) Absolute value delta
	<property
		name="wireadmin.filter"
		type="java.lang.String"
		value="(wirevalue.delta.relative>=0.1)"/>
	
	Filtering by Change (16.7.2) Relative value delta
	<property
		name="wireadmin.filter"
		type="java.lang.String"
		value="(wirevalue.delta.absolute>=1)"/>
	Hysteresis (16.7.3)
	<property
		name="wireadmin.filter"
		type="java.lang.String"
		value="(|(&(wirevalue.previous<=250)(wirevalue.current>250))(&(wirevalue.previous>=249)(wirevalue.current<249)))"/>

	Other properties could be setted
-->

<!ELEMENT property EMPTY>
<!ATTLIST  property
	name CDATA #REQUIRED
	value CDATA #REQUIRED
	type CDATA #REQUIRED
>
