@Override public OWLDataProperty getOWLDataProperty(IRI iri) { return new OWLDataPropertyImpl(iri); }
@Override public OWLDataProperty getOWLDataProperty(IRI iri) { return new OWLDataPropertyImpl(iri); }
@Override public OWLDataProperty getOWLDataProperty(IRI iri) { return new OWLDataPropertyImpl(iri); }
@Override public OWLDataProperty getOWLDataProperty(IRI iri) { return new OWLDataPropertyImpl(iri); }
@Override public OWLDataProperty getOWLDataProperty(IRI iri) { return new OWLDataPropertyImpl(iri); }
@Override public OWLDataProperty getOWLDataProperty(IRI iri) { return new OWLDataPropertyImpl(iri); }
public OWLDataProperty getOWLDataProperty(IRI iri) { OWLDataProperty prop = dataPropertiesByURI.get(iri); if (prop == null) { prop = new OWLDataPropertyImpl(this, iri); dataPropertiesByURI.put(iri, prop); } return prop; }
public static OWLDataPropertyImpl instantiate(SerializationStreamReader streamReader) throws SerializationException { return new OWLDataPropertyImpl(IRI.create(streamReader.readString())); }
@SuppressWarnings("unchecked") static <E extends OWLEntity> E getOWLEntity(EntityType<E> entityType, IRI iri) { if (entityType.equals(EntityType.CLASS)) { return (E) new OWLClassImpl(iri); } else if (entityType.equals(EntityType.OBJECT_PROPERTY)) { return (E) new OWLObjectPropertyImpl(iri); } else if (entityType.equals(EntityType.DATA_PROPERTY)) { return (E) new OWLDataPropertyImpl(iri); } else if (entityType.equals(EntityType.ANNOTATION_PROPERTY)) { return (E) new OWLAnnotationPropertyImpl(iri); } else if (entityType.equals(EntityType.NAMED_INDIVIDUAL)) { return (E) new OWLNamedIndividualImpl(iri); } else if (entityType.equals(EntityType.DATATYPE)) { return (E) new OWLDatatypeImpl(iri); } return null; }
public static void main(String[] args) throws Exception{ ToStringRenderer.getInstance().setRenderer(new DLSyntaxObjectRenderer()); SparqlEndpointKS ks = new SparqlEndpointKS(SparqlEndpoint.getEndpointDBpedia()); ks.init(); DataPropertyDomainAxiomLearner l = new DataPropertyDomainAxiomLearner(ks); l.setEntityToDescribe(new OWLDataPropertyImpl(IRI.create("http://dbpedia.org/ontology/birthDate"))); l.setUseSampling(false); l.setBatchMode(true); l.setUsePrecisionOnly(false); l.setProgressMonitor(new ConsoleAxiomLearningProgressMonitor()); l.init(); l.start(); l.getCurrentlyBestEvaluatedAxioms(0.3).forEach(ax -> { System.out.println("---------------\n" + ax); l.getPositiveExamples(ax).stream().limit(5).forEach(System.out::println); }); }
prop = new OWLObjectPropertyImpl(IRI.create(edge1.getURI())); } else { prop = new OWLDataPropertyImpl(IRI.create(edge1.getURI()));
private OWLEntity getEntity(String resourceURI, String entityType, SparqlEndpoint endpoint) { OWLEntity entity = null; switch (entityType) { case "class": entity = new OWLClassImpl(IRI.create(resourceURI)); break; case "objectproperty": entity = new OWLObjectPropertyImpl(IRI.create(resourceURI)); break; case "dataproperty": entity = new OWLDataPropertyImpl(IRI.create(resourceURI)); break; default: SPARQLTasks st = new SPARQLTasks(endpoint); entity = st.guessResourceType(resourceURI, true); break; } return entity; } }
OWLFacet.MIN_INCLUSIVE, min))); OWLDataProperty dp = new OWLDataPropertyImpl(IRI.create("p1")); OWLObjectProperty op = df.getOWLObjectProperty(IRI.create("op1"));