Interface IRIDecoder

  • All Known Implementing Classes:
    DefaultIRIDecoder

    public interface IRIDecoder
    An IRI encoder / decoder. It maintains a set of prexifes and allows converting an IRI to its prefixed form and back to full form.
    Author:
    burgetr
    • Method Detail

      • encodeIri

        String encodeIri​(org.eclipse.rdf4j.model.IRI iri)
        Converts an IRI to its prefixed string.
        Parameters:
        iri - the IRI to encode
        Returns:
        the prefixed IRI string
      • decodeIri

        org.eclipse.rdf4j.model.IRI decodeIri​(String shortIri)
                                       throws IllegalArgumentException
        Converts a prefixed string to an IRI.
        Parameters:
        shortIri - the prefixed IRI string.
        Returns:
        the decoded IRI
        Throws:
        IllegalArgumentException - when the given IRI could not be decoded (has an invalid format)
      • getPrefixUris

        Map<String,​String> getPrefixUris()
        Gets a map that assigns uris to known prefix names.
        Returns:
        the map prefix name to URI prefix
      • declarePrefixes

        String declarePrefixes()
        Generates a prefix declaration string (e.g. for SPARQL) containing the currenly known prefixes.
        Returns:
        the prefix declaration string