// Path: core/main/src/com/complexible/common/openrdf/util/ModelBuilder.java
// public class ModelBuilder {
//     private final Model mGraph;
//     private final ValueFactory mValueFactory;
// 
//     public ModelBuilder() {
//         mGraph = Models2.newModel();
//         mValueFactory = SimpleValueFactory.getInstance();
//     }
// 
//     public ModelBuilder(final ValueFactory theValueFactory) {
// 	    mGraph = Models2.newModel();
//         mValueFactory = theValueFactory;
//     }
// 
// 	/**
// 	 * Return the Graph created via this builder
// 	 *
// 	 * @return  the graph
// 	 */
//     public Model model() {
//         return Models2.newModel(mGraph);
//     }
// 
// 	/**
// 	 * Clear the contents of the builder
// 	 */
//     public void reset() {
//         mGraph.clear();
//     }
// 
// 	/**
// 	 * Create a {@link ResourceBuilder builder} for the individual
// 	 * @param theURI    the individual
// 	 * @return          the {@link ResourceBuilder builder}
// 	 */
//     public ResourceBuilder iri(IRI theURI) {
//         return new ResourceBuilder(mGraph, getValueFactory(), getValueFactory().createIRI(theURI.toString()));
//     }
// 
// 	/**
// 	 * Create a {@link ResourceBuilder builder} for the individual
// 	 * @param theURI    the individual
// 	 * @return          the {@link ResourceBuilder builder}
// 	 */
//     public ResourceBuilder iri(String theURI) {
//         return instance(null, theURI);
//     }
// 
// 	/**
// 	 * Create a new anonymous instance of the given type
// 	 *
// 	 * @param theType   the type
// 	 *
// 	 * @return          a {@link ResourceBuilder builder} for the new individual
// 	 */
//     public ResourceBuilder instance(IRI theType) {
//         return instance(theType, (String) null);
//     }
// 
// 	/**
// 	 * Create an un-typed anonymous individual in the graph
// 	 *
// 	 * @return a ResourceBuilder wrapping the bnode
// 	 */
// 	public ResourceBuilder instance() {
// 		return instance(null, (String) null);
// 	}
// 
// 
// 	/**
// 	 * Create a {@link ResourceBuilder builder} for the given individual and add the type
// 	 *
// 	 * @param theType   the type
// 	 * @param theURI    the individual
// 	 *
// 	 * @return          a {@link ResourceBuilder builder} for the new individual
// 	 */
// 	public ResourceBuilder instance(IRI theType, java.net.URI theURI) {
// 		return instance(theType, theURI.toString());
// 	}
// 
// 	/**
// 	 * Create a {@link ResourceBuilder builder} for the given individual and add the type
// 	 *
// 	 * @param theType   the type
// 	 * @param theRes    the individual
// 	 *
// 	 * @return          a {@link ResourceBuilder builder} for the new individual
// 	 */
// 	public ResourceBuilder instance(IRI theType, Resource theRes) {
// 		if (theType != null) {
// 			mGraph.add(theRes, RDF.TYPE, theType);
// 		}
// 
// 		return new ResourceBuilder(mGraph, getValueFactory(), theRes);
// 	}
// 	/**
// 	 * Create a {@link ResourceBuilder builder} for the given individual and add the type
// 	 *
// 	 * @param theType   the type
// 	 * @param theURI    the individual
// 	 *
// 	 * @return          a {@link ResourceBuilder builder} for the new individual
// 	 */
//     public ResourceBuilder instance(IRI theType, String theURI) {
//         Resource aRes = theURI == null
//                         ? getValueFactory().createBNode()
//                         : getValueFactory().createIRI(theURI);
// 
//         if (theType != null) {
//             mGraph.add(aRes, RDF.TYPE, theType);
//         }
// 
//         return new ResourceBuilder(mGraph, getValueFactory(), aRes);
//     }
// 
// 	public ValueFactory getValueFactory() {
// 		return mValueFactory;
// 	}
// }


import static org.junit.Assert.assertEquals;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.xml.datatype.DatatypeFactory;
import com.complexible.common.openrdf.util.ModelBuilder;
import org.junit.Test;
import org.openrdf.model.IRI;
import org.openrdf.model.Literal;
import org.openrdf.model.Model;
import org.openrdf.model.Statement;
import org.openrdf.model.impl.SimpleValueFactory;
import org.openrdf.model.impl.ValueFactoryImpl;
import org.openrdf.model.vocabulary.XMLSchema;
/*
 * Copyright (c) 2009-2015 Clark & Parsia, LLC. <http://www.clarkparsia.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.complexible.common.openrdf;





/**
 * <p></p>
 *
 * @author  Michael Grove
 * @since   3.0
 * @version 3.0
 */
public class GraphBuilderTests {
	@Test
	public void createDate() throws Exception {
		final IRI aURI = SimpleValueFactory.getInstance().createIRI("urn:foo");
// Path: core/main/src/com/complexible/common/openrdf/util/ModelBuilder.java
// public class ModelBuilder {
//     private final Model mGraph;
//     private final ValueFactory mValueFactory;
// 
//     public ModelBuilder() {
//         mGraph = Models2.newModel();
//         mValueFactory = SimpleValueFactory.getInstance();
//     }
// 
//     public ModelBuilder(final ValueFactory theValueFactory) {
// 	    mGraph = Models2.newModel();
//         mValueFactory = theValueFactory;
//     }
// 
// 	/**
// 	 * Return the Graph created via this builder
// 	 *
// 	 * @return  the graph
// 	 */
//     public Model model() {
//         return Models2.newModel(mGraph);
//     }
// 
// 	/**
// 	 * Clear the contents of the builder
// 	 */
//     public void reset() {
//         mGraph.clear();
//     }
// 
// 	/**
// 	 * Create a {@link ResourceBuilder builder} for the individual
// 	 * @param theURI    the individual
// 	 * @return          the {@link ResourceBuilder builder}
// 	 */
//     public ResourceBuilder iri(IRI theURI) {
//         return new ResourceBuilder(mGraph, getValueFactory(), getValueFactory().createIRI(theURI.toString()));
//     }
// 
// 	/**
// 	 * Create a {@link ResourceBuilder builder} for the individual
// 	 * @param theURI    the individual
// 	 * @return          the {@link ResourceBuilder builder}
// 	 */
//     public ResourceBuilder iri(String theURI) {
//         return instance(null, theURI);
//     }
// 
// 	/**
// 	 * Create a new anonymous instance of the given type
// 	 *
// 	 * @param theType   the type
// 	 *
// 	 * @return          a {@link ResourceBuilder builder} for the new individual
// 	 */
//     public ResourceBuilder instance(IRI theType) {
//         return instance(theType, (String) null);
//     }
// 
// 	/**
// 	 * Create an un-typed anonymous individual in the graph
// 	 *
// 	 * @return a ResourceBuilder wrapping the bnode
// 	 */
// 	public ResourceBuilder instance() {
// 		return instance(null, (String) null);
// 	}
// 
// 
// 	/**
// 	 * Create a {@link ResourceBuilder builder} for the given individual and add the type
// 	 *
// 	 * @param theType   the type
// 	 * @param theURI    the individual
// 	 *
// 	 * @return          a {@link ResourceBuilder builder} for the new individual
// 	 */
// 	public ResourceBuilder instance(IRI theType, java.net.URI theURI) {
// 		return instance(theType, theURI.toString());
// 	}
// 
// 	/**
// 	 * Create a {@link ResourceBuilder builder} for the given individual and add the type
// 	 *
// 	 * @param theType   the type
// 	 * @param theRes    the individual
// 	 *
// 	 * @return          a {@link ResourceBuilder builder} for the new individual
// 	 */
// 	public ResourceBuilder instance(IRI theType, Resource theRes) {
// 		if (theType != null) {
// 			mGraph.add(theRes, RDF.TYPE, theType);
// 		}
// 
// 		return new ResourceBuilder(mGraph, getValueFactory(), theRes);
// 	}
// 	/**
// 	 * Create a {@link ResourceBuilder builder} for the given individual and add the type
// 	 *
// 	 * @param theType   the type
// 	 * @param theURI    the individual
// 	 *
// 	 * @return          a {@link ResourceBuilder builder} for the new individual
// 	 */
//     public ResourceBuilder instance(IRI theType, String theURI) {
//         Resource aRes = theURI == null
//                         ? getValueFactory().createBNode()
//                         : getValueFactory().createIRI(theURI);
// 
//         if (theType != null) {
//             mGraph.add(aRes, RDF.TYPE, theType);
//         }
// 
//         return new ResourceBuilder(mGraph, getValueFactory(), aRes);
//     }
// 
// 	public ValueFactory getValueFactory() {
// 		return mValueFactory;
// 	}
// }


// Path: core/test/src/com/complexible/common/openrdf/GraphBuilderTests.java
import static org.junit.Assert.assertEquals;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.xml.datatype.DatatypeFactory;
import com.complexible.common.openrdf.util.ModelBuilder;
import org.junit.Test;
import org.openrdf.model.IRI;
import org.openrdf.model.Literal;
import org.openrdf.model.Model;
import org.openrdf.model.Statement;
import org.openrdf.model.impl.SimpleValueFactory;
import org.openrdf.model.impl.ValueFactoryImpl;
import org.openrdf.model.vocabulary.XMLSchema;

/*
 * Copyright (c) 2009-2015 Clark & Parsia, LLC. <http://www.clarkparsia.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.complexible.common.openrdf;





/**
 * <p></p>
 *
 * @author  Michael Grove
 * @since   3.0
 * @version 3.0
 */
public class GraphBuilderTests {
	@Test
	public void createDate() throws Exception {
		final IRI aURI = SimpleValueFactory.getInstance().createIRI("urn:foo");
		ModelBuilder aBuilder = new ModelBuilder();