// Path: src/main/java/com/anqit/spanqit/rdf/RdfBlankNode.java
// public static class PropertiesBlankNode implements RdfBlankNode {
// 	private RdfPredicateObjectListCollection predicateObjectLists = Rdf.predicateObjectListCollection();
// 
// 	PropertiesBlankNode(RdfPredicate predicate, RdfObject... objects) {
// 		andHas(predicate, objects);
// 	}
// 		
// 	/**
// 	 * Using the predicate-object and object list mechanisms, expand this blank node's pattern to include
// 	 * triples consisting of this blank node as the subject, and the given predicate and object(s)
// 	 * 
// 	 * @param predicate the predicate of the triple to add
// 	 * @param objects the object or objects of the triple to add
// 	 * 
// 	 * @return this blank node
// 	 * 
// 	 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#predObjLists">
// 	 * 		Predicate-Object Lists</a>
// 	 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#objLists">
// 	 * 		Object Lists</a>
// 	 */
// 	public PropertiesBlankNode andHas(RdfPredicate predicate, RdfObject... objects) {
// 		predicateObjectLists.andHas(predicate, objects);
// 			
// 		return this;
// 	}
// 		
// 	/**
// 	 * Add predicate-object lists to this blank node's pattern
// 	 * 
// 	 * @param lists
// 	 * 		the {@link RdfPredicateObjectList}(s) to add
// 	 * @return this blank node
// 	 * 
// 	 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#predObjLists">
// 	 * 		Predicate-Object Lists</a>
// 	 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#objLists">
// 	 * 		Object Lists</a>
// 	 */
// 	public PropertiesBlankNode andHas(RdfPredicateObjectList... lists) {
// 		predicateObjectLists.andHas(lists);
// 			
// 		return this;
// 	}
// 	/**
// 	 * convert this blank node to a triple pattern
// 	 * 
// 	 * @return the triple pattern identified by this blank node
// 	 * 
// 	 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#QSynBlankNodes">
// 	 * 		blank node syntax</a>
// 	 */
// 	public TriplePattern toTp() {
// 		return GraphPatterns.tp(this);
// 	}
// 
// 	@Override
// 	public String getQueryString() {
// 		return SpanqitUtils.getBracketedString(predicateObjectLists.getQueryString());
// 	}
// }
// 
// Path: src/main/java/com/anqit/spanqit/rdf/RdfPredicateObjectList.java
// public class RdfPredicateObjectList extends QueryElementCollection<RdfObject> {
// 	private RdfPredicate predicate;
// 	
// 	RdfPredicateObjectList(RdfPredicate predicate, RdfObject... objects) {
// 		super(", ");
// 		this.predicate = predicate;
// 		and(objects);
// 	}
// 	
// 	/**
// 	 * Add {@link RdfObject} instances to this predicate-object list
// 	 * 
// 	 * @param objects the objects to add to this list
// 	 * 
// 	 * @return this {@link RdfPredicateObjectList} instance
// 	 */
// 	public RdfPredicateObjectList and(RdfObject... objects) {
// 		Collections.addAll(elements, objects);
// 		
// 		return this;
// 	}
// 	
// 	@Override
// 	public String getQueryString() {
// 		return predicate.getQueryString() + " " + super.getQueryString();
// 	}
// }


import com.anqit.spanqit.rdf.RdfBlankNode.PropertiesBlankNode;
import com.anqit.spanqit.rdf.RdfPredicateObjectList;
package com.anqit.spanqit.graphpattern;


/**
 * A triple pattern formed by a property-list blank node
 * 
 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#QSynBlankNodes">
 * 		blank node syntax</a>
 */
class BNodeTriplePattern implements TriplePattern {
	private PropertiesBlankNode bnode;

	BNodeTriplePattern(PropertiesBlankNode subject) {
		this.bnode = subject;
	}

	@Override
// Path: src/main/java/com/anqit/spanqit/rdf/RdfBlankNode.java
// public static class PropertiesBlankNode implements RdfBlankNode {
// 	private RdfPredicateObjectListCollection predicateObjectLists = Rdf.predicateObjectListCollection();
// 
// 	PropertiesBlankNode(RdfPredicate predicate, RdfObject... objects) {
// 		andHas(predicate, objects);
// 	}
// 		
// 	/**
// 	 * Using the predicate-object and object list mechanisms, expand this blank node's pattern to include
// 	 * triples consisting of this blank node as the subject, and the given predicate and object(s)
// 	 * 
// 	 * @param predicate the predicate of the triple to add
// 	 * @param objects the object or objects of the triple to add
// 	 * 
// 	 * @return this blank node
// 	 * 
// 	 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#predObjLists">
// 	 * 		Predicate-Object Lists</a>
// 	 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#objLists">
// 	 * 		Object Lists</a>
// 	 */
// 	public PropertiesBlankNode andHas(RdfPredicate predicate, RdfObject... objects) {
// 		predicateObjectLists.andHas(predicate, objects);
// 			
// 		return this;
// 	}
// 		
// 	/**
// 	 * Add predicate-object lists to this blank node's pattern
// 	 * 
// 	 * @param lists
// 	 * 		the {@link RdfPredicateObjectList}(s) to add
// 	 * @return this blank node
// 	 * 
// 	 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#predObjLists">
// 	 * 		Predicate-Object Lists</a>
// 	 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#objLists">
// 	 * 		Object Lists</a>
// 	 */
// 	public PropertiesBlankNode andHas(RdfPredicateObjectList... lists) {
// 		predicateObjectLists.andHas(lists);
// 			
// 		return this;
// 	}
// 	/**
// 	 * convert this blank node to a triple pattern
// 	 * 
// 	 * @return the triple pattern identified by this blank node
// 	 * 
// 	 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#QSynBlankNodes">
// 	 * 		blank node syntax</a>
// 	 */
// 	public TriplePattern toTp() {
// 		return GraphPatterns.tp(this);
// 	}
// 
// 	@Override
// 	public String getQueryString() {
// 		return SpanqitUtils.getBracketedString(predicateObjectLists.getQueryString());
// 	}
// }
// 
// Path: src/main/java/com/anqit/spanqit/rdf/RdfPredicateObjectList.java
// public class RdfPredicateObjectList extends QueryElementCollection<RdfObject> {
// 	private RdfPredicate predicate;
// 	
// 	RdfPredicateObjectList(RdfPredicate predicate, RdfObject... objects) {
// 		super(", ");
// 		this.predicate = predicate;
// 		and(objects);
// 	}
// 	
// 	/**
// 	 * Add {@link RdfObject} instances to this predicate-object list
// 	 * 
// 	 * @param objects the objects to add to this list
// 	 * 
// 	 * @return this {@link RdfPredicateObjectList} instance
// 	 */
// 	public RdfPredicateObjectList and(RdfObject... objects) {
// 		Collections.addAll(elements, objects);
// 		
// 		return this;
// 	}
// 	
// 	@Override
// 	public String getQueryString() {
// 		return predicate.getQueryString() + " " + super.getQueryString();
// 	}
// }


// Path: src/main/java/com/anqit/spanqit/graphpattern/BNodeTriplePattern.java
import com.anqit.spanqit.rdf.RdfBlankNode.PropertiesBlankNode;
import com.anqit.spanqit.rdf.RdfPredicateObjectList;

package com.anqit.spanqit.graphpattern;


/**
 * A triple pattern formed by a property-list blank node
 * 
 * @see <a href="https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#QSynBlankNodes">
 * 		blank node syntax</a>
 */
class BNodeTriplePattern implements TriplePattern {
	private PropertiesBlankNode bnode;

	BNodeTriplePattern(PropertiesBlankNode subject) {
		this.bnode = subject;
	}

	@Override
	public BNodeTriplePattern andHas(RdfPredicateObjectList... lists) {