Coverage Report - org.apache.any23.vocab.OGP
 
Classes in this File Line Coverage Branch Coverage Complexity
OGP
0%
0/31
0%
0/2
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  
  * The <a href="http://ogp.me/">Open Graph Protocol</> vocabulary.
 24  
  *
 25  
  * @author Michele Mostarda (mostarda@fbk.eu)
 26  
  */
 27  
 public class OGP extends Vocabulary {
 28  
 
 29  
     public static final String NS = "http://ogp.me/ns#";
 30  
     
 31  
     /* BEGIN: Basic Metadata. */
 32  
 
 33  
     /** The title of your object as it should appear within the graph (Facebook Graph API). */
 34  
     public static final String TITLE = "title";
 35  
     /** The type of your object, e.g., <code>video.movie</code>.
 36  
      *  Depending on the type you specify, other properties may also be required. */
 37  
     public static final String TYPE  = "type";
 38  
     /** An image URL which should represent your object within the graph. */
 39  
     public static final String URL   = "url";
 40  
     /** The canonical URL of your object that will be used as its permanent ID in the graph (Facebook Graph API). */
 41  
     public static final String IMAGE = "image";
 42  
 
 43  
     /* END: Basic Metadata. */
 44  
 
 45  
     /* BEGIN: Optional Metadata. */
 46  
 
 47  
     /** A URL to an audio file to accompany this object. */
 48  
     public static final String AUDIO = "audio";
 49  
     /** A one to two sentence description of your object. */
 50  
     public static final String DESCRIPTION = "description";
 51  
     /** The word that appears before this object's title in a sentence. An enum of (a, an, the, "", auto).
 52  
      *  If auto is chosen, the consumer of your data should chose between "a" or "an". Default is "" (blank). */
 53  
     public static final String DETERMINER = "determiner";
 54  
     /** The locale these tags are marked up in. Of the format <code>language_TERRITORY</code>.
 55  
      *  Default is <code>en_US</code>. */
 56  
     public static final String LOCALE = "locale";
 57  
     /** An array of other locales this page is available in. */
 58  
     public static final String LOCALE__ALTERNATE = "locale:alternate";
 59  
     /** If your object is part of a larger web site, the name which should be
 60  
      *  displayed for the overall site. e.g., <b>IMDb</b>. */
 61  
     public static final String SITE_NAME = "site_name";
 62  
     /** A URL to a video file that complements this object. */
 63  
     public static final String VIDEO = "video";
 64  
 
 65  
     /* END: Optional Metadata. */
 66  
 
 67  
     /* BEGIN: Structured Properties. */
 68  
 
 69  
     /** Identical to <code>og:image</code>. */
 70  
     public static final String IMAGE__URL        = "image:url";
 71  
     /** An alternate url to use if the webpage requires <b>HTTPS</b>. */
 72  
     public static final String IMAGE__SECURE_URL = "image:secure_url";
 73  
     /** A <i>MIME type</i> for this image. */
 74  
     public static final String IMAGE__TYPE       = "image:type";
 75  
     /** The number of pixels wide. */
 76  
     public static final String IMAGE__WIDTH      = "image:width";
 77  
     /** The number of pixels high. */
 78  
     public static final String IMAGE__HEIGHT     = "image:height";
 79  
 
 80  
     /** Video URL. */
 81  
     public static final String VIDEO__URL        = "video:url";
 82  
     /** An alternate url to use if the webpage requires <b>HTTPS</b>. */
 83  
     public static final String VIDEO__SECURE_URL = "video:secure_url";
 84  
     /** A <i>MIME type</i> for this video. */
 85  
     public static final String VIDEO__TYPE       = "video:type";
 86  
     /** The number of pixels wide. */
 87  
     public static final String VIDEO__WIDTH      = "video:width";
 88  
     /** The number of pixels height. */
 89  
     public static final String VIDEO__HEIGHT     = "video:height";
 90  
 
 91  
     /** An alternate url to use if the webpage requires <b>HTTPS</b>. */
 92  
     public static final String AUDIO__SECURE_URL = "audio:secure_url";
 93  
     /** A <i>MIME type</i> for this audio. */
 94  
     public static final String AUDIO__TYPE       = "audio:type";
 95  
 
 96  
     /* END: Structured Properties. */
 97  
 
 98  
     private static OGP instance;
 99  
 
 100  
     public static OGP getInstance() {
 101  0
         if(instance == null) {
 102  0
             instance = new OGP();
 103  
         }
 104  0
         return instance;
 105  
     }
 106  
 
 107  0
     public final URI NAMESPACE = createURI(NS);
 108  
     
 109  
 
 110  0
     public final URI title           = createProperty(TITLE);
 111  0
     public final URI type            = createProperty(TYPE);
 112  0
     public final URI url             = createProperty(URL);
 113  0
     public final URI image           = createProperty(IMAGE);
 114  0
     public final URI description     = createProperty(DESCRIPTION);
 115  0
     public final URI determiner      = createProperty(DETERMINER);
 116  0
     public final URI locale          = createProperty(LOCALE);
 117  0
     public final URI localeAlternate = createProperty(LOCALE__ALTERNATE);
 118  0
     public final URI siteName        = createProperty(SITE_NAME);
 119  0
     public final URI video           = createProperty(VIDEO);
 120  
 
 121  0
     public final URI imageURL       = createProperty(IMAGE__URL);
 122  0
     public final URI imageSecureURL = createProperty(IMAGE__SECURE_URL);
 123  0
     public final URI imageType      = createProperty(IMAGE__TYPE);
 124  0
     public final URI imageWidth     = createProperty(IMAGE__WIDTH);
 125  0
     public final URI imageHeight    = createProperty(IMAGE__HEIGHT);
 126  
 
 127  0
     public final URI videoURL       = createProperty(VIDEO__URL);
 128  0
     public final URI videoSecureURL = createProperty(VIDEO__SECURE_URL);
 129  0
     public final URI videoType      = createProperty(VIDEO__TYPE);
 130  0
     public final URI videoWidth     = createProperty(VIDEO__WIDTH);
 131  0
     public final URI videoHeight    = createProperty(VIDEO__HEIGHT);
 132  
 
 133  0
     public final URI audio          = createProperty(AUDIO);
 134  0
     public final URI audioSecureURL = createProperty(AUDIO__SECURE_URL);
 135  0
     public final URI audioType      = createProperty(AUDIO__TYPE);
 136  
 
 137  
     private URI createClass(String localName) {
 138  0
         return createClass(NS, localName);
 139  
     }
 140  
 
 141  
     private URI createProperty(String localName) {
 142  0
         return createProperty(NS, localName);
 143  
     }
 144  
 
 145  
     private OGP() {
 146  0
         super(NS);
 147  0
     }
 148  
 
 149  
 }