Examples of addField()


Examples of org.apache.jetspeed.om.portlet.GenericMetadata.addField()

                        GenericMetadata metadata = (def == null ? app.getMetadata() : def.getMetadata());
                        LocalizedFieldBean fieldBean = new LocalizedFieldBean(metadata.createLocalizedField());
                        fieldBean.setName(newName);
                        fieldBean.setLocaleString(newLocale);
                        fieldBean.setValue(newValue);
                        metadata.addField(fieldBean.getLocalizedField());

                        newName = null;
                        newValue = null;
                        newLocale = null;
                    }
View Full Code Here

Examples of org.apache.lucene.codecs.FieldsConsumer.addField()

      boolean doFreq = indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS) >= 0;
      boolean doPos = indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;
      boolean doPayloads = indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0 && allowPayloads;
      boolean doOffsets = indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
     
      TermsConsumer termsConsumer = fieldsConsumer.addField(fieldInfo);
      long sumTotalTF = 0;
      long sumDF = 0;
      FixedBitSet seenDocs = new FixedBitSet(maxDoc);
      for(Map.Entry<BytesRef,Long> termEnt : terms.entrySet()) {
        BytesRef term = termEnt.getKey();
View Full Code Here

Examples of org.apache.lucene.index.memory.CustomMemoryIndex.addField()

            if (field.name().equals(UidFieldMapper.NAME)) {
                continue;
            }
            TokenStream tokenStream = field.tokenStreamValue();
            if (tokenStream != null) {
                memoryIndex.addField(field.name(), tokenStream, field.getBoost());
            } else {
                Reader reader = field.readerValue();
                if (reader != null) {
                    try {
                        memoryIndex.addField(field.name(), request.doc().analyzer().reusableTokenStream(field.name(), reader), field.getBoost() * request.doc().rootDoc().getBoost());
 
View Full Code Here

Examples of org.apache.lucene.index.memory.MemoryIndex.addField()

    if (queryAnalyzer == null)
      throw new IllegalArgumentException("queryAnalyzer must not be null");
   
    if (DEFAULT_CAPACITY <= 0) { // cache disabled?
      MemoryIndex index = new MemoryIndex();
      index.addField(FIELD_NAME, text, textAnalyzer);
      return index.search(parse(query, queryAnalyzer));
    }

    Object key = Pool.createHashKeys(new Object[] {text, query, textAnalyzer, queryAnalyzer});
    Float score = (Float) entries.get(key); // hit/miss ratio is app specific
View Full Code Here

Examples of org.apache.manifoldcf.agents.interfaces.RepositoryDocument.addField()

              case URI:
              case HTML:
                if(property.isMultiValued()){
                  List<String> htmlPropertyValues = (List<String>) property.getValues();
                  for (String htmlPropertyValue : htmlPropertyValues) {
                    rd.addField(propertyId, htmlPropertyValue);
                  }
                } else {
                  String stringValue = (String) property.getValue();
                  if(StringUtils.isNotEmpty(stringValue)){
                    rd.addField(propertyId, stringValue);
View Full Code Here

Examples of org.apache.maven.index.UniqueArtifactFilterPostprocessor.addField()

        NexusIndexer indexer = prepare();

        Query q = indexer.constructQuery( MAVEN.GROUP_ID, "commons", SearchType.SCORED );

        UniqueArtifactFilterPostprocessor filter = new UniqueArtifactFilterPostprocessor();
        filter.addField( MAVEN.GROUP_ID );
        filter.addField( MAVEN.ARTIFACT_ID );

        IteratorSearchRequest request = new IteratorSearchRequest( q, filter );

        IteratorSearchResponse response = indexer.searchIterator( request );
View Full Code Here

Examples of org.apache.oodt.xmlps.mapping.Mapping.addField()

    Mapping mapping = new Mapping();
    MappingField mf = new MappingField();
    mf.setDbName("bar");
    mf.setName("foo");
    mf.setString(true);
    mapping.addField("foo", mf);
   
    XMLQuery query = XMLQueryHelper.getDefaultQueryFromQueryString(queryStr);
    assertNotNull(query);
    Stack<QueryElement> queryStack = HandlerQueryParser.createQueryStack(query
        .getWhereElementSet());
View Full Code Here

Examples of org.apache.openejb.devtools.core.JDTFacade.addField()

    fixture.addClassToProject("org.superbiz.ProductBean", fixture.getStreamContent(getClass().getResourceAsStream("Ejb21ProductBean.txt"))); //$NON-NLS-1$ //$NON-NLS-2$
    fixture.addClassToProject("org.superbiz.ProductHome", fixture.getStreamContent(getClass().getResourceAsStream("Ejb21ProductHome.txt"))); //$NON-NLS-1$ //$NON-NLS-2$
    fixture.addClassToProject(bean, fixture.getStreamContent(getClass().getResourceAsStream(startFilename))); //$NON-NLS-1$ //$NON-NLS-2$

    JDTFacade facade = new JDTFacade(fixture.getProject());
    facade.addField(bean, "entityManagerFactory", "javax.persistence.EntityManagerFactory");

    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put("name", "TestPU");
    facade.addFieldAnnotation(bean, "entityManagerFactory", PersistenceUnit.class, properties);
   
View Full Code Here

Examples of org.apache.openejb.jee.jpa.MappedSuperclass.addField()

            String fieldName = bean.getPrimkeyField();
            MappedSuperclass superclass = superclassByField.get(fieldName);
            if (superclass == null) {
                throw new IllegalStateException("Primary key field " + fieldName + " is not defined in class " + ejbClassName + " or any super classes");
            }
            superclass.addField(new Id(fieldName));
            mapping.addField(new AttributeOverride(fieldName));
            primaryKeyFields.add(fieldName);
        } else if ("java.lang.Object".equals(bean.getPrimKeyClass())) {
            String fieldName = "OpenEJB_pk";
            Id field = new Id(fieldName);
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration.addField()

            // Create a new FetchConfiguration that will be used to ensure that any JOIN FETCHed fields are loaded
            StoreContext store = q.getContext().getStoreContext();
            FetchConfiguration cacheFc = store.pushFetchConfiguration();
            for (QueryExpressions qe : _ex.getQueryExpressions()) {
                for (String fetchFields : qe.fetchPaths) {
                    cacheFc.addField(fetchFields);
                }
                for (String fetchFields : qe.fetchInnerPaths) {
                    cacheFc.addField(fetchFields);
                }
            }
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.