Class TdbFieldDesign

  • All Implemented Interfaces:
    com.tietoenator.trip.jxp.internal.utils.DOMSink, java.lang.Comparable<TdbFieldDesign>

    public class TdbFieldDesign
    extends java.lang.Object
    implements com.tietoenator.trip.jxp.internal.utils.DOMSink, java.lang.Comparable<TdbFieldDesign>
    Container and logic relating to a specific field within a database design
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clear the contents of the field design, reset all values to their default state.
      int compareTo​(TdbFieldDesign field)
      Order this object with relation to another -- required to be able to sort a collection of these objects.
      void copyFrom​(TdbFieldDesign src)
      Initialize this instance from the source provided
      boolean equals​(java.lang.Object o)
      Compares to another object; equality is defined by field number only
      java.lang.String getCopyrightHolderField()
      Retrieve the name of the field in which the name or identifier of the copyright holder of the information contained within this field can be found.
      int getCost()
      Retrieve the field's cost, that is the unit cost that is reported in the server's debit logfile every time a user views the content of the field.
      TdbDefaultFunction getDefaultFunction()
      Retrieve the function id that will be run to create default field content if no other values are provided.
      java.lang.String getDefaultValue()
      Retrieve the value that is applied to the field if no other values are provided.
      java.lang.String getDescription()
      Retrieve any comment or description associated with the field design
      java.lang.String getIndexAse()
      Retrieve the name of an ASE function called when scanning terms in this field during indexing.
      int getIndexMode()
      Retrieve the index mode of the field.
      java.lang.String getLoadAse()
      Retrieve the name of an ASE function called when storing values in this field using the TFORM load utility (BAFFIT)
      int getMaxItems()
      Retrieve the maximum number of items (subfields / paragraphs) that the field can validly contain.
      int getMinItems()
      Retrieve the minimum number of items (subfields / paragraphs) that the field can validly contain.
      java.lang.String getName()
      Retrieve the name of the field
      int getNumber()
      Retrieve the field's unique ID
      java.lang.String getRestriction()
      Retrieve any restriction value associated with the field.
      java.lang.String getType()
      Retrieve the type of the field, e.g.
      TdbFieldType getTypeId()
      Retrieve the type of the field as an ID, therefore dialect-indepedent
      boolean getUsesPattern()
      Check if this field's data restrictions are to be evaluated as a pattern (a regular expression).
      boolean getUsesReference()
      Check if this field's data restrictions are to be interpreted as a reference to a field in another database.
      boolean isFieldIndexed()
      Check if the index for this field should be constructed and stored separately from that for other fields within the database.
      boolean isIncludedInTextProcessing()
      Check if this field is included in non-Boolean text processing, e.g. similarity searching, classification, summarization, etc.
      boolean isIndexed()
      Check if this field is indexed in any way.
      boolean isOriginalLayout()
      Check if the field is stored in original layout, or if TRIP will compress white space when storing field values.
      boolean isPartField()
      Check if this field is a member of the part record structure
      boolean isPartNameField()
      Check if this field is the part record name field
      boolean isRecordNameField()
      Check if this field is the record name field, i.e. the record's primary key
      boolean isRecordNumberField()
      Check if this field is the record number field
      boolean isUnique()
      Check if field values are to be validated for uniqueness.
      boolean isWordIndexed()
      Check if the index for this (PHrase-only) field should consist of the phrase and its constituent words (false), or whether only the constituent words (true) should be indexed and not the containing phrase.
      void setCopyrightHolderField​(java.lang.String name)
      Establish the name of the field in which the name or identifier of the copyright holder of the information contained within this field can be found.
      void setCost​(int cost)
      Establish the field's cost, that is the unit cost that is reported in the server's debit logfile every time a user views the content of the field.
      void setDefaultFunction​(TdbDefaultFunction func)
      Establish the function id that will be run to create default field content if no other values are provided.
      void setDefaultValue​(java.lang.String value)
      Establish the value that is to be applied to the field if no other values are provided.
      void setDescription​(java.lang.String comment)
      Establish a comment or description to be associated with the field design
      void setFieldIndexed​(boolean mode)
      Establish whether the index for this field should be constructed and stored separately from that for other fields within the database.
      void setIncludedInTextProcessing​(boolean mode)
      Establish whether this field is to be included in non-Boolean text processing, e.g. similarity searching, classification, summarization, etc.
      void setIndexAse​(java.lang.String ase)
      Establish the name of an ASE function to be called when scanning terms in this field during indexing.
      void setIndexed​(boolean mode)
      Establish whether this field is indexed in any way.
      void setIndexMode​(int mode)
      Establish the index mode of the field.
      void setLoadAse​(java.lang.String ase)
      Establish the name of an ASE function to be called when storing values in this field using the TFORM load utility (BAFFIT)
      void setMaxItems​(int items)
      Establish the maximum number of items (subfields / paragraphs) that the field can validly contain.
      void setMinItems​(int items)
      Establish the minimum number of items (subfields / paragraphs) that the field can validly contain.
      void setName​(java.lang.String name)
      Establish the name of the field
      void setNumber​(int nr)
      Assign the field's unique ID.
      void setOriginalLayout​(boolean layout)
      Establish whether the field is to be stored in original layout, or if TRIP should compress white space when storing field values.
      void setPartField​(boolean flag)
      Establish this field as belonging to the part record structure
      void setPartNameField​(boolean flag)
      Establish whether this field is the part record name field
      void setRecordNameField​(boolean flag)
      Establish whether this field is the record name field, i.e. the record's primary key
      void setRecordNumberField​(boolean flag)
      Establish whether this field is the record number field
      void setRestriction​(java.lang.String value)
      Establish a restriction value associated with the field.
      void setType​(java.lang.String type)
      Establish the type of the field, e.g.
      void setTypeId​(TdbFieldType typeId)
      Set the type of the field.
      void setUnique​(boolean unique)
      Establish whether field values are to be validated for uniqueness.
      void setUsesPattern​(boolean flag)
      Establish whether this field's data restrictions are to be evaluated as a pattern (a regular expression).
      void setUsesReference​(boolean flag)
      Establish whether this field's data restrictions are to be interpreted as a reference to a field in another database.
      void setWordIndexed​(boolean mode)
      Establish whether the index for this (PHrase-only) field should consist of the phrase and its constituent words (false), or whether only the constituent words (true) should be indexed and not the containing phrase.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TdbFieldDesign

        public TdbFieldDesign()
        Constructor, creates a blank field design
      • TdbFieldDesign

        public TdbFieldDesign​(TdbFieldDesign src)
        Copy constructor
        Parameters:
        src - Copy source
    • Method Detail

      • getName

        public java.lang.String getName()
        Retrieve the name of the field
        Returns:
        Field name
      • setName

        public void setName​(java.lang.String name)
        Establish the name of the field
        Parameters:
        name - Field name
      • getType

        public java.lang.String getType()
        Retrieve the type of the field, e.g. PHrase, TExt, etc.
        Returns:
        Field type
      • setType

        public void setType​(java.lang.String type)
        Establish the type of the field, e.g. PHrase, TExt, etc.
        Parameters:
        type - Field type
      • getCopyrightHolderField

        public java.lang.String getCopyrightHolderField()
        Retrieve the name of the field in which the name or identifier of the copyright holder of the information contained within this field can be found.
        Returns:
        Copyright holder field, if any
      • setCopyrightHolderField

        public void setCopyrightHolderField​(java.lang.String name)
        Establish the name of the field in which the name or identifier of the copyright holder of the information contained within this field can be found.
        Parameters:
        name - Copyright holder field
      • getDescription

        public java.lang.String getDescription()
        Retrieve any comment or description associated with the field design
        Returns:
        Field comment, if any
      • setDescription

        public void setDescription​(java.lang.String comment)
        Establish a comment or description to be associated with the field design
        Parameters:
        comment - Field comment
      • getRestriction

        public java.lang.String getRestriction()
        Retrieve any restriction value associated with the field. This value is either a simple list of valid values that the field may take, or an argument for a specific type of restriction, see getUsesPattern and getUsesReference.
        Returns:
        Restriction value, if any
      • setRestriction

        public void setRestriction​(java.lang.String value)
        Establish a restriction value associated with the field. This value is either a simple list of valid values that the field may take, or an argument for a specific type of restriction, see getUsesPattern and getUsesReference.
        Parameters:
        value - Restriction value
      • getUsesPattern

        public boolean getUsesPattern()
        Check if this field's data restrictions are to be evaluated as a pattern (a regular expression). If this value is true, the string returned by the method getRestriction is the pattern to which field values must conform.
        Returns:
        true if field values must conform to a pattern
      • setUsesPattern

        public void setUsesPattern​(boolean flag)
        Establish whether this field's data restrictions are to be evaluated as a pattern (a regular expression). If this value is true, the string set by the method setRestriction is the pattern to which field values must conform.
        Parameters:
        flag - true if field values must conform to a pattern
      • getUsesReference

        public boolean getUsesReference()
        Check if this field's data restrictions are to be interpreted as a reference to a field in another database. If this value is true, the string returned by the method getRestriction is the name of the database and field (using the normal "Database.Field" syntax) where the list of valid values for this field can be found
        Returns:
        true if field values must conform to values in another database
      • setUsesReference

        public void setUsesReference​(boolean flag)
        Establish whether this field's data restrictions are to be interpreted as a reference to a field in another database. If this value is true, the string set by the method setRestriction is the name of the database and field (using the normal "Database.Field" syntax) where the list of valid values for this field can be found
        Parameters:
        flag - true if field values must conform to values in another database
      • getLoadAse

        public java.lang.String getLoadAse()
        Retrieve the name of an ASE function called when storing values in this field using the TFORM load utility (BAFFIT)
        Returns:
        Load ASE name, if any
      • setLoadAse

        public void setLoadAse​(java.lang.String ase)
        Establish the name of an ASE function to be called when storing values in this field using the TFORM load utility (BAFFIT)
        Parameters:
        ase - Load ASE name
      • getIndexAse

        public java.lang.String getIndexAse()
        Retrieve the name of an ASE function called when scanning terms in this field during indexing.
        Returns:
        Index ASE name, if any
      • setIndexAse

        public void setIndexAse​(java.lang.String ase)
        Establish the name of an ASE function to be called when scanning terms in this field during indexing.
        Parameters:
        ase - Index ASE name
      • getDefaultValue

        public java.lang.String getDefaultValue()
        Retrieve the value that is applied to the field if no other values are provided. See getDefaultFunction for more flexibility.
        Returns:
        Default field value, if any
      • setDefaultValue

        public void setDefaultValue​(java.lang.String value)
        Establish the value that is to be applied to the field if no other values are provided. See getDefaultFunction for more flexibility.
        Parameters:
        value - Default field value
      • getDefaultFunction

        public TdbDefaultFunction getDefaultFunction()
        Retrieve the function id that will be run to create default field content if no other values are provided.
        Returns:
        Default field function, if any
      • setDefaultFunction

        public void setDefaultFunction​(TdbDefaultFunction func)
        Establish the function id that will be run to create default field content if no other values are provided.
        Parameters:
        func - Default field function
      • isOriginalLayout

        public boolean isOriginalLayout()
        Check if the field is stored in original layout, or if TRIP will compress white space when storing field values. Only relevant to TExt fields.
        Returns:
        true if the field is to be compressed.
      • setOriginalLayout

        public void setOriginalLayout​(boolean layout)
        Establish whether the field is to be stored in original layout, or if TRIP should compress white space when storing field values. Only relevant to TExt fields.
        Parameters:
        layout - true if the field is to be compressed.
      • isUnique

        public boolean isUnique()
        Check if field values are to be validated for uniqueness.
        Returns:
        true if field values must be unique
      • setUnique

        public void setUnique​(boolean unique)
        Establish whether field values are to be validated for uniqueness.
        Parameters:
        unique - true if field values must be unique
      • isRecordNameField

        public boolean isRecordNameField()
        Check if this field is the record name field, i.e. the record's primary key
        Returns:
        true if the field is the record name field
      • setRecordNameField

        public void setRecordNameField​(boolean flag)
        Establish whether this field is the record name field, i.e. the record's primary key
        Parameters:
        flag - true if the field is the record name field
      • isRecordNumberField

        public boolean isRecordNumberField()
        Check if this field is the record number field
        Returns:
        true if the field is the record number field
      • setRecordNumberField

        public void setRecordNumberField​(boolean flag)
        Establish whether this field is the record number field
        Parameters:
        flag - true if the field is the record number field
      • isPartNameField

        public boolean isPartNameField()
        Check if this field is the part record name field
        Returns:
        true if the field is the part record name field
      • setPartNameField

        public void setPartNameField​(boolean flag)
        Establish whether this field is the part record name field
        Parameters:
        flag - true if the field is the part record name field
      • isPartField

        public boolean isPartField()
        Check if this field is a member of the part record structure
        Returns:
        true if this field is in the part record structure
      • setPartField

        public void setPartField​(boolean flag)
        Establish this field as belonging to the part record structure
        Parameters:
        flag - true if this field is to be in the part record structure
      • getTypeId

        public TdbFieldType getTypeId()
        Retrieve the type of the field as an ID, therefore dialect-indepedent
        Returns:
        Field type ID
      • setTypeId

        public void setTypeId​(TdbFieldType typeId)
        Set the type of the field.
        Parameters:
        typeId - A TdbFieldType enum indicating the field type.
      • isIndexed

        public boolean isIndexed()
        Check if this field is indexed in any way.
        Returns:
        true if the field is included in the index in some form
      • setIndexed

        public void setIndexed​(boolean mode)
        Establish whether this field is indexed in any way.
        Parameters:
        mode - If this value is false, all indexing flags are removed for the field; if true, the field is enabled for indexing and the type of indexing can be further modified using other index-related methods.
      • isFieldIndexed

        public boolean isFieldIndexed()
        Check if the index for this field should be constructed and stored separately from that for other fields within the database. This can help performance in certain circumstances, such as for code fields that store very commonly occuring terms as abbreviations, for example stock symbols, etc.
        Returns:
        true if the field is setup for separate field-level indexing
      • setFieldIndexed

        public void setFieldIndexed​(boolean mode)
        Establish whether the index for this field should be constructed and stored separately from that for other fields within the database. This can help performance in certain circumstances, such as for code fields that store very commonly occuring terms as abbreviations, for example stock symbols, etc.
        Parameters:
        mode - true if the field is to be setup for separate field-level indexing
      • isWordIndexed

        public boolean isWordIndexed()
        Check if the index for this (PHrase-only) field should consist of the phrase and its constituent words (false), or whether only the constituent words (true) should be indexed and not the containing phrase. This is intended as a storage performance optimization for PHrase fields that contain single words.
        Returns:
        true if the PHrase field is setup for word-level indexing
      • setWordIndexed

        public void setWordIndexed​(boolean mode)
        Establish whether the index for this (PHrase-only) field should consist of the phrase and its constituent words (false), or whether only the constituent words (true) should be indexed and not the containing phrase. This is intended as a storage performance optimization for PHrase fields that contain single words.
        Parameters:
        mode - true if the PHrase field is setup for word-level indexing
      • isIncludedInTextProcessing

        public boolean isIncludedInTextProcessing()
        Check if this field is included in non-Boolean text processing, e.g. similarity searching, classification, summarization, etc.
        Returns:
        true if the field is included in text processing (TExt and PHrase only)
      • setIncludedInTextProcessing

        public void setIncludedInTextProcessing​(boolean mode)
        Establish whether this field is to be included in non-Boolean text processing, e.g. similarity searching, classification, summarization, etc.
        Parameters:
        mode - true if the field is included in text processing (TExt and PHrase only)
      • getNumber

        public int getNumber()
        Retrieve the field's unique ID
        Returns:
        Field number
      • setNumber

        public void setNumber​(int nr)
        Assign the field's unique ID.
        Parameters:
        nr - Field number Please note that a field's number is set by the server and can't be modified meaningfully.
      • getCost

        public int getCost()
        Retrieve the field's cost, that is the unit cost that is reported in the server's debit logfile every time a user views the content of the field.
        Returns:
        Unit cost
      • setCost

        public void setCost​(int cost)
        Establish the field's cost, that is the unit cost that is reported in the server's debit logfile every time a user views the content of the field.
        Parameters:
        cost - Unit cost
      • getMinItems

        public int getMinItems()
        Retrieve the minimum number of items (subfields / paragraphs) that the field can validly contain.
        Returns:
        Minimum acceptable items
      • setMinItems

        public void setMinItems​(int items)
        Establish the minimum number of items (subfields / paragraphs) that the field can validly contain.
        Parameters:
        items - Minimum acceptable items
      • getMaxItems

        public int getMaxItems()
        Retrieve the maximum number of items (subfields / paragraphs) that the field can validly contain.
        Returns:
        Maximum acceptable items
      • setMaxItems

        public void setMaxItems​(int items)
        Establish the maximum number of items (subfields / paragraphs) that the field can validly contain.
        Parameters:
        items - Maximum acceptable items
      • copyFrom

        public void copyFrom​(TdbFieldDesign src)
        Initialize this instance from the source provided
        Parameters:
        src - Source from which to copy
      • clear

        public void clear()
        Clear the contents of the field design, reset all values to their default state.
      • equals

        public boolean equals​(java.lang.Object o)
        Compares to another object; equality is defined by field number only
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - Object with which to compare
        Returns:
        true if field numbers match
      • compareTo

        public int compareTo​(TdbFieldDesign field)
        Order this object with relation to another -- required to be able to sort a collection of these objects.
        Specified by:
        compareTo in interface java.lang.Comparable<TdbFieldDesign>
        Parameters:
        field - The field to compare to the current; ordering is performed using the field number only
        Returns:
        -1 if this field's number is lower than that on the provided object; +1 if this field's number is higher than that on the provided object; 0 if the field numbers are the same