All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.weaverplatform.sp4rql.model.scope.ScopeSealed Maven / Gradle / Ivy

package com.weaverplatform.sp4rql.model.scope;

import com.weaverplatform.sp4rql.model.restriction.Sp4rqlRestriction;
import com.weaverplatform.sp4rql.model.token.VariableToken;

import java.util.HashSet;

public abstract class ScopeSealed extends ScopeSimple {
  public ScopeSealed(Sp4rqlScope superScope) {
    super(superScope);
  }

  @Override
  public HashSet getExposedVariables() {
    HashSet set = new HashSet<>();
    for(Sp4rqlRestriction restriction : getRestrictions()) {
      for(VariableToken token : restriction.getExposedVariables()) {
        if(inScope.getExposedVariables().contains(token)) {
          set.add(token);
        }
      }
    }
    return set;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy