Skip to content
Snippets Groups Projects
Commit af5dd72c authored by alvaro's avatar alvaro
Browse files

Types will be defined by replacing ":" by "__" for compatibility reasons.

Currently, both formats are supported for backwards compatibility
parent d50767e3
No related branches found
No related tags found
No related merge requests found
......@@ -126,8 +126,10 @@ class TypeModule extends abstractModule{
foreach($t as $v){
$curie = Utils::uri2curie($v);
$typesAndValues[$curie] = 0;
$typesAndValues[str_replace(":", "__", $curie)] = 0;
if(isset($conf['type']['priority'][$curie]) && $conf['type']['priority'][$curie] >= 0){
$typesAndValues[$curie] = $conf['type']['priority'][$curie];
$typesAndValues[str_replace(":", "__", $curie)] = $conf['type']['priority'][$curie];
}
}
}
......
......@@ -5,13 +5,13 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
initToken='types'
cd $DIR
componentName=${1/\:/__}
#Check models
mainDir=$DIR/../../components/$initToken/$1/
mainDir=$DIR/../../components/$initToken/$componentName/
if [ -e "$mainDir" ]
then
echo "ERROR: This type $1 already exists." >&2
echo "ERROR: This type $componentName already exists." >&2
exit 1
else
mkdir -p $mainDir
......@@ -19,4 +19,4 @@ fi
cp -rf ../defaults/type/* $mainDir/
echo $1 created successfully! >&2
echo $componentName created successfully! >&2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment