Examples of findAllAsXml()


Examples of org.fao.geonet.repository.GroupRepository.findAllAsXml()

        final UserGroupRepository userGroupRepository = context.getBean(UserGroupRepository.class);
        final Sort sort = SortUtils.createSort(Group_.id);

        UserSession session = context.getUserSession();
        if (!session.isAuthenticated()) {
            return groupRepository.findAllAsXml(Specifications.not(GroupSpecs.isReserved()), sort);
        }

        Element result;
        // you're Administrator
        if (Profile.Administrator == session.getProfile()) {
View Full Code Here

Examples of org.fao.geonet.repository.GroupRepository.findAllAsXml()

        Element result;
        // you're Administrator
        if (Profile.Administrator == session.getProfile()) {
            // return all groups
            result = groupRepository.findAllAsXml(null, sort);
        } else {
            Specifications<UserGroup> spec = Specifications.where(UserGroupSpecs.hasUserId(session.getUserIdAsInt()));
            // you're no Administrator
            // retrieve your groups
      if (profile != null) {
View Full Code Here

Examples of org.fao.geonet.repository.GroupRepository.findAllAsXml()

                    ids.add(reservedGroup.getId());
                }
            }

            // retrieve all groups
            Element groups = groupRepository.findAllAsXml(null, sort);

            // filter all groups so only your groups (+ maybe system groups) are retained
            result = Lib.element.pruneChildren(groups, ids);
    }
        return result;
View Full Code Here

Examples of org.fao.geonet.repository.HarvestHistoryRepository.findAllAsXml()

            springSort = new Sort(harvesterTypeSort, harvestDateOrder);
        }

        Element result;
        if ((uuid == null) || (uuid.equals(""))) {
            result = historyRepository.findAllAsXml(springSort);
    } else {
            result = historyRepository.findAllAsXml(hasHarvesterUuid(uuid), springSort);
        }

View Full Code Here

Examples of org.fao.geonet.repository.HarvestHistoryRepository.findAllAsXml()

        Element result;
        if ((uuid == null) || (uuid.equals(""))) {
            result = historyRepository.findAllAsXml(springSort);
    } else {
            result = historyRepository.findAllAsXml(hasHarvesterUuid(uuid), springSort);
        }


        String id = params.getChildText("id");
View Full Code Here

Examples of org.fao.geonet.repository.MetadataCategoryRepository.findAllAsXml()

    //-----------------------------------------------------------------------
    //--- retrieve groups operations
        final MetadataCategoryRepository categoryRepository = context.getBean(MetadataCategoryRepository.class);

        Element elCateg = categoryRepository.findAllAsXml();

        @SuppressWarnings("unchecked")
        List<Element> list = elCateg.getChildren();
        for (Element el : list) {
View Full Code Here

Examples of org.fao.geonet.repository.MetadataRepository.findAllAsXml()

        final List<Integer> list = operationAllowedRepository.findAllIds(spec, OperationAllowedId_.metadataId);

        final MetadataRepository metadataRepository = context.getBean(MetadataRepository.class);
        Sort sortByChangeDateDesc = new Sort(Sort.Direction.DESC, Metadata_.dataInfo.getName()+"."+MetadataDataInfo_.changeDate);

        Element result = metadataRepository.findAllAsXml(MetadataSpecs.hasMetadataIdIn(list), sortByChangeDateDesc);


        Element formatEl = new Element("format");
        formatEl.setText(format.toLowerCase());
View Full Code Here

Examples of org.fao.geonet.repository.SchematronCriteriaGroupRepository.findAllAsXml()

            } else {
                spec = spec.and(SchematronCriteriaGroupSpecs.hasGroupName(groupName));
            }
        }

        Element groups = repository.findAllAsXml(spec);

        @SuppressWarnings("unchecked")
        final List<Element> records = groups.getChildren(GeonetEntity.RECORD_EL_NAME);
        if (!includeCriteria || !includeSchematron) {
            for (Element child : records) {
View Full Code Here

Examples of org.fao.geonet.repository.SchematronCriteriaRepository.findAllAsXml()

                    spec = Specifications.where(hasGroupSpec);
                } else {
                    spec = spec.and(hasGroupSpec);
                }
            }
            element = criteriaRepository.findAllAsXml(spec);
        } else {
            final SchematronCriteria criteria = criteriaRepository.findOne(Integer.parseInt(id));

            if (criteria == null) {
                throw new BadParameterEx(Params.ID, id);
View Full Code Here

Examples of org.fao.geonet.repository.SchematronRepository.findAllAsXml()

        String id = Util.getParam(params, Params.ID, null);
        final SchematronRepository repository = context.getBean(SchematronRepository.class);

        Element result;
        if (id == null) {
            result = repository.findAllAsXml();
        } else {
            final Schematron one = repository.findOne(Integer.parseInt(id));
            if (one == null) {
                throw new BadParameterEx(Params.ID, id);
            }
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.