3
0
Fork 0

[svn r172] updated x4o

This commit is contained in:
willemc 2007-01-20 03:18:02 +01:00
parent 7db709e9b6
commit 7a797028ac
13 changed files with 64 additions and 260 deletions

Binary file not shown.

View file

@ -24,10 +24,6 @@
The views and conclusions contained in the software and documentation are those of the authors and The views and conclusions contained in the software and documentation are those of the authors and
should not be interpreted as representing official policies, either expressed or implied, of IDCA. should not be interpreted as representing official policies, either expressed or implied, of IDCA.
--> -->
<XMLElements> <eld xmlns:eld="http://x4o.idcanet.com/eld/x4o.eld">
<eld-info>
<name>events.eld</name>
<description>All event foei objects</description>
</eld-info>
</XMLElements> </eld>

View file

@ -24,34 +24,11 @@
The views and conclusions contained in the software and documentation are those of the authors and The views and conclusions contained in the software and documentation are those of the authors and
should not be interpreted as representing official policies, either expressed or implied, of IDCA. should not be interpreted as representing official policies, either expressed or implied, of IDCA.
--> -->
<XMLElements> <eld xmlns:eld="http://x4o.idcanet.com/eld/x4o.eld">
<eld-info>
<name>filters.eld</name>
<description>All core foei objects</description>
</eld-info>
<element> <eld:elementClass tag="filter" objectClassName="com.idcanet.foei.components.lang.Filter"/>
<name>filter</name> <eld:elementClass tag="stringFilter" objectClassName="com.idcanet.foei.components.steps.filters.StringFilter"/>
<description>Filters an object by its eventSteps</description> <eld:elementClass tag="classFilter" objectClassName="com.idcanet.foei.components.steps.filters.ClassFilter"/>
<class>com.idcanet.foei.components.lang.Filter</class> <eld:elementClass tag="dateFilter" objectClassName="com.idcanet.foei.components.steps.filters.DateFilter"/>
</element>
<element> </eld>
<name>stringFilter</name>
<description>filters an String on a regex</description>
<class>com.idcanet.foei.components.steps.filters.StringFilter</class>
</element>
<element>
<name>classFilter</name>
<description>filters for a class on an object</description>
<class>com.idcanet.foei.components.steps.filters.ClassFilter</class>
</element>
<element>
<name>dateFilter</name>
<description>filters an date of an Date</description>
<class>com.idcanet.foei.components.steps.filters.DateFilter</class>
</element>
</XMLElements>

View file

@ -1,7 +0,0 @@
eld.http\://foei.idca.nl/eld/events.eld=/META-INF/events.eld
eld.http\://foei.idca.nl/eld/filters.eld=/META-INF/filters.eld
eld.http\://foei.idca.nl/eld/io.eld=/META-INF/io.eld
eld.http\://foei.idca.nl/eld/lang.eld=/META-INF/lang.eld
eld.http\://foei.idca.nl/eld/logging.eld=/META-INF/logging.eld
eld.http\://foei.idca.nl/eld/printers.eld=/META-INF/printers.eld

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>
Foei namespace
</comment>
<entry key="eld.http://foei.idcanet.com/eld/events.eld" >/META-INF/events.eld</entry>
<entry key="eld.http://foei.idcanet.com/eld/filters.eld" >/META-INF/filters.eld</entry>
<entry key="eld.http://foei.idcanet.com/eld/io.eld" >/META-INF/io.eld</entry>
<entry key="eld.http://foei.idcanet.com/eld/lang.eld" >/META-INF/lang.eld</entry>
<entry key="eld.http://foei.idcanet.com/eld/logging.eld" >/META-INF/logging.eld</entry>
<entry key="eld.http://foei.idcanet.com/eld/printers.eld" >/META-INF/printers.eld</entry>
</properties>

View file

@ -24,30 +24,10 @@
The views and conclusions contained in the software and documentation are those of the authors and The views and conclusions contained in the software and documentation are those of the authors and
should not be interpreted as representing official policies, either expressed or implied, of IDCA. should not be interpreted as representing official policies, either expressed or implied, of IDCA.
--> -->
<XMLElements> <eld xmlns:eld="http://x4o.idcanet.com/eld/x4o.eld">
<eld-info> <eld:elementClass tag="standardOutput" objectClassName="com.idcanet.foei.components.io.StandardOutput"/>
<name>io.eld</name> <eld:elementClass tag="errorOutput" objectClassName="com.idcanet.foei.components.io.ErrorOutput"/>
<description>io foei objects</description> <eld:elementClass tag="fileOutput" objectClassName="com.idcanet.foei.components.io.FileOutput"/>
</eld-info>
<element> </eld>
<name>standardOutput</name>
<description>This Object printer prints to the std-out</description>
<class>com.idcanet.foei.components.io.StandardOutput</class>
</element>
<element>
<name>errorOutput</name>
<description>This Object printer prints to the err-out</description>
<class>com.idcanet.foei.components.io.ErrorOutput</class>
</element>
<element>
<name>fileOutput</name>
<description>This Object printer prints to a file</description>
<class>com.idcanet.foei.components.io.FileOutput</class>
</element>
</XMLElements>

View file

@ -24,82 +24,21 @@
The views and conclusions contained in the software and documentation are those of the authors and The views and conclusions contained in the software and documentation are those of the authors and
should not be interpreted as representing official policies, either expressed or implied, of IDCA. should not be interpreted as representing official policies, either expressed or implied, of IDCA.
--> -->
<XMLElements> <eld xmlns:eld="http://x4o.idcanet.com/eld/x4o.eld">
<eld-info>
<name>lang.eld</name>
<description>All core lang foei objects</description>
</eld-info>
<global-parameter> <eld:elementParameterHandler parameterName="bind" bean.src="com.idcanet.foei.core.x4o.BindAttributeHandler" />
<parameter-name>bind</parameter-name> <eld:elementParameterHandler parameterName="id" bean.src="com.idcanet.foei.core.x4o.IdAttributeHandler" />
<parameter-handler>com.idcanet.foei.core.x4o.BindAttributeHandler</parameter-handler>
<parameter-description>Binds the EventPort to getter</parameter-description>
</global-parameter>
<global-parameter> <eld:elementBindingHandler bean.src="com.idcanet.foei.core.x4o.EventStepBindRuleHandler"/>
<parameter-name>id</parameter-name>
<parameter-handler>com.idcanet.foei.core.x4o.IdAttributeHandler</parameter-handler>
<parameter-description>Adds the object into the context</parameter-description>
</global-parameter>
<element-bindings> <eld:elementClass tag="bind" elementClassName="com.idcanet.foei.core.x4o.ObjectBindingElement"/>
<rule-handler>com.idcanet.foei.core.x4o.EventStepBindRuleHandler</rule-handler> <eld:elementClass tag="dummyOutputPort" objectClassName="com.idcanet.foei.components.lang.DummyOutputPort"/>
<rule-description></rule-description> <eld:elementClass tag="objectChangedBuffer" objectClassName="com.idcanet.foei.components.lang.ObjectChangedBuffer"/>
</element-bindings> <eld:elementClass tag="destroyFoeiProcess" objectClassName="com.idcanet.foei.components.lang.DestroyFoeiProcess"/>
<eld:elementClass tag="setBeanProperty" objectClassName="com.idcanet.foei.components.lang.SetBeanProperty"/>
<eld:elementClass tag="getBeanProperty" objectClassName="com.idcanet.foei.components.lang.GetBeanProperty"/>
<eld:elementClass tag="getBeanPropertyStep" objectClassName="com.idcanet.foei.components.steps.lang.GetBeanPropertyStep"/>
<eld:elementClass tag="mapValue" objectClassName="com.idcanet.foei.components.steps.lang.MapValue"/>
<eld:elementClass tag="listValue" objectClassName="com.idcanet.foei.components.steps.lang.ListValue"/>
<element> </eld>
<name>bind</name>
<description>Binds 2 eventPorts together</description>
<configurator>com.idcanet.foei.core.x4o.ObjectBindingElement</configurator>
</element>
<element>
<name>dummyOutputPort</name>
<description>An dummy output, mostly used to send events into foei.</description>
<class>com.idcanet.foei.components.lang.DummyOutputPort</class>
</element>
<element>
<name>objectChangedBuffer</name>
<description>Buffers objects an only fires when it is not equal</description>
<class>com.idcanet.foei.components.lang.ObjectChangedBuffer</class>
</element>
<element>
<name>destroyFoeiProcess</name>
<description>Destroys the current process</description>
<class>com.idcanet.foei.components.lang.DestroyFoeiProcess</class>
</element>
<element>
<name>setBeanProperty</name>
<description>Sets an property on a bean.</description>
<class>com.idcanet.foei.components.lang.SetBeanProperty</class>
</element>
<element>
<name>getBeanProperty</name>
<description>Gets an property on a bean.</description>
<class>com.idcanet.foei.components.lang.GetBeanProperty</class>
</element>
<element>
<name>getBeanPropertyStep</name>
<description>gets an property of an obeject</description>
<class>com.idcanet.foei.components.steps.lang.GetBeanPropertyStep</class>
</element>
<element>
<name>mapValue</name>
<description>gets an Value out of an Map</description>
<class>com.idcanet.foei.components.steps.lang.MapValue</class>
</element>
<element>
<name>listValue</name>
<description>gets an Value out of an List</description>
<class>com.idcanet.foei.components.steps.lang.ListValue</class>
</element>
</XMLElements>

View file

@ -24,12 +24,6 @@
The views and conclusions contained in the software and documentation are those of the authors and The views and conclusions contained in the software and documentation are those of the authors and
should not be interpreted as representing official policies, either expressed or implied, of IDCA. should not be interpreted as representing official policies, either expressed or implied, of IDCA.
--> -->
<XMLElements> <eld xmlns:eld="http://x4o.idcanet.com/eld/x4o.eld">
<eld:elementClass tag="loggerInput" objectClassName="com.idcanet.foei.components.logging.LoggerInput"/>
<element> </eld>
<name>loggerInput</name>
<description>Java Logger InputHandler</description>
<class>com.idcanet.foei.components.logging.LoggerInput</class>
</element>
</XMLElements>

View file

@ -24,38 +24,9 @@
The views and conclusions contained in the software and documentation are those of the authors and The views and conclusions contained in the software and documentation are those of the authors and
should not be interpreted as representing official policies, either expressed or implied, of IDCA. should not be interpreted as representing official policies, either expressed or implied, of IDCA.
--> -->
<XMLElements> <eld xmlns:eld="http://x4o.idcanet.com/eld/x4o.eld">
<eld-info> <eld:elementClass tag="defaultPrinter" objectClassName="com.idcanet.foei.components.steps.printers.DefaultPrinter"/>
<name>printers.eld</name> <eld:elementClass tag="datePrinter" objectClassName="com.idcanet.foei.components.steps.printers.DatePrinter"/>
<description>A few standaard (step)printers</description>
</eld-info>
</eld>
<element>
<name>defaultPrinter</name>
<description>This EventStep uses to toString() to print an object.</description>
<class>com.idcanet.foei.components.steps.printers.DefaultPrinter</class>
<parameters>
<parameter>
<parameter-name>prefix</parameter-name>
<parameter-type>java.lang.String</parameter-type>
<parameter-default>null</parameter-default>
<parameter-description>Prints the prefix of this printer</parameter-description>
</parameter>
<parameter>
<parameter-name>postfix</parameter-name>
<parameter-type>java.lang.String</parameter-type>
<parameter-default>null</parameter-default>
<parameter-description>Prints the postfix of this printer</parameter-description>
</parameter>
</parameters>
</element>
<element>
<name>datePrinter</name>
<description>This eventStep prints an date object including formating</description>
<class>com.idcanet.foei.components.steps.printers.DatePrinter</class>
</element>
</XMLElements>

View file

@ -6,10 +6,8 @@ import com.idcanet.foei.event.EventInput;
import com.idcanet.foei.event.EventOutput; import com.idcanet.foei.event.EventOutput;
import com.idcanet.foei.event.EventStep; import com.idcanet.foei.event.EventStep;
import com.idcanet.foei.event.EventStepController; import com.idcanet.foei.event.EventStepController;
import com.idcanet.x4o.context.BindingRuleHandler;
import com.idcanet.x4o.element.Element; import com.idcanet.x4o.element.Element;
import com.idcanet.x4o.element.ElementBindingHandler;
import java.util.Map;
/** /**
* *
@ -18,15 +16,7 @@ import java.util.Map;
* @author Willem Cazander * @author Willem Cazander
* @version 1.0 Feb 24, 2006 * @version 1.0 Feb 24, 2006
*/ */
public class FoeiEventBindingRuleHandler implements BindingRuleHandler { public class FoeiEventBindingRuleHandler implements ElementBindingHandler {
/**
*
* @param parameters
*/
public void setParameters(Map<String,String> parameters) {
}
/** /**
* *

View file

@ -31,7 +31,7 @@ import com.idcanet.foei.core.FoeiProcessFactory;
import com.idcanet.foei.event.EventInput; import com.idcanet.foei.event.EventInput;
import com.idcanet.foei.event.EventOutput; import com.idcanet.foei.event.EventOutput;
import com.idcanet.foei.event.EventPort; import com.idcanet.foei.event.EventPort;
import com.idcanet.x4o.context.GlobalParameterHandler; import com.idcanet.x4o.element.AbstractElementParameterHandler;
import com.idcanet.x4o.element.Element; import com.idcanet.x4o.element.Element;
import com.idcanet.x4o.element.ElementException; import com.idcanet.x4o.element.ElementException;
@ -41,14 +41,13 @@ import com.idcanet.x4o.element.ElementException;
* @author Willem Cazander * @author Willem Cazander
* @version 1.0 Apr 15, 2006 * @version 1.0 Apr 15, 2006
*/ */
public class BindAttributeHandler implements GlobalParameterHandler { public class BindAttributeHandler extends AbstractElementParameterHandler {
private String parameterName =null;
/** /**
* @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#doParameter(java.lang.Object, java.lang.String) * @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#doParameter(java.lang.Object, java.lang.String)
*/ */
public void doParameter(Element element,String parameterValue) { @Override
public void doParameterStartTag(Element element,String parameterValue) throws Exception {
String[] port = parameterValue.split(":"); String[] port = parameterValue.split(":");
if(port.length!=2) { if(port.length!=2) {
return; return;
@ -80,22 +79,4 @@ public class BindAttributeHandler implements GlobalParameterHandler {
e.printStackTrace(); e.printStackTrace();
} }
} }
/**
* @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#getParameterName()
*/
public String getParameterName() {
return parameterName;
}
public void setParameterName(String parameterName) {
this.parameterName=parameterName;
}
/**
* @see com.idcanet.x4o.context.GlobalParameterHandler#getProcessCloseTag()
*/
public Boolean getProcessCloseTag() {
return false;
}
} }

View file

@ -28,10 +28,8 @@ package com.idcanet.foei.core.x4o;
import com.idcanet.foei.event.EventStep; import com.idcanet.foei.event.EventStep;
import com.idcanet.foei.event.EventStepController; import com.idcanet.foei.event.EventStepController;
import com.idcanet.x4o.context.BindingRuleHandler;
import com.idcanet.x4o.element.Element; import com.idcanet.x4o.element.Element;
import com.idcanet.x4o.element.ElementBindingHandler;
import java.util.Map;
/** /**
* *
@ -39,9 +37,7 @@ import java.util.Map;
* @author Willem Cazander * @author Willem Cazander
* @version 1.0 Apr 16, 2006 * @version 1.0 Apr 16, 2006
*/ */
public class EventStepBindRuleHandler implements BindingRuleHandler { public class EventStepBindRuleHandler implements ElementBindingHandler {
private Map<String, String> parameters = null;
/** /**
* @see com.idca.foei.xml.x2o.eld.BindingRuleHandler#canBind(java.lang.Object, java.lang.Object) * @see com.idca.foei.xml.x2o.eld.BindingRuleHandler#canBind(java.lang.Object, java.lang.Object)
@ -66,11 +62,4 @@ public class EventStepBindRuleHandler implements BindingRuleHandler {
Object child = element.getElementObject(); Object child = element.getElementObject();
((EventStepController)parent).addEventStep((EventStep)child); ((EventStepController)parent).addEventStep((EventStep)child);
} }
/**
* @see com.idca.foei.xml.x2o.eld.BindingRuleHandler#setParameters(java.util.Map)
*/
public void setParameters(Map<String, String> parameters) {
this.parameters=parameters;
}
} }

View file

@ -28,7 +28,7 @@ package com.idcanet.foei.core.x4o;
import com.idcanet.foei.core.FoeiProcess; import com.idcanet.foei.core.FoeiProcess;
import com.idcanet.foei.core.FoeiProcessFactory; import com.idcanet.foei.core.FoeiProcessFactory;
import com.idcanet.x4o.context.GlobalParameterHandler; import com.idcanet.x4o.element.AbstractElementParameterHandler;
import com.idcanet.x4o.element.Element; import com.idcanet.x4o.element.Element;
/** /**
@ -37,14 +37,13 @@ import com.idcanet.x4o.element.Element;
* @author Willem Cazander * @author Willem Cazander
* @version 1.0 Jul 8, 2006 * @version 1.0 Jul 8, 2006
*/ */
public class IdAttributeHandler implements GlobalParameterHandler { public class IdAttributeHandler extends AbstractElementParameterHandler {
private String parameterName =null;
/** /**
* @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#doParameter(java.lang.Object, java.lang.String) * @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#doParameter(java.lang.Object, java.lang.String)
*/ */
public void doParameter(Element element,String parameterValue) { @Override
public void doParameterStartTag(Element element,String parameterValue) throws Exception {
// add to objext context // add to objext context
if(element.getElementObject()==null | "".equals(parameterValue)) { if(element.getElementObject()==null | "".equals(parameterValue)) {
parameterValue= "auto."+Integer.toHexString(element.getElementObject().hashCode()); parameterValue= "auto."+Integer.toHexString(element.getElementObject().hashCode());
@ -53,22 +52,4 @@ public class IdAttributeHandler implements GlobalParameterHandler {
FoeiProcess process = FoeiProcessFactory.getFoeiProcess(); FoeiProcess process = FoeiProcessFactory.getFoeiProcess();
process.addEventObject(element.getElementObject(),parameterValue); process.addEventObject(element.getElementObject(),parameterValue);
} }
/**
* @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#getParameterName()
*/
public String getParameterName() {
return parameterName;
}
public void setParameterName(String parameterName) {
this.parameterName=parameterName;
}
/**
* @see com.idcanet.x4o.context.GlobalParameterHandler#getProcessCloseTag()
*/
public Boolean getProcessCloseTag() {
return false;
}
} }