Methods

Table 85 summarizes the methods of the ContentType class.

Table 85.

Member methods of the ContentType class
Member method Description Page
ContentType() Creates a content-type object. ContentType()
equals() Compares two content-type objects. equals()
from_int() Generates a content-type object for a specified ordinal value. from_int()
toString() Returns a literal representation of the current content-type object. toString()
value() Returns an ordinal value for the current content type. value()
xmlObject() Generates an XML object that represents the current content-type object. xmlObject()

ContentType()

Creates a content-type object.

Syntax

public ContentType(int contTypeOrdValue);

Parameters

contTypeOrdValue
Is the ordinal value that represents the content type.

Return values

A newly instantiated ContentType object.

equals()

Compares two content-type objects.

Syntax

public boolean equals(Object contentTypeObj);

Parameters

contentTypeObj
Is a reference to the ContentType object to compare with the current ContentType object.

Return values

A boolean value that indicates whether the two content-type objects are equal.

Notes

The equals() method overrides the equals() method in the java.lang.Object class.

from_int()

Generates a content-type object for the specified ordinal value.

Syntax

public static ContentMetaData from_int(int contTypeOrdValue);

Parameters

contTypeOrdValue
Is the ordinal value that represents the current content type.

Return values

A ContentMetaData object that represents the content type of the specified ordinal value.

See also

value()

toString()

Returns a literal representation of the current content-type object.

Syntax

public String toString();

Parameters

None.

Return values

A String object that contains the literal representation of the current content-type object.

Notes

The toString() method overrides the toString() method in the java.lang.Object class.

value()

Returns an ordinal value for the current content type.

Syntax

public int value();

Parameters

None.

Return values

An integer ordinal value that represents the current content type.

See also

from_int()

xmlObject()

Generates an XML object that represents the current content-type object.

Syntax

public XMLObject xmlObject();

Parameters

None.

Return values

An com.crossworlds.ODK.XMLObject object that represents the current content-type object.

Copyright IBM Corp. 1997, 2004