You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Richard Hensley (JIRA)" <hi...@jakarta.apache.org> on 2005/05/24 23:59:51 UTC

[jira] Created: (HIVEMIND-126) Add a PushContentRule to the schema processor

Add a PushContentRule to the schema processor
---------------------------------------------

         Key: HIVEMIND-126
         URL: http://issues.apache.org/jira/browse/HIVEMIND-126
     Project: HiveMind
        Type: New Feature
  Components: framework  
    Versions: 1.1    
    Reporter: Richard Hensley
    Priority: Minor


Please add a push content rule to the schema processor so a custom rule does not need to be used. Here is a sample implementation.

public class PushContentRule extends BaseRule implements Rule {

    public void begin(SchemaProcessor processor, Element element) {
        String value = RuleUtils.processText(processor, element, element
            .getContent());
        Translator t = processor.getContentTranslator();
        Object finalValue = t.translate(processor.getContributingModule(),
            Object.class, value, element.getLocation());
        processor.push(finalValue);
    }

    public void end(SchemaProcessor processor, Element element) {
        processor.pop();
    }
}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Closed: (HIVEMIND-126) Add a PushContentRule to the schema processor

Posted by "Knut Wannheden (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-126?page=all ]
     
Knut Wannheden closed HIVEMIND-126:
-----------------------------------

     Resolution: Fixed
    Fix Version: 1.1

> Add a PushContentRule to the schema processor
> ---------------------------------------------
>
>          Key: HIVEMIND-126
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-126
>      Project: HiveMind
>         Type: New Feature
>   Components: framework
>     Versions: 1.1
>     Reporter: Richard Hensley
>     Assignee: Knut Wannheden
>     Priority: Minor
>      Fix For: 1.1

>
> Please add a push content rule to the schema processor so a custom rule does not need to be used. Here is a sample implementation.
> public class PushContentRule extends BaseRule implements Rule {
>     public void begin(SchemaProcessor processor, Element element) {
>         String value = RuleUtils.processText(processor, element, element
>             .getContent());
>         Translator t = processor.getContentTranslator();
>         Object finalValue = t.translate(processor.getContributingModule(),
>             Object.class, value, element.getLocation());
>         processor.push(finalValue);
>     }
>     public void end(SchemaProcessor processor, Element element) {
>         processor.pop();
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Assigned: (HIVEMIND-126) Add a PushContentRule to the schema processor

Posted by "Knut Wannheden (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-126?page=all ]

Knut Wannheden reassigned HIVEMIND-126:
---------------------------------------

    Assign To: Knut Wannheden

> Add a PushContentRule to the schema processor
> ---------------------------------------------
>
>          Key: HIVEMIND-126
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-126
>      Project: HiveMind
>         Type: New Feature
>   Components: framework
>     Versions: 1.1
>     Reporter: Richard Hensley
>     Assignee: Knut Wannheden
>     Priority: Minor

>
> Please add a push content rule to the schema processor so a custom rule does not need to be used. Here is a sample implementation.
> public class PushContentRule extends BaseRule implements Rule {
>     public void begin(SchemaProcessor processor, Element element) {
>         String value = RuleUtils.processText(processor, element, element
>             .getContent());
>         Translator t = processor.getContentTranslator();
>         Object finalValue = t.translate(processor.getContributingModule(),
>             Object.class, value, element.getLocation());
>         processor.push(finalValue);
>     }
>     public void end(SchemaProcessor processor, Element element) {
>         processor.pop();
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org