Package org.dspace.app.cris.service

Examples of org.dspace.app.cris.service.ApplicationService


    public void doJSONRequest(Context context, HttpServletRequest req,
            HttpServletResponse resp) throws AuthorizeException, IOException           
    {

        DSpace dspace = new DSpace();
        ApplicationService service = dspace.getServiceManager()
                .getServiceByName("applicationService",
                        ApplicationService.class);

        String researcher = req.getParameter("researcher");

       
        EPerson currUser = context.getCurrentUser();
       
        ResearcherPage rp = service.get(ResearcherPage.class, ResearcherPageUtils
                .getRealPersistentIdentifier(researcher, ResearcherPage.class), true);

        try
        {
            if (rp == null  && // cv is hide
View Full Code Here


  public void doJSONRequest(Context context, HttpServletRequest req,
      HttpServletResponse respthrows AuthorizeException, IOException      
    {

    DSpace dspace = new DSpace();
    ApplicationService service = dspace.getServiceManager()
        .getServiceByName("applicationService",
            ApplicationService.class);

    String dept = req.getParameter("dept");
   
View Full Code Here

            HttpServletResponse response) throws ServletException, IOException,
            SQLException
    {
        Researcher util = new Researcher();

        ApplicationService applicationService = util.getApplicationService();
       
        String idString = request.getPathInfo();
        String[] pathInfo = idString.split("/", 2);
        String authority = pathInfo[1];

        String target = request.getParameter("with");
        String relation = request.getParameter("relation");

        if (relation != null && relation.contains("_"))
        {
            relation = relation.split("_")[1];
        }

        Pattern patt = Pattern.compile("rp[0-9]{5}$");
        Matcher matcher = patt.matcher(authority);

        ResearcherPage researcherFocus = new ResearcherPage();
        if (matcher.find())
        {
            researcherFocus = applicationService.get(ResearcherPage.class, ResearcherPageUtils
                    .getRealPersistentIdentifier(authority, ResearcherPage.class), true);
           
        }
        else
        {
            researcherFocus.setFullName(authority);
        }

        ResearcherPage researcherTarget = new ResearcherPage();
        String authorityTarget = target;
        if (target != null)
        {
            matcher = patt.matcher(target);
            if (matcher.find())
            {

                researcherTarget = applicationService.get(ResearcherPage.class, ResearcherPageUtils
                        .getRealPersistentIdentifier(target, ResearcherPage.class), true);

            }
            else
            {
View Full Code Here

  protected void doDSGet(Context context, HttpServletRequest request,
      HttpServletResponse response) throws ServletException, IOException,
      SQLException {
    Researcher util = new Researcher();

    ApplicationService applicationService = util.getApplicationService();
    CrisSearchService searchService = (CrisSearchService) util
        .getCrisSearchService();
   
   
    String idString = request.getPathInfo();
    String[] pathInfo = idString.split("/", 2);
    String authority = pathInfo[1];

    String target = request.getParameter("target");
    String depth = request.getParameter("depth");
    String root = request.getParameter("root");
    String typo = request.getParameter("typo");
   
    Pattern patt = Pattern.compile("rp[0-9]{5}$");
    if (root == null) {
      response.sendError(HttpServletResponse.SC_NOT_FOUND);
      return;
    }
   
    String focus = authority;
    if(!root.equals(authority)) {
      focus = root;
    }
 
    Matcher matcher1 = patt.matcher(focus);
    if(matcher1.find()) {
        typo = "rp";
        request.setAttribute("fullname", ResearcherPageUtils.getFullName(focus));
    }
   
    ResearcherPage researcherTarget = new ResearcherPage();
    String authorityTarget = target;
    if (target != null) {
     
      Matcher matcher = patt.matcher(target);
      if (matcher.find()) {
        researcherTarget = applicationService
            .getResearcherByAuthorityKey(target);

      } else {
        researcherTarget.setInternalRP(false);
        researcherTarget.setFullName(target);
View Full Code Here

            SQLException
    {

        Researcher util = new Researcher();

        ApplicationService applicationService = util.getApplicationService();
        CrisSearchService searchService = (CrisSearchService) util
                .getCrisSearchService();

       
        Integer objectId = extractEntityId(request);
        if (objectId == -1)
        {
            response.sendError(HttpServletResponse.SC_NOT_FOUND,
                    "Researcher page not found");
            return;
        }
       
        ResearcherPage researcher = applicationService.get(ResearcherPage.class, objectId, true);

        boolean found = false;

        if (researcher == null)
        {
View Full Code Here

    // TODO move logic in ImportExportUtils
    log.info("#### START IMPORT: -----" + new Date() + " ----- ####");
    Context dspaceContext = new Context();
    dspaceContext.setIgnoreAuthorization(true);
    DSpace dspace = new DSpace();
    ApplicationService applicationService = dspace.getServiceManager()
        .getServiceByName("applicationService",
            ApplicationService.class);
    CommandLineParser parser = new PosixParser();

    String xmlFilePath = null;
View Full Code Here

    // TODO move logic in ImportExportUtils
    log.info("#### START IMPORT: -----" + new Date() + " ----- ####");
    Context dspaceContext = new Context();
    dspaceContext.setIgnoreAuthorization(true);
    DSpace dspace = new DSpace();
        ApplicationService applicationService = dspace.getServiceManager().getServiceByName(
                "applicationService", ApplicationService.class);
       
    String excelFilePath = null;

    CommandLineParser parser = new PosixParser();
View Full Code Here

        List<String[]> result = new ArrayList<String[]>();
        if (validAuthorities.size() > 0)
        {
            DSpace dspace = new DSpace();
            String path = enh.getQualifiers2path().get(qualifier);
            ApplicationService as = dspace.getServiceManager()
                    .getServiceByName("applicationService",
                            ApplicationService.class);
            for (String authKey : validAuthorities)
            {

                result.addAll(getPathAsMetadata(as, as.get(enh.getClazz(),
                        ResearcherPageUtils
                                .getRealPersistentIdentifier(authKey,enh.getClazz())), path));
            }

        }
View Full Code Here

        Context context = null;
        try
        {
            context = new Context();
            Researcher researcher = new Researcher();
            ApplicationService applicationService = researcher
                    .getApplicationService();

            List<CrisComponentsService> serviceComponent = researcher
                    .getAllCrisComponents();
            for (CrisComponentsService service : serviceComponent)
View Full Code Here

            throws SQLException, AuthorizeException
    {
        context.turnOffAuthorisationSystem();

        DSpace dspace = new DSpace();
        ApplicationService applicationService = dspace.getServiceManager()
                .getServiceByName("applicationService",
                        ApplicationService.class);

        RelationPreferenceService relationPreferenceService = dspace
                .getServiceManager()
                .getServiceByName(
                        "org.dspace.app.cris.service.RelationPreferenceService",
                        RelationPreferenceService.class);

        List<RelationPreference> rejected = new ArrayList<RelationPreference>();
        for (RelationPreferenceConfiguration configuration : relationPreferenceService
                .getConfigurationService().getList())
        {
            if (configuration.getRelationConfiguration().getRelationClass().equals(Item.class))
            {
                rejected = applicationService
                        .findRelationsPreferencesByUUIDByRelTypeAndStatus(
                                rp.getUuid(), configuration.getRelationConfiguration().getRelationName(),
                                RelationPreference.UNLINKED);
            }
        }
View Full Code Here

TOP

Related Classes of org.dspace.app.cris.service.ApplicationService

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.