Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Jena is a Java framework for building Semantic Web applications. It provides a programmatic environment for RDF, RDFS and OWL, SPARQL and includes a rule-based inference engine.
/*
(c) Copyright 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
All rights reserved - see end of file.
$Id: NodeToTriplesMapBase.java,v 1.1 2009/06/29 08:55:55 castagna Exp $
*/
package com.hp.hpl.jena.mem;
import java.util.*;
import com.hp.hpl.jena.graph.*;
import com.hp.hpl.jena.graph.Triple.Field;
import com.hp.hpl.jena.util.iterator.*;
/**
A base class for the "normal" and "faster" NodeToTriplesMaps.
@author kers
*/
public abstract class NodeToTriplesMapBase
{
/**
The map from nodes to Bunch(Triple).
*/
public BunchMap bunchMap = new HashedBunchMap();
/**
The number of triples held in this NTM, maintained incrementally
(because it's a pain to compute from scratch).
*/
protected int size = 0;
protected final Field indexField;
protected final Field f2;
protected final Field f3;
public NodeToTriplesMapBase( Field indexField, Field f2, Field f3 )
{ this.indexField = indexField; this.f2 = f2; this.f3 = f3; }
/**
Add t to this NTM; the node omust
be the index node of the triple. Answer true iff the triple
was not previously in the set, ie, it really truly has been added.
*/
public abstract boolean add( Triple t );
/**
Remove t from this NTM. Answer true iff the
triple was previously in the set, ie, it really truly has been removed.
*/
public abstract boolean remove( Triple t );
public abstract Iterator iterator( Object o, HashCommon.NotifyEmpty container );
/**
Answer true iff this NTM contains the concrete triple t.
*/
public abstract boolean contains( Triple t );
public abstract boolean containsBySameValueAs( Triple t );
/**
The values (usually nodes) which appear in the index position of the stored triples; useful
for eg listSubjects().
*/
public final Iterator