In RDF, resources, including properties, are identified by URIs. There's no sense in which you need to load those URIs. Sometimes documents that are identified by URIs might contain statements that you want, in which case, you'd need to load a document containing those, but that's different than simply referencing the property. Here's an example:
import org.apache.jena.riot.RDFDataMgr;
import org.apache.jena.riot.RDFFormat;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Property;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.Statement;
public class UseFoafNameExample {
public static void main(String[] args) {
Model model = ModelFactory.createDefaultModel();
Property name = model.createProperty( "http://xmlns.com/foaf/0.1/name" );
Resource resource = model.createResource( "http://stackoverflow.com/q/23818390/1281433/NicholasCage" );
Statement s = model.createStatement( resource, name, "Nicholas Cage" );
model.add( s );
RDFDataMgr.write( System.out, model, RDFFormat.RDFXML_ABBREV );
}
}
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:j.0="http://xmlns.com/foaf/0.1/">
<rdf:Description rdf:about="http://stackoverflow.com/q/23818390/1281433/NicholasCage">
<j.0:name>Nicholas Cage</j.0:name>
</rdf:Description>
</rdf:RDF>
Now, there's another problem in your question.
The foaf:Agent class has a property called name, which I would like to
load using Jena with something similar to:
the foaf:Agent class doesn't have a property; that's not how RDFS (and OWL) classes work. There's a property name
that has Agent
as an rdfs:domain
(I didn't check that this is actually the case, but it sounds reasonable, and I'm guessing that that's where the confusion arose from). That means that when you have a triple
x foaf:name "some name"
you can infer that
x rdf:type foaf:Agent
Of course, to do that sort of inference, you need to know about the triple
foaf:name rdfs:domain foaf:Agent
and that's what you may want to load an ontology from someplace else. I.e., you want to get the axioms that it contains, so that you can reason with them.