com.clarkparsia.pellet.sparqldl.model
Class CoreNewImpl

java.lang.Object
  extended by com.clarkparsia.pellet.sparqldl.model.CoreNewImpl
All Implemented Interfaces:
Core, QueryAtom

public class CoreNewImpl
extends java.lang.Object
implements QueryAtom, Core

Title: Implementation of the Core of undistinguished variables.

Description:

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
Petr Kremen

Constructor Summary
CoreNewImpl(java.util.Collection<QueryAtom> atoms, java.util.Collection<aterm.ATermAppl> uv, KnowledgeBase kb)
           
 
Method Summary
 CoreNewImpl apply(ResultBinding binding)
          Applies variable binding to the current atom and returns the result which might be same as the current atom.
 boolean equals(java.lang.Object obj)
           
 java.util.List<aterm.ATermAppl> getArguments()
          Returns arguments of the atom.
 java.util.Set<aterm.ATermAppl> getConstants()
           
 java.util.Set<aterm.ATermAppl> getDistVars()
           
 QueryPredicate getPredicate()
          Returns predicate of the query atom.
 Query getQuery()
           
 java.util.Set<aterm.ATermAppl> getUndistVars()
           
 int hashCode()
           
 boolean isGround()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoreNewImpl

public CoreNewImpl(java.util.Collection<QueryAtom> atoms,
                   java.util.Collection<aterm.ATermAppl> uv,
                   KnowledgeBase kb)
Method Detail

apply

public CoreNewImpl apply(ResultBinding binding)
Applies variable binding to the current atom and returns the result which might be same as the current atom. Current atom is not affected.

Specified by:
apply in interface QueryAtom
Parameters:
binding - QueryBinding to apply
Returns:
a query atom with applied query binding

hashCode

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

equals

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

getConstants

public java.util.Set<aterm.ATermAppl> getConstants()
Specified by:
getConstants in interface Core

getDistVars

public java.util.Set<aterm.ATermAppl> getDistVars()
Specified by:
getDistVars in interface Core

getUndistVars

public java.util.Set<aterm.ATermAppl> getUndistVars()
Specified by:
getUndistVars in interface Core

getArguments

public java.util.List<aterm.ATermAppl> getArguments()
Description copied from interface: QueryAtom
Returns arguments of the atom.

Specified by:
getArguments in interface QueryAtom
Returns:
arguments of the atom

getPredicate

public QueryPredicate getPredicate()
Description copied from interface: QueryAtom
Returns predicate of the query atom.

Specified by:
getPredicate in interface QueryAtom
Returns:
predicate of the query atom

getQuery

public Query getQuery()

isGround

public boolean isGround()
Specified by:
isGround in interface QueryAtom
Returns:
true if the atom is ground, i.e. does not use variables, either distinguished or undistinguished ones.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004 Evren Sirin. All Rights Reserved.