Package com.volantis.mcs.dissection.links

Examples of com.volantis.mcs.dissection.links.ShardLinkConditionalAttributes


                type = DissectionElementTypes.getShardLinkGroupType();

            } else if (localName.equals(SHARD_LINK_CONDITIONAL)) {

                // Create a new attributes class.
                ShardLinkConditionalAttributes attrs
                    = new ShardLinkConditionalAttributes();

                // Initialise the attributes class.
                ShardLinkContentRule rule;
                String value = attributes.getValue("rule");
                if (value.equals("any")) {
                    rule = StandardContentRules.getAnyRule();
                } else if (value.equals("separator")) {
                    rule = StandardContentRules.getSeparatorRule();
                } else {
                    throw new IllegalArgumentException("Unknown rule: "
                                                       + value);
                }
                attrs.setContentRule(rule);

                annotation = attrs;
                type = DissectionElementTypes.getShardLinkConditionalType();

            } else {
View Full Code Here


        Element shardLinkConditional = dom.openElement(
                DissectionConstants.SHARD_LINK_CONDITIONAL_ELEMENT);
        // Add the attributes for the element, luckily in this case
        // they are constant so we don't need any extra state for this
        // renderer.
        ShardLinkConditionalAttributes conditionalAttrs
                = new ShardLinkConditionalAttributes();
        conditionalAttrs.setContentRule(SEPARATOR_RULE);
        shardLinkConditional.setAnnotation(conditionalAttrs);

        // Render the child separator.
        delegate.render(buffer);
View Full Code Here

        }

        public void visitShardLinkConditional(DissectableElement element)
            throws DissectionException {

            ShardLinkConditionalAttributes attributes
                = (ShardLinkConditionalAttributes) document.getAnnotation(element);

            // Create the ShardLink and initialise it.
            ShardLinkConditional shardLinkConditional
                = new ShardLinkConditional();
            shardLinkConditional.setContentRule(attributes.getContentRule());

            // Create a linkage between the shard link and the area to which it
            // belongs.
            shardLinkConditional.setShardLinkGroup(shardLinkGroup);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.dissection.links.ShardLinkConditionalAttributes

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.