I have generated this RDF/XML data
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:j.0="http://marco_student/" >
<rdf:Description rdf:nodeID="A0">
<j.0:description>Departamento de Engenharia Civil</j.0:description>
<j.0:abbreviation>DEC</j.0:abbreviation>
<rdf:type rdf:resource="http://marco_student/Department"/>
</rdf:Description>
<rdf:Description rdf:nodeID="A1">
<j.0:description>Departamento de Engenharia Informática</j.0:description>
<j.0:abbreviation>DEI</j.0:abbreviation>
<rdf:type rdf:resource="http://marco_student/Department"/>
</rdf:Description>
<rdf:Description rdf:nodeID="A2">
<j.0:description>Departamento de Engenharia Electrotécnica</j.0:description>
<j.0:abbreviation>DEE</j.0:abbreviation>
<rdf:type rdf:resource="http://marco_student/Department"/>
</rdf:Description>
</rdf:RDF>
using this code:
String myNameSpace = "http://william_student/";
Resource departmentClass = ResourceFactory.createResource(myNameSpace+"Department");
Property abbreviationProperty = ResourceFactory.createProperty(myNameSpace, "abbreviation");
Property descriptionProperty = ResourceFactory.createProperty(myNameSpace, "description");
Model departmentModel = ModelFactory.createDefaultModel();
Resource departmentInstance1 = departmentModel.createResource();
departmentInstance1.addProperty(RDF.type, departmentClass);
departmentInstance1.addProperty(abbreviationProperty, "DEI");
and I write to file using this simple code
File file = new File("D:/departments.rdf");
fos = new FileOutputStream(file);
departmentModel.write(fos);
as you see, in the RDF generated data, there is j.0
prefix:
My question:
How can I replace that default prefix j.0
, but my prefix like vocabularyMarco