Examples of addThesaurus()


Examples of org.fao.geonet.kernel.ThesaurusManager.addThesaurus()

    String filePath = tm.buildThesaurusFilePath(fname, type, dname);
   
    File rdfFile = new File(filePath);
        final String siteURL = context.getBean(SettingManager.class).getSiteURL(context);
        Thesaurus thesaurus = new Thesaurus(context.getApplicationContext(), fname, tname, tnamespace, type, dname, rdfFile, siteURL, false);
    tm.addThesaurus(thesaurus, true);

    // Save activated status in the database
        ThesaurusActivation activation = new ThesaurusActivation();
        activation.setActivated(Constants.toBoolean_fromYNChar(activated.charAt(0)));
        activation.setId(fname);
View Full Code Here

Examples of org.fao.geonet.kernel.ThesaurusManager.addThesaurus()

      Xml.writeResponse(new Document(tsXml), new FileOutputStream(
          newFile));

            final String siteURL = context.getBean(SettingManager.class).getSiteURL(context);
            Thesaurus gst = new Thesaurus(context.getApplicationContext(), fname, type, dir, newFile, siteURL);
      thesaurusMan.addThesaurus(gst, false);
    } else {
      IO.delete(rdfFile, false, Geonet.THESAURUS);
      throw new Exception("Unknown format (Must be in SKOS format).");
    }
View Full Code Here

Examples of org.fao.geonet.kernel.search.keyword.KeywordSearchParamsBuilder.addThesaurus()

            params.build();
            fail("Expected an IllegalStateException because offset is not allowed if no thesaurus is defined");
        } catch (IllegalStateException e) {
            // good
        }
        params.addThesaurus(thesaurus.getKey());
        searcher.search(params.build());
        assertEquals(keywords-5, searcher.getNbResults());
       
        params.addThesaurus(thesaurusBlah.getKey());
        try {
View Full Code Here

Examples of org.fao.geonet.kernel.search.keyword.KeywordSearchParamsBuilder.addThesaurus()

        }
        params.addThesaurus(thesaurus.getKey());
        searcher.search(params.build());
        assertEquals(keywords-5, searcher.getNbResults());
       
        params.addThesaurus(thesaurusBlah.getKey());
        try {
            params.build();
            fail("Expected an IllegalStateException because offset is not allowed if more than one thesaurus");
        } catch (IllegalStateException e) {
            // good
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.