com.wutka.dtd

Class DTDCardinal

Implemented Interfaces:
DTDOutput

public class DTDCardinal
extends Object
implements DTDOutput

Represents the various cardinality values for a DTD item.
  • NONE indicates no cardinality
  • OPTIONAL indicates an optional value (specified by ?)
  • ZEROMANY indicates zero-to-many values (specified by *)
  • ONEMANY indicates an one-to-many values (specified by +)
  • Version:
    $Revision: 1.16 $ $Date: 2002/07/19 01:20:11 $ by $Author: wutka $
    Author:
    Mark Wutka

    Field Summary

    static DTDCardinal
    NONE
    Indicates no cardinality (implies a single object)
    static DTDCardinal
    ONEMANY
    Indicates that there can be one-to-many occurrances of an item
    static DTDCardinal
    OPTIONAL
    Indicates that an item is optional (zero-to-one)
    static DTDCardinal
    ZEROMANY
    Indicates that there can be zero-to-many occurrances of an item
    String
    name
    int
    type

    Constructor Summary

    DTDCardinal(int aType, String aName)

    Method Summary

    boolean
    equals(Object ob)
    void
    write(PrintWriter out)
    Writes the notation for this cardinality value

    Field Details

    NONE

    public static final DTDCardinal NONE
    Indicates no cardinality (implies a single object)

    ONEMANY

    public static final DTDCardinal ONEMANY
    Indicates that there can be one-to-many occurrances of an item

    OPTIONAL

    public static final DTDCardinal OPTIONAL
    Indicates that an item is optional (zero-to-one)

    ZEROMANY

    public static final DTDCardinal ZEROMANY
    Indicates that there can be zero-to-many occurrances of an item

    name

    public String name

    type

    public int type

    Constructor Details

    DTDCardinal

    public DTDCardinal(int aType,
                       String aName)

    Method Details

    equals

    public boolean equals(Object ob)

    write

    public void write(PrintWriter out)
                throws IOException
    Writes the notation for this cardinality value
    Specified by:
    write in interface DTDOutput

    Copyright (c) 2001 Mark Wutka.