Class ResourceReference

    • Method Detail

      • setTyped

        public void setTyped​(boolean typed)
        typed - see isTyped()
      • isTyped

        public boolean isTyped()
        true if the resource type has been explicitly provided (eg in XWiki Syntax 2.1 if the reference is prefixed with the resource type followed by ":" and then the rest of the reference)
      • setReference

        public void setReference​(String reference)
        reference - see getReference()
      • getReference

        public String getReference()
        the reference pointed to by this resource. For example a reference can be a document's name (which depends on the wiki, for example for XWiki the format is ""), a URI (for example:, a URL, an Inter Wiki reference, etc
        See Also:
      • addBaseReference

        public void addBaseReference​(String baseReference)
        baseReference - see getBaseReferences()
      • getBaseReferences

        public List<String> getBaseReferences()
        the base references to use when we need to compute an absolute reference and getReference() returns a non absolute reference, can be null. When resolving references the list should be evaluated from first to last (the last entries qualifying the entries earlier in the list)
      • setType

        public void setType​(ResourceType type)
        type - the type of the resource
        See Also:
      • getParameter

        public String getParameter​(String name)
        In order for Resource references to be extensible we allow for extra parameters in addition to the Resource reference. For example this is used in Document Resource References for storing the query string and anchor information, and in InterWiki Resource References to store the InterWiki Alias. Note that supported parameters depend on the Renderer that will be used (i.e. it depends on the target Syntax). For example the XWiki Syntax 2.1 only supports "queryString" and "anchor".
        name - the name of the parameter to get
        the parameter value or null if no such parameter exist
      • getParameters

        public Map<String,​String> getParameters()
        the collections of parameters, see getParameter(String). Returns parameters in the same order they were added.
      • toString

        public String toString()

        The output is syntax independent since this class is used for all syntaxes. Specific syntaxes should extend this class and override this method to perform syntax-dependent formatting.

        toString in class Object
        See Also:
      • hashCode

        public int hashCode()
        hashCode in class Object