Examples of AttributeImpl


Examples of org.apache.lucene.util.AttributeImpl

    getAttributes().add( attr );
  }

  @Override
  public void addOffsetAttribute(int startOffset, int endOffset) {
    AttributeImpl attr = AttributeSource.AttributeFactory
        .DEFAULT_ATTRIBUTE_FACTORY
        .createAttributeInstance( OffsetAttribute.class );
    ( (OffsetAttribute) attr ).setOffset( startOffset, endOffset );
    getAttributes().add( attr );
  }
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(CharTermAttribute.class);
    assertTrue(tokenAtt instanceof Token);
    ts.reset();

    assertTrue(ts.incrementToken());
    assertEquals(token, tokenAtt);
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.AttributeImpl

            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl) property;
            if (a.isTransient())
                return true;
            EDataType d = (EDataType) a.getEType();
            if (!d.isSerializable()) {
                return true;
            }
        }
        return false;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.AttributeImpl

            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl) property;
            if (a.isTransient())
                return true;
            EDataType d = (EDataType) a.getEType();
            if (!d.isSerializable()) {
                return true;
            }
        }
        return false;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.AttributeImpl

            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl)property;
            if (a.isTransient()) {
                return true;
            }
            EDataType d = (EDataType)a.getEType();
            if (!d.isSerializable()) {
                return true;
            }
        }
        return false;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.AttributeImpl

            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl)property;
            if (a.isTransient()) {
                return true;
            }
            EDataType d = (EDataType)a.getEType();
            if (!d.isSerializable()) {
                return true;
            }
        }
        return false;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.AttributeImpl

            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl) property;
            if (a.isTransient())
                return true;
            EDataType d = (EDataType) a.getEType();
            if (!d.isSerializable()) {
                return true;
            }
        }
        return false;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.AttributeImpl

            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl) property;
            if (a.isTransient())
                return true;
            EDataType d = (EDataType) a.getEType();
            if (!d.isSerializable()) {
                return true;
            }
        }
        return false;
View Full Code Here

Examples of org.apache.xerces.stax.events.AttributeImpl

    public Attribute createAttribute(String localName, String value) {
        return createAttribute(new QName(localName), value);
    }

    public Attribute createAttribute(QName name, String value) {
        return new AttributeImpl(name, value, "CDATA", true, fLocation);
    }
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.