public org.osid.shared.LongValueIterator getAssetDates(org.osid.shared.Id assetId) throws org.osid.repository.RepositoryException { if (assetId == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } java.util.Vector result = new java.util.Vector(); try { org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); org.osid.shared.LongValueIterator longValueIterator = repository.getAssetDates(assetId); while (longValueIterator.hasNextLongValue()) { result.addElement(new Long(longValueIterator.nextLongValue())); } } return new LongValueIterator(result); } catch (Throwable t) { log.error(t.getMessage()); throw new org.osid.repository.RepositoryException(org.osid.OsidException.OPERATION_FAILED); } }
nextRepository.getAssetsBySearch(searchCriteria,searchType,searchProperties); while (assetIterator.hasNextAsset())
public org.osid.repository.RepositoryIterator getRepositoriesByType(org.osid.shared.Type repositoryType) throws org.osid.repository.RepositoryException { if (repositoryType == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } java.util.Vector result = new java.util.Vector(); org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); if (nextRepository.getType().isEqual(repositoryType)) { result.addElement(nextRepository); } } return new RepositoryIterator(result); }
public org.osid.repository.Asset getAsset(org.osid.shared.Id assetId) throws org.osid.repository.RepositoryException { if (assetId == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } try { org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); try { org.osid.repository.Asset asset = nextRepository.getAsset(assetId); return asset; } catch (Throwable t) {} } } catch (Throwable t) { log.warn(t.getMessage()); throw new org.osid.repository.RepositoryException(org.osid.OsidException.OPERATION_FAILED); } throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.UNKNOWN_ID); }
public org.osid.repository.Asset getAssetByDate(org.osid.shared.Id assetId , long date) throws org.osid.repository.RepositoryException { if (assetId == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } try { org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); try { org.osid.repository.Asset asset = nextRepository.getAssetByDate(assetId,date); return asset; } catch (Throwable t) {} } } catch (Throwable t) { log.error(t.getMessage()); throw new org.osid.repository.RepositoryException(org.osid.OsidException.OPERATION_FAILED); } throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.UNKNOWN_ID); }
repository.getAssetsBySearch( cqlQuery, searchType, searchProperties ); repository.getPropertiesByType( statusType );
protected String getSearchStatusMessage( Repository repository ) throws SearchException { BasicType statusType = new BasicType("sakaibrary", "properties", "metasearchStatus"); String message = null; try { org.osid.shared.Properties statusProperties = repository.getPropertiesByType(statusType); message = (String) statusProperties.getProperty("statusMessage"); } catch(RepositoryException e) { // let the message remain null but log this exception m_log.warn("getSearchStatusMessage RepositoryException getting properties " + e.getMessage()); } catch(SharedException e) { // let the message remain null but log this exception m_log.warn("getSearchStatusMessage SharedException getting property " + e.getMessage()); } return message; }
protected Type getPropertyType(Repository repository) throws SearchException { TypeIterator propertyTypes = null; Type propertyType = null; try { propertyTypes = repository.getPropertyTypes(); while( propertyTypes.hasNextType() ) { Type tempType = propertyTypes.nextType(); if( tempType.getAuthority().equals( "sakaibrary" ) && tempType.getDomain().equals( "properties" ) && tempType.getKeyword().equals( "metasearchStatus" ) ) { propertyType = tempType; break; } } } catch( OsidException oe ) { m_log.warn("getPropertyType -- OsidException: " + oe.getMessage()); throw new SearchException( "ERROR in getting search types: " + oe.getMessage() ); } return propertyType; }
protected Type getCategoryType( Repository repository ) throws SearchException { TypeIterator assetTypes = null; try { assetTypes = repository.getAssetTypes(); while( assetTypes.hasNextType() ) { Type tempType = assetTypes.nextType(); if( tempType.isEqual( categoryAssetType ) ) { return tempType; } } } catch( OsidException oe ) { m_log.warn("getCategoryType -- OsidException: ", oe); throw new SearchException( "ERROR in getting category type: " + oe.getMessage() ); } return null; }
public org.osid.repository.RepositoryIterator getRepositoriesByType(org.osid.shared.Type repositoryType) throws org.osid.repository.RepositoryException { if (repositoryType == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } java.util.Vector result = new java.util.Vector(); org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); if (nextRepository.getType().isEqual(repositoryType)) { result.addElement(nextRepository); } } return new RepositoryIterator(result); }
public org.osid.repository.Asset getAsset(org.osid.shared.Id assetId) throws org.osid.repository.RepositoryException { if (assetId == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } try { org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); try { org.osid.repository.Asset asset = nextRepository.getAsset(assetId); return asset; } catch (Throwable t) {} } } catch (Throwable t) { log.error(t.getMessage()); throw new org.osid.repository.RepositoryException(org.osid.OsidException.OPERATION_FAILED); } throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.UNKNOWN_ID); }
public org.osid.repository.Asset getAssetByDate(org.osid.shared.Id assetId , long date) throws org.osid.repository.RepositoryException { if (assetId == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } try { org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); try { org.osid.repository.Asset asset = nextRepository.getAssetByDate(assetId,date); return asset; } catch (Throwable t) {} } } catch (Throwable t) { log.warn(t.getMessage()); throw new org.osid.repository.RepositoryException(org.osid.OsidException.OPERATION_FAILED); } throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.UNKNOWN_ID); }
statusProperties = repository.getPropertiesByType( statusType );
public org.osid.repository.Repository getRepository(org.osid.shared.Id repositoryId) throws org.osid.repository.RepositoryException { if (repositoryId == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } try { org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); if (nextRepository.getId().isEqual(repositoryId)) { return nextRepository; } } throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.UNKNOWN_ID); } catch (Throwable t) { log.warn(t.getMessage()); throw new org.osid.repository.RepositoryException(org.osid.OsidException.OPERATION_FAILED); } }
public org.osid.repository.RepositoryIterator getRepositoriesByType(org.osid.shared.Type repositoryType) throws org.osid.repository.RepositoryException { if (repositoryType == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } java.util.Vector result = new java.util.Vector(); org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); if (nextRepository.getType().isEqual(repositoryType)) { result.addElement(nextRepository); } } return new RepositoryIterator(result); }
public org.osid.shared.LongValueIterator getAssetDates(org.osid.shared.Id assetId) throws org.osid.repository.RepositoryException { if (assetId == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } java.util.Vector result = new java.util.Vector(); try { org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); org.osid.shared.LongValueIterator longValueIterator = nextRepository.getAssetDates(assetId); while (longValueIterator.hasNextLongValue()) { result.addElement(new Long(longValueIterator.nextLongValue())); } } return new LongValueIterator(result); } catch (Throwable t) { log.warn(t.getMessage()); throw new org.osid.repository.RepositoryException(org.osid.OsidException.OPERATION_FAILED); } }
public org.osid.repository.Asset getAsset(org.osid.shared.Id assetId) throws org.osid.repository.RepositoryException { if (assetId == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } try { org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); try { org.osid.repository.Asset asset = nextRepository.getAsset(assetId); return asset; } catch (Throwable t) {} } } catch (Throwable t) { log.warn(t.getMessage()); throw new org.osid.repository.RepositoryException(org.osid.OsidException.OPERATION_FAILED); } throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.UNKNOWN_ID); }
public org.osid.repository.Asset getAssetByDate(org.osid.shared.Id assetId , long date) throws org.osid.repository.RepositoryException { if (assetId == null) { throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.NULL_ARGUMENT); } try { org.osid.repository.RepositoryIterator repositoryIterator = getRepositories(); while (repositoryIterator.hasNextRepository()) { org.osid.repository.Repository nextRepository = repositoryIterator.nextRepository(); try { org.osid.repository.Asset asset = nextRepository.getAssetByDate(assetId,date); return asset; } catch (Throwable t) {} } } catch (Throwable t) { log.error(t.getMessage()); throw new org.osid.repository.RepositoryException(org.osid.OsidException.OPERATION_FAILED); } throw new org.osid.repository.RepositoryException(org.osid.shared.SharedException.UNKNOWN_ID); }
nextRepository.getAssetsBySearch(searchCriteria,searchType,searchProperties); while (assetIterator.hasNextAsset())