org.ontoware.rdf2go.model.impl
Class TriplePatternImpl

java.lang.Object
  extended by org.ontoware.rdf2go.model.impl.TriplePatternImpl
All Implemented Interfaces:
TriplePattern
Direct Known Subclasses:
QuadPatternImpl

public class TriplePatternImpl
extends java.lang.Object
implements TriplePattern

A statement with variables

Author:
voelkel

Nested Class Summary
static class TriplePatternImpl.SPO
           
 
Field Summary
 TriplePatternImpl.SPO extract
           
 
Constructor Summary
TriplePatternImpl(ResourceOrVariable subject, UriOrVariable predicate, NodeOrVariable object)
           
TriplePatternImpl(ResourceOrVariable subject, UriOrVariable predicate, NodeOrVariable object, TriplePatternImpl.SPO extract)
           
TriplePatternImpl(ResourceOrVariable subject, URI predicate, java.lang.String object)
          Convenience constructor
 
Method Summary
static TriplePatternImpl createObjectPattern(Resource resource, URI propertyURI)
           
static TriplePatternImpl createSubjectPattern(URI propertyURI, Node objectNode)
           
 boolean equals(java.lang.Object o)
           
 Node getExtract(Statement statement)
           
 NodeOrVariable getObject()
           
 UriOrVariable getPredicate()
           
 ResourceOrVariable getSubject()
           
 int hashCode()
           
 boolean matches(Statement statement)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extract

public TriplePatternImpl.SPO extract
Constructor Detail

TriplePatternImpl

public TriplePatternImpl(ResourceOrVariable subject,
                         UriOrVariable predicate,
                         NodeOrVariable object)

TriplePatternImpl

public TriplePatternImpl(ResourceOrVariable subject,
                         UriOrVariable predicate,
                         NodeOrVariable object,
                         TriplePatternImpl.SPO extract)

TriplePatternImpl

public TriplePatternImpl(ResourceOrVariable subject,
                         URI predicate,
                         java.lang.String object)
Convenience constructor

Parameters:
subject -
predicate -
object -
Method Detail

getObject

public NodeOrVariable getObject()
Specified by:
getObject in interface TriplePattern

getPredicate

public UriOrVariable getPredicate()
Specified by:
getPredicate in interface TriplePattern

getSubject

public ResourceOrVariable getSubject()
Specified by:
getSubject in interface TriplePattern

getExtract

public Node getExtract(Statement statement)
Parameters:
statement - an RDF2Go statement
Returns:
the part of the statement which should be extracted according to this pattern

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

createObjectPattern

public static TriplePatternImpl createObjectPattern(Resource resource,
                                                    URI propertyURI)

createSubjectPattern

public static TriplePatternImpl createSubjectPattern(URI propertyURI,
                                                     Node objectNode)

matches

public boolean matches(Statement statement)
Specified by:
matches in interface TriplePattern


Copyright © 2005-2008 FZI - Forschungszentrum Informatik | Karlsruhe | Germany. All Rights Reserved.