Package org.dspace.app.cris.util

Examples of org.dspace.app.cris.util.Researcher


    @Override
    protected void doDSGet(Context context, HttpServletRequest request,
            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];
View Full Code Here


    public static boolean isBoxHidden(ResearcherPage anagrafica,
            BoxResearcherPage box)
    {

        Researcher researcher = new Researcher();

        Map<String, ICRISComponent> rpComponent = researcher.getRPComponents();
        if (rpComponent != null && !rpComponent.isEmpty())
        {
            for (String key : rpComponent.keySet())
            {
View Full Code Here

                && isBoxHiddenWithStructural(anagrafica, box);
    }

    public static boolean isBoxHidden(Project anagrafica, BoxProject box)
    {
        Researcher researcher = new Researcher();

        Map<String, ICRISComponent> rpComponent = researcher
                .getProjectComponents();
        if (rpComponent != null && !rpComponent.isEmpty())
        {
            for (String key : rpComponent.keySet())
            {
View Full Code Here

    }

    public static boolean isBoxHidden(ResearchObject anagrafica,
            BoxDynamicObject box)
    {
        Researcher researcher = new Researcher();

        Map<String, ICRISComponent> rpComponent = researcher.getDOComponents();
        if (rpComponent != null && !rpComponent.isEmpty())
        {
            for (String key : rpComponent.keySet())
            {
View Full Code Here

    }

    public static boolean isBoxHidden(OrganizationUnit anagrafica,
            BoxOrganizationUnit box)
    {
        Researcher researcher = new Researcher();

        Map<String, ICRISComponent> rpComponent = researcher.getOUComponents();
        if (rpComponent != null && !rpComponent.isEmpty())
        {
            for (String key : rpComponent.keySet())
            {
View Full Code Here

 
  @Override
  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);
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();

       
        Integer objectId = extractEntityId(request);
        if (objectId == -1)
View Full Code Here

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

            List<CrisComponentsService> serviceComponent = researcher
                    .getAllCrisComponents();
            for (CrisComponentsService service : serviceComponent)
            {
                for (ICRISComponent component : service.getComponents()
                        .values())
View Full Code Here

                break;
            default:
                throw new IllegalArgumentException("Unknow frequency " + freq);
            }
           
            Researcher researcher = new Researcher();
            Map<String, Map<String,ObjectCount[]>> selectedObject = new HashMap<String, Map<String,ObjectCount[]>>();
            Map<String, Map<String,ObjectCount[]>> topObject = new TreeMap<String, Map<String,ObjectCount[]>>();
            if (type >= 9)
            {

                ACrisObject object = as.getEntityByUUID(uuid);
                String persistentIdentifier = ResearcherPageUtils
                        .getPersistentIdentifier(object);

                statBean.setObject(object);
                statBean.setObjectName(object.getName());

                statBean.setObjectURL(ConfigurationManager
                        .getProperty("dspace.url")
                        + "/cris/"
                        + object.getPublicPath() + "/" + persistentIdentifier);
                statBean.setStatURL(ConfigurationManager
                        .getProperty("dspace.url")
                        + "/cris/stats/"
                        + object.getPublicPath()
                        + ".html?id="
                        + object.getUuid());

                statBean.setType(object.getType());
                               
                selectedObject = new HashMap<String, Map<String,ObjectCount[]>>();
               
                CrisStatComponentsService statsComponentsService = null;
                switch (type)
                {
                case 9:
                    statsComponentsService = researcher.getRPStatsComponents();
                    break;
                case 10:
                    statsComponentsService = researcher.getPJStatsComponents();
                    break;
                case 11:
                    statsComponentsService = researcher.getOUStatsComponents();
                    break;
                default:
                    break;
                }
                selectedObject.put(AStatComponentService._SELECTED_OBJECT, statsComponentsService.getSelectedObjectComponent().getStatsViewComponent().queryFacetDate(statsLogger, object, dateType, dateStart, dateEnd, gap));
                selectedObject.get(AStatComponentService._SELECTED_OBJECT).putAll(statsComponentsService.getSelectedObjectComponent().getStatsDownloadComponent().queryFacetDate(statsLogger, object, dateType, dateStart, dateEnd, gap));               
                for(String key : statsComponentsService.getComponents().keySet()) {
                    IStatsComponent dual = statsComponentsService.getComponents().get(key).getStatsViewComponent();
                    topObject.put(key, dual.queryFacetDate(statsLogger, object, dateType, dateStart, dateEnd, gap));
                    dual = statsComponentsService.getComponents().get(key).getStatsDownloadComponent();
                    topObject.get(key).putAll(dual.queryFacetDate(statsLogger, object, dateType, dateStart, dateEnd, gap));
                }
            }
            else
            {
               
                DSpaceObject dso = HandleManager.resolveToObject(context,
                        uuid);
                if (dso == null)
                {
                    throw new IllegalArgumentException("Invalid handle: "
                            + uuid + " DSpace object not found");
                }

                statBean.setObject(dso);
                statBean.setObjectName(dso.getName());
                statBean.setObjectURL(ConfigurationManager
                        .getProperty("dspace.url") + "/handle/" + uuid);
                statBean.setType(dso.getType());
                switch (dso.getType())
                {
                case Constants.ITEM:
                   
                    StatComponentsService serviceItem = researcher.getItemStatsComponents();
                    retrieveResults(dateType, dateStart, dateEnd, gap,
                            selectedObject, topObject, dso, serviceItem);
               
                    statBean.setStatURL(ConfigurationManager
                            .getProperty("dspace.url")
                            + "/cris/stats/item.html?handle=" + uuid);
                    break;

                case Constants.COLLECTION:

                    StatComponentsService serviceColl = researcher.getCollectionStatsComponents();
                    retrieveResults(dateType, dateStart, dateEnd, gap,
                            selectedObject, topObject, dso, serviceColl);
                 
                    statBean.setStatURL(ConfigurationManager
                            .getProperty("dspace.url")
                            + "/cris/stats/collection.html?handle=" + uuid);
                    break;

                case Constants.COMMUNITY:
                   
                    StatComponentsService serviceComm = researcher.getCommunityStatsComponents();
                    retrieveResults(dateType, dateStart, dateEnd, gap,
                            selectedObject, topObject, dso, serviceComm);
                   
                    statBean.setStatURL(ConfigurationManager
                            .getProperty("dspace.url")
View Full Code Here

TOP

Related Classes of org.dspace.app.cris.util.Researcher

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.