Codota Logo
Node.equals
Code IndexAdd Codota to your IDE (free)

How to use
equals
method
in
com.hp.hpl.jena.graph.Node

Best Java code snippets using com.hp.hpl.jena.graph.Node.equals (Showing top 20 results out of 315)

  • Common ways to obtain Node
private void myMethod () {
Node n =
  • Codota IconTriple triple;triple.getObject()
  • Codota IconTriple triple;triple.getPredicate()
  • Codota IconTriple triple;triple.getSubject()
  • Smart code suggestions by Codota
}
origin: com.hp.hpl.jena/arq

/** Default, concrete graph (either generated or explicitly named) -- not triple-in-quad*/
public static boolean isUnionGraph(Node node)
{
  return unionGraph.equals(node) ; 
}
origin: com.hp.hpl.jena/arq

/** Test whether this is a quad for the default graph (not the default graphs by explicit name) */
public static boolean isDefaultGraphGenerated(Node node)
{
  // The node used by the quad generator for the default graph 
  // Not the named graph that refers to the default graph.
  return defaultGraphNodeGenerated.equals(node) ;
}
 
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

  @Override
  public boolean mightBeEqual(SomeResource r) {
    if (r!=null && (r instanceof FixedResource)) {
      FixedResource f = (FixedResource)r;
      return hash == f.hash && node.equals(f.node); // PURE SYNTAX
    } else {
      return false;
    }
  }
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/** 
  Answer true iff this triple has subject s, predicate p, and object o.
*/    
public boolean sameAs( Node s, Node p, Node o )
  { return subj.equals( s ) && pred.equals( p ) && obj.equals( o ); }
  
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
  Answer true iff this node accepts the other one as a match.
  The default is an equality test; it is over-ridden in subclasses to
  provide the appropriate semantics for literals, ANY, and variables.
  
  @param other a node to test for matching
  @return true iff this node accepts the other as a match
*/
public boolean matches( Node other )
  { return equals( other ); }
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

/** Test whether this is a quad for the default graph (not the default graphs by explicit name) */
public static boolean isDefaultGraphGenerated(Node node)
{
  // The node used by the quad generator for the default graph 
  // Not the named graph that refers to the default graph.
  return defaultGraphNodeGenerated.equals(node) ;
}

origin: com.hp.hpl.jena/arq

  private boolean isSameOrVar(Node var, Node value)
  {
    return var.isVariable() || var.equals(value) ;
  }
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
 * Compare two patterns and return true if arg is a more
 * specific (more grounded) version of this one.
 * Does not handle functors.
 */
public boolean subsumes(TriplePattern arg) {
  return (subject.isVariable()  || subject.equals(arg.subject))
    && (predicate.isVariable() || predicate.equals(arg.predicate))
    && (object.isVariable() || object.equals(arg.object));
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public boolean equalTo(Op other, NodeIsomorphismMap labelMap)
{
  if ( ! ( other instanceof OpQuadPattern ) ) return false ;
  OpQuadPattern opQuad = (OpQuadPattern)other ;
  if ( ! graphNode.equals(opQuad.graphNode) )
    return false ;
  return triples.equiv(opQuad.triples, labelMap) ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public boolean equals(Object other)
{
  if ( this == other ) return true ;
  if ( ! ( other instanceof PropFuncArg ) ) return false ;
  PropFuncArg pfArg = (PropFuncArg)other ;
  if ( isNode() )
    return arg.equals(pfArg.arg) ;
  return argList.equals(pfArg.argList) ;
  
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

private static void update(Node node, PatternTriple elt)
{
  if ( Var.isVar(node) )
  {
    if ( node.equals(elt.subject.getNode()) )
      elt.subject = PatternElements.TERM ;
    if ( node.equals(elt.predicate.getNode()) )
      elt.predicate = PatternElements.TERM ;
    if ( node.equals(elt.object.getNode()) )
      elt.object = PatternElements.TERM ;
  }
}

origin: com.hp.hpl.jena/arq

private void addPatterns(Item predicate, double numProp)
{
  double wSP = weightSP ;
  double wPO = weightPO ;
  wPO = Math.min(numProp, wPO) ;
  wSP = Math.min(numProp, wSP) ;
  
  if ( NodeConst.nodeRDFType.equals(predicate.getNode()) )
    // ? rdf:type <Object> -- Avoid as can be very, very bad.
    wPO = weightTypeO ;
  addPatterns(predicate, numProp, wSP, wPO) ;
}
 
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

private void addPatterns(Item predicate, double numProp)
{
  double wSP = weightSP ;
  double wPO = weightPO ;
  wPO = Math.min(numProp, wPO) ;
  wSP = Math.min(numProp, wSP) ;
  
  if ( NodeConst.nodeRDFType.equals(predicate.getNode()) )
    // ? rdf:type <Object> -- Avoid as can be very, very bad.
    wPO = weightTypeO ;
  addPatterns(predicate, numProp, wSP, wPO) ;
}

origin: com.hp.hpl.jena/arq

private void addPatternsSmall(Item predicate, double numProp)
{
  double wSP = weightSP_small ;
  double wPO = weightPO_small ;
  wPO = Math.min(numProp, wPO) ;
  wSP = Math.min(numProp, wSP) ;
  
  if ( predicate.isNode() && NodeConst.nodeRDFType.equals(predicate.getNode()) )
    wPO = weightTypeO_small ;
  addPatterns(predicate, numProp, wSP, wPO) ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

private static boolean equalNode(Node m, Node n)
{
  // m should not be null unless .getMatchXXXX used to get the node.
  // Language tag canonicalization
  n = fixupNode(n) ;
  m = fixupNode(m) ;
  return (m==null) || (m == Node.ANY) || m.equals(n) ;
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
 * Validate a triple add to see if it should reinvoke the hook. If so
 * then the inference will be restarted at next prepare time. Incremental
 * re-processing is not yet supported.
 */
@Override
public boolean needsRerun(FBRuleInfGraph infGraph, Triple t) {
  return (t.getPredicate().equals(OWL.intersectionOf.asNode()));
}
origin: com.hp.hpl.jena/arq

  public static boolean nodeIso(Node n1, Node n2, NodeIsomorphismMap isoMap)
  {
    if ( isoMap != null && Var.isBlankNodeVar(n1) && Var.isBlankNodeVar(n2) )
      return isoMap.makeIsomorhpic(n1, n2) ;
    return n1.equals(n2) ;
  }
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

  @Override
  public boolean doCheck( Node n, EnhGraph g ) {
    for (Iterator<Resource> i = ((OntModel) g).getProfile().getAnnotationProperties();  i.hasNext(); ) {
      if (i.next().asNode().equals( n )) {
        // a built-in annotation property
        return true;
      }
    }
    return g.asGraph().contains( n, RDF.type.asNode(), OWL.AnnotationProperty.asNode() );
  }
}
origin: com.hp.hpl.jena/arq

@Override
public boolean equalTo(Op other, NodeIsomorphismMap labelMap)
{
  if ( ! (other instanceof OpService) )
    return false ;
  OpService opService = (OpService)other ;
  if ( ! ( serviceNode.equals(opService.serviceNode) ) )
    return false ;
  if ( opService.getSilent() != getSilent() )
    return false ;
  return getSubOp().equalTo(opService.getSubOp(), labelMap) ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

  @Override
  public boolean doCheck( Node n, EnhGraph g ) {
    return n.equals( RDF.nil.asNode() )  ||
    g.asGraph().contains( n, RDF.type.asNode(), RDF.List.asNode() );
  }
}
com.hp.hpl.jena.graphNodeequals

Javadoc

Nodes only equal other Nodes that have equal labels.

Popular methods of Node

  • getURI
    get the URI of this node if it has one, else die horribly
  • isURI
    Answer true iff this node is a URI node [subclasses override]
  • isLiteral
    Answer true iff this node is a literal node [subclasses override]
  • toString
    Answer a human-readable representation of this Node where literals are quoted according to quoting b
  • isBlank
    Answer true iff this node is a blank node [subclasses override]
  • getLiteralLexicalForm
    Answer the lexical form of this node's literal value, if it is a literal; otherwise die horribly.
  • getLiteralDatatypeURI
    Answer the data-type URI of this node's literal value, if it is a literal; otherwise die horribly.
  • createURI
    make a URI node with the specified URIref string
  • getLiteral
    Answer the literal value of a literal node, or throw an UnsupportedOperationException if it's not a
  • getBlankNodeLabel
    Answer the label of this blank node or throw an UnsupportedOperationException if it's not blank.
  • getLiteralLanguage
    Answer the language of this node's literal value, if it is a literal; otherwise die horribly.
  • isVariable
    Answer true iff this node is a variable node - subclasses override
  • getLiteralLanguage,
  • isVariable,
  • createLiteral,
  • getName,
  • getLiteralValue,
  • createAnon,
  • getBlankNodeId,
  • isConcrete,
  • hashCode

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now