@@ -19,7 +19,7 @@ var addUriTriple = function(kb, s, o, p) {
1919var turtleExtension = ".ttl" ;
2020
2121function createRootContainer ( options ) {
22- if ( ! metadata . hasContainerMetadata ( options . fileBase ) ) {
22+ if ( ! metadata . hasContainerMetadata ( options . base ) ) {
2323 var rootContainer = $rdf . graph ( ) ;
2424 addUriTriple ( rootContainer , options . pathStart ,
2525 rdfVocab . type , ldpVocab . Container ) ;
@@ -30,13 +30,13 @@ function createRootContainer(options) {
3030 '"Root Container"' ) ;
3131 var serializedContainer = $rdf . serialize ( undefined , rootContainer ,
3232 options . pathStart , 'text/turtle' ) ;
33- metadata . writeContainerMetadata ( options . fileBase ,
33+ metadata . writeContainerMetadata ( options . base ,
3434 serializedContainer , function ( err ) {
3535 if ( err ) {
3636 //TODO handle error
3737 debug ( "Could not write root container" ) ;
3838 } else {
39- debug ( "Wrote root container to " + options . fileBase ) ;
39+ debug ( "Wrote root container to " + options . base ) ;
4040 }
4141 } ) ;
4242 }
@@ -74,10 +74,10 @@ function releaseResourceUri(options, uri) {
7474}
7575
7676function createNewResource ( options , resourcePath , resourceGraph , callback ) {
77- var resourceURI = path . relative ( options . fileBase , resourcePath ) ;
77+ var resourceURI = path . relative ( options . base , resourcePath ) ;
7878 //TODO write files with relative URIS.
7979 var rawResource = $rdf . serialize ( undefined ,
80- resourceGraph , options . uriBase + resourceURI , 'text/turtle' ) ;
80+ resourceGraph , options . uri + resourceURI , 'text/turtle' ) ;
8181 debug ( "Writing new resource to " + resourcePath ) ;
8282 debug ( "Resource:\n" + rawResource ) ;
8383 fs . writeFile ( resourcePath , rawResource , writeResourceCallback ) ;
@@ -103,7 +103,7 @@ function createNewContainer(options, containerPath, containerGraph, callback) {
103103 return callback ( err ) ;
104104 } else {
105105 var rawContainer = $rdf . serialize ( undefined , containerGraph ,
106- options . uriBase , 'text/turtle' ) ;
106+ options . uri , 'text/turtle' ) ;
107107 debug ( "rawContainer " + rawContainer ) ;
108108 metadata . writeContainerMetadata ( containerPath , rawContainer ,
109109 writeContainerCallback ) ;
0 commit comments