Examples of AttributeImpl


Examples of org.apache.hivemind.impl.AttributeImpl

            Map.Entry entry = (Map.Entry) i.next();

            String name = (String) entry.getKey();
            String value = (String) entry.getValue();

            Attribute a = new AttributeImpl(name, value);

            result.addAttribute(a);
        }

        return result;
View Full Code Here

Examples of org.apache.hivemind.impl.AttributeImpl

            Map.Entry entry = (Map.Entry) i.next();

            String name = (String) entry.getKey();
            String value = (String) entry.getValue();

            Attribute a = new AttributeImpl(name, value);

            result.addAttribute(a);
        }

        return result;
View Full Code Here

Examples of org.apache.hivemind.impl.AttributeImpl

            Map.Entry entry = (Map.Entry) i.next();

            String name = (String) entry.getKey();
            String value = (String) entry.getValue();

            Attribute a = new AttributeImpl(name, value);

            result.addAttribute(a);
        }

        return result;
View Full Code Here

Examples of org.apache.hivemind.impl.AttributeImpl

            Map.Entry entry = (Map.Entry) i.next();

            String name = (String) entry.getKey();
            String value = (String) entry.getValue();

            Attribute a = new AttributeImpl(name, value);

            result.addAttribute(a);
        }

        return result;
View Full Code Here

Examples of org.apache.hivemind.impl.AttributeImpl

        MockControl control = newControl(SchemaProcessor.class);

        ElementImpl element = new ElementImpl();
        element.setElementName("myelement");

        Attribute attribute = new AttributeImpl("fred", "flintstone");

        element.addAttribute(attribute);

        PushAttributeRule rule = new PushAttributeRule();
View Full Code Here

Examples of org.apache.hivemind.impl.AttributeImpl

        new ModuleImpl().toString();
        new RegistryImpl(null, Locale.ENGLISH).toString();
        new ContributionImpl().toString();
        new ConfigurationPointImpl().toString();
        new ElementImpl().toString();
        new AttributeImpl("foo", "bar").toString();
        new ServiceInterceptorContributionImpl().toString();
        new ServicePointImpl().toString();
        new InterceptorStackImpl(null, mockServicePoint, null).toString();
    }
View Full Code Here

Examples of org.apache.jetspeed.security.mapping.model.impl.AttributeImpl

            {
                SecurityAttribute sa = sas.getAttribute(attrDef.getMappedName());
                if (sa != null)
                {
                    // currently only single-valued attributes are supported
                    AttributeImpl attr = new AttributeImpl(attrDef);
                    attr.setValue(sa.getStringValue());
                    ldapAttrValues.add(attr);
                }
            }
        }
        return internalCreateEntity(principal.getName(), null, ldapAttrValues);
View Full Code Here

Examples of org.apache.jetspeed.security.mapping.model.impl.AttributeImpl

        {
            List<String> values = null;
            values = getStringAttributes(attrs, attrDef.getName(), attrDef.requiresDnDefaultValue());
            if (values != null)
            {
                Attribute a = new AttributeImpl(attrDef);
                if (attrDef.isMultiValue())
                {
                    // remove the dummy value for required fields when present.
                    if (attrDef.isRequired())
                    {
                        String defaultValue = attrDef.requiresDnDefaultValue() ? dn : attrDef.getRequiredDefaultValue();
                        values.remove(defaultValue);
                    }
                       
                    if (values.size() != 0)
                    {
                        a.setValues(values);
                    }
                       
                    else
                    {
                        attributes.add(a);
                    }                       
                }
                else
                {
                    String value = values.get(0);
                    if (attrDef.isEntityIdAttribute())
                    {
                        entityId = value;
                    }
                    a.setValue(value);
                }
                attributes.add(a);
            }
        }
        if (entityId == null)
View Full Code Here

Examples of org.apache.lucene.util.AttributeImpl

          while (tokenStream.incrementToken()) {
            // TODO: this is a simple workaround to still work with tokens, not very effective, but as far as I know, this writer should get removed soon:
            final Token token = new Token();
            for (Iterator<AttributeImpl> atts = tokenStream.getAttributeImplsIterator(); atts.hasNext();) {
              final AttributeImpl att = atts.next();
              try {
                att.copyTo(token);
              } catch (Exception e) {
                // ignore unsupported attributes,
                // this may fail to copy some attributes, if a special combined AttributeImpl is used, that
                // implements basic attributes supported by Token and also other customized ones in one class.
              }
View Full Code Here

Examples of org.apache.lucene.util.AttributeImpl

public class TestSingleTokenTokenFilter extends LuceneTestCase {

  public void test() throws IOException {
    Token token = new Token();
    SingleTokenTokenStream ts = new SingleTokenTokenStream(token);
    AttributeImpl tokenAtt = (AttributeImpl) ts.addAttribute(TermAttribute.class);
    assertTrue(tokenAtt instanceof Token);
    ts.reset();

    assertTrue(ts.incrementToken());
    assertEquals(token, tokenAtt);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.