Package org.openrdf.query

Examples of org.openrdf.query.Binding


  }

  @Override
  public boolean equals(Object o) {
    if (o instanceof Binding) {
      Binding other = (Binding)o;

      return name.equals(other.getName()) && value.equals(other.getValue());
    }

    return false;
  }
View Full Code Here


  public boolean hasBinding(String bindingName) {
    return bindings.containsKey(bindingName);
  }

  public Value getValue(String bindingName) {
    Binding binding = getBinding(bindingName);

    if (binding != null) {
      return binding.getValue();
    }

    return null;
  }
View Full Code Here

    Iterator<Value> bindingIter = model.filter(solutionNode, BINDING, null).objects().iterator();
    while (bindingIter.hasNext()) {
      Value bindingNode = bindingIter.next();

      if (bindingNode instanceof Resource) {
        Binding binding = getBinding((Resource)bindingNode);
        bindingSet.addBinding(binding);
      }
      else {
        throw new RDFHandlerException("Value for " + BINDING + " is not a resource: " + bindingNode);
      }
View Full Code Here

                 * Project parentProject = getProjectFor( tokens[0], tokens[1], tokens[2], null, null );
                 * project.setParentProject( parentProject ); }
                 */
                if ( set.hasBinding( ProjectUri.DEPENDENCY.getObjectBinding() ) )
                {
                    Binding binding = set.getBinding( ProjectUri.DEPENDENCY.getObjectBinding() );
                    addDependenciesToProject( project, repositoryConnection, binding.getValue() );
                }

                if ( set.hasBinding( ProjectUri.CLASSIFIER.getObjectBinding() ) )
                {
                    Binding binding = set.getBinding( ProjectUri.CLASSIFIER.getObjectBinding() );
                    addClassifiersToProject( project, repositoryConnection, binding.getValue() );
                }
            }
        }
        catch ( QueryEvaluationException e )
        {
View Full Code Here

        while ( result.hasNext() )
        {
            BindingSet set = result.next();
            for ( Iterator<Binding> i = set.iterator(); i.hasNext(); )
            {
                Binding binding = i.next();
                if ( binding.getValue().toString().startsWith( "http://maven.apache.org/artifact/requirement" ) )
                {
                    try
                    {
                        project.addRequirement( Requirement.Factory.createDefaultRequirement(
                                                                                              new java.net.URI(
                                                                                                                binding.getValue().toString() ),
                                                                                              set.getValue( "y" ).toString() ) );
                    }
                    catch ( URISyntaxException e )
                    {
                        e.printStackTrace();
View Full Code Here

                projectDependency.setGroupId( bs.getBinding( ProjectUri.GROUP_ID.getObjectBinding() ).getValue().toString() );
                projectDependency.setArtifactId( bs.getBinding( ProjectUri.ARTIFACT_ID.getObjectBinding() ).getValue().toString() );
                projectDependency.setVersion( bs.getBinding( ProjectUri.VERSION.getObjectBinding() ).getValue().toString() );
                projectDependency.setArtifactType( bs.getBinding( ProjectUri.ARTIFACT_TYPE.getObjectBinding() ).getValue().toString() );

                Binding classifierBinding = bs.getBinding( ProjectUri.CLASSIFIER.getObjectBinding() );
                if ( classifierBinding != null )
                {
                    projectDependency.setPublicKeyTokenId( classifierBinding.getValue().toString().replace( ":", "" ) );
                }

                project.addProjectDependency( projectDependency );
                if ( bs.hasBinding( ProjectUri.DEPENDENCY.getObjectBinding() ) )
                {
View Full Code Here

      openBraces(); // start of new solution

      Iterator<Binding> bindingIter = bindingSet.iterator();
      while (bindingIter.hasNext()) {
        Binding binding = bindingIter.next();

        writeKeyValue(binding.getName(), binding.getValue());

        if (bindingIter.hasNext()) {
          writeComma();
        }
      }
View Full Code Here

  public boolean hasBinding(String bindingName) {
    return bindings.containsKey(bindingName);
  }

  public Value getValue(String bindingName) {
    Binding binding = getBinding(bindingName);

    if (binding != null) {
      return binding.getValue();
    }

    return null;
  }
View Full Code Here

    public boolean hasNext() {
      return index < values.size();
    }

    public Binding next() {
      Binding result = new BindingImpl(bindingNames.get(index), values.get(index));
      findNextElement();
      return result;
    }
View Full Code Here

  @Override
  public boolean equals(Object o)
  {
    if (o instanceof Binding) {
      Binding other = (Binding)o;

      return name.equals(other.getName()) && value.equals(other.getValue());
    }

    return false;
  }
View Full Code Here

TOP

Related Classes of org.openrdf.query.Binding

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.