Search in sources :

Example 1 with MetadataType

use of org.olat.imscp.xml.manifest.MetadataType in project OpenOLAT by OpenOLAT.

the class ManifestBuilder method getResourceBuilderByHref.

public ManifestMetadataBuilder getResourceBuilderByHref(String href) {
    ResourceType resourceType = getResourceTypeByHref(href);
    MetadataType metadata = getMetadata(resourceType);
    return metadata == null ? null : new ManifestMetadataBuilder(metadata);
}
Also used : ManifestMetadataType(org.olat.imscp.xml.manifest.ManifestMetadataType) MetadataType(org.olat.imscp.xml.manifest.MetadataType) ResourceType(org.olat.imscp.xml.manifest.ResourceType)

Example 2 with MetadataType

use of org.olat.imscp.xml.manifest.MetadataType in project openolat by klemens.

the class ManifestBuilder method getMetadata.

public MetadataType getMetadata(ResourceType resourceType) {
    if (resourceType == null)
        return null;
    MetadataType metadata = resourceType.getMetadata();
    if (metadata == null) {
        metadata = cpObjectFactory.createMetadataType();
        resourceType.setMetadata(metadata);
    }
    return metadata;
}
Also used : ManifestMetadataType(org.olat.imscp.xml.manifest.ManifestMetadataType) MetadataType(org.olat.imscp.xml.manifest.MetadataType)

Example 3 with MetadataType

use of org.olat.imscp.xml.manifest.MetadataType in project OpenOLAT by OpenOLAT.

the class ManifestBuilder method getResourceBuilderByIdentifier.

public ManifestMetadataBuilder getResourceBuilderByIdentifier(String resourceId) {
    ResourceType resourceType = getResourceTypeByIdentifier(resourceId);
    MetadataType metadata = getMetadata(resourceType);
    return metadata == null ? null : new ManifestMetadataBuilder(metadata);
}
Also used : ManifestMetadataType(org.olat.imscp.xml.manifest.ManifestMetadataType) MetadataType(org.olat.imscp.xml.manifest.MetadataType) ResourceType(org.olat.imscp.xml.manifest.ResourceType)

Example 4 with MetadataType

use of org.olat.imscp.xml.manifest.MetadataType in project OpenOLAT by OpenOLAT.

the class ManifestBuilder method getMetadata.

public MetadataType getMetadata(ResourceType resourceType) {
    if (resourceType == null)
        return null;
    MetadataType metadata = resourceType.getMetadata();
    if (metadata == null) {
        metadata = cpObjectFactory.createMetadataType();
        resourceType.setMetadata(metadata);
    }
    return metadata;
}
Also used : ManifestMetadataType(org.olat.imscp.xml.manifest.ManifestMetadataType) MetadataType(org.olat.imscp.xml.manifest.MetadataType)

Example 5 with MetadataType

use of org.olat.imscp.xml.manifest.MetadataType in project OpenOLAT by OpenOLAT.

the class ManifestBuilder method getMetadataType.

public MetadataType getMetadataType(ResourceType resource, boolean create) {
    if (resource == null)
        return null;
    MetadataType metadata = resource.getMetadata();
    if (metadata == null && create) {
        metadata = cpObjectFactory.createMetadataType();
        resource.setMetadata(metadata);
    }
    return metadata;
}
Also used : ManifestMetadataType(org.olat.imscp.xml.manifest.ManifestMetadataType) MetadataType(org.olat.imscp.xml.manifest.MetadataType)

Aggregations

ManifestMetadataType (org.olat.imscp.xml.manifest.ManifestMetadataType)8 MetadataType (org.olat.imscp.xml.manifest.MetadataType)8 ResourceType (org.olat.imscp.xml.manifest.ResourceType)4