001 /*
002 * (c) Copyright 2009 University of Bristol
003 * All rights reserved.
004 * [See end of file]
005 */
006 package net.rootdev.javardfa;
007
008 import java.util.Arrays;
009 import java.util.Collection;
010 import java.util.Collections;
011 import java.util.HashSet;
012 import java.util.List;
013 import java.util.Set;
014 import javax.xml.namespace.QName;
015
016 /**
017 *
018 * @author pldms
019 */
020 public class Constants {
021 final static List<String> _allowed = Arrays.asList(
022 "alternate", "appendix", "bookmark", "cite",
023 "chapter", "contents", "copyright", "first",
024 "glossary", "help", "icon", "index", "last",
025 "license", "meta", "next", "p3pv1", "prev",
026 "collection", "role", "section", "stylesheet",
027 "subsection", "start", "top", "up");
028 public final static Set<String> SpecialRels = new HashSet<String>(_allowed);
029 // Suggestion: switch this for object produced by factory that matches QNames
030 // we can then en-slacken if needed by passing in different factory etc
031 public final static QName about = new QName("about"); // safe
032 public final static QName resource = new QName("resource"); // safe
033 public final static QName href = new QName("href"); // URI
034 public final static QName src = new QName("src"); // URI
035 public final static QName property = new QName("property"); // CURIE
036 public final static QName datatype = new QName("datatype"); // CURIE
037 public final static QName typeof = new QName("typeof"); // CURIE
038 public final static QName rel = new QName("rel"); // Link types and CURIES
039 public final static QName rev = new QName("rev"); // Link type and CURIES
040 public final static QName content = new QName("content");
041 public final static QName xmllang = new QName("xml:lang");
042 public final static QName xmllangNS = new QName("http://www.w3.org/XML/1998/namespace", "lang", "xml");
043 public final static QName lang = new QName("lang");
044 public final static QName base = new QName("http://www.w3.org/1999/xhtml", "base");
045 public final static QName head = new QName("http://www.w3.org/1999/xhtml", "head");
046 public final static QName body = new QName("http://www.w3.org/1999/xhtml", "body");
047 // Hack bits
048 public final static QName input = new QName("http://www.w3.org/1999/xhtml", "input");
049 public final static QName name = new QName("name");
050 public final static QName form = new QName("http://www.w3.org/1999/xhtml", "form");
051 public final static Collection<String> rdfType = Collections.singleton("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
052
053 // RDFa 1.1
054 public final static QName vocab = new QName("vocab");
055 public final static QName profile = new QName("profile");
056 public final static QName prefix = new QName("prefix");
057 }
058
059 /*
060 * (c) Copyright 2009 University of Bristol
061 * All rights reserved.
062 *
063 * Redistribution and use in source and binary forms, with or without
064 * modification, are permitted provided that the following conditions
065 * are met:
066 * 1. Redistributions of source code must retain the above copyright
067 * notice, this list of conditions and the following disclaimer.
068 * 2. Redistributions in binary form must reproduce the above copyright
069 * notice, this list of conditions and the following disclaimer in the
070 * documentation and/or other materials provided with the distribution.
071 * 3. The name of the author may not be used to endorse or promote products
072 * derived from this software without specific prior written permission.
073 *
074 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
075 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
076 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
077 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
078 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
079 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
080 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
081 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
082 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
083 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
084 */