// Path: content/content-tutorial/content-tutorial-platform/src/main/java/com/someco/model/SomeCoModel.java
// public interface SomeCoModel {
// 
//     // Types
//     public static final String NAMESPACE_SOMECO_CONTENT_MODEL  = "http://www.someco.com/model/content/1.0";
//     public static final String TYPE_SC_DOC = "doc";
//     public static final String TYPE_SC_WHITEPAPER = "whitepaper";
// 
//     // Aspects
//     public static final String ASPECT_SC_WEBABLE = "webable";
//     public static final String ASPECT_SC_PRODUCT_RELATED = "productRelated";
// 
//     // Properties
//     public static final String PROP_PRODUCT = "product";
//     public static final String PROP_VERSION = "version";
//     public static final String PROP_PUBLISHED = "published";
//     public static final String PROP_IS_ACTIVE = "isActive";
// 
//     // Associations
//     public static final String ASSN_RELATED_DOCUMENTS = "relatedDocuments";
// }


import java.text.DateFormat;
import java.util.ArrayList;
import java.util.List;
import org.apache.chemistry.opencmis.client.api.CmisObject;
import org.apache.chemistry.opencmis.client.api.ItemIterable;
import org.apache.chemistry.opencmis.client.api.QueryResult;
import org.apache.chemistry.opencmis.client.api.Session;
import org.apache.chemistry.opencmis.commons.data.PropertyData;
import com.someco.model.SomeCoModel;
package com.someco.cmis.examples;





/**
 * This class shows various examples of CMIS query syntax.
 * This is a port of the SomeCoDataQueries class which uses the Alfresco Web Services API. This example
 * shows how to query for instances of custom content types via CMIS including how to do joins to query
 * against custom properties defined in custom aspects.
 * 
 * @author jpotts
 */
public class SomeCoCMISDataQueries extends CMISExampleBase {

	private static final String RESULT_SEP = "======================";
	private static final String USAGE = "java SomeCoCMISDataQueries <username> <password> <root folder>";
	    
	public static void main(String[] args) {
		if (args.length != 3) doUsage(SomeCoCMISDataQueries.USAGE);
    	SomeCoCMISDataQueries sccdq = new SomeCoCMISDataQueries();
    	sccdq.setUser(args[0]);
    	sccdq.setPassword(args[1]);
    	sccdq.setFolderName(args[2]);
    	sccdq.doExamples();
		System.exit(0);
	}
	
	/**
	 * Executes a series of CMIS Query Language queries and dumps the results.
	 */
	public void doExamples() {
		String queryString;
		
		System.out.println(RESULT_SEP);
// Path: content/content-tutorial/content-tutorial-platform/src/main/java/com/someco/model/SomeCoModel.java
// public interface SomeCoModel {
// 
//     // Types
//     public static final String NAMESPACE_SOMECO_CONTENT_MODEL  = "http://www.someco.com/model/content/1.0";
//     public static final String TYPE_SC_DOC = "doc";
//     public static final String TYPE_SC_WHITEPAPER = "whitepaper";
// 
//     // Aspects
//     public static final String ASPECT_SC_WEBABLE = "webable";
//     public static final String ASPECT_SC_PRODUCT_RELATED = "productRelated";
// 
//     // Properties
//     public static final String PROP_PRODUCT = "product";
//     public static final String PROP_VERSION = "version";
//     public static final String PROP_PUBLISHED = "published";
//     public static final String PROP_IS_ACTIVE = "isActive";
// 
//     // Associations
//     public static final String ASSN_RELATED_DOCUMENTS = "relatedDocuments";
// }


// Path: content/content-tutorial-cmis/src/main/java/com/someco/cmis/examples/SomeCoCMISDataQueries.java
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.List;
import org.apache.chemistry.opencmis.client.api.CmisObject;
import org.apache.chemistry.opencmis.client.api.ItemIterable;
import org.apache.chemistry.opencmis.client.api.QueryResult;
import org.apache.chemistry.opencmis.client.api.Session;
import org.apache.chemistry.opencmis.commons.data.PropertyData;
import com.someco.model.SomeCoModel;

package com.someco.cmis.examples;





/**
 * This class shows various examples of CMIS query syntax.
 * This is a port of the SomeCoDataQueries class which uses the Alfresco Web Services API. This example
 * shows how to query for instances of custom content types via CMIS including how to do joins to query
 * against custom properties defined in custom aspects.
 * 
 * @author jpotts
 */
public class SomeCoCMISDataQueries extends CMISExampleBase {

	private static final String RESULT_SEP = "======================";
	private static final String USAGE = "java SomeCoCMISDataQueries <username> <password> <root folder>";
	    
	public static void main(String[] args) {
		if (args.length != 3) doUsage(SomeCoCMISDataQueries.USAGE);
    	SomeCoCMISDataQueries sccdq = new SomeCoCMISDataQueries();
    	sccdq.setUser(args[0]);
    	sccdq.setPassword(args[1]);
    	sccdq.setFolderName(args[2]);
    	sccdq.doExamples();
		System.exit(0);
	}
	
	/**
	 * Executes a series of CMIS Query Language queries and dumps the results.
	 */
	public void doExamples() {
		String queryString;
		
		System.out.println(RESULT_SEP);
		System.out.println("Finding content of type:" + SomeCoModel.TYPE_SC_DOC.toString());