NAME

Treex::PML::Schema::Container - implements declaration of a container.

INHERITANCE

This class inherits from Treex::PML::Schema::Decl, but provides several methods which make its interface largely compatible with the Treex::PML::Schema::Struct class.

METHODS

See the super-class for the complete list.

$decl->get_decl_type ()

Returns the constant PML_CONTAINER_DECL.

$decl->get_decl_type_str ()

Returns the string 'container'.

$decl->get_content_decl ()

Return declaration of the content type.

$decl->is_atomic ()

Returns 0.

$decl->get_attributes ()

Return a list of the associated attribute declarations (Treex::PML::Schema::Attribute).

$decl->has_attributes ()

Return true if the container declares attributes.

$decl->get_attribute_names ()

Return a list of names of attributes associated with the container.

$decl->get_attribute_by_name (name)

Return the declaration of the attribute with a given name.

$decl->find_attributes_by_content_decl (decl)

Lookup and return those attribute declarations whose content declaration is decl.

$decl->find_attributes_by_type_name (name)

Lookup and return those attribute declarations whose content is specified via a reference to the named type with a given name.

$decl->find_attributes_by_role (role)

Lookup and return declarations of all members with a given role.

COMPATIBILITY METHODS

$decl->get_members ()

Return declarations of all associated attributes and of the content type.

$decl->get_member_by_name (name)

If name is equal to '#content', return the content type declaration, otherwise acts like get_attribute_by_name.

$decl->get_member_names ()

Return a list of all attribute names plus the string '#content'.

$decl->find_members_by_content_decl (decl)

Lookup and return those member (attribute or content) declarations whose content declaration is decl.

$decl->find_members_by_type_name (name)

Lookup and return those member (attribute or content) declarations whose content is specified via a reference to the named type with a given name.

$decl->find_members_by_role (role)

Lookup and return declarations of all members (attribute or content) with a given role.

SEE ALSO

Treex::PML::Schema::Decl, Treex::PML::Schema, Treex::PML::Schema::Attribute, Treex::PML::Container

COPYRIGHT AND LICENSE

Copyright (C) 2008-2010 by Petr Pajas

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.

BUGS

None reported... yet.