Examples of factory()


Examples of it.unimi.dsi.mg4j.document.DocumentSequence.factory()

    DocumentCollectionBuilder builder = null;
    if ( jsapResult.userSpecified( "buildCollection" ) ) {
      final Class<? extends DocumentCollectionBuilder> builderClass = jsapResult.getClass( "builderClass" );
      builder = builderClass != null ? builderClass.getConstructor( String.class, DocumentFactory.class, boolean.class ).newInstance(
          jsapResult.getString( "buildCollection" ),
          documentSequence.factory().numberOfFields() == indexedField.length ? documentSequence.factory().copy() : new SubDocumentFactory( documentSequence.factory().copy(), indexedField ),
          Boolean.valueOf( jsapResult.getBoolean( "exact" ) ) ) : null;
    }

    final IndexBuilder indexBuilder = new IndexBuilder( jsapResult.getString( "basename" ), documentSequence )
    .termProcessor( termProcessor )
View Full Code Here

Examples of it.unimi.dsi.mg4j.document.DocumentSequence.factory()

    DocumentCollectionBuilder builder = null;
    if ( jsapResult.userSpecified( "buildCollection" ) ) {
      final Class<? extends DocumentCollectionBuilder> builderClass = jsapResult.getClass( "builderClass" );
      builder = builderClass != null ? builderClass.getConstructor( String.class, DocumentFactory.class, boolean.class ).newInstance(
          jsapResult.getString( "buildCollection" ),
          documentSequence.factory().numberOfFields() == indexedField.length ? documentSequence.factory().copy() : new SubDocumentFactory( documentSequence.factory().copy(), indexedField ),
          Boolean.valueOf( jsapResult.getBoolean( "exact" ) ) ) : null;
    }

    final IndexBuilder indexBuilder = new IndexBuilder( jsapResult.getString( "basename" ), documentSequence )
    .termProcessor( termProcessor )
View Full Code Here

Examples of it.unimi.dsi.mg4j.document.DocumentSequence.factory()

    DocumentCollectionBuilder builder = null;
    if ( jsapResult.userSpecified( "buildCollection" ) ) {
      final Class<? extends DocumentCollectionBuilder> builderClass = jsapResult.getClass( "builderClass" );
      builder = builderClass != null ? builderClass.getConstructor( String.class, DocumentFactory.class, boolean.class ).newInstance(
          jsapResult.getString( "buildCollection" ),
          documentSequence.factory().numberOfFields() == indexedField.length ? documentSequence.factory().copy() : new SubDocumentFactory( documentSequence.factory().copy(), indexedField ),
          Boolean.valueOf( jsapResult.getBoolean( "exact" ) ) ) : null;
    }

    final IndexBuilder indexBuilder = new IndexBuilder( jsapResult.getString( "basename" ), documentSequence )
    .termProcessor( termProcessor )
View Full Code Here

Examples of it.unimi.dsi.mg4j.document.DocumentSequence.factory()

    JSAPResult jsapResult = jsap.parse( arg );
    if ( jsap.messagePrinted() ) return;
   
    DocumentSequence documentSequence = it.unimi.dsi.mg4j.tool.Scan.getSequence( jsapResult.getString( "sequence" ), jsapResult.getClass( "factory" ), jsapResult.getStringArray( "property" ), jsapResult.getInt( "delimiter" ), LOGGER );
   
    final DocumentFactory factory = documentSequence.factory();
    final boolean stem = jsapResult.getBoolean( "stem" );
    final boolean termLists = jsapResult.getBoolean( "termLists" );
    final int[] indexedField = it.unimi.dsi.mg4j.tool.Scan.parseFieldNames( jsapResult.getStringArray( "indexedField" ), factory, jsapResult.getBoolean( "allFields" )  );
   
    LOGGER.debug( "Parsed indexed field: " + IntArrayList.wrap( indexedField ) );
View Full Code Here

Examples of it.unimi.dsi.mg4j.document.TRECDocumentCollection.factory()

    d = iter.nextDocument();
    assertNotNull(d);
    assertEquals("http://gx0001/", d.uri());
    assertEquals("GX001", d.title());

    final int textIndex = collection.factory().fieldIndex( "text" );
   
    assertEquals( "Line 1\n     The line 2!\n  Mamma\n", IOUtils.toString( (Reader)d.content( textIndex ) ) );
   
    d = iter.nextDocument();
    assertNotNull(d);
View Full Code Here

Examples of org.apache.axis.wsdl.WSDL2Java.factory()

                emitter.setNamespaceMap(namespaceMap);
            }
            emitter.generateTestCase(testCase);
            emitter.helperGen(helperGen);   
            if (factory != null) {
                emitter.factory(factory);
            }  
            emitter.generateImports(!noImports);
            emitter.generateAll(all);
            emitter.setOutputDir(output);
            emitter.generateServerSide(server);
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.BindyCsvFactory.factory()

                // Increment counter
                count++;

                // Create POJO where CSV data will be stored
                model = factory.factory();

                // Split the CSV record according to the separator defined in
                // annotated class @CSVRecord
                String[] tokens = line.split(separator, -1);
                List<String> result = Arrays.asList(tokens);
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.BindyFixedLengthFactory.factory()

                if ((line.length() < factory.recordLength()) || (line.length() > factory.recordLength())) {
                    throw new java.lang.IllegalArgumentException("Size of the record: " + line.length() + " is not equal to the value provided in the model: " + factory.recordLength());
                }

                // Create POJO where Fixed data will be stored
                model = factory.factory();
               
                // Bind data from Fixed record with model classes
                factory.bind(line, model, count);

                // Link objects together
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.BindyKeyValuePairFactory.factory()

                // Increment counter
                count++;

                // Create POJO
                model = factory.factory();

                // Split the message according to the pair separator defined in
                // annotated class @Message
                List<String> result = Arrays.asList(line.split(separator));
View Full Code Here

Examples of org.apache.camel.language.LanguageAnnotation.factory()

        } else if (annotation instanceof ExchangeException) {
            return ExpressionBuilder.exchangeExceptionExpression(CastUtils.cast(parameterType, Exception.class));
        } else {
            LanguageAnnotation languageAnnotation = annotation.annotationType().getAnnotation(LanguageAnnotation.class);
            if (languageAnnotation != null) {
                Class<?> type = languageAnnotation.factory();
                Object object = camelContext.getInjector().newInstance(type);
                if (object instanceof AnnotationExpressionFactory) {
                    AnnotationExpressionFactory expressionFactory = (AnnotationExpressionFactory) object;
                    return expressionFactory.createExpression(camelContext, annotation, languageAnnotation, parameterType);
                } else {
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.