Class Translator.ScriptTranslator.AbstractTypeTranslator

    • Field Detail

      • withParameters

        protected final boolean withParameters
      • script

        protected final Script script
    • Constructor Detail

      • AbstractTypeTranslator

        protected AbstractTypeTranslator​(boolean withParameters)
    • Method Detail

      • getAnonymousTraversalPrefix

        protected String getAnonymousTraversalPrefix()
        Gets the syntax for the spawn of an anonymous traversal which is traditionally the double underscore.
      • getNullSyntax

        protected abstract String getNullSyntax()
        Gets the syntax for a null value as a string representation.
      • getSyntax

        protected abstract String getSyntax​(String o)
        Take the string argument and convert it to a string representation in the target language (i.e. escape, enclose in appropriate quotes, etc.)
      • getSyntax

        protected abstract String getSyntax​(Boolean o)
        Take the boolean argument and convert it to a string representation in the target language.
      • getSyntax

        protected abstract String getSyntax​(Date o)
        Take the Date argument and convert it to a string representation in the target language.
      • getSyntax

        protected abstract String getSyntax​(Timestamp o)
        Take the Timestamp argument and convert it to a string representation in the target language.
      • getSyntax

        protected abstract String getSyntax​(UUID o)
        Take the UUID argument and convert it to a string representation in the target language.
      • getSyntax

        protected abstract String getSyntax​(Lambda o)
        Take the Lambda argument and convert it to a string representation in the target language.
      • getSyntax

        protected abstract String getSyntax​(Pick o)
        Take the Pick argument and convert it to a string representation in the target language.
      • getSyntax

        protected abstract String getSyntax​(Number o)
        Take the numeric argument and convert it to a string representation in the target language. Languages that can discern differences in types of numbers will wish to further check the type of the Number instance itself (i.e. Double, Integer, etc.)
      • produceScript

        protected abstract Script produceScript​(Set<?> o)
        Take the Set and writes the syntax directly to the member script variable.
      • produceScript

        protected abstract Script produceScript​(List<?> o)
        Take the List and writes the syntax directly to the member script variable.
      • produceScript

        protected abstract Script produceScript​(Map<?,​?> o)
        Take the Map and writes the syntax directly to the member script variable.
      • produceScript

        protected abstract Script produceScript​(Class<?> o)
        Take the Class and writes the syntax directly to the member script variable.
      • produceScript

        protected abstract Script produceScript​(Enum<?> o)
        Take the Enum and writes the syntax directly to the member script variable.
      • produceScript

        protected abstract Script produceScript​(Vertex o)
        Take the Vertex and writes the syntax directly to the member script variable.
      • produceScript

        protected abstract Script produceScript​(Edge o)
        Take the Edge and writes the syntax directly to the member script variable.
      • produceScript

        protected abstract Script produceScript​(String traversalSource,
                                                Bytecode o)
        Take the Bytecode and writes the syntax directly to the member script variable.
      • produceScript

        protected abstract Script produceScript​(P<?> p)
        Take the P and writes the syntax directly to the member script variable. This implementation should also consider TextP.
      • convertToScript

        protected Script convertToScript​(Object object)
        For each operator argument, if withParameters set true, try parametrization as follows: ----------------------------------------------- if unpack, why ? ObjectType ----------------------------------------------- (Yes) Bytecode.Binding (Recursion, No) Bytecode (Recursion, No) Traversal (Yes) String (Recursion, No) Set (Recursion, No) List (Recursion, No) Map (Yes) Long (Yes) Double (Yes) Float (Yes) Integer (Yes) Timestamp (Yes) Date (Yes) Uuid (Recursion, No) P (Enumeration, No) SackFunctions.Barrier (Enumeration, No) VertexProperty.Cardinality (Enumeration, No) TraversalOptionParent.Pick (Enumeration, No) Enum (Recursion, No) Vertex (Recursion, No) Edge (Recursion, No) VertexProperty (Yes) Lambda (Recursion, No) TraversalStrategyProxy (Enumeration, No) TraversalStrategy (Yes) Other -------------------------------------------------
        Parameters:
        object -
        Returns:
        String Repres