[SCM] librdf-ns-perl Debian packaging branch, master, updated. debian/20130208-1-22-g47de138

Jakob Voss voss at gbv.de
Fri Apr 19 13:28:41 UTC 2013


The following commit has been merged in the master branch:
commit 56511b3f337ad88b46420ed7e588c075cdff808b
Author: Jakob Voss <voss at gbv.de>
Date:   Thu Nov 24 12:06:27 2011 +0100

    version 20111124

diff --git a/Changes b/Changes
index 0728aef..e216172 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,8 @@
+20111124 (709 prefixes)
+  added: gnd,grs,htir,infosys,muto,omapi,prf,webbox
+  changed: commerce
+  removed: uri
+  changed command line tool option syntax
 20111102 (702 prefixes) 
   new command line tool 'rdfns'
   added: vsw
diff --git a/README b/README
index c9c697c..df06407 100644
--- a/README
+++ b/README
@@ -16,7 +16,7 @@ for easy reuse without having to download them in every application.
 
 In short, you can get a full prefix-to-namespace mapping as blessed hash with
 
-    RDF::NS->new('20111102')
+    RDF::NS->new('20111124')
 
 The only argument to the constructor is the version number, that is equivalent
 to the date of a particular snapshot. The changelog in the file Changes lists
diff --git a/bin/rdfns b/bin/rdfns
index 414a300..47f448f 100755
--- a/bin/rdfns
+++ b/bin/rdfns
@@ -14,21 +14,28 @@ if (!@ARGV or $ARGV[0] =~ /^(-[?h]|--help)$/) {
      exit;
 }
 
-while (@ARGV and $ARGV[0] =~ /^-(.+)$/) {
-     if ($1 =~ /^(ttl|n(otation)?3|sparql|xmlns|txt)$/i) {
-         $format = $1;
-     } elsif ($1 =~ /^(\d{8})$/) {
-	     $version = $1;
-     } else {
-         print STDERR "Unknown option ".$ARGV[0]."\n";
-     }
-     shift @ARGV;
+foreach my $a (@ARGV) {
+    if ( $a =~ /^(\d{8})$/ ) {
+        $version = $a;
+        next;
+    }
+    if ( $a =~ s/\.([^.]+)$// ) {
+        my $f = $1;
+        if ( $f =~ $RDF::NS::FORMATS ) {
+            $format = $f;
+        } else {
+            print STDERR "Unknown format: $f\n";
+        }
+    }
+    print map {"$_\n"} RDF::NS->new($version)->FORMAT( $format, $a );
 }
 
-print map {"$_\n"} RDF::NS->new($version)->FORMAT( $format, @ARGV );
-
 __DATA__
-USAGE: rdfns [format] [-YYYYMMDD] <prefix[es]>
+USAGE: rdfns { [YYYYMMDD] <prefix[es]>[.format] }+
 
-  formats: -txt, -sparql, -ttl, -n3, -xmlns
+  formats: txt, sparql, ttl, n3, xmlns
+ 
+  examples:
+    rdfns 20111102 foaf,owl.ttl
+    rdfns foaf.xmlns foaf.n3
 
diff --git a/dist.ini b/dist.ini
index 44e875d..4574ab7 100644
--- a/dist.ini
+++ b/dist.ini
@@ -1,6 +1,6 @@
 name             = RDF-NS
 license          = Perl_5
-version          = 20111102
+version          = 20111124
 copyright_year   = 2011
 author           = Jakob Voss
 copyright_holder = Jakob Voss
diff --git a/lib/RDF/NS.pm b/lib/RDF/NS.pm
index 8f99b03..be96df4 100644
--- a/lib/RDF/NS.pm
+++ b/lib/RDF/NS.pm
@@ -7,6 +7,7 @@ use Scalar::Util qw(blessed);
 use File::ShareDir;
 
 our $AUTOLOAD;
+our $FORMATS = qr/ttl|n(otation)?3|sparql|xmlns|txt|beacon/;
 
 sub new {
     my $class   = shift;
@@ -46,9 +47,9 @@ sub LOAD {
 
 sub FORMAT {
     my $self = shift;
-	my $format = shift;
+	my $format = shift || "";
     $format = 'TTL' if $format =~ /^n(otation)?3$/i;
-    if ($format =~ /^(ttl|n3|sparql|txt)$/i) {
+    if (lc($format) =~ $FORMATS) {
 	    $format = uc($format);
 	    $self->$format( @_ );
 	}
@@ -74,6 +75,11 @@ sub TXT {
     $self->MAP( sub { "$_\t".$self->{$_} } , @_ );
 }
 
+sub BEACON {
+    my $self = shift;
+    $self->MAP( sub { "#PREFIX: ".$self->{$_} } , @_ );
+}
+
 sub SELECT {
     my $self = shift;
     $self->MAP( sub { $_ => $self->{$_} } , @_ );
@@ -119,8 +125,8 @@ sub AUTOLOAD {
 
 =head1 SYNOPSIS
 
-  use RDF::NS '20111102';              # check at compile time
-  my $ns = RDF::NS->new('20111102');   # check at runtime
+  use RDF::NS '20111124';              # check at compile time
+  my $ns = RDF::NS->new('20111124');   # check at runtime
 
   $ns->foaf;               # http://xmlns.com/foaf/0.1/
   $ns->foaf_Person;        # http://xmlns.com/foaf/0.1/Person
@@ -133,7 +139,7 @@ sub AUTOLOAD {
 
   # To get RDF::Trine::Node::Resource instead of strings
   use RDF::NS::Trine;
-  $ns = RDF::NS::Trine->new('20111102');
+  $ns = RDF::NS::Trine->new('20111124');
   $ns->foaf_Person;        # iri('http://xmlns.com/foaf/0.1/Person')
 
   # load your own mapping
@@ -211,6 +217,10 @@ vertical bars, and spaces.
 
 Returns a list of tabular-separated prefix-namespace-mappings.
 
+=method BEACON ( prefix[es] )
+
+Returns a list of BEACON format prefix definitions (not including prefixes).
+
 =method SELECT ( prefix[es] )
 
 In list context, returns a sorted list of prefix-namespace pairs, which
diff --git a/lib/RDF/NS/Trine.pm b/lib/RDF/NS/Trine.pm
index 44e0a3e..73f720f 100644
--- a/lib/RDF/NS/Trine.pm
+++ b/lib/RDF/NS/Trine.pm
@@ -17,7 +17,7 @@ sub GET {
 
   use RDF::NS::Trine;
 
-  my $ns = RDF::NS::Trine->new('20111102');
+  my $ns = RDF::NS::Trine->new('20111124');
 
   $ns->foaf_Person;        # a RDF::Trine::Node::Resource
   $ns->URI('foaf:Person);  # same
diff --git a/share/20111102.txt b/share/20111124.txt
similarity index 98%
copy from share/20111102.txt
copy to share/20111124.txt
index 6875155..f9f107c 100644
--- a/share/20111102.txt
+++ b/share/20111124.txt
@@ -88,7 +88,7 @@ code	http://telegraphis.net/ontology/measurement/code#
 coeus	http://bioinformatics.ua.pt/coeus/
 coin	http://purl.org/court/def/2009/coin#
 com	http://purl.org/commerce#
-commerce	http://purl.org/commerce#
+commerce	http://search.yahoo.com/searchmonkey/commerce/
 common	http://www.w3.org/2007/uwa/context/common.owl#
 commons	http://commons.psi.enakting.org/def/
 compass	http://purl.org/net/compass#
@@ -231,6 +231,7 @@ gesis	http://lod.gesis.org/lodpilot/ALLBUS/vocab.rdf#
 giving	http://ontologi.es/giving#
 gml	http://www.opengis.net/gml/
 gn	http://www.geonames.org/ontology#
+gnd	http://d-nb.info/gnd/
 go	http://www.geneontology.org/go#
 gob	http://purl.org/ontology/last-fm/
 gold	http://purl.org/linguistics/gold/
@@ -242,6 +243,7 @@ granatum	http://chem.deri.ie/granatum/
 grddl	http://www.w3.org/2003/g/data-view#
 greg	http://kasei.us/about/foaf.xrdf#
 gridworks	http://purl.org/net/opmv/types/gridworks#
+grs	http://www.georss.org/georss/
 gv	http://rdf.data-vocabulary.org/#
 h5	http://buzzword.org.uk/rdf/h5#
 hard	http://www.w3.org/2007/uwa/context/hardware.owl#
@@ -254,6 +256,7 @@ hemogram	http://www.agfa.com/w3c/2009/hemogram#
 hints2005	http://purl.org/twc/cabig/model/HINTS2005-1.owl#
 hlisting	http://sindice.com/hlisting/0.1/
 hospital	http://www.agfa.com/w3c/2009/hospital#
+htir	http://www.w3.org/2011/http#
 http	http://www.w3.org/2006/http#
 httph	http://www.w3.org/2007/ont/httph#
 httpvoc	http://www.w3.org/2006/http#
@@ -265,6 +268,7 @@ ical	http://www.w3.org/2002/12/cal/ical#
 imm	http://schemas.microsoft.com/imm/
 imreg	http://www.w3.org/2004/02/image-regions#
 infection	http://www.agfa.com/w3c/2009/infectiousDisorder#
+infosys	http://www.infosys.com/
 ir	http://www.ontologydesignpatterns.org/cp/owl/informationrealization.owl#
 ire	http://www.ontologydesignpatterns.org/cpont/ire.owl#
 iron	http://purl.org/ontology/iron#
@@ -336,6 +340,7 @@ mu	http://www.kanzaki.com/ns/music#
 muo	http://purl.oclc.org/NET/muo/muo#
 music	http://musicontology.com/
 musim	http://purl.org/ontology/similarity/
+muto	http://purl.org/muto/core#
 mygrid	http://www.mygrid.org.uk/ontology#
 myspace	http://purl.org/ontology/myspace#
 myspo	http://purl.org/ontology/myspace#
@@ -373,6 +378,7 @@ ok	http://okkam.org/terms#
 okkam	http://models.okkam.org/ENS-core-vocabulary#
 olia	http://purl.org/olia/olia.owl#
 olo	http://purl.org/ontology/olo/core#
+omapi	http://purl.org/omapi/0.2/#
 omb	http://purl.org/ontomedia/ext/common/being#
 omc	http://purl.org/ontomedia/ext/common/bestiary#
 ome	http://purl.org/ontomedia/core/expression#
@@ -435,6 +441,7 @@ postcode	http://data.ordnancesurvey.co.uk/id/postcodeunit/
 powder	http://www.w3.org/2007/05/powder#
 ppo	http://vocab.deri.ie/ppo#
 pr	http://ontologi.es/profiling#
+prf	http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#
 prism	http://prismstandard.org/namespaces/1.2/basic/
 prissma	http://ns.inria.fr/prissma/v1#
 prj	http://purl.org/stuff/project/
@@ -620,7 +627,6 @@ uni	http://purl.org/weso/uni/uni.html#
 uniprot	http://purl.uniprot.org/core/
 unit	http://qudt.org/vocab/unit#
 units	http://eulersharp.sourceforge.net/2003/03swap/unitsExtension#
-uri	http://purl.org/NET/uri#
 urn	http://fliqz.com/
 user	http://schemas.talis.com/2005/user/schema#
 usgov	http://www.rdfabout.com/rdf/schema/usgovt/
@@ -655,6 +661,7 @@ water	http://escience.rpi.edu/ontology/semanteco/2/0/water.owl#
 wdr	http://www.w3.org/2007/05/powder#
 wdrs	http://www.w3.org/2007/05/powder-s#
 web	http://www.w3.org/2007/uwa/context/web.owl#
+webbox	http://webbox.ecs.soton.ac.uk/ns#
 webtlab	http://webtlab.it.uc3m.es/
 wf	http://www.w3.org/2005/01/wf/flow#
 wgs	http://www.w3.org/2003/01/geo/wgs84_pos#

-- 
librdf-ns-perl Debian packaging



More information about the Pkg-perl-cvs-commits mailing list