Class ResearchObjectProfile

  • All Implemented Interfaces:
    java.io.Serializable

    @Entity
    public class ResearchObjectProfile
    extends java.lang.Object
    implements java.io.Serializable
    A representation of a RO profile. Consists of a name (used as the key for lookups) and a JSON schema.
    See Also:
    Serialized Form
    • Constructor Detail

      • ResearchObjectProfile

        public ResearchObjectProfile()
      • ResearchObjectProfile

        public ResearchObjectProfile​(java.lang.String name,
                                     java.lang.String schemaPath)
        Parameters:
        name - The unique name of the profile.
        schemaPath - A path to the JSON schema.
    • Method Detail

      • getId

        public long getId()
      • getName

        public java.lang.String getName()
      • getTemplate

        public com.fasterxml.jackson.databind.node.ObjectNode getTemplate()
        Get a skeleton JSON object, to be applied to new Research Objects that use this profile.
        Returns:
        The template JSON object.
      • getFields

        public java.lang.String[] getFields()
        Returns:
        An array of top-level field names for this profile.
      • hasField

        public boolean hasField​(java.lang.String field)
        Is the given field a valid field for this profile?
        Parameters:
        field - The field name.
        Returns:
      • canAppend

        public boolean canAppend​(java.lang.String field)
        Can this field have values appended to it? (is it a list?)
        Parameters:
        field - The name of the field.
        Returns:
      • getSchemaPath

        public java.lang.String getSchemaPath()