Package org.apache.lucene.search.vectorhighlight

Examples of org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilderTest$Doc


  public ListBucketResult getBucketObjectList(String marker, String bucket, String prefix, int size) throws Exception
  {
    Access access = new Access();
   
    /* Get the list of files from S3 */
    ListBucketResult listResult = null;
   
    if (prefix != null)
    {
      prefix += OBJECT_PREFIX_SEPARATOR;
    }
View Full Code Here


  output.setPrefix( bucket.getPrefix( ) );
 
  List<ListEntry> outputContents = output.getContents( );
  for ( Metadata meta : contents )
  {
      ListEntry entry = new ListEntry( );
      entry.setETag( String.valueOf( meta.getMd5( ) ) );
      entry.setKey( meta.getKey( ) );
      try
      {
    entry.setLastModified( DatatypeFactory.newInstance( )
      .newXMLGregorianCalendar(
              meta
      .getLastModified( ).toGregorianCalendar( ) ) );
      }
      catch ( DatatypeConfigurationException e )
      {
    throw new CloudStoreException( e );
      }
      entry.setSize( meta.getSize( ) );
      entry.setStorageClass( StorageClass
        .valueOf( meta.getStorageClass( ) ) );
      outputContents.add( entry );
  }
  return output;
    }
View Full Code Here

    /* Setup the optional meta data */
    if (this.tag_ != null)
    {
      metaData = new MetadataEntry[1];
      metaData[0] = new MetadataEntry(META_DATA_TAG, this.tag_);
    }
   
   
      long startTime = System.currentTimeMillis();
     
View Full Code Here

      AmazonS3_ServiceLocator locator = new AmazonS3_ServiceLocator();
      AmazonS3SoapBindingStub binding = new AmazonS3SoapBindingStub(new URL(locator.getAmazonS3Address()), locator);
      DataHandler dataHandler = new DataHandler(new SourceDataSource(null, MIMETYPE_OCTET_STREAM, new StreamSource(is)));
            binding.addAttachment(dataHandler);
     
      PutObjectResult result = binding.putObject(getBucketName(),
                            key,
                            metaData ,
                            length,
                            null,
                            storageClass,
                            access.getAccessKey(),
                            access.getAccessCalendar(),
                            access.generateSignature("PutObject"),
                            null);
     
             
      long endTime = System.currentTimeMillis();
     
      Log.info(String.format("%6.02f Kb/s\n", (((double)((double)length * (double)Byte.SIZE)) / 1000D) / ((endTime - startTime) / 1000)));

      /* compare md5 hashes */
      if (md5.equals(result.getETag().replaceAll("\"", "")) == false)
      {
        throw new Exception("After putting the S3 object [" + key + "], we compared the md5 hash codes. They did not match\n" + "original: [" + md5 + "]\nS3: [" + result.getETag() + "]");
      }
       
   
  }
View Full Code Here

      return;
    }
   

    MetadataEntry[] metaData = null;
    StorageClass storageClass = StorageClass.STANDARD;
    Access access = new Access();

    /* Setup the optional meta data */
    if (this.tag_ != null)
    {
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilderTest$Doc

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.