当前位置: 首页>>代码示例>>Java>>正文


Java AvuData类代码示例

本文整理汇总了Java中org.irods.jargon.core.pub.domain.AvuData的典型用法代码示例。如果您正苦于以下问题:Java AvuData类的具体用法?Java AvuData怎么用?Java AvuData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AvuData类属于org.irods.jargon.core.pub.domain包,在下文中一共展示了AvuData类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addMetadataToDataObject

import org.irods.jargon.core.pub.domain.AvuData; //导入依赖的package包/类
protected void addMetadataToDataObject(String filePath,
		Map<String, String> metadata) throws ReplicationServiceException {
	try {
		DataObjectAO dataObjectAO = irodsFileSystem
				.getIRODSAccessObjectFactory()
				.getDataObjectAO(irodsAccount);
		for (Map.Entry<String, String> md : metadata.entrySet()) {
			AvuData data = AvuData.instance(md.getKey(), md.getValue(), "");
			dataObjectAO.addAVUMetadata(filePath, data);
		}
	} catch (JargonException e) {
		throw new ReplicationServiceException(e);
	}
}
 
开发者ID:EUDAT-B2SAFE,项目名称:B2SAFE-repository-package,代码行数:15,代码来源:ReplicationServiceIrodsGenericImpl.java

示例2: modifyMetadataToDataObject

import org.irods.jargon.core.pub.domain.AvuData; //导入依赖的package包/类
protected void modifyMetadataToDataObject(String filePath,
		Map<String, String> metadata) throws ReplicationServiceException {
	try {
		DataObjectAO dataObjectAO = irodsFileSystem
				.getIRODSAccessObjectFactory()
				.getDataObjectAO(irodsAccount);
		for (Map.Entry<String, String> md : metadata.entrySet()) {
			AvuData data = AvuData.instance(md.getKey(), md.getValue(), "");
			dataObjectAO.modifyAvuValueBasedOnGivenAttributeAndUnit(
					filePath, data);
		}
	} catch (JargonException e) {
		throw new ReplicationServiceException(e);
	}
}
 
开发者ID:EUDAT-B2SAFE,项目名称:B2SAFE-repository-package,代码行数:16,代码来源:ReplicationServiceIrodsGenericImpl.java

示例3: addMetadataToCollection

import org.irods.jargon.core.pub.domain.AvuData; //导入依赖的package包/类
protected void addMetadataToCollection(String collectionPath,
		Map<String, String> metadata) throws ReplicationServiceException {
	try {
		CollectionAO collectionAO = irodsFileSystem
				.getIRODSAccessObjectFactory()
				.getCollectionAO(irodsAccount);
		for (Map.Entry<String, String> md : metadata.entrySet()) {
			AvuData data = AvuData.instance(md.getKey(), md.getValue(), "");
			collectionAO.addAVUMetadata(collectionPath, data);
		}
	} catch (JargonException e) {
		throw new ReplicationServiceException(e);
	}
}
 
开发者ID:EUDAT-B2SAFE,项目名称:B2SAFE-repository-package,代码行数:15,代码来源:ReplicationServiceIrodsGenericImpl.java

示例4: modifyMetadataToCollection

import org.irods.jargon.core.pub.domain.AvuData; //导入依赖的package包/类
protected void modifyMetadataToCollection(String collectionPath,
		Map<String, String> metadata) throws ReplicationServiceException {
	try {
		CollectionAO collectionAO = irodsFileSystem
				.getIRODSAccessObjectFactory()
				.getCollectionAO(irodsAccount);
		for (Map.Entry<String, String> md : metadata.entrySet()) {
			AvuData data = AvuData.instance(md.getKey(), md.getValue(), "");
			collectionAO.modifyAvuValueBasedOnGivenAttributeAndUnit(
					collectionPath, data);
		}
	} catch (JargonException e) {
		throw new ReplicationServiceException(e);
	}
}
 
开发者ID:EUDAT-B2SAFE,项目名称:B2SAFE-repository-package,代码行数:16,代码来源:ReplicationServiceIrodsGenericImpl.java

示例5: import_to_directory_recovery

import org.irods.jargon.core.pub.domain.AvuData; //导入依赖的package包/类
public void import_to_directory_recovery(IRODSAccount account, String sourceFilePath, String irodsPath,
        String targetFileName, String userName, String datasetURI, String creationDate, String datasetName,
        String datasetType, String recoveryFolderName)
        throws JargonException {
    logger.debug("Importing to IRODS-Server[\n\tiRODS account: " + account.toString()
            + "\tSourceFilePath: " + sourceFilePath
            + "\tiRODSPath: " + irodsPath
            + "\tTargetFileName: " + targetFileName
            + "\tUsername: " + userName
            + "\tDatasetURI: " + datasetURI
            + "\tDatasetName: " + datasetName
            + "\tCreationDate: " + creationDate);

    IRODSFileSystem irodsFileSystem = IRODSFileSystem.instance();

    DataTransferOperations dataTransferOperations = irodsFileSystem.getIRODSAccessObjectFactory().getDataTransferOperations(account);

    File sourceFile = new File(sourceFilePath);

    IRODSFileFactory irodsFileFactory = irodsFileSystem.getIRODSFileFactory(account);

    //newFileName = "/tempZone/home/rods/"+newFileName;
    String recoveryFolderPath = irodsPath + "/" + recoveryFolderName + "/";

    IRODSFile targetFileFolder = irodsFileFactory.instanceIRODSFile(recoveryFolderPath);

    targetFileFolder.mkdir();

    String targetFilePath = recoveryFolderPath;// + "/" + datasetName + "/";

    IRODSFile targetFile = irodsFileFactory.instanceIRODSFile(targetFilePath);

    targetFile.mkdir();

    // targetFilePath = irodsPath + targetFileName; 
    targetFilePath = targetFilePath + targetFileName;

    targetFile = irodsFileFactory.instanceIRODSFile(targetFilePath);

    DataTransferOperations dataTransferOperationsAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataTransferOperations(account);

    dataTransferOperationsAO.putOperation(sourceFile, targetFile, null, null);

    DataObjectAO dataObjectAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(account);

    dataObjectAO.findByAbsolutePath(targetFile.getAbsolutePath());

    AvuData avuData = new AvuData();
    avuData.setAttribute(USERNAME_LABEL);
    avuData.setValue(userName);

    AvuData avuData2 = new AvuData();
    avuData2.setAttribute(DATASET_URI_LABEL);
    avuData2.setValue(datasetURI);

    AvuData avuData3 = new AvuData();
    avuData3.setAttribute(CREATION_DATE_LABEL);
    avuData3.setValue(creationDate);

    AvuData avuData4 = new AvuData();
    avuData4.setAttribute(DATASET_TITLE_LABEL);
    avuData4.setValue(datasetName);

    AvuData avuData5 = new AvuData();
    avuData5.setAttribute(DATASET_TYPE_LABEL);
    avuData5.setValue(datasetType);

    dataObjectAO.addAVUMetadata(targetFile.getAbsolutePath(), avuData);
    dataObjectAO.addAVUMetadata(targetFile.getAbsolutePath(), avuData2);
    dataObjectAO.addAVUMetadata(targetFile.getAbsolutePath(), avuData3);
    dataObjectAO.addAVUMetadata(targetFile.getAbsolutePath(), avuData4);
    dataObjectAO.addAVUMetadata(targetFile.getAbsolutePath(), avuData5);
}
 
开发者ID:isl,项目名称:LifeWatch_Greece,代码行数:74,代码来源:ContentStorageService.java


注:本文中的org.irods.jargon.core.pub.domain.AvuData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。