HtmlAttributeDesc (JHOVE Documentation)
Date: 2013-09-08

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.harvard.hul.ois.jhove.module.html
Class HtmlAttributeDesc

    java.lang.Object
      edu.harvard.hul.ois.jhove.module.html.HtmlAttributeDesc

    public class HtmlAttributeDesc

extends java.lang.Object

Class representing an abstract attribute of an HTML element.

Author:
  Gary McGath

Field Summary
`static int` | `CONREF` Permitted values for _kind
`static int` | `CURRENT` Permitted values for _kind
`static int` | `IMPLIED` Permitted values for _kind
`static int` | `OTHER` Permitted values for _kind
`static int` | `REQUIRED` Permitted values for _kind

Constructor Summary
`HtmlAttributeDesc(java.lang.String name)` Constructor for an attribute that can take any value, with kind defaulting to IMPLIED.
`HtmlAttributeDesc(java.lang.String name, java.lang.String[] permittedValues, int kind)` Constructor.

Method Summary
`java.lang.String` | `getName()` Returns the attribute's name.
`boolean` | `isRequired()` Return `true` if the attribute is required.
`boolean` | `nameMatches(java.lang.String name)` Returns `true` if this tag's name matches the parameter.
`boolean` | `valueOK(java.lang.String name, java.lang.String value)` Returns `true` if the parameter is a permissible value for the attribute.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### REQUIRED

    public static final int REQUIRED

  Permitted values for _kind

  See Also:
    Constant Field Values

### CURRENT

    public static final int CURRENT

  Permitted values for _kind

  See Also:
    Constant Field Values

### CONREF

    public static final int CONREF

  Permitted values for _kind

  See Also:
    Constant Field Values

### IMPLIED

    public static final int IMPLIED

  Permitted values for _kind

  See Also:
    Constant Field Values

### OTHER

    public static final int OTHER

  Permitted values for _kind

  See Also:
    Constant Field Values

Constructor Detail

### HtmlAttributeDesc

    public HtmlAttributeDesc(java.lang.String name,
                             java.lang.String[] permittedValues,
                             int kind)

  Constructor.

  Parameters:
    `name` - The name of the attribute. Must be lower case.
    `permittedValues` - Specific values allowed for the parameter. If null, then any CDATA value is allowed.
    `kind` - The kind of parameter. Must be REQUIRED, CURRENT, CONREF, or IMPLIED.

### HtmlAttributeDesc

    public HtmlAttributeDesc(java.lang.String name)

  Constructor for an attribute that can take any value, with kind defaulting to IMPLIED.

Method Detail

### getName

    public java.lang.String getName()

  Returns the attribute's name.

### nameMatches

    public boolean nameMatches(java.lang.String name)

  Returns `true` if this tag's name matches the parameter.

### valueOK

    public boolean valueOK(java.lang.String name,
                           java.lang.String value)

  Returns `true` if the parameter is a permissible value for the attribute.

### isRequired

    public boolean isRequired()

  Return `true` if the attribute is required.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD