org.apache.jena.ontology.DatatypeProperty Java Examples

The following examples show how to use org.apache.jena.ontology.DatatypeProperty. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ModelStorage.java    From FCA-Map with GNU General Public License v3.0 5 votes vote down vote up
private void acquireDataTypeProperties() {
  for (ExtendedIterator<DatatypeProperty> it = ontModel.listDatatypeProperties(); it.hasNext(); ) {
    DatatypeProperty p = it.next();
    if (isIgnoredDataTypeProperty(p)) continue;
    dataTypeProperties.add(p);
  }
}
 
Example #2
Source File: OntModelWrapper.java    From FCA-Map with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Acquire datatype properties and skip the ignored one
 */
private void acquireDatatypeProperties() {
  for (ExtendedIterator<DatatypeProperty> it = m_ontology.listDatatypeProperties(); it.hasNext(); ) {
    DatatypeProperty p = it.next();
    if (isSkipProperty(p)) continue;
    m_datatype_properties.add(p);
  }
}
 
Example #3
Source File: OwlSchemaFactory.java    From baleen with Apache License 2.0 5 votes vote down vote up
private void addProperty(
    OntModel ontModel, OntClass domain, String name, String comment, Resource range) {
  DatatypeProperty begin = ontModel.createDatatypeProperty(namespace + name);
  begin.addComment(comment, EN);
  begin.addDomain(domain);
  begin.addRange(range);
}
 
Example #4
Source File: OwlSchemaFactory.java    From baleen with Apache License 2.0 5 votes vote down vote up
private void addFeature(OntModel ontModel, OntClass ontClass, FeatureDescription feature) {
  if (ontModel.getDatatypeProperty(namespace + feature.getName()) == null) {
    DatatypeProperty property = ontModel.createDatatypeProperty(namespace + feature.getName());
    String propertyComment = feature.getDescription();
    if (propertyComment != null) {
      property.addComment(propertyComment, EN);
    }

    property.addDomain(ontClass);
    property.addRange(getRange(feature));
  }
}
 
Example #5
Source File: ModelStorage.java    From FCA-Map with GNU General Public License v3.0 4 votes vote down vote up
public Set<DatatypeProperty> getDataTypeProperties() {
  return dataTypeProperties;
}
 
Example #6
Source File: ModelStorage.java    From FCA-Map with GNU General Public License v3.0 4 votes vote down vote up
private static final boolean isIgnoredDataTypeProperty(DatatypeProperty p) {
  // XXX:
  return false;
}
 
Example #7
Source File: OwlSchemaFactory.java    From baleen with Apache License 2.0 4 votes vote down vote up
private void addProperty(OntModel ontModel, String name, String comment, Resource range) {
  DatatypeProperty begin = ontModel.createDatatypeProperty(namespace + name);
  begin.addComment(comment, EN);
  begin.addRange(range);
}
 
Example #8
Source File: OntModelWrapper.java    From FCA-Map with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Get the hash set of datatype properties
 *
 * @return m_datatype_properties
 */
public Set<DatatypeProperty> getDatatypeProperties() {
  return m_datatype_properties;
}