Class LinkIndexQuery

    • Constructor Detail

      • LinkIndexQuery

        public LinkIndexQuery()
      • LinkIndexQuery

        public LinkIndexQuery​(Collection<URI> targetURLs,
                              Collection<URI> linkTypes,
                              URI gcURL)
        Creates a new LinkIndexQuery instance.
        Parameters:
        targetURLs - only query the indexed links whose target matches one of these
        linkTypes - only query the indexed links whose type matches one of these
        gcURL - only query the links that were indexed with this global configuration
    • Method Detail

      • create

        public static Collection<LinkIndexQuery> create​(Collection<Friend> friends,
                                                        ProjectAreaAssociations projectAreaAssociations,
                                                        URI resource,
                                                        URI resourceType,
                                                        URI gcURL)
        A utility method that creates link index queries from the given parameters.

        Not all of the given project area associations will result in a link index query:

        • at most one link index query will be created per application
        • the associations are only retained if their back association provides outgoing link types that target the given resource type
        • the retained associations must have a matching friend application

        The resulting link index queries contain the rootServices property of a matching friend, so that the caller is able to easily use ExecuteLinkIndexQuery.create(OslcClient, LinkIndexQuery) for each returned link index query afterwards.

        Parameters:
        friends - the local application's friends
        projectAreaAssociations - the local application's project area associations
        resource - the created link index queries will only query the links that target this resource
        resourceType - the given resource's type (used to filter the link types range)
        gcURL - the created link index queries will only query the links that were indexed with this global configuration
        Returns:
        the link index query that are made available by the given project area associations
      • getTargetURLs

        @OslcPropertyDefinition("http://www.sodius.com/ns/process/links#targetURLs")
        public Collection<URI> getTargetURLs()
        Get the target URLs. Only query the indexed links whose target matches one of these.
        Returns:
        the target URLs
      • setTargetURLs

        public void setTargetURLs​(Collection<URI> targetURLs)
        Set the target URLs. Only query the indexed links whose target matches one of these.
        Parameters:
        targetURLs - the target URLs
      • getLinkTypes

        @OslcPropertyDefinition("http://www.sodius.com/ns/process/links#linkTypes")
        public Collection<URI> getLinkTypes()
        Get the link types. Only query the indexed links whose type matches one of these.
        Returns:
        the link types
      • setLinkTypes

        public void setLinkTypes​(Collection<URI> linkTypes)
        Set the link types. Only query the indexed links whose type matches one of these.
        Parameters:
        linkTypes - the link types
      • getGcURL

        @OslcPropertyDefinition("http://www.sodius.com/ns/process/links#gcURL")
        public URI getGcURL()
        Get the global configuration URL. Only query the links that were indexed with this configuration.
        Returns:
        the global configuration URL
      • setGcURL

        public void setGcURL​(URI gcURL)
        Set the global configuration URL. Only query the links that were indexed with this configuration.
        Parameters:
        gcURL - the global configuration URL
      • setRootServices

        public void setRootServices​(URI rootServices)
        Set the root services URL. This is an optional property that should only be present if the link index query URL is not known, so that it can be discovered with ExecuteLinkIndexQuery.create(OslcClient, LinkIndexQuery).
        Parameters:
        rootServices - the root services URL