Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.graph.query
Class Pattern

    java.lang.Object
      com.hp.hpl.jena.graph.query.Pattern

    public class Pattern

extends java.lang.Object

A Pattern represents a matching triple; it is composed of S, P, and O Elements.

Author:
  hedgehog

Field Summary
`Element` | `O`
`Element` | `P`
`Element` | `S`

Constructor Summary
`Pattern(Element S, Element P, Element O)`

Method Summary
`TripleMatch` | `asTripleMatch(Domain d)` Convert a Pattern into a TripleMatch by making a Triple who's Nodes are the conversions of the constituent elements.
`boolean` | `match(Domain d, Triple t)` Answer true iff this pattern, given the values for variables as found in a given Domain, matches the given triple; update the Domain with any variable bindings.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### S

    public final Element S

### P

    public final Element P

### O

    public final Element O

Constructor Detail

### Pattern

    public Pattern(Element S,
                   Element P,
                   Element O)

Method Detail

### asTripleMatch

    public TripleMatch asTripleMatch(Domain d)

  Convert a Pattern into a TripleMatch by making a Triple who's Nodes are the conversions of the constituent elements.

### match

    public boolean match(Domain d,
                         Triple t)

  Answer true iff this pattern, given the values for variables as found in a given Domain, matches the given triple; update the Domain with any variable bindings.

  Parameters:
    `d` - the Domain with the current bound variable values (and slots for the rest)
    `t` - the concrete triple to match
  Returns:
    true iff this pattern matches the triple [and side-effects the domain]

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP