Off-Topic Section? Holy hell, I've been gone a while...


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? Off-Topic Section? Holy hell, I've been gone a while...
# 8  
Old 10-02-2004
Quote:
Originally posted by Perderabo
Well gosh, Karma, we thought you were gone!

Just kidding... welcome back!
Thanks, didn't think anyone'd remember me. Finally moved out so I can use the net freely which should mean I'll be around a lot more often.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Prepend first line of section to each line until the next section header

I have searched in a variety of ways in a variety of places but have come up empty. I would like to prepend a portion of a section header to each following line until the next section header. I have been using sed for most things up until now but I'd go for a solution in just about anything--... (7 Replies)
Discussion started by: pagrus
7 Replies

2. Shell Programming and Scripting

Extract section of file based on word in section

I have a list of Servers in no particular order as follows: virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection). 9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
Discussion started by: jelloir
2 Replies

3. UNIX for Dummies Questions & Answers

Confussed as hell

:eek: (1 Reply)
Discussion started by: Kevinfine
1 Replies

4. Shell Programming and Scripting

hell & mathematics

I've been able to generate output based on the code scarfake provided me (thanks again man). A little background so everyone more or less knows whats going on: I needed code that would propagate a database with 100,000 entries, for capacity testing purposes, something like a stress test. ... (5 Replies)
Discussion started by: ogoy
5 Replies

5. Shell Programming and Scripting

hell and sqlite

Hi everyone, I have a requirement that requires me to fill an sqlite database with 100,000 entries (no duplicates). I will start out by giving the command that will insert the values necessary to populate the database: # sqlite /var/local/database/dblist "insert into list... (2 Replies)
Discussion started by: ogoy
2 Replies

6. UNIX for Dummies Questions & Answers

rpm hell!

I've just installed redhat 6.2 on one of my systems and am trying to install the gcc c compiler after downloading an rpm from the redhat site. The damn thing gives me: only major numbers <= 3 are supported by this version of RPM what do I do, it does the same with the latest rpm of php ... (7 Replies)
Discussion started by: knmwt15000
7 Replies
Login or Register to Ask a Question
TM::DM(3pm)						User Contributed Perl Documentation					       TM::DM(3pm)

NAME
TM::DM - Topic Maps, read-only TMDM layer SYNOPSIS
# somehow acquire a map (see TM and its subclasses) my $tm = .... # put a TMDM layer on top of it use TM::DM; my $tmdm = new TM::DM (map => $tm); # get the TMDM topic map item my $topicmap = $tmdm->topicmap; # ask for all topics my @topics = $topicmap->topics; # for all associations my @assocs = $topicmap->associations; # get a particular topic my $adam = $topicmap->topic ('adam'); # get some of its properties $adam->id; $adam->subjectLocators; $adam->subjectIdentifiers; $adam->parent; my @ns = $adam->names; my @os = $adam->occurrences; # similar for assocs my @as = $topicmap->associations (iplayer => 'adam'); $as[0]->type; $as[0]->parent; my @rs = $as[0]->roles; ABSTRACT
This package provides a TMDM-ish (read-only) view on an existing topic map. DESCRIPTION
TMDM, the Topic Maps Data Model http://www.isotopicmaps.org/sam/sam-model/ is the ISO standard for the high-level model for Topic Maps. TMDM Concepts TMDM's main concepts are the topic map item containing any number of topic and association items topic item containing any number of names, occurrence items, subject locators and subject identifiers association item containing a type, a scope and any number of role items name item containing a string, a type and a scope occurrence item containing a data value (together with its data type), a type and a scope role item containing a type and a player All items have an item id and all (except the map) have a parent which links back to where the item belongs. This package implements for each of the above a class and access methods to retrieve actual structure and values from an existing map. Nota bene, there are some deviations from TMDM: o only ONE identifier per item is supported o at most ONE subject locator per topic is supported o no variants are supported (might be added at some stage, poke me) o a scope consists only of a single topic o role items do not have an identity, so they also cannot be reified Modus Operandi Before you can use the TMDM layer, you need TM information in the form of a TM object. Any subclass should do, materialized and non- materialized maps should both be fine. Only with such a map you can instantiate a TMDM layer: use TM::Materialized::AsTMa; my $tm = new TM::Materialized::AsTMa (file => 'test.atm'); use TM::DM; my $tmdm = new TM::DM (map => $tm); Probably the first thing you need to do is to get a handle on the whole topic map: my $topicmap = $tmdm->topicmap; That is delivered as an instance of TM::DM::TopicMap as described below. From there you start to extract topics and associations and that way you then further drill down. Implementation Notes This implementation only supports reading map information, not changing it or modifying the structure of the map. Not that it is impossible to do, but many applications get their map content from elsewhere and a read/write interface is an overkill in these cases. All objects generated here are ephemeral, i.e. they are only instantiated because you wanted the map information embedded into them. This implies that if you ask for one and the same topic twice, you are getting two copies of the topic information. The following will not work as expected: my $t0 = $topicmap->topic ('adam'); my $t1 = $topicmap->topic ('adam'); warn "have the same topic!" if $t0 == $t1; This will work: warn "have the same topic!" if $t0->id eq $t1->id; INTERFACES
TM::DM The TM::DM class itself does not offer much functionality itself. It only keeps the connection to the background map. Constructor The constructor expects exactly one parameter, namely the background map. $tmdm = new TM::DM (map => $tm) Methods topicmap $topicmap = $tmdm->topicmap This method generates a Topic Map item. See TM::DM::TopicMap . TM::DM::TopicMap This class provides access to all TMDM properties: id This returns the item identifier. topics @topics = $topicmap->topics (@list-of-ids) @topics = $topicmap->topics @topics = $topicmap->topics ($selection-spec) This method expects a list containing topic valid identifiers and returns for each of the topics a "TM::DM::Topic" reference. If any of the input identifiers do not denote a valid topic in the map, undef will be returned in its place. If the parameter list is empty, all topics will be returned. Have fun, I mean, use with care. Examples: # round tripping topic ids print map { $_->id } $topicmap->topics ('abel', 'cain' ); print "he again" if $topicmap->topics ('god'); If a selection is specified then the same language as in TM (method "toplets") can be used. associations @as = $topicmap->associations @as = $topicmap->associations (%search_spec); This method retrieves the list of ALL associations when it is invoked without a search specification. See TM for that. reifier This returns the topic item which reifies the association. "undef" is returned if there is none. topic This returns a topic item with that id. This method will die if the id is invalid. Note that always new copies are made. TM::DM::Topic subjectLocators Returns the (only) subject locator (URI string) in the topic item or "undef" if there is none. subjectIdentifiers Returns a list of URI strings. Might be empty. id Returns the item id. parent Returns a TM::DM::TopicMap item in which this topic is embedded. names @names = $topic->names Returns a list of TMDM name items. occurrences @occurrences = $topic->occurrences Returns a list of TMDM occurrences items. roles @roles = $topic->roles Returns a list of TM::DM::Role items where this topic plays any role. TM::DM::Association id Returns the item id. type Returns a TM::DM::Topic item which is the type of the association. This is always defined. scope Returns the scope of the association in the form of a single TM::DM::Topic item. This is always defined as for the unconstrained scope the topic "us" is used (see TM::PSI). roles @roles = $assoc->roles Returns a list of roles of the association. Each role is a TM::DM::Role item. parent Returns a TM::DM::TopicMap item for the embedding map. reifier Returns a TM::DM::Topic item if this association is reified. "undef" otherwise. TM::DM::Occurrence id Returns the item id. value Returns the value (together with the data type) in the form of a TM::Literal object. type Returns a TM::DM::Topic item which is the type of the occurrence. This is always defined. scope Returns the scope of the occurrence in the form of a single TM::DM::Topic item. This is always defined. reifier Returns a TM::DM::Topic item if this occurrence is reified. "undef" otherwise. parent Returns the TM::DM::Topic item of the topic where this occurrence is part of. TM::DM::Name id Returns the item id. value Returns the string value of the name. type Returns a TM::DM::Topic item which is the type of the name. This is always defined. scope Returns the scope of the name in the form of a single TM::DM::Topic item. This is always defined. reifier Returns a TM::DM::Topic item if this name is reified. "undef" otherwise. parent Returns the TM::DM::Topic item of the topic where this name is part of. TM::DM::Role player Returns a TM::DM::Topic item for the topic which is the player in this role. type Returns a TM::DM::Topic item for the topic which is the type of this role. parent Returns a TM::DM::Association item of the association where this role is in. SEE ALSO
TM, TM::Easy COPYRIGHT AND LICENSE
Copyright 200[68] by Robert Barta, <drrho@cpan.org> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2008-05-07 TM::DM(3pm)