Examples of addMetaData()


Examples of org.apache.archiva.rest.api.services.BrowseService.addMetadata()

        Map<String, String> metadatas =
            toMap( browseService.getMetadatas( "commons-cli", "commons-cli", "1.0", TEST_REPO_ID ) );

        assertThat( metadatas ).isNotNull().isEmpty();

        browseService.addMetadata( "commons-cli", "commons-cli", "1.0", "wine", "bordeaux", TEST_REPO_ID );

        metadatas = toMap( browseService.getMetadatas( "commons-cli", "commons-cli", "1.0", TEST_REPO_ID ) );

        assertThat( metadatas ).isNotNull().isNotEmpty().contains( MapEntry.entry( "wine", "bordeaux" ) );
    }
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference.addMetaData()

        stsEpr = new EndpointReference(stsAddress);

        mexEpr = new Metadata(mexAddress);

        stsEpr.addExtensibleElement(id.serialize());
        stsEpr.addMetaData(mexEpr.serialize());

        TokenService service = new TokenService(stsEpr, credential);
        TokenServiceList serviceList = new TokenServiceList();
        serviceList.addTokenService(service);
View Full Code Here

Examples of org.apache.ctakes.necontexts.ContextHit.addMetaData()

          }
        }
        ContextHit ctxHit = new ContextHit(finalSi.getStartOffset(),
            finalSi.getEndOffset());

        ctxHit.addMetaData(CTX_HIT_KEY_ILLNESS_TYPE, new Integer(
            finalSi.getStatus()));

        return ctxHit;
      } else {
        return null;
View Full Code Here

Examples of org.apache.maven.artifact.Artifact.addMetadata()

            // Deploy the POM
            boolean isPomArtifact = "pom".equals(artifactMetaData.getPackaging());
            if (!isPomArtifact)
            {
                ArtifactMetadata metadata = new ProjectArtifactMetadata(artifact, pomFile);
                artifact.addMetadata(metadata);
            }

            try
            {
                if (isPomArtifact)
View Full Code Here

Examples of org.apache.oodt.cas.filemgr.catalog.Catalog.addMetadata()

    catalog.removeProduct(product);
    newProduct.setProductId(product.getProductId());
    catalog.addProduct(newProduct);
    newProduct.setProductReferences(references);
    catalog.addProductReferences(newProduct);
    catalog.addMetadata(newMetadata, newProduct);
  }

  /**
   * Method to delete a specific product from the catalog
   *
 
View Full Code Here

Examples of org.apache.oodt.cas.metadata.Metadata.addMetadata()

  }
 
  public void testDataSourceCatalogIngestQueryAndDelete() throws CatalogServiceException, ParseException, TokenMgrError {
    //test ingest
    Metadata m = new Metadata();
    m.addMetadata("testkey1", "testval1");
    TransactionReceipt tr = cs.ingest(m);
    Vector<TransactionReceipt> receipts = new Vector<TransactionReceipt>();
    receipts.add(tr);
    List<TransactionalMetadata> metadatas = cs.getMetadata(receipts);
    assertEquals(metadatas.size(), 1);
View Full Code Here

Examples of org.apache.oodt.cas.metadata.Metadata.addMetadata()

      Metadata metadata = new Metadata();
      Vector<CatalogReceipt> successfulCatalogReceipts = new Vector<CatalogReceipt>();
      for (CatalogReceipt catalogReceipt : transactionReceipt.getCatalogReceipts()) {
        try {
          Catalog catalog = this.getCatalog(catalogReceipt.getCatalogId());
          metadata.addMetadata(catalog.getMetadata(catalogReceipt.getTransactionId()));
          successfulCatalogReceipts.add(catalogReceipt);
        }catch (Exception e) {
          if (this.oneCatalogFailsAllFail)
            throw new CatalogServiceException("Failed to get metadata for transaction ids for catalog '" + catalogReceipt.getCatalogId() + "' : " + e.getMessage(), e);
          else
View Full Code Here

Examples of org.apache.oodt.cas.metadata.Metadata.addMetadata()

      Vector<CatalogReceipt> catalogReceipts = new Vector<CatalogReceipt>();
      for (Catalog catalog : this.getCurrentCatalogList()) {
        try {
          CatalogReceipt catalogReceipt = this.ingestMapper.getCatalogReceipt(catalogServiceTransactionId, catalog.getId());
          if (catalogReceipt != null) {
            metadata.addMetadata(catalog.getMetadata(catalogReceipt.getTransactionId()).getHashtable());
            catalogReceipts.add(catalogReceipt);
          }
        }catch (Exception e) {
          if (this.oneCatalogFailsAllFail)
            throw new CatalogServiceException("Failed to get metadata for transaction ids for catalog '" + catalog.getId() + "' : " + e.getMessage(), e);
View Full Code Here

Examples of org.apache.oodt.cas.metadata.Metadata.addMetadata()

      String metKeyName = vec.getName();
      LOG.log(Level.FINE, "Extracting key: ["+metKeyName+"]");
      int offset = Integer.valueOf((String) vec.getElements().get(0)) - 1;
      int length = Integer.valueOf((String) vec.getElements().get(1));
      String metVal = filename.substring(offset, offset + length).trim();
      met.addMetadata(metKeyName, metVal);
    }

    return met;
  }
View Full Code Here

Examples of org.apache.oodt.cas.metadata.SerializableMetadata.addMetadata()

            SerializableMetadata sMetadata = new SerializableMetadata("UTF-8",
                    false);
            for (String metadataKey : metadataToWriteOut)
                if (this.metadata.getMetadata(metadataKey) != null
                        && !this.metadata.getMetadata(metadataKey).equals(""))
                    sMetadata.addMetadata(metadataKey, this.metadata
                            .getMetadata(metadataKey));
            sMetadata.writeMetadataToXmlStream(new FileOutputStream(filePath));
        } catch (Exception e) {
            throw new IOException("Failed to write metadata file for "
                    + this.pFile + " : " + e.getMessage());
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.