.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "TM::Serializable::AsTMa 3pm" .TH TM::Serializable::AsTMa 3pm "2019-09-07" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" TM::Serializable::AsTMa \- Topic Maps, trait for parsing AsTMa instances. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # this is not an end\-user package \& # see the source in TM::Materialized::AsTMa how this can be used .Ve .SH "DESCRIPTION" .IX Header "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. .IP "\fBAsTMa= 1.3\fR" 4 .IX Item "AsTMa= 1.3" This follows the specification: with the following constraints/additions: .RS 4 .IP "following directives are supported:" 4 .IX Item "following directives are supported:" .RS 4 .PD 0 .ie n .IP "%cancel" 4 .el .IP "\f(CW%cancel\fR" 4 .IX Item "%cancel" .PD 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 \s-1STDERR.\s0 .ie n .IP "%log [ message ]" 4 .el .IP "\f(CW%log\fR [ message ]" 4 .IX Item "%log [ message ]" Writes a line to \s-1STDERR\s0 reporting the line number and an optional message. Useful for debugging. .ie n .IP "%encoding [ encoding ]" 4 .el .IP "\f(CW%encoding\fR [ encoding ]" 4 .IX Item "%encoding [ encoding ]" Specifies which encoding to use to interpret the \fBfollowing\fR 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. .Sp \&\fB\s-1NOTE\s0\fR: If no encoding is provided, utf8 is assumed. .ie n .IP "%trace integer" 4 .el .IP "\f(CW%trace\fR integer" 4 .IX Item "%trace integer" For debugging purposes you can turn on \fItracing\fR by specifying an integer level. Level \f(CW0\fR means \&\fIno tracing\fR, level \f(CW1\fR shows a bit more, and so forth. .Sp \&\fB\s-1NOTE\s0\fR: This is not overly developed at the moment, but can be easily extended. .RE .RS 4 .Sp A directive can be inserted anywhere in the document but must be at the start of a line. .RE .RE .RS 4 .RE .IP "\fBAsTMa= 2.0\fR" 4 .IX Item "AsTMa= 2.0" It follows the specification on http://astma.it.bond.edu.au/astma=\-spec\-2.0r1.0.dbk with the following changes: .RS 4 .IP "this is work in progress" 4 .IX Item "this is work in progress" .RE .RS 4 .RE .SH "INTERFACE" .IX Header "INTERFACE" .SS "Methods" .IX Subsection "Methods" .PD 0 .IP "\fBdeserialize\fR" 4 .IX Item "deserialize" .PD 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. .IP "\fBserialize\fR" 4 .IX Item "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. .Sp The method understands a number of key/value pair parameters: .RS 4 .ie n .IP """version"" (default: 1)" 4 .el .IP "\f(CWversion\fR (default: \f(CW1\fR)" 4 .IX Item "version (default: 1)" Which AsTMa version the result should conform to. Currently only version \f(CW1\fR is supported. .ie n .IP """omit_trivia"" (default: 0)" 4 .el .IP "\f(CWomit_trivia\fR (default: \f(CW0\fR)" 4 .IX Item "omit_trivia (default: 0)" This option suppresses the output of completely \fInaked\fR toplets (toplets without any characteristics). .ie n .IP """omit_infrastructure"" (default: 1)" 4 .el .IP "\f(CWomit_infrastructure\fR (default: \f(CW1\fR)" 4 .IX Item "omit_infrastructure (default: 1)" This option suppresses the output of infrastructure toplets. .ie n .IP """omit_provenance"" (default: 0)" 4 .el .IP "\f(CWomit_provenance\fR (default: \f(CW0\fR)" 4 .IX Item "omit_provenance (default: 0)" If set, no mentioning of where the content came from is added. .ie n .IP """trace"" (default: ""undef"")" 4 .el .IP "\f(CWtrace\fR (default: \f(CWundef\fR)" 4 .IX Item "trace (default: undef)" [v1.54] Switches on \fItracing\fR in the generated AsTMa code. The trace level can be controlled via the value of this option. .RE .RS 4 .RE .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1TM\s0, TM::Serializable .SH "AUTHOR INFORMATION" .IX Header "AUTHOR INFORMATION" Copyright 200[1\-68], Robert Barta , Alexander Zangerl , All rights reserved. .PP 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