|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.rdf.model.BNodeContextFactory
public class BNodeContextFactory
Class provides a document-scoped context for generating blank node
identifiers (IDs). This class is intended for use to generate blank node
identifiers (IDs) for a source document within a shared prefix. When that
prefix is mapped onto the term2id index, all blank nodes for the same
source document will tend to be mapped onto the same index partition
(this is more efficient since the ordered writes are more local). The
prefix itself is a UUID, which is how we ensure that blank nodes
generated for different sources are understood as distinct blank nodes by
the database (this is required).
Note: All BigdataValue instances are in fact created by the
delegate instances created by this class and by the delegate will appear
to have been created by the same factory. This is intentional - it makes
the instances reusable by the base factory.
Note: nextID() is NOT thread-safe, but different documents that
are being passed concurrently will have a distinct instance of this
factory and processing a single document is generally single-threaded.
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
protected String nextID()
public BigdataBNodeImpl createBNode()
createBNode in interface BigdataValueFactorycreateBNode in interface ValueFactorypublic BigdataValue asValue(Value v)
BigdataValueFactoryValue into a BigdataValue. If the value is
already a BigdataValue and it was allocated by this
BigdataValueFactoryImpl then it is returned unchanged. Otherwise a
new BigdataValue will be creating using the same data as the
given value and the term identifier on the new BigdataValue will
be initialized to IRawTripleStore.NULL.
All BigdataValues created by a BigdataValueFactoryImpl
internally store a transient reference to the BigdataValueFactoryImpl.
This reference is used to decide if a BigdataValue MIGHT have
been created by a different lexicon (term identifiers generated by
different lexicons CAN NOT be used interchangably). This has the effect
of protecting against incorrect use of the term identifier with a
database backed by a different lexicon while allowing reuse of the
BigdataValues when possible.
asValue in interface BigdataValueFactoryv - The value.
BigdataValue with the same data. If the value is
null then null is returned.public BigdataBNodeImpl createBNode(String id)
createBNode in interface BigdataValueFactorycreateBNode in interface ValueFactorypublic BigdataLiteralImpl createLiteral(boolean arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactorypublic BigdataLiteralImpl createLiteral(byte arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactorypublic BigdataLiteralImpl createLiteral(double arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactorypublic BigdataLiteralImpl createLiteral(float arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactorypublic BigdataLiteralImpl createLiteral(int arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactorypublic BigdataLiteralImpl createLiteral(long arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactorypublic BigdataLiteralImpl createLiteral(short arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactory
public BigdataLiteralImpl createLiteral(String label,
String language)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactory
public BigdataLiteralImpl createLiteral(String label,
URI datatype)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactorypublic BigdataLiteralImpl createLiteral(String label)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactorypublic BigdataLiteralImpl createLiteral(XMLGregorianCalendar arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface ValueFactory
public BigdataStatementImpl createStatement(Resource s,
URI p,
Value o)
BigdataValueFactoryStatementEnum is NOT specified.
createStatement in interface BigdataValueFactorycreateStatement in interface ValueFactory
public BigdataStatementImpl createStatement(Resource s,
URI p,
Value o,
Resource c)
BigdataValueFactoryStatementEnum is NOT specified.
createStatement in interface BigdataValueFactorycreateStatement in interface ValueFactory
public BigdataStatementImpl createStatement(Resource s,
URI p,
Value o,
Resource c,
StatementEnum type)
BigdataValueFactoryBigdataValueFactory using
BigdataValueFactory.asValue(Value).
createStatement in interface BigdataValueFactorys - The subject.p - The predicate.o - The object.c - The context (optional). Note: When non-null
and statement identifiers are enabled, then this will be a
blank node whose term identifier is the statement identifier.type - The statement type (optional).
public BigdataURIImpl createURI(String namespace,
String localName)
createURI in interface BigdataValueFactorycreateURI in interface ValueFactorypublic BigdataURIImpl createURI(String uriString)
createURI in interface BigdataValueFactorycreateURI in interface ValueFactorypublic BigdataValueSerializer<BigdataValue> getValueSerializer()
BigdataValueFactoryValues using this
ValueFactory. When the values are de-serialized they will have a
reference to this BigdataValueFactoryImpl. That reference can be
used to identify when two BigdataValues MIGHT be from different
lexicons.
getValueSerializer in interface BigdataValueFactorypublic BigdataValueFactory newBNodeContext()
newBNodeContext in interface BigdataValueFactoryBNodeContextFactorypublic BigdataResource asValue(Resource v)
BigdataValueFactoryResources.
asValue in interface BigdataValueFactorypublic BigdataURI asValue(URI v)
BigdataValueFactoryURIs.
asValue in interface BigdataValueFactorypublic BigdataLiteral asValue(Literal v)
BigdataValueFactoryLiterals.
asValue in interface BigdataValueFactorypublic BigdataBNode asValue(BNode v)
BigdataValueFactoryBNodes.
asValue in interface BigdataValueFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||