Tabnine Logo
Models.isSubsetInternal
Code IndexAdd Tabnine to your IDE (free)

How to use
isSubsetInternal
method
in
org.openrdf.model.util.Models

Best Java code snippets using org.openrdf.model.util.Models.isSubsetInternal (Showing top 2 results out of 315)

origin: org.openrdf.sesame/sesame-model

/**
 * Compares two RDF models, and returns <tt>true</tt> if the first model is a
 * subset of the second model, using graph isomorphism to map statements
 * between models.
 */
public static boolean isSubset(Set<? extends Statement> model1, Set<? extends Statement> model2) {
  // Compare the number of statements in both sets
  if (model1.size() > model2.size()) {
    return false;
  }
  return isSubsetInternal(model1, model2);
}
origin: org.openrdf.sesame/sesame-model

/**
 * Compares two RDF models, and returns <tt>true</tt> if they consist of
 * isomorphic graphs and the isomorphic graph identifiers map 1:1 to each
 * other. RDF graphs are isomorphic graphs if statements from one graphs can
 * be mapped 1:1 on to statements in the other graphs. In this mapping, blank
 * nodes are not considered mapped when having an identical internal id, but
 * are mapped from one graph to the other by looking at the statements in
 * which the blank nodes occur.
 * <p>
 * A Model can consist of more than one graph (denoted by context
 * identifiers). Two models are considered isomorphic if for each of the
 * graphs in one model, an isomorphic graph exists in the other model, and
 * the context identifiers of these graphs are either identical or (in the
 * case of blank nodes) map 1:1 on each other.
 * 
 * @see <a href="http://www.w3.org/TR/rdf11-concepts/#graph-isomorphism">RDF
 *      Concepts &amp; Abstract Syntax, section 3.6 (Graph Comparison)</a>
 * @since 2.8.0
 */
public static boolean isomorphic(Iterable<? extends Statement> model1,
    Iterable<? extends Statement> model2)
{
  Set<? extends Statement> set1 = toSet(model1);
  Set<? extends Statement> set2 = toSet(model2);
  // Compare the number of statements in both sets
  if (set1.size() != set2.size()) {
    return false;
  }
  return isSubsetInternal(set1, set2);
}
org.openrdf.model.utilModelsisSubsetInternal

Popular methods of Models

  • objectLiteral
    Retrieves an object Literal value from the statements in the given model. If more than one possible
  • isomorphic
    Compares two RDF models, and returns true if they consist of isomorphic graphs and the isomorphic gr
  • objectIRI
    Retrieves an object IRI value from the statements in the given model. If more than one possible IRI
  • objectResource
    Retrieves an object Resource value from the statements in the given model. If more than one possible
  • isSubset
    Compares two RDF models, and returns true if the first model is a subset of the second model, using
  • findMatchingStatements
  • matchModels
  • object
    Retrieves an object Value from the statements in the given model. If more than one possible object v
  • predicate
    Retrieves a predicate from the statements in the given model. If more than one possible predicate va
  • statementsMatch
  • subject
    Retrieves a subject Resource from the statements in the given model. If more than one possible resou
  • subjectBNode
    Retrieves a subject BNode from the statements in the given model. If more than one possible blank no
  • subject,
  • subjectBNode,
  • subjectIRI,
  • toSet

Popular in Java

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • setScale (BigDecimal)
  • setContentView (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now