org.openanzo.model.impl
Class AnzoContextStatementImpl
java.lang.Object
org.openrdf.model.impl.StatementImpl
org.openrdf.model.impl.ContextStatementImpl
org.openanzo.model.impl.AnzoContextStatementImpl
- All Implemented Interfaces:
- java.io.Serializable, org.openrdf.model.Statement
public class AnzoContextStatementImpl
- extends org.openrdf.model.impl.ContextStatementImpl
Extension of ContextStatementImpl that adds a few extra constraints.
Hashcode is stored so that it doesn't have to be recomputed every time its needed.
Checks that all values are set on creation, and throws exception if not.
Compares context of 2 statements during equals, if both have a context set.
- Author:
- Matthew Roy ( mroy@cambridgesemantics.com )
- See Also:
- Serialized Form
|
Constructor Summary |
AnzoContextStatementImpl(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj)
Create new AnzoContextStatementImpl with the given values |
AnzoContextStatementImpl(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
Create new AnzoContextStatementImpl with the given values |
|
Method Summary |
boolean |
equals(java.lang.Object otherStmt)
|
int |
hashCode()
|
| Methods inherited from class org.openrdf.model.impl.ContextStatementImpl |
getContext, toString |
| Methods inherited from class org.openrdf.model.impl.StatementImpl |
getObject, getPredicate, getSubject |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
AnzoContextStatementImpl
public AnzoContextStatementImpl(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
- Create new AnzoContextStatementImpl with the given values
- Parameters:
subj - Subject of statementprop - Property of statementobj - Object of statementcontext - Context of statement
- Throws:
AnzoRuntimeException - if subj,prop, or obj are null
AnzoContextStatementImpl
public AnzoContextStatementImpl(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj)
- Create new AnzoContextStatementImpl with the given values
- Parameters:
subj - Subject of statementprop - Property of statementobj - Object of statement
- Throws:
AnzoRuntimeException - if subj,prop, or obj are null
equals
public boolean equals(java.lang.Object otherStmt)
- Specified by:
equals in interface org.openrdf.model.Statement- Overrides:
equals in class org.openrdf.model.impl.StatementImpl
hashCode
public int hashCode()
- Specified by:
hashCode in interface org.openrdf.model.Statement- Overrides:
hashCode in class org.openrdf.model.impl.StatementImpl
Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.