schema_salad.java_codegen
=========================

.. py:module:: schema_salad.java_codegen

.. autoapi-nested-parse::

   Java code generator for a given schema salad definition.



Attributes
----------

.. autoapisummary::

   schema_salad.java_codegen.USE_ONE_OR_LIST_OF_TYPES
   schema_salad.java_codegen.BASIC_JAVA_IDENTIFIER_RE
   schema_salad.java_codegen.prims


Classes
-------

.. autoapisummary::

   schema_salad.java_codegen.JavaCodeGen


Functions
---------

.. autoapisummary::

   schema_salad.java_codegen.doc_to_doc_string


Module Contents
---------------

.. py:data:: USE_ONE_OR_LIST_OF_TYPES
   :value: False


.. py:data:: BASIC_JAVA_IDENTIFIER_RE

.. py:function:: doc_to_doc_string(doc, indent_level = 0)

.. py:data:: prims

.. py:class:: JavaCodeGen(base, target, examples, package, copyright)

   Bases: :py:obj:`schema_salad.codegen_base.CodeGenBase`

   .. autoapi-inheritance-diagram:: schema_salad.java_codegen.JavaCodeGen
      :parts: 1


   Abstract base class for schema salad code generators.


   .. py:attribute:: base_uri


   .. py:attribute:: examples


   .. py:attribute:: package


   .. py:attribute:: artifact


   .. py:attribute:: copyright


   .. py:attribute:: target_dir


   .. py:attribute:: rel_package_dir


   .. py:attribute:: main_src_dir


   .. py:attribute:: test_src_dir


   .. py:attribute:: test_resources_dir


   .. py:method:: prologue()

      Trigger to generate the prolouge code.



   .. py:method:: property_name(name)
      :staticmethod:



   .. py:method:: safe_name(name)
      :staticmethod:


      Generate a safe version of the given name.



   .. py:method:: interface_name(n)


   .. py:method:: begin_class(classname, extends, doc, abstract, field_names, idfield, optional_fields)

      Produce the header for the given class.



   .. py:method:: end_class(classname, field_names)

      Finish this class.



   .. py:method:: type_loader(type_declaration, container = None, no_link_check = None)

      Parse the given type declaration and declare its components.



   .. py:method:: type_loader_enum(type_declaration)

      Build an enum type loader for the given declaration.



   .. py:method:: declare_field(name, fieldtype, doc, optional, subscope)

      Output the code to load the given field.



   .. py:method:: declare_id_field(name, fieldtype, doc, optional)

      Output the code to handle the given ID field.



   .. py:method:: uri_loader(inner, scoped_id, vocab_term, ref_scope, no_link_check = None)

      Construct the TypeDef for the given URI loader.



   .. py:method:: idmap_loader(field, inner, map_subject, map_predicate)

      Construct the TypeDef for the given mapped ID loader.



   .. py:method:: typedsl_loader(inner, ref_scope)

      Construct the TypeDef for the given DSL loader.



   .. py:method:: to_java(val)


   .. py:method:: epilogue(root_loader)

      Trigger to generate the epilouge code.



   .. py:method:: secondaryfilesdsl_loader(inner)

      Construct the TypeDef for secondary files.



