// Path: src/main/java/com/github/tkurz/sparqlmm/Constants.java
// public class Constants {
// 
//     public static final String VERSION = "2.0.0";
//     public static final String ABBREVIATION = "mm";
//     public static final String NAMESPACE = "http://linkedmultimedia.org/sparql-mm/ns/" + VERSION + "/function#";
// 
// 
// }


import com.github.tkurz.sparqlmm.Constants;
import com.github.tkurz.sparqlmm.vocabularies.SCHEMA;
import com.google.common.base.Joiner;
import com.google.common.collect.FluentIterable;
import com.google.common.io.Files;
import org.openrdf.model.Model;
import org.openrdf.model.URI;
import org.openrdf.model.ValueFactory;
import org.openrdf.model.impl.LinkedHashModel;
import org.openrdf.model.impl.ValueFactoryImpl;
import org.openrdf.model.vocabulary.RDF;
import org.openrdf.rio.RDFFormat;
import org.openrdf.rio.RDFHandlerException;
import org.openrdf.rio.Rio;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.nio.charset.Charset;
import java.util.*;
        out.println(Constants.NAMESPACE);
        out.println("```");
        out.println();
        out.printf("When abbreviating terms the suggested prefix is `%s`%n", Constants.ABBREVIATION);
        out.println();
        out.println("Each function in this function set has a URI constructed by appending a term name to the vocabulary URI. For example:");
        out.println();
        out.println("```");
        out.println(functions.get(0).uri.stringValue());
        out.println("```");
        out.println();
        out.print("There are machine readable function description using [SPARQL Extension Description Vocabulary](http://www.ldodds.com/schemas/sparql-extension-description/) in ");
        out.printf("[RDF/XML](%s) and [TURTLE](%s).%n", LINK_XML, LINK_TURTLE);
        out.println();
        for(FunctionDoc.Reference reference : FunctionDoc.Reference.values()) {
            for(FunctionDoc.Type type : FunctionDoc.Type.values()) {

                boolean show = false;
                //test if it should be displayed
                for (Function function : functions) {
                    if (function.reference == reference && function.typeName.equals(type.getName()) && function.type.equals(type.getUri())) {
                        show = true; break;
                    }
                }

                if(!show) continue;

                out.printf("## %s %ss", reference.getName(), type.getName());
                out.println();
                out.println("| Relation name | Description |");
// Path: src/main/java/com/github/tkurz/sparqlmm/Constants.java
// public class Constants {
// 
//     public static final String VERSION = "2.0.0";
//     public static final String ABBREVIATION = "mm";
//     public static final String NAMESPACE = "http://linkedmultimedia.org/sparql-mm/ns/" + VERSION + "/function#";
// 
// 
// }


// Path: src/main/java/com/github/tkurz/sparqlmm/doc/FunctionSet.java
import com.github.tkurz.sparqlmm.Constants;
import com.github.tkurz.sparqlmm.vocabularies.SCHEMA;
import com.google.common.base.Joiner;
import com.google.common.collect.FluentIterable;
import com.google.common.io.Files;
import org.openrdf.model.Model;
import org.openrdf.model.URI;
import org.openrdf.model.ValueFactory;
import org.openrdf.model.impl.LinkedHashModel;
import org.openrdf.model.impl.ValueFactoryImpl;
import org.openrdf.model.vocabulary.RDF;
import org.openrdf.rio.RDFFormat;
import org.openrdf.rio.RDFHandlerException;
import org.openrdf.rio.Rio;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.nio.charset.Charset;
import java.util.*;

        out.println(Constants.NAMESPACE);
        out.println("```");
        out.println();
        out.printf("When abbreviating terms the suggested prefix is `%s`%n", Constants.ABBREVIATION);
        out.println();
        out.println("Each function in this function set has a URI constructed by appending a term name to the vocabulary URI. For example:");
        out.println();
        out.println("```");
        out.println(functions.get(0).uri.stringValue());
        out.println("```");
        out.println();
        out.print("There are machine readable function description using [SPARQL Extension Description Vocabulary](http://www.ldodds.com/schemas/sparql-extension-description/) in ");
        out.printf("[RDF/XML](%s) and [TURTLE](%s).%n", LINK_XML, LINK_TURTLE);
        out.println();
        for(FunctionDoc.Reference reference : FunctionDoc.Reference.values()) {
            for(FunctionDoc.Type type : FunctionDoc.Type.values()) {

                boolean show = false;
                //test if it should be displayed
                for (Function function : functions) {
                    if (function.reference == reference && function.typeName.equals(type.getName()) && function.type.equals(type.getUri())) {
                        show = true; break;
                    }
                }

                if(!show) continue;

                out.printf("## %s %ss", reference.getName(), type.getName());
                out.println();
                out.println("| Relation name | Description |");
                out.println("| :------------ |:------------|");