Returns a Predicate that is matching links having the specified profile {@link Link#getProfile() profile}

@param profile the expected profile of the link
@return Predicate used to select links
343198
public static Predicate<Link> havingProfile(final String profile) {
        return link -> profile.equals(link.getProfile());
    }
1347201
protected List<VideoProfile> getVideoProfiles() {
    List<VideoProfile> profiles = new ArrayList<VideoProfile>();
    for (String profileName : getVideoProfileNames()) {
      VideoProfile profile = VideoProfile.get(resourceResolver, profileName);
      if (profile != null) {
        profiles.add(profile);
      }
      else {
        log.warn("DAM video profile with name '{}' does not exist.", profileName);
      }
    }
    return profiles;
  }
973081
@RequestMapping(value = "/api/profile", method = RequestMethod.GET)
    public
    @ResponseBody
    HashMap<String, Object> getList(Model model) throws Exception {
        logger.info("Using a GET request to list profiles");
        return Utils.getJQGridJSON(profileService.findAllProfiles(), "profiles");
    }
260871
public static UserProfile getUserProfile() {
        UserProfile userProfile = null;
        Subject subject = getSubject();
        Iterator<UserProfile> userProfilesIterator = subject.getPrivateCredentials(UserProfile.class).iterator();
        if (userProfilesIterator.hasNext()) {
            userProfile = userProfilesIterator.next();
        }
        return userProfile;
    }
659290
public String[] getMetaKeywords(Profile profile) {
        if( configuration.keywords ) {
            String profileName = profile.name;
            return new String[] { profileName + " " + "profile" };
        } else {
            return new String[] {};
        }
    }
196104
public CasServerProfile getProfile() {
        val profile = new CasServerProfile();
        profile.setRegisteredServiceTypesSupported(locateRegisteredServiceTypesSupported());
        profile.setRegisteredServiceTypes(locateRegisteredServiceTypesActive());
        profile.setMultifactorAuthenticationProviderTypesSupported(locateMultifactorAuthenticationProviderTypesSupported());
        profile.setMultifactorAuthenticationProviderTypes(locateMultifactorAuthenticationProviderTypesActive());
        profile.setDelegatedClientTypesSupported(locateDelegatedClientTypesSupported());
        profile.setDelegatedClientTypes(locateDelegatedClientTypes());
        profile.setAvailableAttributes(this.availableAttributes);
        return profile;
    }
1247767
public Iterable<Entry<String, ProfileNode>> getDescendingOrderedNodes() {
			if( nodes == null ) return null;
			
			List<Entry<String, ProfileNode>> averageStepTimes = new LinkedList<Entry<String, ProfileNode>>(nodes.entrySet());
			
			Collections.sort(averageStepTimes, new Comparator<Entry<String, ProfileNode>>() {
				public int compare(Entry<String, ProfileNode> o1, Entry<String, ProfileNode> o2) {
					return (int) (o1.getValue().totalMillisecs - o2.getValue().totalMillisecs);
				}
			});
			
			
			return averageStepTimes;
	}
31861
public static Profile getProfile(HttpServletRequest request) {
        Authentication auth = getAuthentication(request);
        if (auth != null) {
            return auth.getProfile();
        } else {
            return null;
        }
    }
440776
async def get_profile(self, *tags):
        ''''''
        url = '{0.BASE}/profile/{1}'.format(self, ','.join(tags))

        data = await self.request(url)
                
        if isinstance(data, list):
            return [Profile(self, c) for c in data]
        else:
            return Profile(self, data)
450745
private static String parseProfileName(String trimmedLine) {
        if (trimmedLine.startsWith("[") && trimmedLine.endsWith("]")) {
            String profileName = trimmedLine.substring(1, trimmedLine.length() - 1);
            return profileName.trim();
        }
        return null;
    }
1038284
public List<Group> getGroupsInPathProfile(
        int profileId, int pathId) {
        ArrayList<Group> groupsInProfile = new ArrayList<Group>();
        ArrayList<Group> allGroups = new ArrayList<Group>(findAllGroups());
        int[] groupIds = Utils.arrayFromStringOfIntegers(getGroupIdsInPathProfile(profileId,
                                                                                  pathId));
        // get all the groups, then remove the ones != group ids, leaving us
        // with all the groups in the profile
        for (int j = 0; j < allGroups.size(); j++) {
            for (int i = 0; i < groupIds.length; i++) {
                if (allGroups.get(j).getId() == groupIds[i]) {
                    groupsInProfile.add(allGroups.get(j));
                }
            }
        }
        return groupsInProfile;
    }
999100
public Search name(@Nullable Predicate<String> nameMatches) {
        if (nameMatches != null)
            this.nameMatches = nameMatches;
        return this;
    }
386605
public static RDFFormat getJsonLdProfile(final IRI... profiles) {
        return of(mergeProfiles(profiles)).map(JSONLD_FORMATS::get).orElse(JSONLD_EXPAND_FLAT);
    }
1336977
public Governator addProfiles(String... profiles) {
        if (profiles != null) {
            this.profiles.addAll(Arrays.asList(profiles));
        }
        return this;
    }
483106
public static StringPrep getInstance(int profile) {
        if (profile < 0 || profile > MAX_PROFILE) {
            throw new IllegalArgumentException("Bad profile type");
        }

        StringPrep instance = null;

        // A StringPrep instance is immutable.  We use a single instance
        // per type and store it in the internal cache.
        synchronized (CACHE) {
            WeakReference<StringPrep> ref = CACHE[profile];
            if (ref != null) {
                instance = ref.get();
            }

            if (instance == null) {
                ByteBuffer bytes = ICUBinary.getRequiredData(PROFILE_NAMES[profile] + ".spp");
                if (bytes != null) {
                    try {
                        instance = new StringPrep(bytes);
                    } catch (IOException e) {
                        throw new ICUUncheckedIOException(e);
                    }
                }
                if (instance != null) {
                    CACHE[profile] = new WeakReference<StringPrep>(instance);
                }
            }            
        }
        return instance;
    }
836631
public static Profile createProfile(Connection<?> connection) {
        Profile profile = new Profile();
        UserProfile providerProfile = connection.fetchUserProfile();

        String email = providerProfile.getEmail();
        if (StringUtils.isEmpty(email)) {
            throw new IllegalStateException("No email included in provider profile");
        }

        String username = providerProfile.getUsername();
        if (StringUtils.isEmpty(username)) {
            username = email;
        }

        String firstName = providerProfile.getFirstName();
        String lastName = providerProfile.getLastName();
        String displayName;

        if (StringUtils.isNotEmpty(connection.getDisplayName())) {
            displayName = connection.getDisplayName();
        } else {
            displayName = firstName + " " + lastName;
        }

        profile.setUsername(username);
        profile.setEmail(email);
        profile.setAttribute(FIRST_NAME_ATTRIBUTE_NAME, firstName);
        profile.setAttribute(LAST_NAME_ATTRIBUTE_NAME, lastName);
        profile.setAttribute(DISPLAY_NAME_ATTRIBUTE_NAME, displayName);

        if (StringUtils.isNotEmpty(connection.getImageUrl())) {
            profile.setAttribute(AVATAR_LINK_ATTRIBUTE_NAME, connection.getImageUrl());
        }

        return profile;
    }
1142346
public static IRI getProfile(final List<MediaType> acceptableTypes, final RDFSyntax syntax) {
        for (final MediaType type : acceptableTypes) {
            if (RDFSyntax.byMediaType(type.toString()).filter(syntax::equals).isPresent() &&
                    type.getParameters().containsKey("profile")) {
                return rdf.createIRI(type.getParameters().get("profile").split(" ")[0].trim());
            }
        }
        return null;
    }