Search in sources :

Example 26 with MetadataList

use of org.opencastproject.index.service.catalog.adapter.MetadataList in project opencast by opencast.

the class IndexServiceImpl method updateCommonEventMetadata.

@Override
public MetadataList updateCommonEventMetadata(String id, String metadataJSON, AbstractSearchIndex index) throws IllegalArgumentException, IndexServiceException, SearchIndexException, NotFoundException, UnauthorizedException {
    MetadataList metadataList;
    try {
        metadataList = getMetadataListWithCommonEventCatalogUIAdapter();
        metadataList.fromJSON(metadataJSON);
    } catch (Exception e) {
        logger.warn("Not able to parse the event metadata {}: {}", metadataJSON, getStackTrace(e));
        throw new IllegalArgumentException("Not able to parse the event metadata " + metadataJSON, e);
    }
    return updateEventMetadata(id, metadataList, index);
}
Also used : MetadataList(org.opencastproject.index.service.catalog.adapter.MetadataList) SchedulerException(org.opencastproject.scheduler.api.SchedulerException) IngestException(org.opencastproject.ingest.api.IngestException) WebApplicationException(javax.ws.rs.WebApplicationException) MetadataParsingException(org.opencastproject.metadata.dublincore.MetadataParsingException) EventCommentException(org.opencastproject.event.comment.EventCommentException) IOException(java.io.IOException) JSONException(org.codehaus.jettison.json.JSONException) SearchIndexException(org.opencastproject.matterhorn.search.SearchIndexException) ParseException(java.text.ParseException) SeriesException(org.opencastproject.series.api.SeriesException) WorkflowException(org.opencastproject.workflow.api.WorkflowException) MediaPackageException(org.opencastproject.mediapackage.MediaPackageException) IndexServiceException(org.opencastproject.index.service.exception.IndexServiceException) UnauthorizedException(org.opencastproject.security.api.UnauthorizedException) NotFoundException(org.opencastproject.util.NotFoundException) WorkflowDatabaseException(org.opencastproject.workflow.api.WorkflowDatabaseException) AssetManagerException(org.opencastproject.assetmanager.api.AssetManagerException)

Example 27 with MetadataList

use of org.opencastproject.index.service.catalog.adapter.MetadataList in project opencast by opencast.

the class IndexServiceImpl method getMetadataListWithCommonEventCatalogUIAdapter.

private MetadataList getMetadataListWithCommonEventCatalogUIAdapter() {
    MetadataList metadataList = new MetadataList();
    metadataList.add(eventCatalogUIAdapter, eventCatalogUIAdapter.getRawFields());
    return metadataList;
}
Also used : MetadataList(org.opencastproject.index.service.catalog.adapter.MetadataList)

Aggregations

MetadataList (org.opencastproject.index.service.catalog.adapter.MetadataList)27 MetadataCollection (org.opencastproject.metadata.dublincore.MetadataCollection)15 NotFoundException (org.opencastproject.util.NotFoundException)10 Path (javax.ws.rs.Path)8 JSONArray (org.json.simple.JSONArray)8 JSONParser (org.json.simple.parser.JSONParser)8 RestQuery (org.opencastproject.util.doc.rest.RestQuery)8 ParseException (org.json.simple.parser.ParseException)7 IOException (java.io.IOException)6 Produces (javax.ws.rs.Produces)6 IndexServiceException (org.opencastproject.index.service.exception.IndexServiceException)6 EventCatalogUIAdapter (org.opencastproject.metadata.dublincore.EventCatalogUIAdapter)6 GET (javax.ws.rs.GET)5 WebApplicationException (javax.ws.rs.WebApplicationException)5 JSONObject (org.json.simple.JSONObject)5 CommonEventCatalogUIAdapter (org.opencastproject.index.service.catalog.adapter.events.CommonEventCatalogUIAdapter)5 IngestException (org.opencastproject.ingest.api.IngestException)5 MediaPackageException (org.opencastproject.mediapackage.MediaPackageException)5 AccessControlList (org.opencastproject.security.api.AccessControlList)5 UnauthorizedException (org.opencastproject.security.api.UnauthorizedException)5