##### Coverage Report - org.apache.any23.vocab.HLISTING

Classes in this File | Line Coverage | Branch Coverage | Complexity
HLISTING |
0% | 0/43
0% | 0/2
| 1.25;1.25

1 |  |
     /*
2 |  |
      * Licensed to the Apache Software Foundation (ASF) under one or more
3 |  |
      * contributor license agreements.  See the NOTICE file distributed with
4 |  |
      * this work for additional information regarding copyright ownership.
5 |  |
      * The ASF licenses this file to You under the Apache License, Version 2.0
6 |  |
      * (the "License"); you may not use this file except in compliance with
7 |  |
      * the License.  You may obtain a copy of the License at
8 |  |
      *
9 |  |
      *  http://www.apache.org/licenses/LICENSE-2.0
10 |  |
      *
11 |  |
      * Unless required by applicable law or agreed to in writing, software
12 |  |
      * distributed under the License is distributed on an "AS IS" BASIS,
13 |  |
      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 |  |
      * See the License for the specific language governing permissions and
15 |  |
      * limitations under the License.
16 |  |
      */
17 |  |
18 |  |
     package org.apache.any23.vocab;
19 |  |
20 |  |
     import org.openrdf.model.URI;
21 |  |
22 |  |
     /**
23 |  |
      * Class modeling the <a href="http://microformats.org/wiki/hlisting-proposal">hListing</a> vocabulary.
24 |  |
      *
25 |  |
      * @author Davide Palmisano (dpalmisano@gmail.com)
26 |  |
      *
27 |  |
      */
28 |  |
     public class HLISTING extends Vocabulary {
29 |  |
30 |  |
         public static final String NS = "http://sindice.com/hlisting/0.1/";
31 |  |
32 |  |
         private static HLISTING instance;
33 |  |
34 |  |
         public static HLISTING getInstance() {
35 | 0 |
             if(instance == null) {
36 | 0 |
                 instance = new HLISTING();
37 |  |
             }
38 | 0 |
             return instance;
39 |  |
         }
40 |  |
41 |  |
         // Resources.
42 | 0 |
         public final URI Listing = createClass("Listing");
43 | 0 |
         public final URI Lister  = createClass("Lister" ); // isa FOAF.Person
44 | 0 |
         public final URI Item    = createClass("Item"   ); // isa ?
45 |  |
46 |  |
         // Properties.
47 | 0 |
         public final URI action = createProperty("action");
48 | 0 |
         public final URI lister = createProperty("lister"); // ranges over Lister
49 | 0 |
         public final URI item   = createProperty("item"  );
50 |  |
51 | 0 |
         public final URI sell     = createClass("sell"    );
52 | 0 |
         public final URI rent     = createClass("rent"    );
53 | 0 |
         public final URI trade    = createClass("trade"   );
54 | 0 |
         public final URI meet     = createClass("meet"    );
55 | 0 |
         public final URI announce = createClass("announce");
56 | 0 |
         public final URI offer    = createClass("offer"   );
57 | 0 |
         public final URI wanted   = createClass("wanted"  );
58 | 0 |
         public final URI event    = createClass("event"   );
59 | 0 |
         public final URI service  = createClass("service" );
60 |  |
61 | 0 |
         public final URI tel       = VCARD.getInstance().tel;
62 | 0 |
         public final URI dtlisted  = createProperty("dtlisted" );
63 | 0 |
         public final URI dtexpired = createProperty("dtexpired");
64 | 0 |
         public final URI price     = createProperty("price"    );
65 |  |
66 | 0 |
         public final URI description = createProperty("description");
67 | 0 |
         public final URI summary     = createProperty("summary"    );
68 | 0 |
         public final URI permalink   = createProperty("permalink"  );
69 |  |
70 | 0 |
         public final URI region          = VCARD.getInstance().region;
71 | 0 |
         public final URI postOfficeBox   = VCARD.getInstance().post_office_box;
72 | 0 |
         public final URI locality        = VCARD.getInstance().locality;
73 | 0 |
         public final URI extendedAddress = VCARD.getInstance().extended_address;
74 | 0 |
         public final URI streetAddress   = VCARD.getInstance().street_address;
75 | 0 |
         public final URI postalCode      = VCARD.getInstance().postal_code;
76 | 0 |
         public final URI countryName     = VCARD.getInstance().country_name;
77 |  |
78 | 0 |
         public final URI listerUrl  = createProperty("listerUrl" );
79 | 0 |
         public final URI listerName = createProperty("listerName");
80 | 0 |
         public final URI itemName   = createProperty("itemName"  );
81 | 0 |
         public final URI itemUrl    = createProperty("itemUrl"   );
82 | 0 |
         public final URI itemPhoto  = createProperty("itemPhoto" );
83 | 0 |
         public final URI listerOrg  = createProperty("listerOrg" );
84 | 0 |
         public final URI listerLogo = createProperty("listerLogo");
85 |  |
86 |  |
         private URI createProperty(String localName) {
87 | 0 |
             return createProperty(NS, localName);
88 |  |
         }
89 |  |
90 |  |
         private URI createClass(String localName) {
91 | 0 |
             return createClass(NS, localName);
92 |  |
         }
93 |  |
94 |  |
         private HLISTING(){
95 | 0 |
             super(NS);
96 | 0 |
         }
97 |  |
98 |  |
     }