@Override public Set<OWLDatatype> getDatatypesInSignature() { Set<OWLDatatype> result = new HashSet<OWLDatatype>(); for (OWLEntity ent : getSignature()) { if (ent.isOWLDatatype()) { result.add(ent.asOWLDatatype()); } } return result; }
@Override public Set<OWLDatatype> getDatatypesInSignature() { Set<OWLDatatype> result = new HashSet<>(); for (OWLEntity ent : getSignature()) { if (ent.isOWLDatatype()) { result.add(ent.asOWLDatatype()); } } return result; }
@Override public Set<OWLDatatype> getDatatypesInSignature() { Set<OWLDatatype> result = new HashSet<>(); for (OWLEntity ent : getSignature()) { if (ent.isOWLDatatype()) { result.add(ent.asOWLDatatype()); } } return result; }
/** * A convenience method that obtains the datatypes * that are in the signature of this object * @return A set containing the datatypes that are in the signature * of this object. */ public Set<OWLDatatype> getDatatypesInSignature() { Set<OWLDatatype> result = new HashSet<OWLDatatype>(); for(OWLEntity ent : getSignature()) { if(ent.isOWLDatatype()) { result.add(ent.asOWLDatatype()); } } return result; }
public OWLDatatype getOWLDatatype(String name) { for (OWLEntity ent : shortFormProvider.getEntities(name)) { if (ent.isOWLDatatype()) { return ent.asOWLDatatype(); } } return null; }
@Override public OWLDatatype getOWLDatatype(String name) { for (OWLEntity ent : shortFormProvider.getEntities(name)) { if (ent.isOWLDatatype()) { return ent.asOWLDatatype(); } } return null; }
public OWLDatatype getOWLDatatype(String name) { for (OWLEntity ent : shortFormProvider.getEntities(name)) { if (ent.isOWLDatatype()) { return ent.asOWLDatatype(); } } return null; }
@NonNull @Override public OWLDatatype getOWLDatatype() { return getOWLEntity().asOWLDatatype(); }
public boolean dd(@NonNull List<@NonNull SWRLBuiltInArgument> arguments) throws SWRLBuiltInException { checkNumberOfArgumentsEqualTo(1, arguments.size()); Set<OWLDeclarationAxiom> axioms = getBuiltInBridge().getOWLOntology() .getAxioms(AxiomType.DECLARATION, Imports.INCLUDED).stream().filter(a -> a.getEntity().isOWLDatatype()) .collect(Collectors.toSet()); if (axioms.isEmpty()) return false; else { Map<@NonNull Integer, @NonNull OWLObject> inputArgumentValues = getInputArgumentValues(arguments, SWRLBuiltInArgumentType.DATATYPE); Map<@NonNull Integer, @NonNull SWRLMultiValueVariableBuiltInArgument> outputMultiValueArguments = createOutputMultiValueArguments( arguments); for (OWLDeclarationAxiom axiom : axioms) { OWLDatatype candidateValue1 = axiom.getEntity().asOWLDatatype(); if (!noBoundArgumentsMismatch(inputArgumentValues, candidateValue1)) { if (outputMultiValueArguments.isEmpty()) return true; // We have a match and there are no unbound arguments - return immediately else { // We have a match so update any unbound arguments with the matched values if (outputMultiValueArguments.containsKey(0)) outputMultiValueArguments.get(0).addArgument(createDatatypeBuiltInArgument(candidateValue1)); } } } return processResultMultiValueArguments(arguments, outputMultiValueArguments); } }
public Set<OWLAxiom> getReferencingAxioms(OWLEntity owlEntity) { if (owlEntity instanceof OWLClass) { return getAxioms(owlEntity.asOWLClass(), owlClassReferences, false); } if (owlEntity instanceof OWLObjectProperty) { return getAxioms(owlEntity.asOWLObjectProperty(), owlObjectPropertyReferences, false); } if (owlEntity instanceof OWLDataProperty) { return getAxioms(owlEntity.asOWLDataProperty(), owlDataPropertyReferences, false); } if (owlEntity instanceof OWLNamedIndividual) { return getAxioms(owlEntity.asOWLNamedIndividual(), owlIndividualReferences, false); } if (owlEntity instanceof OWLDatatype) { return getAxioms(owlEntity.asOWLDatatype(), owlDatatypeReferences, false); } if(owlEntity instanceof OWLAnnotationProperty) { return getAxioms(owlEntity.asOWLAnnotationProperty(), owlAnnotationPropertyReferences, false); } return Collections.emptySet(); }
public Set<OWLAxiom> writeFrame(OWLEntity entity) { if (entity.isOWLClass()) { return write(entity.asOWLClass()); } if (entity.isOWLObjectProperty()) { return write(entity.asOWLObjectProperty()); } if (entity.isOWLDataProperty()) { return write(entity.asOWLDataProperty()); } if (entity.isOWLNamedIndividual()) { return write(entity.asOWLNamedIndividual()); } if (entity.isOWLAnnotationProperty()) { return write(entity.asOWLAnnotationProperty()); } if (entity.isOWLDatatype()) { return write(entity.asOWLDatatype()); } return Collections.emptySet(); }
public Set<OWLAxiom> writeFrame(OWLEntity entity) { if (entity.isOWLClass()) { return write(entity.asOWLClass()); } if (entity.isOWLObjectProperty()) { return write(entity.asOWLObjectProperty()); } if (entity.isOWLDataProperty()) { return write(entity.asOWLDataProperty()); } if (entity.isOWLNamedIndividual()) { return write(entity.asOWLNamedIndividual()); } if (entity.isOWLAnnotationProperty()) { return write(entity.asOWLAnnotationProperty()); } if (entity.isOWLDatatype()) { return write(entity.asOWLDatatype()); } return Collections.emptySet(); }
/** * Write frame. * * @param entity the entity * @return the sets the */ public Collection<OWLAxiom> writeFrame(OWLEntity entity) { if (entity.isOWLClass()) { return write(entity.asOWLClass()); } if (entity.isOWLObjectProperty()) { return write(entity.asOWLObjectProperty()); } if (entity.isOWLDataProperty()) { return write(entity.asOWLDataProperty()); } if (entity.isOWLNamedIndividual()) { return write(entity.asOWLNamedIndividual()); } if (entity.isOWLAnnotationProperty()) { return write(entity.asOWLAnnotationProperty()); } if (entity.isOWLDatatype()) { return write(entity.asOWLDatatype()); } return Collections.emptySet(); }
/** * Write frame. * * @param entity the entity * @return the sets the */ public Collection<OWLAxiom> writeFrame(OWLEntity entity) { if (entity.isOWLClass()) { return write(entity.asOWLClass()); } if (entity.isOWLObjectProperty()) { return write(entity.asOWLObjectProperty()); } if (entity.isOWLDataProperty()) { return write(entity.asOWLDataProperty()); } if (entity.isOWLNamedIndividual()) { return write(entity.asOWLNamedIndividual()); } if (entity.isOWLAnnotationProperty()) { return write(entity.asOWLAnnotationProperty()); } if (entity.isOWLDatatype()) { return write(entity.asOWLDatatype()); } return Collections.emptySet(); }
/** * Write frame. * * @param entity the entity * @return the sets the */ public Collection<OWLAxiom> writeFrame(OWLEntity entity) { if (entity.isOWLClass()) { return write(entity.asOWLClass()); } if (entity.isOWLObjectProperty()) { return write(entity.asOWLObjectProperty()); } if (entity.isOWLDataProperty()) { return write(entity.asOWLDataProperty()); } if (entity.isOWLNamedIndividual()) { return write(entity.asOWLNamedIndividual()); } if (entity.isOWLAnnotationProperty()) { return write(entity.asOWLAnnotationProperty()); } if (entity.isOWLDatatype()) { return write(entity.asOWLDatatype()); } return Collections.emptySet(); }
/** * Calls the appropriate hook method to write the comments for an entity. * * @param entity The entity for which comments should be written. */ private void writeEntityComment(OWLEntity entity) { if (entity.isOWLClass()) { writeClassComment(entity.asOWLClass()); } else if (entity.isOWLDatatype()) { writeDatatypeComment(entity.asOWLDatatype()); } else if (entity.isOWLObjectProperty()) { writeObjectPropertyComment(entity.asOWLObjectProperty()); } else if (entity.isOWLDataProperty()) { writeDataPropertyComment(entity.asOWLDataProperty()); } else if (entity.isOWLAnnotationProperty()) { writeAnnotationPropertyComment(entity.asOWLAnnotationProperty()); } else if (entity.isOWLNamedIndividual()) { writeIndividualComments(entity.asOWLNamedIndividual()); } }
/** * Calls the appropriate hook method to write the comments for an entity. * * @param entity The entity for which comments should be written. */ private void writeEntityComment(OWLEntity entity) { if (entity.isOWLClass()) { writeClassComment(entity.asOWLClass()); } else if (entity.isOWLDatatype()) { writeDatatypeComment(entity.asOWLDatatype()); } else if (entity.isOWLObjectProperty()) { writeObjectPropertyComment(entity.asOWLObjectProperty()); } else if (entity.isOWLDataProperty()) { writeDataPropertyComment(entity.asOWLDataProperty()); } else if (entity.isOWLAnnotationProperty()) { writeAnnotationPropertyComment(entity.asOWLAnnotationProperty()); } else if (entity.isOWLNamedIndividual()) { writeIndividualComments(entity.asOWLNamedIndividual()); } }
/** * Calls the appropriate hook method to write the comments for an entity. * * @param entity The entity for which comments should be written. */ private void writeEntityComment(OWLEntity entity) { if (entity.isOWLClass()) { writeClassComment(entity.asOWLClass()); } else if (entity.isOWLDatatype()) { writeDatatypeComment(entity.asOWLDatatype()); } else if (entity.isOWLObjectProperty()) { writeObjectPropertyComment(entity.asOWLObjectProperty()); } else if (entity.isOWLDataProperty()) { writeDataPropertyComment(entity.asOWLDataProperty()); } else if (entity.isOWLAnnotationProperty()) { writeAnnotationPropertyComment(entity.asOWLAnnotationProperty()); } else if (entity.isOWLNamedIndividual()) { writeIndividualComments(entity.asOWLNamedIndividual()); } }
/** Calls the appropriate hook method to write the comments for an entity. * * @param entity * The entity for which comments should be written. * @throws IOException * if there was a problem writing the comment */ private void writeEntityComment(OWLEntity entity) throws IOException { if (entity.isOWLClass()) { writeClassComment(entity.asOWLClass()); } else if (entity.isOWLDatatype()) { writeDatatypeComment(entity.asOWLDatatype()); } else if (entity.isOWLObjectProperty()) { writeObjectPropertyComment(entity.asOWLObjectProperty()); } else if (entity.isOWLDataProperty()) { writeDataPropertyComment(entity.asOWLDataProperty()); } else if (entity.isOWLAnnotationProperty()) { writeAnnotationPropertyComment(entity.asOWLAnnotationProperty()); } else if (entity.isOWLNamedIndividual()) { writeIndividualComments(entity.asOWLNamedIndividual()); } }
/** * Calls the appropriate hook method to write the comments for an entity. * * @param entity The entity for which comments should be written. */ private void writeEntityComment(OWLEntity entity) { if (entity.isOWLClass()) { writeClassComment(entity.asOWLClass()); } else if (entity.isOWLDatatype()) { writeDatatypeComment(entity.asOWLDatatype()); } else if (entity.isOWLObjectProperty()) { writeObjectPropertyComment(entity.asOWLObjectProperty()); } else if (entity.isOWLDataProperty()) { writeDataPropertyComment(entity.asOWLDataProperty()); } else if (entity.isOWLAnnotationProperty()) { writeAnnotationPropertyComment(entity.asOWLAnnotationProperty()); } else if (entity.isOWLNamedIndividual()) { writeIndividualComments(entity.asOWLNamedIndividual()); } }