Examples of deleteMetadata()


Examples of edu.uga.galileo.voci.model.MetadataManager.deleteMetadata()

        MetadataElement element = manager
            .getMetadataElement(metadataId);
        if (element.isKeyField()) {
          errors.add("Key fields can not be deleted.");
        } else {
          manager.deleteMetadata(element);
          request.setAttribute("successMessage", "Metadata element ("
              + metadataId + ") successfully deleted.");
        }
      } catch (NumberFormatException e) {
        request.setAttribute("errorMessage",
View Full Code Here

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

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

        assertThat( metadatas ).isNotNull().isNotEmpty().contains( MapEntry.entry( "wine", "bordeaux" ) );

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

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

        assertThat( metadatas ).isNotNull().isEmpty();
    }
View Full Code Here

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

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

        assertThat( metadatas ).isNotNull().isNotEmpty().contains( MapEntry.entry( "wine", "bordeaux" ) );

        browseService.deleteMetadata( "commons-cli", "commons-cli", "1.0", "wine", testRepoId );

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

        assertThat( metadatas ).isNotNull().isEmpty();
View Full Code Here

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

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

        assertThat( metadatas ).isNotNull().isNotEmpty().contains( MapEntry.entry( "wine", "bordeaux" ) );

        browseService.deleteMetadata( "commons-cli", "commons-cli", "1.0", "wine", testRepoId );

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

        assertThat( metadatas ).isNotNull().isEmpty();
View Full Code Here

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

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

        assertThat( metadatas ).isNotNull().isNotEmpty().contains( MapEntry.entry( "wine", "bordeaux" ) );

        browseService.deleteMetadata( "commons-cli", "commons-cli", "1.0", "wine", testRepoId );

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

        assertThat( metadatas ).isNotNull().isEmpty();
View Full Code Here

Examples of org.fao.geonet.kernel.DataManager.deleteMetadata()

    try {
      if (dm.existsMetadataUuid(uuid) && !uuidAction.equals(Params.NOTHING)) {
                // user has privileges to replace the existing metadata
                if(dm.getAccessManager().canEdit(context, dm.getMetadataId(uuid))) {
                    dm.deleteMetadata(context, dm.getMetadataId(uuid));
                    if(Log.isDebugEnabled(Geonet.MEF))
                        Log.debug(Geonet.MEF, "Deleting existing metadata with UUID : " + uuid);
                }
                // user does not hav privileges to replace the existing metadata
                else {
View Full Code Here

Examples of org.fao.geonet.kernel.DataManager.deleteMetadata()

          //--- remove the metadata directory
          File pb = new File(Lib.resource.getMetadataDir(context, id));
          FileCopyMgr.removeDirectoryOrFile(pb);
 
          //--- delete metadata and return status
          dataMan.deleteMetadata(context, id);
                    if(context.isDebugEnabled())
                        context.debug("  Metadata with id " + id + " deleted.");
          metadata.add(Integer.valueOf(id));
        }
      } else
View Full Code Here

Examples of org.fao.geonet.kernel.DataManager.deleteMetadata()

    FileCopyMgr.removeDirectoryOrFile(pb);
   
    //-----------------------------------------------------------------------
    //--- delete metadata and return status

    dataMan.deleteMetadata(context, id);

    Element elResp = new Element(Jeeves.Elem.RESPONSE);
    elResp.addContent(new Element(Geonet.Elem.ID).setText(id));

    return elResp;
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.