Enum Encodings

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Encodings>

    public enum Encodings
    extends java.lang.Enum<Encodings>
    Common Reference encodings.
    Author:
    Bogdan Horje
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      HASH
      A hash based condensed Reference string representation.
      PLAIN
      Reference string encoding that parses and produces reference string representations that conform to the following grammar :
      ZERO
      A condensed Reference string representation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Encoding fromToken​(java.lang.Character token)  
      static Encodings valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Encodings[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • PLAIN

        public static final Encodings PLAIN
        Reference string encoding that parses and produces reference string representations that conform to the following grammar :
          reference            := protocol':'resource[':'parameters]
          protocol             := 'virtual'|'node'|'template'
          resource             := repositoryResource | classpathResource
          repositoryResource   := 'repository'':'repositoryLocation
          repositoryLocation   := ('path'':'path)|('node'':'nodeRef)
          classpathResource    := 'classpath'':'path
          path                 := string
          parameters           := parameter[':'parameters]
          parameter            := referenceParameter | integerParameter | stringParameter
          referenceParameter   := 'ref'':'reference 
          resourceParameter    := 'r'':'resource
          integerParameter     := 'i'':'integer
          stringParameter      := 's'':'string
         
         Examples (syntax is correct, but not the semantic):  
          
         virtual:classpath:/org/alfresco/
         virtual:classpath:/org/alfresco/:r:repository:node:workspace:SpacesStore:0029-222-333-444
         virtual:classpath:/org/alfresco/:r:repository:node:workspace:SpacesStore:0029-222-333-444:r:repository:path:/Data Dictionary/Virtual Folders/claim.json
         node:repository:node:workspace:SpacesStore:0029-222-333-444:r:virtual:repository:node:workspace:SpacesStore:0029-122-333-0023
         
      • HASH

        public static final Encodings HASH
        A hash based condensed Reference string representation.
    • Field Detail

      • encoding

        public final Encoding encoding
    • Method Detail

      • values

        public static Encodings[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Encodings c : Encodings.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Encodings valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • fromToken

        public static Encoding fromToken​(java.lang.Character token)