File Coverage

blib/lib/RDF/Core/Constants.pm
Criterion Covered Total %
statement 147 147 100.0
branch n/a
condition n/a
subroutine 49 49 100.0
pod n/a
total 196 196 100.0


line stmt bran cond sub pod time code
1             #
2             # The contents of this file are subject to the Mozilla Public
3             # License Version 1.1 (the "License"); you may not use this file
4             # except in compliance with the License. You may obtain a copy of
5             # the License at http://www.mozilla.org/MPL/
6             #
7             # Software distributed under the License is distributed on an "AS
8             # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9             # implied. See the License for the specific language governing
10             # rights and limitations under the License.
11             #
12             # The Original Code is the RDF::Core module
13             #
14             # The Initial Developer of the Original Code is Ginger Alliance Ltd.
15             # Portions created by Ginger Alliance are
16             # Copyright (C) 2001 Ginger Alliance Ltd.
17             # All Rights Reserved.
18             #
19             # Contributor(s):
20             #
21             # Alternatively, the contents of this file may be used under the
22             # terms of the GNU General Public License Version 2 or later (the
23             # "GPL"), in which case the provisions of the GPL are applicable
24             # instead of those above. If you wish to allow use of your
25             # version of this file only under the terms of the GPL and not to
26             # allow others to use your version of this file under the MPL,
27             # indicate your decision by deleting the provisions above and
28             # replace them with the notice and other provisions required by
29             # the GPL. If you do not delete the provisions above, a recipient
30             # may use your version of this file under either the MPL or the
31             # GPL.
32             #
33              
34             package RDF::Core::Constants;
35              
36 2     2   10 use strict;
  2         4  
  2         68  
37              
38 2     2   13 use vars qw(%EXPORT_TAGS @ISA @EXPORT_OK);
  2         3  
  2         125  
39 2     2   11 use Exporter;
  2         3  
  2         292  
40              
41             @ISA = qw (Exporter);
42              
43             ########################################
44             # export stuff
45             my @XML_EXP = qw (XML_NS XMLA_LANG XMLA_BASE);
46              
47             my @RDF_EXP = qw (RDF_NS RDF_RDF RDF_DESCRIPTION RDF_BAG RDF_ALT RDF_SEQ
48             RDF_LI RDF_TYPE RDF_OBJECT RDF_SUBJECT RDF_PREDICATE
49             RDF_STATEMENT RDF_PROPERTY RDF_LIST RDF_FIRST RDF_REST
50             RDF_NIL RDFA_ABOUT RDFA_ABOUTEACH RDFA_ID RDFA_NODEID
51             RDFA_BAGID RDFA_RESOURCE RDFA_PARSETYPE RDFA_TYPE
52             RDFA_DATATYPE RDF_XMLLITERAL);
53              
54              
55             my @RDFS_EXP = qw(RDFS_NS RDFS_RESOURCE RDFS_CLASS RDFS_LITERAL RDFS_CONTAINER
56             RDFS_CONTAINER_MEMBER RDFS_IS_DEFINED_BY RDFS_MEMBER
57             RDFS_SUBCLASS_OF RDFS_SUBPROPERTY_OF RDFS_COMMENT RDFS_LABEL
58             RDFS_DOMAIN RDFS_RANGE RDFS_SEE_ALSO);
59              
60             %EXPORT_TAGS = (xml => \@XML_EXP,
61             rdf => \@RDF_EXP,
62             rdfs => \@RDFS_EXP);
63              
64             @EXPORT_OK = (@XML_EXP, @RDF_EXP, @RDFS_EXP);
65              
66             ########################################
67             # XML
68 2     2   12 use constant XML_NS => 'http://www.w3.org/XML/1998/namespace';
  2         10  
  2         158  
69 2     2   12 use constant XMLA_LANG => XML_NS . 'lang';
  2         3  
  2         97  
70 2     2   7 use constant XMLA_BASE => XML_NS . 'base';
  2         3  
  2         87  
71              
72             ########################################
73             # RDF
74 2     2   8 use constant RDF_NS => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
  2         3  
  2         108  
75 2     2   9 use constant RDF_RDF => RDF_NS . 'RDF';
  2         3  
  2         136  
76 2     2   10 use constant RDF_DESCRIPTION => RDF_NS . 'Description';
  2         4  
  2         100  
77 2     2   9 use constant RDF_BAG => RDF_NS . 'Bag';
  2         2  
  2         99  
78 2     2   8 use constant RDF_ALT => RDF_NS . 'Alt';
  2         2  
  2         82  
79 2     2   10 use constant RDF_SEQ => RDF_NS . 'Seq';
  2         3  
  2         118  
80 2     2   8 use constant RDF_LI => RDF_NS . 'li';
  2         3  
  2         102  
81 2     2   9 use constant RDF_TYPE => RDF_NS . 'type';
  2         2  
  2         77  
82 2     2   7 use constant RDF_OBJECT => RDF_NS . 'object';
  2         3  
  2         89  
83 2     2   9 use constant RDF_SUBJECT => RDF_NS . 'subject';
  2         4  
  2         116  
84 2     2   8 use constant RDF_PREDICATE => RDF_NS . 'predicate';
  2         3  
  2         84  
85 2     2   13 use constant RDF_STATEMENT => RDF_NS . 'Statement';
  2         3  
  2         93  
86 2     2   8 use constant RDF_PROPERTY => RDF_NS . 'Property';
  2         3  
  2         73  
87 2     2   8 use constant RDF_LIST => RDF_NS . 'List';
  2         3  
  2         82  
88 2     2   7 use constant RDF_FIRST => RDF_NS . 'first';
  2         3  
  2         89  
89 2     2   8 use constant RDF_REST => RDF_NS . 'rest';
  2         4  
  2         90  
90 2     2   17 use constant RDF_NIL => RDF_NS . 'nil';
  2         3  
  2         126  
91 2     2   19 use constant RDF_VALUE => RDF_NS . 'value';
  2         3  
  2         121  
92 2     2   11 use constant RDF_XMLLITERAL => RDF_NS . 'XMLLiteral';
  2         2  
  2         127  
93              
94             ########################################
95             # RDF attributes
96 2     2   11 use constant RDFA_ABOUT => RDF_NS . 'about';
  2         4  
  2         115  
97 2     2   10 use constant RDFA_ABOUTEACH => RDF_NS . 'aboutEach';
  2         2  
  2         113  
98 2     2   9 use constant RDFA_ID => RDF_NS . 'ID';
  2         3  
  2         99  
99 2     2   11 use constant RDFA_NODEID => RDF_NS . 'nodeID';
  2         2  
  2         110  
100 2     2   27 use constant RDFA_BAGID => RDF_NS . 'bagID';
  2         3  
  2         105  
101 2     2   10 use constant RDFA_RESOURCE => RDF_NS . 'resource';
  2         3  
  2         136  
102 2     2   9 use constant RDFA_PARSETYPE => RDF_NS . 'parseType';
  2         3  
  2         101  
103 2     2   11 use constant RDFA_TYPE => RDF_NS . 'type';
  2         4  
  2         109  
104 2     2   25 use constant RDFA_DATATYPE => RDF_NS . 'datatype';
  2         2  
  2         176  
105              
106             ########################################
107             # RDFS
108 2     2   12 use constant RDFS_NS => 'http://www.w3.org/2000/01/rdf-schema#';
  2         2  
  2         115  
109 2     2   10 use constant RDFS_RESOURCE => RDFS_NS . 'Resource';
  2         4  
  2         117  
110 2     2   10 use constant RDFS_CLASS => RDFS_NS . 'Class';
  2         4  
  2         139  
111 2     2   10 use constant RDFS_LITERAL => RDFS_NS . 'Literal';
  2         4  
  2         123  
112 2     2   10 use constant RDFS_CONTAINER => RDFS_NS . 'Container';
  2         4  
  2         131  
113 2     2   9 use constant RDFS_CONTAINER_MEMBER => RDFS_NS . 'ContainerMembershipProperty';
  2         3  
  2         108  
114              
115 2     2   12 use constant RDFS_IS_DEFINED_BY => RDFS_NS . 'isDefinedBy';
  2         10  
  2         131  
116 2     2   11 use constant RDFS_MEMBER => RDFS_NS . 'member';
  2         4  
  2         117  
117 2     2   10 use constant RDFS_SUBCLASS_OF => RDFS_NS . 'subClassOf';
  2         3  
  2         121  
118 2     2   12 use constant RDFS_SUBPROPERTY_OF => RDFS_NS . 'subPropertyOf';
  2         5  
  2         130  
119 2     2   11 use constant RDFS_COMMENT => RDFS_NS . 'comment';
  2         4  
  2         115  
120 2     2   11 use constant RDFS_LABEL => RDFS_NS . 'label';
  2         4  
  2         116  
121 2     2   17 use constant RDFS_DOMAIN => RDFS_NS . 'domain';
  2         4  
  2         105  
122 2     2   9 use constant RDFS_RANGE => RDFS_NS . 'range';
  2         3  
  2         167  
123 2     2   10 use constant RDFS_SEE_ALSO => RDFS_NS . 'seeAlso';
  2         19  
  2         145  
124              
125             1;
126              
127             __END__