private void addSubtypes(Frame frame) { Iterator<OntClass> sequence = frame.asOntClass().listSubClasses(true); while (sequence.hasNext()) { OntClass type = sequence.next(); String subURI = type.getURI(); if (subURI == null) continue; Frame subFrame = manager.getFrameByUri(subURI); if (subFrame == null) { subFrame = manager.getListTypeByListUri(subURI); } if (subFrame != null) { frame.getSubtypeList().add(subFrame); } else { Datatype datatype = manager.getDatatypeByUri(subURI); if (datatype != null) { frame.addSubdatatype(datatype); continue; } if (isStandard(subURI)) continue; logger.warn( "Ignoring supertype of " + type.getLocalName() + " because frame not found: " + subURI); } } }
private void addRestrictions(Frame frame) { List<OntClass> restrictionList = listRestrictions(frame.asOntClass()); for (OntClass restriction : restrictionList) { frame.addRestriction(restriction); } }
private void setRestCategory(Frame frame) { OntClass type = frame.asOntClass(); Iterator<Resource> sequence = type.listRDFTypes(false); while (sequence.hasNext()) { Resource resource = sequence.next(); if (BindVocabulary.Addressable.equals(resource)) { frame.setCategory(RestCategory.ADDRESSABLE); } else if (BindVocabulary.Enum.equals(resource)) { frame.setCategory(RestCategory.ENUMERABLE); } else if (BindVocabulary.EmbeddableClass.equals(resource)) { frame.setCategory(RestCategory.EMBEDDABLE); } } }