Package advene :: Package model :: Package parsers :: Module cinelab_xml :: Class Parser
[hide private]
[frames] | no frames]

Class Parser

source code

            object --+        
                     |        
base_xml.XmlParserBase --+    
                         |    
         advene_xml.Parser --+
                             |
                            Parser

Instance Methods [hide private]
 
__init__(self, file_, package)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
manage_package_subelements(self)
This method may be overridden by application model parsers having a syntax simiar to the generic advene format - like the cinelab parser.
source code
 
handle_annotation_type(self) source code
 
handle_relation_type(self) source code
 
handle_tag(self, element=None) source code
 
handle_schema(self) source code
 
handle_list(self) source code
 
handle_element(self, advene_tag) source code
 
handle_association(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

    Inherited from advene_xml.Parser
 
do_or_postpone(self, id, function, function2=None)
If `identified` an imported element, function is invoked with `id` as its argument.
source code
 
handle_annotation(self) source code
 
handle_content(self, creation_method, *args) source code
 
handle_import(self) source code
 
handle_item(self, lst, c) source code
 
handle_media(self) source code
 
handle_member(self, relation) source code
 
handle_meta(self, obj) source code
 
handle_package(self)
Subclasses should normally not override this method, but rather `manage_package_subelements`.
source code
 
handle_query(self) source code
 
handle_relation(self) source code
 
handle_resource(self) source code
 
handle_view(self) source code
 
optional_sequence(self, tag, *args, **kw) source code
 
parse(self)
Do the actual parsing.
source code
    Inherited from base_xml.XmlParserBase
 
_check_end(self, elem) source code
 
_handle(self, args, kw) source code
 
complete_current(self) source code
 
get_attribute(self, key, default=_RAISE) source code
 
optional(self, tag, *args, **kw) source code
 
required(self, tag, *args, **kw) source code
 
sequence(self, tag, *args, **kw)
NB: this methods allows an *empty* sequence.
source code
Class Methods [hide private]
    Inherited from advene_xml.Parser
 
claims_for_parse(cls, file_)
Is this parser likely to parse that file-like object?
source code
 
make_parser(cls, file_, package)
Return a parser that will parse `file_` into `package`.
source code
 
parse_into(cls, file_, package)
A shortcut for ``make_parser(file_, package).parse()``.
source code
Class Variables [hide private]
  NAME = 'Cinelab Advene XML'
  EXTENSION = '.cxp'
  MIMETYPE = 'application/x-cinelab-package+xml'
  SERIALIZER
Cinelab serializer implementation.
  _NAMESPACE_URI = 'http://advene.liris.cnrs.fr/ns/cinelab/0.1#'
Properties [hide private]

Inherited from object: __class__

    Inherited from base_xml.XmlParserBase
  current
  ns_stack
Method Details [hide private]

__init__(self, file_, package)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

manage_package_subelements(self)

source code 

This method may be overridden by application model parsers having a syntax simiar to the generic advene format - like the cinelab parser.

Overrides: advene_xml.Parser.manage_package_subelements
(inherited documentation)

handle_tag(self, element=None)

source code 
Overrides: advene_xml.Parser.handle_tag

handle_list(self)

source code 
Overrides: advene_xml.Parser.handle_list

handle_element(self, advene_tag)

source code 
Overrides: advene_xml.Parser.handle_element

handle_association(self)

source code 
Overrides: advene_xml.Parser.handle_association

Class Variable Details [hide private]

SERIALIZER

Cinelab serializer implementation.

Value:
advene.model.serializers.cinelab_xml