private static void definedShortname( Property p, String shortName ) { p .addProperty(RDF.type, RDF.Property) .addProperty(RDFS.label, shortName) ; }
private static Resource propertyShortname(Property p) { return p .addProperty(RDF.type, RDF.Property) .addProperty(RDFS.label, p.getLocalName() ) ; }
/** * <p> * Answer a resource representing an generic property in this model. Effectively * this method is an alias for {@link #createProperty( String )}, except that * the return type is {@link OntProperty}, which allow more convenient access to * a property's position in the property hierarchy, domain, range, etc. * </p> * * @param uri The uri for the property. May not be null. * @return An OntProperty resource. */ @Override public OntProperty createOntProperty( String uri ) { Property p = createProperty( uri ); p.addProperty( RDF.type, getProfile().PROPERTY() ); return p.as( OntProperty.class ); }
Property aN = model.createProperty(ONDEXRdf.attributeNameToUri(graphURI, an)); rdfMetadata(aN, an); if (an.getSpecialisationOf() != null) aN.addProperty(RDFS.subPropertyOf, model.createProperty(ONDEXRdf.attributeNameToUri(graphURI, an.getSpecialisationOf())));