• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java IRI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: createDatasetReceipt

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
DepositReceipt createDatasetReceipt(String baseUrl, Dataset dataset) {
    logger.fine("baseUrl was: " + baseUrl);
    DepositReceipt depositReceipt = new DepositReceipt();
    String globalId = dataset.getGlobalId();
    String editIri = baseUrl + "/edit/study/" + globalId;
    depositReceipt.setEditIRI(new IRI(editIri));
    /**
     * @todo: should setLocation depend on if an atom entry or a zip file
     * was deposited? (This @todo has been carried over from the DVN 3.x
     * version.)
     */
    depositReceipt.setLocation(new IRI(editIri));
    depositReceipt.setEditMediaIRI(new IRI(baseUrl + "/edit-media/study/" + globalId));
    depositReceipt.setStatementURI("application/atom+xml;type=feed", baseUrl + "/statement/study/" + globalId);
    depositReceipt.addDublinCore("bibliographicCitation", dataset.getLatestVersion().getCitation());
    depositReceipt.setSplashUri(dataset.getPersistentURL());
    return depositReceipt;
}
 
开发者ID:pengchengluo,项目名称:Peking-University-Open-Research-Data-Platform,代码行数:19,代码来源:ReceiptGenerator.java


示例2: createDataverseReceipt

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
DepositReceipt createDataverseReceipt(String baseUrl, Dataverse dataverse) {
    logger.fine("baseUrl was: " + baseUrl);
    DepositReceipt depositReceipt = new DepositReceipt();
    String globalId = dataverse.getAlias();
    String collectionIri = baseUrl + "/collection/dataverse/" + globalId;
    depositReceipt.setSplashUri(collectionIri);
    /**
     * @todo We have to include an "edit" IRI or else we get
     * NullPointerException in getAbderaEntry at
     * https://github.com/swordapp/JavaServer2.0/blob/sword2-server-1.0/src/main/java/org/swordapp/server/DepositReceipt.java#L52
     *
     * Do we want to support a replaceMetadata of dataverses? Probably not.
     * Let's do that with the native API.
     *
     * Typically, we only operate on the "collection" IRI for dataverses, to
     * create a dataset.
     */
    String editIri = baseUrl + "/edit/dataverse/" + globalId;
    depositReceipt.setEditIRI(new IRI(editIri));
    return depositReceipt;
}
 
开发者ID:pengchengluo,项目名称:Peking-University-Open-Research-Data-Platform,代码行数:22,代码来源:ReceiptGenerator.java


示例3: getMediaResourceRepresentation

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
public MediaResource getMediaResourceRepresentation(String editMediaIRI, Map<String, String> accept,
    AuthCredentials authCredentials, SwordConfiguration swordConfiguration)
    throws SwordError, SwordServerException, SwordAuthException {
    LOGGER.info("getMediaResourceRepresentation: {}", editMediaIRI);
    final IRI mediaEditIRI = new IRI(editMediaIRI);
    final String requestDerivateID = MCRSwordUtil.ParseLinkUtil.MediaEditIRI
        .getDerivateFromMediaEditIRI(mediaEditIRI);
    final String requestFilePath = MCRSwordUtil.ParseLinkUtil.MediaEditIRI
        .getFilePathFromMediaEditIRI(mediaEditIRI);
    final String collection = MCRSwordUtil.ParseLinkUtil.MediaEditIRI.getCollectionFromMediaEditIRI(mediaEditIRI);

    doAuthentication(authCredentials, collection);
    checkObject(requestDerivateID);

    return getMediaProvider(collection).getMediaResourceRepresentation(requestDerivateID, requestFilePath, accept);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:17,代码来源:MCRSwordMediaManager.java


示例4: replaceMediaResource

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
public DepositReceipt replaceMediaResource(String editMediaIRI, Deposit deposit, AuthCredentials authCredentials,
    SwordConfiguration swordConfiguration) throws SwordError, SwordServerException, SwordAuthException {
    LOGGER.info("replaceMediaResource: {}", editMediaIRI);
    final IRI mediaEditIRI = new IRI(editMediaIRI);

    final String requestDerivateID = MCRSwordUtil.ParseLinkUtil.MediaEditIRI
        .getDerivateFromMediaEditIRI(mediaEditIRI);
    final String requestFilePath = MCRSwordUtil.ParseLinkUtil.MediaEditIRI
        .getFilePathFromMediaEditIRI(mediaEditIRI);
    final String collection = MCRSwordUtil.ParseLinkUtil.MediaEditIRI.getCollectionFromMediaEditIRI(mediaEditIRI);

    doAuthentication(authCredentials, collection);
    checkObject(requestDerivateID);
    getMediaProvider(collection).replaceMediaResource(requestDerivateID, requestFilePath, deposit);

    final MCRObject mcrObject = MCRSwordUtil.getMcrObjectForDerivateID(requestDerivateID);
    return MCRSword.getCollection(collection).getMetadataProvider().provideMetadata(mcrObject);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:19,代码来源:MCRSwordMediaManager.java


示例5: addResource

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
public DepositReceipt addResource(String editMediaIRI, Deposit deposit, AuthCredentials authCredentials,
    SwordConfiguration swordConfiguration) throws SwordError, SwordServerException, SwordAuthException {
    LOGGER.info("addResource: {}", editMediaIRI);

    final IRI mediaEditIRI = new IRI(editMediaIRI);
    final String requestDerivateID = MCRSwordUtil.ParseLinkUtil.MediaEditIRI
        .getDerivateFromMediaEditIRI(mediaEditIRI);
    String requestFilePath = MCRSwordUtil.ParseLinkUtil.MediaEditIRI.getFilePathFromMediaEditIRI(mediaEditIRI);
    final String collection = MCRSwordUtil.ParseLinkUtil.MediaEditIRI.getCollectionFromMediaEditIRI(mediaEditIRI);

    doAuthentication(authCredentials, collection);
    checkObject(requestDerivateID);

    if (requestFilePath == null) {
        requestFilePath = "/";
    }

    getMediaProvider(collection).addResource(requestDerivateID, requestFilePath, deposit);
    final MCRObject mcrObject = MCRSwordUtil.getMcrObjectForDerivateID(requestDerivateID);
    return MCRSword.getCollection(collection).getMetadataProvider().provideMetadata(mcrObject);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:22,代码来源:MCRSwordMediaManager.java


示例6: getEntry

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
@Override
public DepositReceipt getEntry(String editIRI, Map<String, String> map, AuthCredentials authCredentials,
    SwordConfiguration swordConfiguration) throws SwordServerException, SwordError, SwordAuthException {
    IRI iri = new IRI(editIRI);
    String collection = MCRSwordUtil.ParseLinkUtil.EditIRI.getCollectionFromEditIRI(iri);
    String objectIdString = MCRSwordUtil.ParseLinkUtil.EditIRI.getObjectFromEditIRI(iri);
    final MCRSwordCollectionProvider collectionProvider = MCRSword.getCollection(collection);

    LOGGER.info(MessageFormat.format("REQUEST: Get entry {0} from {1} !", objectIdString, collection));

    collectionProvider.getAuthHandler().authentication(authCredentials);

    MCRObjectID objectId = MCRObjectID.getInstance(objectIdString);
    if (!MCRMetadataManager.exists(objectId)) {
        throwObjectDoesNotExist(objectIdString);
    }
    MCRBase retrievedMCRBase = MCRMetadataManager.retrieve(objectId);
    checkIsObject(retrievedMCRBase);

    final Optional<Map<String, String>> accept = Optional.of(map);
    return collectionProvider.getContainerHandler().getMetadata(collection,
        (MCRObject) retrievedMCRBase, accept);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:24,代码来源:MCRSwordContainerManager.java


示例7: replaceMetadata

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
@Override
public DepositReceipt replaceMetadata(String editIRI, Deposit deposit, AuthCredentials authCredentials,
    SwordConfiguration swordConfiguration) throws SwordError, SwordServerException, SwordAuthException {
    IRI iri = new IRI(editIRI);
    String collection = MCRSwordUtil.ParseLinkUtil.EditIRI.getCollectionFromEditIRI(iri);
    String objectIdString = MCRSwordUtil.ParseLinkUtil.EditIRI.getObjectFromEditIRI(iri);
    final MCRSwordCollectionProvider collectionProvider = MCRSword.getCollection(collection);

    LOGGER.info(MessageFormat.format("REQUEST: Replace metadata of {0} from {1} !", objectIdString, collection));
    collectionProvider.getAuthHandler().authentication(authCredentials);
    MCRObjectID objectId = MCRObjectID.getInstance(objectIdString);

    if (!MCRMetadataManager.exists(objectId)) {
        throwObjectDoesNotExist(objectIdString);
    }

    MCRBase retrievedMCRBase = MCRMetadataManager.retrieve(objectId);
    checkIsObject(retrievedMCRBase);

    return collectionProvider.getContainerHandler().replaceMetadata((MCRObject) retrievedMCRBase, deposit);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:22,代码来源:MCRSwordContainerManager.java


示例8: replaceMetadataAndMediaResource

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
@Override
public DepositReceipt replaceMetadataAndMediaResource(String editIRI, Deposit deposit,
    AuthCredentials authCredentials, SwordConfiguration swordConfiguration)
    throws SwordError, SwordServerException, SwordAuthException {
    IRI iri = new IRI(editIRI);
    String collection = MCRSwordUtil.ParseLinkUtil.EditIRI.getCollectionFromEditIRI(iri);
    String objectIdString = MCRSwordUtil.ParseLinkUtil.EditIRI.getObjectFromEditIRI(iri);
    final MCRSwordCollectionProvider collectionProvider = MCRSword.getCollection(collection);

    LOGGER.info(MessageFormat.format("REQUEST: Replace metadata and resource of {0} from {1} !", objectIdString,
        collection));
    collectionProvider.getAuthHandler().authentication(authCredentials);

    MCRObjectID objectId = MCRObjectID.getInstance(objectIdString);

    if (!MCRMetadataManager.exists(objectId)) {
        throwObjectDoesNotExist(objectIdString);
    }

    MCRBase retrievedMCRBase = MCRMetadataManager.retrieve(objectId);
    return collectionProvider.getContainerHandler().replaceMetadataAndResources((MCRObject) retrievedMCRBase,
        deposit);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:24,代码来源:MCRSwordContainerManager.java


示例9: addResources

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
@Override
public DepositReceipt addResources(String editIRI, Deposit deposit, AuthCredentials authCredentials,
    SwordConfiguration swordConfiguration) throws SwordError, SwordServerException, SwordAuthException {
    IRI iri = new IRI(editIRI);
    String collection = MCRSwordUtil.ParseLinkUtil.EditIRI.getCollectionFromEditIRI(iri);
    String objectIdString = MCRSwordUtil.ParseLinkUtil.EditIRI.getObjectFromEditIRI(iri);
    final MCRSwordCollectionProvider collectionProvider = MCRSword.getCollection(collection);

    LOGGER.info(MessageFormat.format("REQUEST: add resources {0} from {1} !", objectIdString, collection));

    collectionProvider.getAuthHandler().authentication(authCredentials);
    MCRObjectID objectId = MCRObjectID.getInstance(objectIdString);

    if (!MCRMetadataManager.exists(objectId)) {
        throwObjectDoesNotExist(objectIdString);
    }

    MCRBase retrievedMCRBase = MCRMetadataManager.retrieve(objectId);

    return collectionProvider.getContainerHandler().addResources((MCRObject) retrievedMCRBase, deposit);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:22,代码来源:MCRSwordContainerManager.java


示例10: deleteContainer

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
@Override
public void deleteContainer(String editIRI, AuthCredentials authCredentials, SwordConfiguration swordConfiguration)
    throws SwordError, SwordServerException, SwordAuthException {
    IRI iri = new IRI(editIRI);
    String collection = MCRSwordUtil.ParseLinkUtil.EditIRI.getCollectionFromEditIRI(iri);
    String objectIdString = MCRSwordUtil.ParseLinkUtil.EditIRI.getObjectFromEditIRI(iri);
    final MCRSwordCollectionProvider collectionProvider = MCRSword.getCollection(collection);

    LOGGER.info(MessageFormat.format("REQUEST: Delete {0} from {1}", objectIdString, collection));

    collectionProvider.getAuthHandler().authentication(authCredentials);

    MCRObjectID objectId = MCRObjectID.getInstance(objectIdString);
    if (!MCRMetadataManager.exists(objectId)) {
        throwObjectDoesNotExist(objectIdString);
    }

    final MCRBase object = MCRMetadataManager.retrieve(objectId);
    checkIsObject(object);

    collectionProvider.getContainerHandler().deleteObject((MCRObject) object);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:23,代码来源:MCRSwordContainerManager.java


示例11: getXFromXIRI

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
private static String getXFromXIRI(IRI editIRI, Integer x, String iri, Pattern iriPattern, boolean required) {
    String[] urlParts = editIRI.toString().split(iri);

    if (urlParts.length < 2) {
        final String message = "Invalid " + iri + " : " + editIRI;
        throw new IllegalArgumentException(message);
    }

    String uriPathAsString = urlParts[1];
    Matcher matcher = iriPattern.matcher(uriPathAsString);
    if (matcher.matches()) {
        if (matcher.groupCount() >= x) {
            return matcher.group(x);
        } else {
            return null;
        }
    } else {
        if (required) {
            throw new IllegalArgumentException(
                MessageFormat.format("{0} does not match the pattern {1}", uriPathAsString, iriPattern));
        } else {
            return null;
        }
    }
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:26,代码来源:MCRSwordUtil.java


示例12: getEditMediaIRIStream

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
/**
 * Creates a edit link for every derivate of a mcrobject.
 *
 * @param mcrObjId the mcrobject id as String
 * @return returns a Stream which contains links to every derivate.
 */
public static Stream<Link> getEditMediaIRIStream(final String collection, final String mcrObjId)
    throws SwordError {
    return MCRSword.getCollection(collection).getDerivateIDsofObject(mcrObjId).map(derivateId -> {
        final Factory abderaFactory = Abdera.getNewFactory();
        final Stream<IRI> editMediaFileIRIStream = getEditMediaFileIRIStream(collection, derivateId);
        return Stream
            .concat(Stream.of(getEditMediaHrefOfDerivate(collection, derivateId)), editMediaFileIRIStream)
            .map(link -> {
                final Link newLinkElement = abderaFactory.newLink();
                newLinkElement.setHref(link.toString());
                newLinkElement.setRel("edit-media");
                return newLinkElement;
            });
    }).flatMap(s -> s);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:22,代码来源:MCRSwordUtil.java


示例13: getEditMediaFileIRIStream

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
/**
 * Creates a Stream which contains edit-media-IRIs to all files in a specific derivate derivate.
 *
 * @param collection the collection in which the derivate is.
 * @param derivateId the id of the derivate
 * @return a Stream which contains edit-media-IRIs to all files.
 */
private static Stream<IRI> getEditMediaFileIRIStream(final String collection, final String derivateId) {
    MCRPath derivateRootPath = MCRPath.getPath(derivateId, "/");
    try {
        List<IRI> iris = new ArrayList<>();
        Files.walkFileTree(derivateRootPath, new SimpleFileVisitor<Path>() {
            @Override
            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
                throws IOException {
                String relativePath = derivateRootPath.relativize(file).toString();
                final String URI = MessageFormat.format("{0}{1}{2}/{3}/{4}", MCRFrontendUtil.getBaseURL(),
                    MCRSwordConstants.SWORD2_EDIT_MEDIA_IRI, collection, derivateId,
                    encodeURLPart(relativePath));
                iris.add(new IRI(URI));
                return FileVisitResult.CONTINUE;
            }
        });
        return iris.stream();
    } catch (IOException e) {
        LOGGER.error("Error while processing directory stream of {}", derivateId, e);
        throw new MCRException(e);
    }
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:30,代码来源:MCRSwordUtil.java


示例14: configureBaseMapper

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
private static void configureBaseMapper(ObjectMapper mapper,
		boolean includeIdsMappers) {
	mapper.setSerializationInclusion(Include.NON_NULL);
	mapper.setDateFormat(new ISO8601VerboseDateFormat());
	SimpleModule module = new SimpleModule();

	JsonSerializer<IRI> iriSerializer = new IRISerializer();
	module.addSerializer(IRI.class, iriSerializer);
	if (includeIdsMappers) {
		module.addSerializer(Agent.class, new AgentIdsSerializer());
		module.addSerializer(Group.class, new GroupIdsSerializer());
		module.addSerializer(Activity.class, new ActivityIdsSerializer());
	}

	mapper.registerModule(module);
}
 
开发者ID:Apereo-Learning-Analytics-Initiative,项目名称:Larissa,代码行数:17,代码来源:StatementPrinterImpl.java


示例15: before

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
@Before
public void before() {
	validAgent = new Agent();
	IFI ifi = new IFI();
	ifi.setMbox(ValidMbox);
	validAgent.setIdentifier(ifi);
	validActor = validAgent;
	validVerb = new Verb();
	validVerb.setId(new IRI("http://uva.nl/verbs/making"));
	validActivity = new Activity();
	validActivity.setId(new IRI("http://uva.nl/activities/homework"));
	validStatementObject = validActivity;

	ValidatorFactory factory = Validation.buildDefaultValidatorFactory();

	validator = factory.getValidator();

}
 
开发者ID:Apereo-Learning-Analytics-Initiative,项目名称:Larissa,代码行数:19,代码来源:TestValidator.java


示例16: createStatement

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
private Statement createStatement() {
	Statement statement = new Statement();

	statement.setActor(createAgent("[email protected]"));

	Verb verb = new Verb();
	verb.setId(new IRI("http://smurf.com/smurft"));
	statement.setVerb(verb);

	Activity activity = new Activity();
	activity.setId(new IRI("http://smurf.com/smurfbesplukken"));
	ActivityDefinition definition = new ActivityDefinition();
	Map<String, String> map = new HashMap<>();
	map.put("NL-nl", "smurfbessen smurfen");
	definition.setName(map);
	activity.setDefinition(definition);
	statement.setStatementObject(activity);

	return statement;
}
 
开发者ID:Apereo-Learning-Analytics-Initiative,项目名称:Larissa,代码行数:21,代码来源:ITCouchDBStatementRepository.java


示例17: deleteMediaResource

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
public void deleteMediaResource(String editMediaIRI, AuthCredentials authCredentials,
    SwordConfiguration swordConfiguration) throws SwordError, SwordServerException, SwordAuthException {
    LOGGER.info("deleteMediaResource: {}", editMediaIRI);
    final IRI mediaEditIRI = new IRI(editMediaIRI);
    final String requestObjectID = MCRSwordUtil.ParseLinkUtil.MediaEditIRI
        .getDerivateFromMediaEditIRI(mediaEditIRI);
    final String requestFilePath = MCRSwordUtil.ParseLinkUtil.MediaEditIRI
        .getFilePathFromMediaEditIRI(mediaEditIRI);
    final String collection = MCRSwordUtil.ParseLinkUtil.MediaEditIRI.getCollectionFromMediaEditIRI(mediaEditIRI);

    doAuthentication(authCredentials, collection);
    getMediaProvider(collection).deleteMediaResource(requestObjectID, requestFilePath);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:14,代码来源:MCRSwordMediaManager.java


示例18: listCollectionContents

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
@Override
public Feed listCollectionContents(IRI collectionIRI, AuthCredentials authCredentials, SwordConfiguration config)
    throws SwordServerException, SwordAuthException, SwordError {
    String collection = MCRSwordUtil.ParseLinkUtil.CollectionIRI.getCollectionNameFromCollectionIRI(collectionIRI);
    String path = collectionIRI.getPath();

    LOGGER.info(MessageFormat.format("List Collection: {0}", collection));

    Feed feed = new Abdera().newFeed();
    if (MCRSword.getCollectionNames().contains(collection)) {
        MCRSwordCollectionProvider collectionProvider = MCRSword.getCollection(collection);

        collectionProvider.getAuthHandler().authentication(authCredentials);
        if (collectionProvider.isVisible()) {
            Integer paginationFromIRI = MCRSwordUtil.ParseLinkUtil.CollectionIRI
                .getPaginationFromCollectionIRI(collectionIRI);
            final int start = (paginationFromIRI - 1) * MCRSwordConstants.MAX_ENTRYS_PER_PAGE;

            collectionProvider.getIDSupplier().get(start, MCRSwordConstants.MAX_ENTRYS_PER_PAGE).stream()
                .map(id -> {
                    try {
                        return collectionProvider.getMetadataProvider().provideListMetadata(id);
                    } catch (SwordError swordError) {
                        LOGGER.warn("Error while creating feed for [{}]! (Will be removed from List)", id);
                        return null;
                    }
                }).filter(Objects::nonNull)
                .forEach(feed::addEntry);

            MCRSwordUtil.BuildLinkUtil.addPaginationLinks(collectionIRI, collection, feed, collectionProvider);
        }

    } else {
        throw new SwordError(UriRegistry.ERROR_BAD_REQUEST, HttpServletResponse.SC_NOT_FOUND,
            "The collection '" + collection + "' does not exist!");
    }

    return feed;
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:40,代码来源:MCRSwordCollectionManager.java


示例19: createNew

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
@Override
public DepositReceipt createNew(String editIRI, Deposit deposit, AuthCredentials authCredentials,
    SwordConfiguration swordConfiguration) throws SwordError, SwordServerException, SwordAuthException {
    LOGGER.info("createNew:{}", editIRI);
    String collection = MCRSwordUtil.ParseLinkUtil.CollectionIRI
        .getCollectionNameFromCollectionIRI(new IRI(editIRI));
    MCRSwordCollectionProvider collectionProvider = MCRSword.getCollection(collection);
    collectionProvider.getAuthHandler().authentication(authCredentials);
    return collectionProvider.getContainerHandler().addObject(deposit);
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:11,代码来源:MCRSwordCollectionManager.java


示例20: getCollectionNameFromCollectionIRI

import org.apache.abdera.i18n.iri.IRI; //导入依赖的package包/类
public static String getCollectionNameFromCollectionIRI(IRI collectionIRI) {
    String uriPathAsString = collectionIRI.getPath().split(MCRSwordConstants.SWORD2_COL_IRI)[1];
    Matcher matcher = COLLECTION_IRI_PATTERN.matcher(uriPathAsString);
    if (matcher.matches()) {
        return matcher.group(1);
    } else {
        throw new IllegalArgumentException(MessageFormat.format("{0} does not match the pattern {1}",
            uriPathAsString, COLLECTION_IRI_PATTERN));
    }
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:11,代码来源:MCRSwordUtil.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PrettyPrinter类代码示例发布时间:2022-05-22
下一篇:
Java IllegalAttributeException类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap