All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bigdata.rdf.store.BD Maven / Gradle / Ivy

/*

Copyright (C) SYSTAP, LLC DBA Blazegraph 2006-2016.  All rights reserved.

Contact:
     SYSTAP, LLC DBA Blazegraph
     2501 Calvert ST NW #106
     Washington, DC 20008
     [email protected]

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/
/*
 * Created on Apr 12, 2008
 */

package com.bigdata.rdf.store;

import org.openrdf.model.Resource;
import org.openrdf.model.URI;
import org.openrdf.model.Value;
import org.openrdf.model.impl.URIImpl;
import org.openrdf.model.vocabulary.SESAME;

import com.bigdata.rdf.sparql.ast.cache.DescribeServiceFactory;
import com.bigdata.rdf.sparql.ast.eval.ServiceParams;
import com.bigdata.rdf.sparql.ast.optimizers.ASTALPServiceOptimizer;


/**
 * A vocabulary for bigdata specific extensions.
 * 
 * @author Bryan Thompson
 */
public interface BD {

    /**
     * The namespace used for bigdata specific extensions.
     */
    String NAMESPACE = "http://www.bigdata.com/rdf#";
    
    /**
     * The name of a per-statement attribute whose value is recognized in
     * RDF/XML as the statement identifier for statement described by the
     * element on which it appears. The bigdata:sid attribute is
     * allowed on elements describing RDF statements and serves as a
     * per-statement identifier. The value of the bigdata:sid
     * attribute must conform to the syntactic constraints of a blank node. By
     * re-using the value of the bigdata:sid attribute within
     * other statements in the same RDF/XML document, the client can express
     * statements about the statements.
     * 

* This RDF/XML extension allows us to inline provenance (statements about * statements) with RDF/XML to clients in a manner which has minor impact on * unaware clients (they will perceive additional statements whose predicate * is bigdata:sid). In addition, clients aware of this * extension can submit RDF/XML with inline provenance. *

* For example: * *

     * <rdf:Description rdf:about="http://www.foo.org/A">
     *     <label bigdata:sid="_S67" xmlns="http://www.w3.org/2000/01/rdf-schema#">abc</label>
     * </rdf:Description>
     * 
*/ URI SID = new URIImpl(NAMESPACE+"sid"); /** * The name of a per-statement attribute whose indicates whether the * statement is an axiom, inference, or explicit in the knowledge base. This * attribute is strictly informative for clients and is ignored when loading * data into a knowledge base. *

* The value will be one of *

*
Axiom
*
The statement is an axiom that has not been explicitly asserted.
*
Inferred
*
The statement is an inference that has not been explicitly asserted.
*
Explicit
*
The statement has been explicitly asserted.
*
* Note: If the knowledge base supports truth maintenance and an explicit * statement is deleted from the knowledge base but it remains provable as * an inference or an axiom then then knowledge base will continue to report * it as either an axiom or an inference as appropriate. */ URI STATEMENT_TYPE = new URIImpl(NAMESPACE+"statementType"); /** * The URI for the "DESCRIBE" service. * * @see DescribeServiceFactory * @see * Describe Cache */ URI DESCRIBE = new URIImpl(NAMESPACE + "describe"); /** * Sesame has the notion of a "null" graph. Any time you insert a statement * into a quad store and the context position is not specified, it is * actually inserted into this "null" graph. If SPARQL DATASET * is not specified, then all contexts are queried and you will see * statements from the "null" graph as well as from any other context. * {@link com.bigdata.rdf.sail.BigdataSailConnection#getStatements(Resource, URI, Value, boolean, Resource...)} * will return statements from the "null" graph if the context is either * unbound or is an array whose sole element is null. *

* Given * *

    * void foo(Resource s, final URI p, final Value o, final Resource... contexts)
    * 
* *
*
foo(s,p,o)
*
All named graphs are addressed. The contexts parameter will be * a Resource[0] reference.
*
foo(s,p,o,(Resource[]) null)
*
* Note: openrdf does not allow this invocation pattern - the Resource[] MUST NOT be a null reference. *
*
foo(s,p,o,(Resource) null)
*
The openrdf "nullGraph" is addressed. The contexts parameter * will be Resource[]{null}. Java will autobox the Resource reference as a * Resource[]{null} array.
*
foo(s,p,o,x,y,z)
*
The openrdf named graphs (x,y,z) are addressed. The contexts * parameter will be Resource[]{x,y,z}.
*
foo(s,p,o,x,null,z)
*
The openrdf named graphs (x,nullGraph,z) are addressed. The * contexts parameter will be Resource[]{x,null,z}
* *
* * @see Resource... contexts * not encoded/decoded according to openrdf semantics (REST API) * * @see com.bigdata.rdf.sail.BigdataSailConnection#addStatement(Resource, * URI, Value, Resource...) * @see com.bigdata.rdf.sail.BigdataSailConnection#getStatements(Resource, * URI, Value, boolean, Resource...) * @see SESAME#NIL */ URI NULL_GRAPH = new URIImpl(NAMESPACE + "nullGraph"); /** *

* A predicate used to model the membership of a virtual graph. The * following assertions declare the membership of a virtual graph as the * graphs (:g1,:g2). *

* *
     * :vg bd:virtualGraph :g1
     * :vg bd:virtualGraph :g2
     * 
* *

*

* Virtual graphs are addressed through a SPARQL syntax extension: *

* *
     * FROM VIRTUAL GRAPH
     * FROM NAMED VIRTUAL GRAPH
     * 
* *

* If :vg as declared above is addressed using * FROM VIRTUAL GRAPH then its member graphs (:g1,:g2) are * added to the default graph for the query. *

*

* If :vg as declared above is addressed using * FROM NAMED VIRTUAL GRAPH then its member graphs (:g1,:g2) * are added to the named graphs for the query. *

* * @see * Virtual Graphs (ticket) * @see * Virtual Graphs (wiki) */ URI VIRTUAL_GRAPH = new URIImpl(NAMESPACE + "virtualGraph"); // /** // * We need the ability to do atomic add+drop in one operation via the // * remoting interface. Thus we need the ability to place // * statements to add and to delete in the same serialized document sent // * across the wire. This separator key, when included in a comment, will // * mark the separation point between statements to drop (above the // * separator) and statements to add (below the separator). // */ // URI ATOMIC_UPDATE_SEPARATOR_KEY = new URIImpl(NAMESPACE + "atomicUpdateSeparatorKey"); /** * URI that can be used as the Subject of magic triple patterns for bigdata * SERVICEs. There may be zero or more such triple patterns. The Predicate * (key) and Object (val) positions for those triple patterns are extracted * into a {@link ServiceParams} object. For each key, there may be one or * more values. * *
     * SERVICE  {
     *   bd:serviceParam :key1 :val1 .
     *   bd:serviceParam :key1 :val2 .
     *   bd:serviceParam :key2 :val3 .
     * }
     * 
* * @see ServiceParams. */ URI SERVICE_PARAM = new URIImpl(NAMESPACE + "serviceParam"); /** * The well-known URI of the ALP SERVICE extension. * * @see ASTALPServiceOptimizer * @see Configurable ALP * Service * @see Document the ALP * Service */ URI ALP_SERVICE = new URIImpl(NAMESPACE + "alp"); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy