Package openllet.core.rules
Class VariableBinding
- java.lang.Object
-
- openllet.core.rules.VariableBinding
-
public class VariableBinding extends java.lang.ObjectTitle: Variable Binding
Description: Keeps variable bindings. Data and Individual variables are kept in seperate name spaces.
Copyright: Copyright (c) 2007
Company: Clark & Parsia, LLC.
- Author:
- Ron Alford
-
-
Constructor Summary
Constructors Constructor Description VariableBinding(ABox abox)VariableBinding(VariableBinding binding)Shallow copies the binding maps.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(AtomDVariable key)booleancontainsKey(AtomIVariable key)java.util.Set<java.util.Map.Entry<AtomDVariable,Literal>>dataEntrySet()java.util.Set<java.util.Map.Entry<? extends AtomVariable,? extends Node>>entrySet()booleanequals(java.lang.Object other)Literalget(AtomDObject key)If the key is a variable, return the _node associated with it in the map.Individualget(AtomIObject key)If the key is a variable, return the _individual associated with it in the map.ABoxgetABox()inthashCode()Literalset(AtomDObject key, Literal value)If the key is a _data variable, set the value.Literalset(AtomDVariable key, openllet.aterm.ATermAppl value)Individualset(AtomIObject key, Individual value)If the key is an instance variable, set the value.Individualset(AtomIVariable key, openllet.aterm.ATermAppl value)java.lang.StringtoString()
-
-
-
Constructor Detail
-
VariableBinding
public VariableBinding(ABox abox)
-
VariableBinding
public VariableBinding(VariableBinding binding)
Shallow copies the binding maps.- Parameters:
binding-
-
-
Method Detail
-
containsKey
public boolean containsKey(AtomDVariable key)
-
containsKey
public boolean containsKey(AtomIVariable key)
-
dataEntrySet
public java.util.Set<java.util.Map.Entry<AtomDVariable,Literal>> dataEntrySet()
-
entrySet
public java.util.Set<java.util.Map.Entry<? extends AtomVariable,? extends Node>> entrySet()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
get
public Literal get(AtomDObject key)
If the key is a variable, return the _node associated with it in the map. If the key is a constant, return the corresponding _node from the _abox.- Parameters:
key-- Returns:
- a node
-
get
public Individual get(AtomIObject key)
If the key is a variable, return the _individual associated with it in the map. If the key is a constant, return the corresponding _individual from the _abox.- Parameters:
key-- Returns:
- an individual link to the key of the abox
-
getABox
public ABox getABox()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
set
public Literal set(AtomDObject key, Literal value)
If the key is a _data variable, set the value. Otherwise, ignore it.- Parameters:
key-value-- Returns:
- the visited value after acceptation
-
set
public Literal set(AtomDVariable key, openllet.aterm.ATermAppl value)
-
set
public Individual set(AtomIObject key, Individual value)
If the key is an instance variable, set the value. Otherwise, ignore it.- Parameters:
key-value-- Returns:
- the visited individual after acceptation
-
set
public Individual set(AtomIVariable key, openllet.aterm.ATermAppl value)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-