Commit 9bb0e65e authored by Gilles Mouchard's avatar Gilles Mouchard
Browse files

Made configurable the fix of the artefact type depending on the collection name.

Made lazier other services about the type ASFM artefacts as the PKM can fix it.
parent d63ae491
Pipeline #18100 passed with stages
in 9 minutes and 9 seconds
......@@ -82,7 +82,7 @@ const asfm_to_doc = ({ dbName, key, body, asynchronous, invocationID }) => {
file_path, // rel_path
buffer, // content
null, // encoding
'Doc', // type
'', // type (let PKM guess the type)
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' // MIME type
);
......@@ -620,7 +620,7 @@ const code_to_asfm = ({ dbName, key, asynchronous, invocationID }) => {
});
})).then((cpp_class_docs) =>
{
doc_document.type = 'Doc';
// doc_document.type = 'ASFM Docs';
unit_doc.classes = cpp_class_docs;
doc_document.units.push(unit_doc);
......@@ -866,7 +866,7 @@ const doc_to_asfm = ({ dbName, key, body, asynchronous, invocationID }) => {
// run doc_to_asfm
doc_to_asfm(file_system, file_path, doc_to_asfm_options).then((doc_document) =>
{
doc_document.type = 'Doc';
// doc_document.type = 'ASFM Docs';
doc_document.sourceFile = file_path;
if(debug)
......
......@@ -68,7 +68,7 @@
file_path, // rel_path
buffer, // content
null, // encoding
'Doc', // type
'', // type (let PKM guess the type)
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' // MIME type
);
......
......@@ -383,7 +383,7 @@
});
})).then((cpp_class_docs) =>
{
doc_document.type = 'Doc';
// doc_document.type = 'ASFM Docs';
unit_doc.classes = cpp_class_docs;
doc_document.units.push(unit_doc);
......
......@@ -84,7 +84,7 @@
// run doc_to_asfm
doc_to_asfm(file_system, file_path, doc_to_asfm_options).then((doc_document) =>
{
doc_document.type = 'Doc';
// doc_document.type = 'ASFM Docs';
doc_document.sourceFile = file_path;
if(debug)
......
......@@ -99,10 +99,7 @@ parse_cmdline(['help', 'version', 'user', 'db', 'host', 'pkm-db', 'root', 'encod
const doc_file = new File(
doc_document.name + '.json', // rel_path
doc_document_content, // content
'utf8', // encoding
'Doc', // type
'application/json' // MIME type
doc_document_content // content
);
write_file_promises.push(file_system.writeFile(doc_file));
......
......@@ -91,7 +91,7 @@ parse_cmdline(['help', 'version', 'user', 'db', 'host', 'pkm-db', 'root', 'forma
host_doc_file_paths.forEach((host_doc_file_path) =>
{
const path = require('path');
read_file_promises.push(file_system.readFile(path.resolve(host_doc_file_path), { type : 'Doc' }).then((doc_file) =>
read_file_promises.push(file_system.readFile(path.resolve(host_doc_file_path)).then((doc_file) =>
{
return new Promise((resolve, reject) =>
{
......
......@@ -117,7 +117,7 @@ parse_cmdline(['help', 'version', 'user', 'db', 'host', 'pkm-db', 'debug!' ]).th
file_path, // rel_path
buffer, // content
null, // encoding
'Doc', // type
'', // type (let PKM guess the type)
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' // MIME type
);
......
......@@ -135,7 +135,7 @@ parse_cmdline(['help', 'version', 'user', 'db', 'host', 'pkm-db', 'debug!' ]).th
doc_to_asfm(file_system, file_path, doc_to_asfm_options).then((doc_document) =>
{
doc_document.type = 'Doc';
// doc_document.type = 'ASFM Docs';
doc_document.sourceFile = file_path;
pkm.update_docs(dbName, [ doc_document ]).then(() =>
......
......@@ -91,7 +91,7 @@ parse_cmdline(['help', 'version', 'user', 'db', 'host', 'pkm-db', 'root', 'forma
host_doc_file_paths.forEach((host_doc_file_path) =>
{
const path = require('path');
read_file_promises.push(file_system.readFile(path.resolve(host_doc_file_path), { type : 'Doc' }).then((doc_file) =>
read_file_promises.push(file_system.readFile(path.resolve(host_doc_file_path)).then((doc_file) =>
{
return new Promise((resolve, reject) =>
{
......
......@@ -788,6 +788,39 @@ class PKM
enable: true
}
},
types :
{
Annotations : 'Annotation',
RawSourcecode : 'Code',
RawUML : 'Diagram',
sourcecodeC : 'Code',
sourcecodeCPP : 'Code',
sourcecodeJava : 'Code',
annotationsACSL : 'Annotation',
annotationsACSLPP : 'Annotation',
annotationsJML : 'Annotation',
commentsC : 'Comment',
commentsCPP : 'Comment',
commentsjava : 'Comment',
RawDocumentation : 'Doc',
Documentation : 'ASFM Docs',
GraphicalDocumentation: 'Doc',
UMLClasses : 'Diagram',
UMLStateMachines : 'Diagram',
// TESTARStateModels : '',
// TESTARTestResults : '',
// TraceabilityMatrix : '',
// Project : '',
// CompileCommands : '',
Logs : 'Log'
// CVEList : '',
// RawBinaries : '',
// GitWorkingTrees : '',
// Tools : '',
// TESTARSettings : '',
// MethodologyStatus : '',
// Reviews : ''
},
file_types :
[
// Before adding new file types: see https://www.digipres.org/formats/mime-types
......@@ -2409,42 +2442,7 @@ class PKM
*/
static get_type_value(collection_name)
{
switch(collection_name)
{
case 'Annotations' : return 'Annotation';
case 'RawSourcecode' : return 'Code';
case 'RawUML' : return 'Diagram';
case 'sourcecodeC' : return 'Code';
case 'sourcecodeCPP' : return 'Code';
case 'sourcecodeJava' : return 'Code';
case 'annotationsACSL' : return 'Annotation';
case 'annotationsACSLPP' : return 'Annotation';
case 'annotationsJML' : return 'Annotation';
case 'commentsC' : return 'Comment';
case 'commentsCPP' : return 'Comment';
case 'commentsjava' : return 'Comment';
case 'RawDocumentation' : return 'Doc';
case 'Documentation' : return 'Doc';
case 'GraphicalDocumentation': return 'Doc';
case 'UMLClasses' : return 'Diagram';
case 'UMLStateMachines' : return 'Diagram';
// case 'TESTARStateModels' : return '';
// case 'TESTARTestResults' : return '';
// case 'Logs' : return '';
// case 'TraceabilityMatrix': return '';
// case 'Project' : return '';
// case 'CompileCommands' : return '';
case 'Logs' : return 'Log';
// case 'CVEList' : return '';
// case 'RawBinaries' : return '';
// case 'GitWorkingTrees' : return '';
// case 'Tools' : return '';
// case 'TESTARSettings' : return '';
// case 'MethodologyStatus' : return '';
// case 'Reviews' : return '';
}
return undefined;
return PKM.global_config.types[collection_name];
}
/** Guess file attribute (type, MIME type, collection) based on MIME type, filename suffix and magic number
......
......@@ -34,6 +34,7 @@
"server_request_body_limit": "256MB",
"project": {…},
"schemas": {…},
"types": {…},
"file_types": […]
}</code></pre>
<p>The JSON schema of the configuration file is available on the <a href="https://gitlab.ow2.org/decoder/pkm-api/-/blob/master/api/pkm-config-schema.json">pkm-api gitlab repository</a>.</p>
......
......@@ -21,6 +21,7 @@ The default configuration file, whose content is outlined below, is good for mos
"server_request_body_limit": "256MB",
"project": {…},
"schemas": {…},
"types": {…},
"file_types": […]
}
......
......@@ -451,7 +451,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2224">line 2224</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2257">line 2257</a>
</li></ul></dd>
 
......@@ -715,7 +715,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2009">line 2009</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2042">line 2042</a>
</li></ul></dd>
 
......@@ -897,7 +897,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2615">line 2615</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2613">line 2613</a>
</li></ul></dd>
 
......@@ -1056,7 +1056,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2270">line 2270</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2303">line 2303</a>
</li></ul></dd>
 
......@@ -1166,7 +1166,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1442">line 1442</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1475">line 1475</a>
</li></ul></dd>
 
......@@ -1313,7 +1313,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1404">line 1404</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1437">line 1437</a>
</li></ul></dd>
 
......@@ -1423,7 +1423,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1372">line 1372</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1405">line 1405</a>
</li></ul></dd>
 
......@@ -1533,7 +1533,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1460">line 1460</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1493">line 1493</a>
</li></ul></dd>
 
......@@ -1631,7 +1631,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1478">line 1478</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1511">line 1511</a>
</li></ul></dd>
 
......@@ -1778,7 +1778,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1384">line 1384</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1417">line 1417</a>
</li></ul></dd>
 
......@@ -1937,7 +1937,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2400">line 2400</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2433">line 2433</a>
</li></ul></dd>
 
......@@ -2096,7 +2096,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2410">line 2410</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2443">line 2443</a>
</li></ul></dd>
 
......@@ -2391,7 +2391,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1875">line 1875</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1908">line 1908</a>
</li></ul></dd>
 
......@@ -2706,7 +2706,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2139">line 2139</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2172">line 2172</a>
</li></ul></dd>
 
......@@ -2908,7 +2908,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2187">line 2187</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2220">line 2220</a>
</li></ul></dd>
 
......@@ -3018,7 +3018,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1805">line 1805</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1838">line 1838</a>
</li></ul></dd>
 
......@@ -3106,7 +3106,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1848">line 1848</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1881">line 1881</a>
</li></ul></dd>
 
......@@ -13311,7 +13311,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2588">line 2588</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2586">line 2586</a>
</li></ul></dd>
 
......@@ -14583,7 +14583,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2310">line 2310</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2343">line 2343</a>
</li></ul></dd>
 
......@@ -16334,7 +16334,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2633">line 2633</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2631">line 2631</a>
</li></ul></dd>
 
......@@ -16493,7 +16493,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2563">line 2563</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2561">line 2561</a>
</li></ul></dd>
 
......@@ -18011,7 +18011,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1451">line 1451</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1484">line 1484</a>
</li></ul></dd>
 
......@@ -20634,7 +20634,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1469">line 1469</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1502">line 1502</a>
</li></ul></dd>
 
......@@ -21518,7 +21518,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1504">line 1504</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1537">line 1537</a>
</li></ul></dd>
 
......@@ -21966,7 +21966,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1521">line 1521</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1554">line 1554</a>
</li></ul></dd>
 
......@@ -24460,7 +24460,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1487">line 1487</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1520">line 1520</a>
</li></ul></dd>
 
......@@ -24607,7 +24607,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1394">line 1394</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1427">line 1427</a>
</li></ul></dd>
 
......@@ -28203,7 +28203,7 @@ The returned user instance is ready for creating/updating user in the PKM manage
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2297">line 2297</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2330">line 2330</a>
</li></ul></dd>
 
......@@ -28385,7 +28385,7 @@ The returned user instance is ready for creating/updating user in the PKM manage
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2456">line 2456</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2454">line 2454</a>
</li></ul></dd>
 
......@@ -40972,7 +40972,7 @@ The returned user instance is ready for creating/updating user in the PKM manage
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2640">line 2640</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2638">line 2638</a>
</li></ul></dd>
 
......@@ -44742,7 +44742,7 @@ The returned user instance is ready for creating/updating user in the PKM manage
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1821">line 1821</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1854">line 1854</a>
</li></ul></dd>
 
......@@ -44880,7 +44880,7 @@ This function hides PKM management roles that are internal to the implementation
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2283">line 2283</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2316">line 2316</a>
</li></ul></dd>
 
......@@ -45039,7 +45039,7 @@ This function hides PKM management roles that are internal to the implementation
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2604">line 2604</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line2602">line 2602</a>
</li></ul></dd>
 
......@@ -52552,7 +52552,7 @@ If validation is enabled and a valid schema is present, these methods throw an e
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1430">line 1430</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1463">line 1463</a>
</li></ul></dd>
 
......
......@@ -816,6 +816,39 @@ class PKM
enable: true
}
},
types :
{
Annotations : 'Annotation',
RawSourcecode : 'Code',
RawUML : 'Diagram',
sourcecodeC : 'Code',
sourcecodeCPP : 'Code',
sourcecodeJava : 'Code',
annotationsACSL : 'Annotation',
annotationsACSLPP : 'Annotation',
annotationsJML : 'Annotation',
commentsC : 'Comment',
commentsCPP : 'Comment',
commentsjava : 'Comment',
RawDocumentation : 'Doc',
Documentation : 'ASFM Docs',
GraphicalDocumentation: 'Doc',
UMLClasses : 'Diagram',
UMLStateMachines : 'Diagram',
// TESTARStateModels : '',
// TESTARTestResults : '',
// TraceabilityMatrix : '',
// Project : '',
// CompileCommands : '',
Logs : 'Log'
// CVEList : '',
// RawBinaries : '',
// GitWorkingTrees : '',
// Tools : '',
// TESTARSettings : '',
// MethodologyStatus : '',
// Reviews : ''
},
file_types :
[
// Before adding new file types: see https://www.digipres.org/formats/mime-types
......@@ -2437,42 +2470,7 @@ class PKM
*/
static get_type_value(collection_name)
{
switch(collection_name)
{
case 'Annotations' : return 'Annotation';
case 'RawSourcecode' : return 'Code';
case 'RawUML' : return 'Diagram';
case 'sourcecodeC' : return 'Code';
case 'sourcecodeCPP' : return 'Code';
case 'sourcecodeJava' : return 'Code';
case 'annotationsACSL' : return 'Annotation';
case 'annotationsACSLPP' : return 'Annotation';
case 'annotationsJML' : return 'Annotation';
case 'commentsC' : return 'Comment';
case 'commentsCPP' : return 'Comment';
case 'commentsjava' : return 'Comment';
case 'RawDocumentation' : return 'Doc';
case 'Documentation' : return 'Doc';
case 'GraphicalDocumentation': return 'Doc';
case 'UMLClasses' : return 'Diagram';
case 'UMLStateMachines' : return 'Diagram';
// case 'TESTARStateModels' : return '';
// case 'TESTARTestResults' : return '';
// case 'Logs' : return '';
// case 'TraceabilityMatrix': return '';
// case 'Project' : return '';
// case 'CompileCommands' : return '';
case 'Logs' : return 'Log';
// case 'CVEList' : return '';
// case 'RawBinaries' : return '';
// case 'GitWorkingTrees' : return '';
// case 'Tools' : return '';
// case 'TESTARSettings' : return '';
// case 'MethodologyStatus' : return '';
// case 'Reviews' : return '';
}
return undefined;
return PKM.global_config.types[collection_name];
}
/** Guess file attribute (type, MIME type, collection) based on MIME type, filename suffix and magic number
......
......@@ -11305,7 +11305,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1492">line 1492</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1525">line 1525</a>
</li></ul></dd>
......@@ -11648,7 +11648,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1509">line 1509</a>
<a href="core_pkm.js.html">core/pkm.js</a>, <a href="core_pkm.js.html#line1542">line 1542</a>
</li></ul></dd>
......
......@@ -127,6 +127,10 @@
"file": "api/pkm-asfm-schema.json",
"enable": true
},
"GraphicalDocumentation": {
"file": "api/pkm-gsl-schema.json",
"enable": true
},
"CVEList": {
"file": "api/pkm-cve-schema.json",
"enable": true
......@@ -160,6 +164,26 @@
"enable": true
}
},
"types": {
"Annotations": "Annotation",
"RawSourcecode": "Code",
"RawUML": "Diagram",
"sourcecodeC": "Code",
"sourcecodeCPP": "Code",
"sourcecodeJava": "Code",
"annotationsACSL": "Annotation",