Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tm::serializable::astma(3pm) [debian man page]

TM::Serializable::AsTMa(3pm)				User Contributed Perl Documentation			      TM::Serializable::AsTMa(3pm)

NAME
TM::Serializable::AsTMa - Topic Maps, trait for parsing AsTMa instances. SYNOPSIS
# this is not an end-user package # see the source in TM::Materialized::AsTMa how this can be used DESCRIPTION
This trait provides parsing functionality for AsTMa= instances. AsTMa= is a textual shorthand notation for Topic Map authoring. Currently, AsTMa= 1.3 and the (experimental) AsTMa= 2.0 is supported. AsTMa= 1.3 This follows the specification: <http://astma.it.bond.edu.au/authoring.xsp> with the following constraints/additions: following directives are supported: %cancel Cancels the parse process on this very line and ignores the rest of the AsTMa instance. Useful for debugging faulty maps. There is an appropriate line written to STDERR. %log [ message ] Writes a line to STDERR reporting the line number and an optional message. Useful for debugging. %encoding [ encoding ] Specifies which encoding to use to interpret the following text. This implies that this directive may appear several times to change the encoding. Whether this is a good idea in terms of information management, is a different question. NOTE: If no encoding is provided, utf8 is assumed. %trace integer For debugging purposes you can turn on tracing by specifying an integer level. Level 0 means no tracing, level 1 shows a bit more, and so forth. NOTE: This is not overly developed at the moment, but can be easily extended. A directive can be inserted anywhere in the document but must be at the start of a line. AsTMa= 2.0 It follows the specification on http://astma.it.bond.edu.au/astma=-spec-2.0r1.0.dbk with the following changes: this is work in progress INTERFACE
Methods deserialize This method take a string and tries to parse AsTMa= content from it. It will raise an exception on parse error. On success, it will return the map object. serialize This method serialized the map object into AsTMa notation and returns the resulting string. It will raise an exception if the object contains constructs that AsTMa cannot represent. The result is a standard Perl string, so you may need to force it into a particular encoding. The method understands a number of key/value pair parameters: "version" (default: 1) Which AsTMa version the result should conform to. Currently only version 1 is supported. "omit_trivia" (default: 0) This option suppresses the output of completely naked toplets (toplets without any characteristics). "omit_infrastructure" (default: 1) This option suppresses the output of infrastructure toplets. "omit_provenance" (default: 0) If set, no mentioning of where the content came from is added. "trace" (default: "undef") [v1.54] Switches on tracing in the generated AsTMa code. The trace level can be controlled via the value of this option. SEE ALSO
TM, TM::Serializable AUTHOR INFORMATION
Copyright 200[1-68], Robert Barta <drrho@cpan.org>, Alexander Zangerl <he@does.not.want.his.email.anywhere>, All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html perl v5.10.1 2010-09-06 TM::Serializable::AsTMa(3pm)

Check Out this Related Man Page

TM::Serializable::LTM(3pm)				User Contributed Perl Documentation				TM::Serializable::LTM(3pm)

NAME
TM::Serializable::LTM - Topic Maps, trait for parsing of LTM instances. SYNOPSIS
# this is not an end-user package # see the source of TM::Materialized::LTM DESCRIPTION
This package provides parsing functionality for LTM 1.3 instances with the exceptions listed below. LTM 1.3 is backwards compatible with version 1.2. As LTM 1.3 is not yet public, please contact the author (Lars M. Garshol) for a copy. http://www.ontopia.net/download/ltm.html Deviations from the LTM Specification comments: The parser does NOT recognizes nested comments. Any closest following */ sequence terminates a comment. The parser does also not distinguish between comments within or outside strings. Justification: Speed of parsing and complexity of the parser. scope: Only exactly ONE topic can be specified for a scope. Justification: Multiple topics per scope are allowed by the standard, but are undefined in their semantics. The underlying TM representation does NOT allow for multiple topics per scope. variants Variants are currently not supported. This also includes sort names and display names. Justification: Will be added later. syntax Any number of statements are allowed in LTM files (also 0). Justification: There is no reason to do otherwise. TOPICMAP directive This is currently not implemented. Justification: There are better ways to do that. MERGEMAP directive The HyTime, ISO13250 format is not implemented as there is currently no driver in the TM suite. Justification: As long as there is no interest (read: bribe money), it never will. BASEURI directive BASEURI is currently not honored for all local URIs. Justification: I do not understand its purpose. encoding This is currently ignored. Justification: Will be added later. Subject Locators It is a violation to use more than one subject locator per topic. Justification: This is enforced by the underlying model. Source Locators No source locators are created. Justification: There is no such concept (thankfully) in the TM suite. role type: If a role is not specified, it will remain default to "thing" and not - as the specification mandates - will be substituted by the topic type. Justification: First, a topic might have several types (which one to use?), secondly there might be several topics in a member and thirdly, a role should generally NOT be the type of a member. Notes Merging The parser (like any other in the TM suite) does NOT perform merging automatically. You have to trigger that explicitely with the method "consolidate". MERGEMAP directive The strings determining the format are checked case-insensitive, so ASTMA and AsTMa are treated equally. The location of the map can be defined via any URI handled by LWP::Simple. If no scheme is provided file: will be assumed. INTERFACE
Methods deserialize This method tries to parse the passed in text stream as LTM instance. It will raise an exception on the first parse error. serialize This is not implemented. SEE ALSO
TM AUTHOR INFORMATION
Copyright 200[1-6], Robert Barta <drrho@cpan.org>, All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html perl v5.10.1 2008-06-12 TM::Serializable::LTM(3pm)
Man Page