Class LinkingType


  • public class LinkingType
    extends Object
    Either an OSLC domain or LinkType for linking two application's artifacts.
    Since:
    3.1.0
    • Method Detail

      • of

        public static LinkingType of​(URI uri,
                                     com.sodius.oslc.server.process.internal.LinkingArtifact artifact,
                                     HttpServletRequest request)
        Builds an instance given the linking URI and HTTP request.
        Parameters:
        uri - the linking URI.
        artifact - the linking artifact.
        request - the current HTTP request.
        Returns:
        the corresponding instance.
        Throws:
        NullPointerException - if either uri or request is null.
        OslcWebApplicationException - if uri is an unknown OSLC domain and an unknown LinkType.
        Since:
        3.5.0
      • getUri

        public URI getUri()
        Gets the URI of the linking type.
        Returns:
        the linking type URI.
      • getTitle

        public String getTitle()
        Gets the linking type title.
        Returns:
        the linking type title.
        Since:
        3.5.0
      • getLinkType

        public Optional<LinkType> getLinkType()
        Gets the underlying link type, if any.
        Returns:
        the underlying link type.
      • getTargetDomain

        public URI getTargetDomain()
        Gets the target domain of this instance.
        Returns:
        the target domain URI.
      • filter

        public void filter​(OslcCore.Finder<Dialog> filter)
        Appends the target range of this instance to an OSLC dialog filter.
        Parameters:
        filter - the OSLC dialog filter.
      • matches

        public boolean matches​(com.sodius.oslc.server.process.internal.LinkingResource linkingResource)
        Determines whether this linking type matches a linking resource.
        Parameters:
        linkingResource - the linking resource.
        Returns:
        true if range of this instance matches the linking resource type; false otherwise.
        Since:
        3.5.0
      • matches

        public boolean matches​(LinkType linkType)
        Determines whether this linking type matches a LinkType.
        Parameters:
        linkType - the given link type.
        Returns:
        true if the linkType matches this linking type; false otherwise.
      • matches

        public boolean matches​(LinkType linkType)
        Determines whether this linking type matches a LinkType.
        Parameters:
        linkType - the given link type.
        Returns:
        true if the linkType matches this linking type; false otherwise.
      • corresponds

        public boolean corresponds​(ProjectAreaAssociation association)
        Determines whether this linking type corresponds to a given ProjectAreaAssociation.
        Parameters:
        association - the given association.
        Returns:
        true if this linking type corresponds to the association; false otherwise.
        Since:
        3.3.0