/** * Builds an empty PSI document version 2. * * @param institution the source of that PSI Document. * * @return an empty PSI document version 2. */ private static Document buildPsiVersion2( UserSessionDownload session, Institution institution ) { DOMImplementationImpl impl = new DOMImplementationImpl(); Document document = impl.createDocument( "net:sf:psidev:mi", "entrySet", null ); //doctype only used by DTDs ! Element psiEntrySet = document.getDocumentElement(); psiEntrySet.setAttribute( "xmlns", "net:sf:psidev:mi" ); psiEntrySet.setAttribute( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" ); psiEntrySet.setAttribute( "xsi:schemaLocation", "net:sf:psidev:mi " + URL_SCHEMA_VERSION_2 ); psiEntrySet.setAttribute( "level", "1" ); psiEntrySet.setAttribute( "version", "2" ); Element entry = document.createElement( "entry" ); psiEntrySet.appendChild( entry ); Element source = createSource( session, document, institution ); entry.appendChild( source ); return document; }
/** * Builds an empty PSI document version 1. * * @param institution the source of that PSI Document. * * @return an empty PSI document version 1. */ private static Document buildPsiVersion1( UserSessionDownload session, Institution institution ) { DOMImplementationImpl impl = new DOMImplementationImpl(); Document document = impl.createDocument( "net:sf:psidev:mi", "entrySet", null ); //doctype only used by DTDs ! Element psiEntrySet = document.getDocumentElement(); psiEntrySet.setAttribute( "xmlns", "net:sf:psidev:mi" ); psiEntrySet.setAttribute( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" ); psiEntrySet.setAttribute( "xsi:schemaLocation", "net:sf:psidev:mi " + URL_SCHEMA_VERSION_1 ); psiEntrySet.setAttribute( "level", "1" ); psiEntrySet.setAttribute( "version", "1" ); Element entry = document.createElement( "entry" ); psiEntrySet.appendChild( entry ); Element source = createSource( session, document, institution ); entry.appendChild( source ); return document; }
/** * Builds an empty PSI document version 2. * * @param institution the source of that PSI Document. * * @return an empty PSI document version 2. */ private static Document buildPsiVersion2( UserSessionDownload session, Institution institution ) { DOMImplementationImpl impl = new DOMImplementationImpl(); Document document = impl.createDocument( "net:sf:psidev:mi", "entrySet", null ); //doctype only used by DTDs ! Element psiEntrySet = document.getDocumentElement(); psiEntrySet.setAttribute( "xmlns", "net:sf:psidev:mi" ); psiEntrySet.setAttribute( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" ); psiEntrySet.setAttribute( "xsi:schemaLocation", "net:sf:psidev:mi " + URL_SCHEMA_VERSION_2 ); psiEntrySet.setAttribute( "level", "1" ); psiEntrySet.setAttribute( "version", "2" ); Element entry = document.createElement( "entry" ); psiEntrySet.appendChild( entry ); Element source = createSource( session, document, institution ); entry.appendChild( source ); return document; }
/** * Builds an empty PSI document version 1. * * @param institution the source of that PSI Document. * * @return an empty PSI document version 1. */ private static Document buildPsiVersion1( UserSessionDownload session, Institution institution ) { DOMImplementationImpl impl = new DOMImplementationImpl(); Document document = impl.createDocument( "net:sf:psidev:mi", "entrySet", null ); //doctype only used by DTDs ! Element psiEntrySet = document.getDocumentElement(); psiEntrySet.setAttribute( "xmlns", "net:sf:psidev:mi" ); psiEntrySet.setAttribute( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" ); psiEntrySet.setAttribute( "xsi:schemaLocation", "net:sf:psidev:mi " + URL_SCHEMA_VERSION_1 ); psiEntrySet.setAttribute( "level", "1" ); psiEntrySet.setAttribute( "version", "1" ); Element entry = document.createElement( "entry" ); psiEntrySet.appendChild( entry ); Element source = createSource( session, document, institution ); entry.appendChild( source ); return document; }
/** * Builds an empty PSI document version 1. * * @param institution the source of that PSI Document. * * @return an empty PSI document version 1. */ private static Document buildPsiVersion1(UserSessionDownload session, Institution institution) { DOMImplementationImpl impl = new DOMImplementationImpl(); Document document = impl.createDocument("net:sf:psidev:mi", "entrySet", null); //doctype only used by DTDs ! Element psiEntrySet = document.getDocumentElement(); psiEntrySet.setAttribute("xmlns", "net:sf:psidev:mi"); psiEntrySet.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); psiEntrySet.setAttribute("xsi:schemaLocation", "net:sf:psidev:mi " + URL_SCHEMA_VERSION_1); psiEntrySet.setAttribute("level", "1"); psiEntrySet.setAttribute("version", "1"); Element entry = document.createElement("entry"); psiEntrySet.appendChild(entry); Element source = createSource(session, document, institution); entry.appendChild(source); return document; }
/** * Builds an empty PSI document version 3. * * @param institution the source of that PSI Document. * * @return an empty PSI document version 3. */ private static Document buildPsiVersion25( UserSessionDownload session, Institution institution ) { DOMImplementationImpl impl = new DOMImplementationImpl(); Document document = impl.createDocument( "net:sf:psidev:mi", "entrySet", null ); //doctype only used by DTDs ! Element psiEntrySet = document.getDocumentElement(); psiEntrySet.setAttribute( "xmlns", "net:sf:psidev:mi" ); psiEntrySet.setAttribute( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" ); psiEntrySet.setAttribute( "xsi:schemaLocation", "net:sf:psidev:mi " + URL_SCHEMA_VERSION_25 ); // values fixed by the schema psiEntrySet.setAttribute( "level", "2" ); psiEntrySet.setAttribute( "version", "5" ); psiEntrySet.setAttribute( "minorVersion", "3" ); Element entry = document.createElement( "entry" ); psiEntrySet.appendChild( entry ); Element source = createSource( session, document, institution ); entry.appendChild( source ); return document; }
/** * Builds an empty PSI document version 3. * * @param institution the source of that PSI Document. * * @return an empty PSI document version 3. */ private static Document buildPsiVersion25( UserSessionDownload session, Institution institution ) { DOMImplementationImpl impl = new DOMImplementationImpl(); Document document = impl.createDocument( "net:sf:psidev:mi", "entrySet", null ); //doctype only used by DTDs ! Element psiEntrySet = document.getDocumentElement(); psiEntrySet.setAttribute( "xmlns", "net:sf:psidev:mi" ); psiEntrySet.setAttribute( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" ); psiEntrySet.setAttribute( "xsi:schemaLocation", "net:sf:psidev:mi " + URL_SCHEMA_VERSION_25 ); // values fixed by the schema psiEntrySet.setAttribute( "level", "2" ); psiEntrySet.setAttribute( "version", "5" ); psiEntrySet.setAttribute( "minorVersion", "3" ); Element entry = document.createElement( "entry" ); psiEntrySet.appendChild( entry ); Element source = createSource( session, document, institution ); entry.appendChild( source ); return document; }
/** * Builds an empty PSI document version 3. * * @param institution the source of that PSI Document. * * @return an empty PSI document version 3. */ private static Document buildPsiVersion25(UserSessionDownload session, Institution institution) { DOMImplementationImpl impl = new DOMImplementationImpl(); Document document = impl.createDocument("net:sf:psidev:mi", "entrySet", null); //doctype only used by DTDs ! Element psiEntrySet = document.getDocumentElement(); psiEntrySet.setAttribute("xmlns", "net:sf:psidev:mi"); psiEntrySet.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); psiEntrySet.setAttribute("xsi:schemaLocation", "net:sf:psidev:mi " + URL_SCHEMA_VERSION_25); // values fixed by the schema psiEntrySet.setAttribute("level", "2"); psiEntrySet.setAttribute("version", "5"); psiEntrySet.setAttribute("minorVersion", "3"); Element entry = document.createElement("entry"); psiEntrySet.appendChild(entry); Element source = createSource(session, document, institution); entry.appendChild(source); return document; }
/** * Builds an empty PSI document version 2. * * @param institution the source of that PSI Document. * * @return an empty PSI document version 2. */ private static Document buildPsiVersion2(UserSessionDownload session, Institution institution) { DOMImplementationImpl impl = new DOMImplementationImpl(); Document document = impl.createDocument("net:sf:psidev:mi", "entrySet", null); //doctype only used by DTDs ! Element psiEntrySet = document.getDocumentElement(); psiEntrySet.setAttribute("xmlns", "net:sf:psidev:mi"); psiEntrySet.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); psiEntrySet.setAttribute("xsi:schemaLocation", "net:sf:psidev:mi " + URL_SCHEMA_VERSION_2); psiEntrySet.setAttribute("level", "1"); psiEntrySet.setAttribute("version", "2"); Element entry = document.createElement("entry"); psiEntrySet.appendChild(entry); Element source = createSource(session, document, institution); entry.appendChild(source); return document; }
Element source = PsiDocumentFactory.createSource( this, root, this.source ); entry.appendChild( source );
Element source = PsiDocumentFactory.createSource( this, root, this.source ); entry.appendChild( source );
Element source = PsiDocumentFactory.createSource( this, root, this.source ); entry.appendChild( source );