if( node != null ) {
if( node instanceof Literal ) {
if( ((Literal) node).getValue() == null && PelletOptions.USE_COMPLETION_QUEUE ) {
// added for completion queue
QueueElement newElement = new QueueElement( node );
this.completionQueue.add( newElement, NodeSelector.LITERAL );
}
if( getBranch() >= 0 && PelletOptions.TRACK_BRANCH_EFFECTS ) {
branchEffects.add( getBranch(), node.getName() );
}
return (Literal) node;
}
else {
throw new InternalReasonerException(
"Same term refers to both a literal and an individual: " + name );
}
}
int remember = branch;
setBranch( DependencySet.NO_BRANCH );
/*
* TODO Investigate the effects of storing asserted value
* The input version of the literal is not discarded, only the canonical
* versions are stored in the literal. This may cause problems in cases
* where the same value space object is presented in the data in multiple
* forms.
*/
Literal lit = new Literal( name, dataValue, this, ds );
lit.addType( ATermUtils.TOP_LIT, ds );
setBranch( remember );
nodes.put( name, lit );
nodeList.add( name );
if( lit.getValue() == null && PelletOptions.USE_COMPLETION_QUEUE ) {
// added for completion queue
QueueElement newElement = new QueueElement( lit );
this.completionQueue.add( newElement, NodeSelector.LITERAL );
}
if( getBranch() >= 0 && PelletOptions.TRACK_BRANCH_EFFECTS ) {
branchEffects.add( getBranch(), lit.getName() );