Class KeyDefinitionInfo


  • @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public class KeyDefinitionInfo
    extends java.lang.Object
    Information about a key definition. This is filled on the API side.
    Since:
    14
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFINITION_LOCATION
      The location of the DITA Map where the key definition was defined.
      static java.lang.String DESCRIPTION
      This could be the navigation title on the topic ref which defines the key.
      static java.lang.String HREF
      The relative href value of the topic ref which defines the key.
      static java.lang.String IS_SUBJECT_DEF
      A boolean flag which defines whether or not this key definition corresponds to a <subjectdef> element
      static java.lang.String META_CONTENT_PROVIDER
      May return a MetaContentProvider implementation which returns the text which should appear on an element which has the keyref if the element has no content.
      static java.lang.String NAME
      The key name.
      static java.lang.String SUBJECT_DEF_CHILDREN
      A list of child <subjectdef> KeyDefinitionInfo children.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> getAttributes()
      Get the set of attributes which are defined or cascade to on the key definition.
      java.lang.Object getProperty​(java.lang.String propertyName)
      Get the value of a recognized property.
      void setAttribute​(java.lang.String attributeName, java.lang.String attributeValue)
      Set the value of an XML attribute which is defined on the key or cascades to it.
      void setProperty​(java.lang.String propertyName, java.lang.Object propertyValue)
      Get the value of a recognized property.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • HREF

        public static final java.lang.String HREF
        The relative href value of the topic ref which defines the key. Can be null. If the defined key points indirectly (using a keyref) to other definitions, it is the responsibility of the developer to set here the final href value. The absolute reference will be resolved based on the "DEFINITION_LOCATION" property which needs to be set in the KeyDefinitionInfo.
        See Also:
        Constant Field Values
      • DESCRIPTION

        public static final java.lang.String DESCRIPTION
        This could be the navigation title on the topic ref which defines the key. It is used for display purposes when a key reference is inserted. Can be null.
        See Also:
        Constant Field Values
      • DEFINITION_LOCATION

        public static final java.lang.String DEFINITION_LOCATION
        The location of the DITA Map where the key definition was defined. This must be given as an URL in the Oxygen standalone version. In the Oxygen plugin for Eclipse this can be also given as a native resource like IResource. The location is useful in order for Oxygen to determine the absolute location where the keyref is pointing. When the user clicks a keyref or a conkeyref in the Author page Oxygen has to open the target location corresponding to it.
        See Also:
        Constant Field Values
      • META_CONTENT_PROVIDER

        public static final java.lang.String META_CONTENT_PROVIDER
        May return a MetaContentProvider implementation which returns the text which should appear on an element which has the keyref if the element has no content. The provider is useful in order for Oxygen to show the static text in place in the Author page.
        See Also:
        Constant Field Values
      • IS_SUBJECT_DEF

        public static final java.lang.String IS_SUBJECT_DEF
        A boolean flag which defines whether or not this key definition corresponds to a <subjectdef> element
        See Also:
        Constant Field Values
      • SUBJECT_DEF_CHILDREN

        public static final java.lang.String SUBJECT_DEF_CHILDREN
        A list of child <subjectdef> KeyDefinitionInfo children.
        See Also:
        Constant Field Values
    • Constructor Detail

      • KeyDefinitionInfo

        public KeyDefinitionInfo()
    • Method Detail

      • setProperty

        public void setProperty​(java.lang.String propertyName,
                                java.lang.Object propertyValue)
        Get the value of a recognized property.
        Parameters:
        propertyName - The property name. One of the following constants:
        propertyValue - The value of the property.
        Throws:
        java.lang.IllegalArgumentException - If the property name is not one of the constants in this class.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • setAttribute

        public void setAttribute​(java.lang.String attributeName,
                                 java.lang.String attributeValue)
        Set the value of an XML attribute which is defined on the key or cascades to it. For example the application may use the "format" attribute to hide when inserting key references, key definitions which point to DITA resources.
        Parameters:
        attributeName - The attribute name.
        attributeValue - The value of the attribute.
        Since:
        18.1
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getAttributes()
        Get the set of attributes which are defined or cascade to on the key definition. Can be null
        Returns:
        Returns the set of attributes which are defined or cascade to on the key definition.
        Since:
        18.1