/** * <p>Answer an iterator over all of the classes that are the operands of this * Boolean class expression. Each element of the iterator will be an {@link OntClass}.</p> * @return An iterator over the operands of the expression. * @exception OntProfileException If the operand property is not supported in the current language profile. */ @Override public ExtendedIterator<? extends OntClass> listOperands() { return getOperands().iterator().mapWith( new AsMapper<OntClass>( OntClass.class ) ); }
/** * <p>Answer an iterator over all of the individuals that are declared to be the class extension for * this class. Each element of the iterator will be an {@link OntResource}.</p> * @return An iterator over the individuals in the class extension * @exception OntProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public ExtendedIterator<? extends OntResource> listOneOf() { return getOneOf().iterator().mapWith( new AsMapper<OntResource>( OntResource.class ) ); }
/** * <p>Answer an iterator over all of the literals that are declared to be the permissible values for * this class. Each element of the iterator will be an {@link Literal}.</p> * @return An iterator over the literals that are the permissible values * @exception OntProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public ExtendedIterator<Literal> listOneOf() { return getOneOf().iterator().mapWith( new AsMapper<Literal>( Literal.class ) ); }
private <E> Collection<E> parseIntoCollection(RDFList list, Collection<E> l, ClassMeta<?> type, BeanPropertyMeta pMeta) throws Exception { int argIndex = 0; for (ExtendedIterator<RDFNode> ni = list.iterator(); ni.hasNext();) { E e = (E)parseAnything(type.isArgs() ? type.getArg(argIndex++) : type.getElementType(), ni.next(), l, pMeta); l.add(e); } return l; }
/** Answer this view after modifying it to contain all the property chains defined by <code>spec</code>. */ public View addViewFromRDFList(Resource spec, ShortnameService sns) { cannotUpdateALL(); if (spec.canAs(RDFList.class)) { List<ViewProperty> properties = new ArrayList<>(); Iterator<RDFNode> list = spec.as(RDFList.class).iterator(); while(list.hasNext()) { properties.add(new ViewProperty.Base(list.next().as(Property.class))); } chains.add( new PropertyChain( properties ) ); } else { String uri = spec.asResource().getURI(); Property prop = ResourceFactory.createProperty(uri); ViewProperty vp = new ViewProperty.Base(prop); chains.add(new PropertyChain(vp)); } if (chains.size() > 0) type = Type.T_CHAINS; return this; }
ExtendedIterator<Resource> iter = list.iterator().mapWith(new Map1<RDFNode, Resource>(){