Package cambridge

Examples of cambridge.DynamicAttributeKey


      Cambridge bindings = Cambridge.getInstance();

      tagParts.add(a);

      if (a.isDynamic()) {
         DynamicAttributeKey attributeKey = new DynamicAttributeKey(a.getNamespaceUri(), a.getAttributeNameSpace(), a.getAttributeName());
         if (bindings.getStaticBehavior(attributeKey) == null) {
            dynamic = true;
         }
      }
View Full Code Here


            boolean remove = false;
            HashSet<AttributeKey> staticAttributes = new HashSet<AttributeKey>();

            for (Attribute a : attributes.values()) {
               if (a.isDynamic()) {
                  DynamicAttributeKey key = new DynamicAttributeKey(a.getNamespaceUri(), a.getAttributeNameSpace(), a.getAttributeName());
                  StaticBehavior sb = bindings.getStaticBehavior(key);
                  if (sb != null) {
                     sb.modify(doc, a.getValue(), this);
                     staticAttributes.add(new AttributeKey(a.getAttributeNameSpace(), a.getAttributeName()));
                     if (sb.shouldRemove()) {
View Full Code Here

         boolean remove = false;
         HashSet<AttributeKey> staticAttributes = new HashSet<AttributeKey>();

         for (Attribute a : attributes.values()) {
            if (a.isDynamic()) {
               DynamicAttributeKey key = new DynamicAttributeKey(a.getNamespaceUri(), a.getAttributeNameSpace(), a.getAttributeName());
               StaticBehavior sb = bindings.getStaticBehavior(key);
               if (sb != null) {
                  sb.modify(doc, a.getValue(), this);
                  staticAttributes.add(new AttributeKey(a.getAttributeNameSpace(), a.getAttributeName()));
                  if (sb.shouldRemove()) {
View Full Code Here

   private void assignBehaviors() throws BehaviorInstantiationException {
      Cambridge bindings = Cambridge.getInstance();
      if (attributes != null) {
         for (Attribute a : attributes.values()) {
            if (a.isDynamic()) {
               DynamicAttributeKey key = new DynamicAttributeKey(a.getNamespaceUri(), a.getAttributeNameSpace(), a.getAttributeName());
               TagBehavior behavior;
               try {
                  behavior = bindings.getBehavior(key, attributes, a.getLine(), a.getColumn());
               } catch (ExpressionParsingException e) {
                  throw new BehaviorInstantiationException("Error in parsing expression", e, getBeginLine(), getBeginColumn());
View Full Code Here

      for (TemplateNode node : children) {
         if (node instanceof Tag) {
            Tag tag = (Tag) node;
            Tag overriden = null;

            Attribute overrides = tag.getDynamicAttribute(new DynamicAttributeKey(Cambridge.DefaultNamespaceURI, "a", "overrides"));
            if (overrides != null) {
               overriden = extendedDocument.locateTag(overrides.getValue());
            } else {
               Attribute id = tag.getAttribute("id");
               if (id != null) {
View Full Code Here

      TagNode node = null;

      if (token.getNameSpace() != null) {
         String namespaceUri = getNamespaceUri(token.getNameSpace());
         if (namespaceUri != null) {
            node = bindings.getDynamicTag(new DynamicAttributeKey(namespaceUri, token.getNameSpace(), token.getTagName()));
         }
      }

      boolean dynamicTag = true;
      if (node == null) {
View Full Code Here

        TagNode node = null;

        if (token.getNameSpace() != null) {
            String namespaceUri = getNamespaceUri(token.getNameSpace());
            if (namespaceUri != null) {
                node = bindings.getDynamicTag(new DynamicAttributeKey(namespaceUri, token.getNameSpace(), token.getTagName()));
            }
        }

        boolean dynamicTag = true;
        if (node == null) {
View Full Code Here

            if (node instanceof Tag)
            {
                Tag tag = (Tag) node;
                Tag overriden = null;

                Attribute overrides = tag.getDynamicAttribute(new DynamicAttributeKey(Cambridge.DefaultNamespaceURI, "a", "overrides"));
                if (overrides != null)
                {
                    overriden = extendedDocument.locateTag(overrides.getValue());
                }
                else
View Full Code Here

      Cambridge bindings = Cambridge.getInstance();

      tagParts.add(a);

      if (a.isDynamic()) {
         DynamicAttributeKey attributeKey = new DynamicAttributeKey(a.getNamespaceUri(), a.getAttributeNameSpace(), a.getAttributeName());
         if (bindings.getStaticBehavior(attributeKey) == null) {
            dynamic = true;
         }
      }
View Full Code Here

            boolean remove = false;
            HashSet<AttributeKey> staticAttributes = new HashSet<AttributeKey>();

            for (Attribute a : attributes.values()) {
               if (a.isDynamic()) {
                  DynamicAttributeKey key = new DynamicAttributeKey(a.getNamespaceUri(), a.getAttributeNameSpace(), a.getAttributeName());
                  StaticBehavior sb = bindings.getStaticBehavior(key);
                  if (sb != null) {
                     sb.modify(doc, a.getValue(), this);
                     staticAttributes.add(new AttributeKey(a.getAttributeNameSpace(), a.getAttributeName()));
                     if (sb.shouldRemove()) {
View Full Code Here

TOP

Related Classes of cambridge.DynamicAttributeKey

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.