Class KeyDefinitionInfo

java.lang.Object
ro.sync.exml.workspace.api.editor.page.ditamap.keys.KeyDefinitionInfo

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

    • NAME

      public static final String NAME
      The key name.
      See Also:
    • HREF

      public static final 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:
    • DESCRIPTION

      public static final 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:
    • DEFINITION_LOCATION

      public static final 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:
    • META_CONTENT_PROVIDER

      public static final 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:
    • IS_SUBJECT_DEF

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

      public static final String SUBJECT_DEF_CHILDREN
      A list of child <subjectdef> KeyDefinitionInfo children.
      See Also:
  • Constructor Details

    • KeyDefinitionInfo

      public KeyDefinitionInfo()
  • Method Details

    • getProperty

      public Object getProperty(String propertyName)
      Get the value of a recognized property.
      Parameters:
      propertyName - The property name. One of the following constants:
      Returns:
      The property value or null if not available.
    • setProperty

      public void setProperty(String propertyName, 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:
      IllegalArgumentException - If the property name is not one of the constants in this class.
    • toString

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

      public void setAttribute(String attributeName, 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 Map<String,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