Ejemplo n.º 1
0
def mutation_musicgroup_remove_exact_match_musicgroup(identifier_from: str, identifier_to: str):
    """Returns a mutation for removing the skos:exactMatch relation between two MusicGroup objects

    Args:
        identifier_from: the identifer of the MusicGroup to match to
        identifier_to: the identifier of the MusicGroup that is an exact match of identifier_from
    Returns: a mutation to remove the exactMatch relationship from the MusicGroup objects
    """
    return format_link_mutation("RemoveMusicGroupExactMatch", identifier_from, identifier_to)
Ejemplo n.º 2
0
def mutation_musicgroup_add_exact_match_musicgroup(identifier_from: str, identifier_to: str):
    """Returns a mutation for linking two MusicGroup objects with skos:exactMatch.

    Args:
        identifier_from: the identifer of the MusicGroup to match to
        identifier_to: the identifier of the MusicGroup that is an exact match of identifier_from
    Returns: a mutation to make an exactMatch relationship between the MusicGroup objects
    """
    return format_link_mutation("MergeMusicGroupExactMatch", identifier_from, identifier_to)
Ejemplo n.º 3
0
def merge_annotation_bodytext(annotation_id, textualbody_id):
    """
    Join an annotation with a body described in an AnnotationTextualBody
    Arguments:
        annotation_id: CE Node ID of an Annotation object
        textualbody_id: CE Node ID of an AnnotationTextualBody object

    """
    return format_link_mutation("MergeAnnotationBodyText", annotation_id,
                                textualbody_id)
Ejemplo n.º 4
0
def merge_annotation_bodynode(annotation_id, node_id):
    """
    Join an annotation with body described in any node in the CE
    Arguments:
        annotation_id: CE Node ID of an Annotation object
        node_id: CE Node ID of any object that implements ThingInterface

    """
    return format_link_mutation("MergeAnnotationBodyNode", annotation_id,
                                node_id)
Ejemplo n.º 5
0
def mutation_remove_musicgroup_member(person_identifier: str, musicgroup_identifier: str):
    """Returns a mutation for removing a Person object as member of a MusicGroup object.
    (https://schema.org/member)

    Args:
        person_identifier: the identifer of the Person to match to
        musicgroup_identifier: the identifier of the MusicGroup to which Person belong
    Returns: a mutation for removing a Person object as member of a MusicGroup object
    """
    return format_link_mutation("RemoveMusicGroupMember", person_identifier, musicgroup_identifier)
Ejemplo n.º 6
0
def mutation_add_controlaction_object(controlaction_id: str, object_id: str):
    """Returns a mutation for adding a control action to an object, either a property value specification or a property
    Arguments:
        controlaction_id: The unique identifier of the control action.
        object_id: The unique identifier of the object (property / property value specification).
    Returns:
        The string for the mutation for adding a control action to an object.
    """
    return format_link_mutation("AddControlActionObject", controlaction_id,
                                object_id)
Ejemplo n.º 7
0
def mutation_remove_music_composition_composer(composition_identifier,
                                               person_identifier):
    """Returns a mutation for removing a Person as the composer of a MusicComposition
    (https://schema.org/composer).

    Args:
        composition_identifier: The identifier of a MusicComposition.
        person_identifier: The identifier of a Person who composed the MusicComposition.
    """
    return format_link_mutation("RemoveMusicCompositionComposer",
                                composition_identifier, person_identifier)
Ejemplo n.º 8
0
def mutation_person_add_exact_match_person(identifier_from: str,
                                           identifier_to: str):
    """Returns a mutation for linking two Person objects with skos:exactMatch.

    Args:
        identifier_from: the identifer of the Person to match to
        identifier_to: the identifier of the Person that is an exact match of identifier_from
    Returns: a mutation to make an exactMatch relationship between the Person objects
    """
    return format_link_mutation("MergePersonExactMatch", identifier_from,
                                identifier_to)
Ejemplo n.º 9
0
def mutation_remove_music_composition_included_composition(
        main_identifier, part_identifier):
    """Returns a mutation for removing a MusicComposition as an included composition of another MusicComposition
    (https://schema.org/includedComposition).

    Args:
        main_identifier: The identifier of a main MusicComposition.
        part_identifier: The identifier of a MusicComposition which is an included part of the main MusicComposition.
    """
    return format_link_mutation("RemoveMusicCompositionIncludedComposition",
                                main_identifier, part_identifier)
Ejemplo n.º 10
0
def merge_annotation_targetnode(annotation_id, target_id):
    """
    Join an annotation with an AnnotationCETarget

    Arguments:
        annotation_id: CE Node ID of an Annotation object
        target_id: CE Node ID of an AnnotationCETarget object

    """
    return format_link_mutation("MergeAnnotationTargetNode", annotation_id,
                                target_id)
Ejemplo n.º 11
0
def mutation_remove_music_composition_exact_match(from_identifier,
                                                  to_identifier):
    """Returns a mutation for removing two MusicComposition representing the same composition
    (http://www.w3.org/2004/02/skos/core#exactMatch).

    Args:
        from_identifier: The identifier of one MusicComposition.
        to_identifier: The identifier of another MusicComposition.
    """
    return format_link_mutation("RemoveMusicCompositionExactMatch",
                                from_identifier, to_identifier)
Ejemplo n.º 12
0
def mutation_person_remove_exact_match_person(identifier_from: str,
                                              identifier_to: str):
    """Returns a mutation for removing the skos:exactMatch relation between two Person objects

    Args:
        identifier_from: the identifer of the Person to match to
        identifier_to: the identifier of the Person that is an exact match of identifier_from
    Returns: a mutation to remove the exactMatch relationship from the Person objects
    """
    return format_link_mutation("RemovePersonExactMatch", identifier_from,
                                identifier_to)
Ejemplo n.º 13
0
def defined_term_add_to_defined_term_set(*, defined_term_set: str, defined_term: str):
    """Return a mutation for adding a DefinedTerm to a DefinedTermSet.

    Arguments:
        defined_term_set: The identifier of the DefinedTermSet to add to
        defined_term: The identifier of the DefinedTermSet to add

    Returns:
        A GraphQL Mutation to add a DefinedTerm to the DefinedTermSet
    """
    return format_link_mutation("MergeDefinedTermSetHasDefinedTerm", defined_term_set, defined_term)
Ejemplo n.º 14
0
def mutation_remove_music_composition_has_part(main_identifier,
                                               part_identifier):
    """Returns a mutation for removing a MusicComposition as a part of another MusicComposition
    (https://schema.org/hasPart).

    Args:
        main_identifier: The identifier of a main MusicComposition.
        part_identifier: The identifier of a MusicComposition which is a part of the main MusicComposition.
    """
    return format_link_mutation("RemoveMusicCompositionHasPart",
                                main_identifier, part_identifier)
Ejemplo n.º 15
0
def mutation_add_controlaction_additionalproperty(controlaction_id: str,
                                                  property_id: str):
    """Returns a mutation for adding a control action to a property value specification.
    Arguments:
        controlaction_id: The unique identifier of the control action.
        property_id: The unique identifier of the property.
    Returns:
        The string for the mutation foradding a control action to a property.
    """
    return format_link_mutation("MergeControlActionAdditionalProperty",
                                controlaction_id, property_id)
Ejemplo n.º 16
0
def mutation_add_actioninterface_result(controlaction_id: str,
                                        thing_interface_id: str):
    """Returns a mutation for linking a control action object and a thing interface with the result relation
    Arguments:
        controlaction_id: The unique identifier of the control action.
        thing_interface_id: the unique identifier of a thing interface object
    Returns:
        The string for the mutation for adding a control action to an object.
        """

    return format_link_mutation("AddActionInterfaceResult", controlaction_id,
                                thing_interface_id)
Ejemplo n.º 17
0
def mutation_merge_music_composition_has_part(main_identifier,
                                              part_identifier):
    """Returns a mutation for adding a MusicComposition as a part of another MusicComposition
    (https://schema.org/hasPart). For example, the first movement of a composition could be
    represented as a hasPart of a main symphony.

    Args:
        main_identifier: The identifier of a main MusicComposition.
        part_identifier: The identifier of a MusicComposition which is a part of the main MusicComposition.
    """
    return format_link_mutation("MergeMusicCompositionHasPart",
                                main_identifier, part_identifier)
Ejemplo n.º 18
0
def mutation_remove_music_composition_recorded_as(music_composition_id: str,
                                                  music_recording_id: str):
    """Returns a mutation for removing a MusicRecording as a recording of a MusicComposition.
    (https://schema.org/recordedAs).

    Args:
        music_composition_id: The identifier of a MusicComposition.
        music_recording_id: The identifier of a MusicRecording which is a recording of the MusicComposition.
    """

    return format_link_mutation("RemoveMusicCompositionRecordedAs",
                                music_composition_id, music_recording_id)
Ejemplo n.º 19
0
def mutation_remove_music_composition_work_example(music_composition_id: str,
                                                   creativework_id: str):
    """Returns a mutation for removing a CreativeWork as an example of a MusicComposition
    (https://schema.org/workExample).

    Args:
        music_composition_id: The identifier of a MusicComposition.
        creativework_id: The identifier of a CreativeWork which is an example of the MusicComposition.
    """

    return format_link_mutation("RemoveMusicCompositionWorkExample",
                                music_composition_id, creativework_id)
Ejemplo n.º 20
0
def mutation_add_propertyvaluespecification_potentialaction(
        propertyvaluespecification_id: str, controlaction_id: str):
    """Returns a mutation for adding a control action to a property value specification.
    Arguments:
        controlaction_id: The unique identifier of the control action.
        propertyvaluespecification_id: The unique identifier of the property value specification.
    Returns:
        The string for the mutation foradding a control action to a property value specification.
    """
    return format_link_mutation(
        "MergePropertyValueSpecificationPotentialAction",
        propertyvaluespecification_id, controlaction_id)
Ejemplo n.º 21
0
def merge_annotation_cemotivation(annotation_id, cemotivation_id):
    """
    Join an annotation with an AnnotationCEMotivation object that describes a custom annotation Motivation

    Arguments:
        annotation_id: CE Node ID of an Annotation object
        cemotivation_id: CE Node ID of a AnnotationCEMotivation object which is a more specific annotation Motivation

    Returns:

    """
    return format_link_mutation("MergeAnnotationMotivationNode", annotation_id,
                                cemotivation_id)
Ejemplo n.º 22
0
def mutation_remove_musicplaylist_itemlist(playlist_identifier: str,
                                           itemlist_identifier: str):
    """Returns a mutation for removing an ItemList of MusicRecordings as the track list of a Playlist.

    Arguments:
        playlist_identifier: The unique identifier of the Playlist.
        itemlist_identifier: The unique identifier of the ItemList that contains the playlist's tracks.

    Returns:
        The string for the mutation for removing an ItemList as part of a playlist.
    """

    return format_link_mutation("RemoveMusicPlaylistTrackItemList",
                                playlist_identifier, itemlist_identifier)
Ejemplo n.º 23
0
def mutation_remove_musicplaylist_musicrecording(
        playlist_identifier: str, musicrecording_identifier: str):
    """Returns a mutation for removing a musicrecording as a track of a playlist.

    Arguments:
        playlist_identifier: The unique identifier of the playlist.
        musicrecording_identifier: The unique identifier of the musicrecording that is part of the playlist.

    Returns:
        The string for the mutation for removing a musicrecording as part of a playlist.
    """

    return format_link_mutation("RemoveMusicPlaylistTrack",
                                playlist_identifier, musicrecording_identifier)
Ejemplo n.º 24
0
def rating_add_was_derived_from_rating(rating_id: str,
                                       original_rating_id: str):
    """Generate a mutation to link two ratings with the prov:wasDerivedFrom relation

    Arguments:
        rating_id: the id of the new rating
        original_rating_id: the id of the original rating from which rating_id was derived

    Returns:
        A GraphQL Mutation for MergeRatingWasDerivedFrom
    """

    return format_link_mutation("MergeRatingWasDerivedFrom", rating_id,
                                original_rating_id)
Ejemplo n.º 25
0
def merge_annotation_motivationdefinedtermset(annotation_id,
                                              definedtermset_id):
    """
    Join an annotation with a DefinedTerm that describes a custom annotation Motivation

    Arguments:
        annotation_id: CE Node ID of an Annotation object
        definedtermset_id: CE Node ID of a DefinedTermSet object which is a more specific annotation Motivation

    Returns:

    """
    return format_link_mutation("MergeAnnotationMotivationDefinedTermSet",
                                annotation_id, definedtermset_id)
Ejemplo n.º 26
0
def rating_remove_was_derived_from_rating(rating_id: str,
                                          original_rating_id: str):
    """Generate a mutation to remove the prov:wasDerivedFrom relation between two ratings

    Arguments:
        rating_id: the id of the new rating
        original_rating_id: the id of the original rating from which rating_id was derived

    Returns:
        A GraphQL Mutation for RemoveRatingWasDerivedFrom
    """

    return format_link_mutation("RemoveRatingWasDerivedFrom", rating_id,
                                original_rating_id)
Ejemplo n.º 27
0
def mutation_remove_music_recording_audio(recording_identifier,
                                          audio_identifier):
    """Returns a mutation for removing a Audio object to a MusicRecording object.
    (https://schema.org/workExample).

    Args:
        recording_identifier: The identifier of a MusicRecording.
        audio_identifier: The identifier of a AudioObject linked to a MusicRecording.

    Returns:
        The string for the mutation for removing a Audio object to a MusicRecording object.
    """
    return format_link_mutation("RemoveMusicRecordingAudio",
                                recording_identifier, audio_identifier)
Ejemplo n.º 28
0
def mutation_remove_mediaobject_example_of_work(mediaobject_identifier: str,
                                                work_identifier: str):
    """Returns a mutation for removing that a MediaObject is an example of a work
    (https://schema.org/exampleOfWork).

    Arguments:
        mediaobject_identifier: The unique identifier of the media object.
        work_identifier: The unique identifier of the work that the media object is an example of.

    Returns:
        A GraphQL mutation for RemoveMediaObjectExampleOfWork.
    """

    return format_link_mutation("RemoveMediaObjectExampleOfWork",
                                mediaobject_identifier, work_identifier)
Ejemplo n.º 29
0
def mutation_add_media_object_used(mediaobject_identifier: str,
                                   thing_identifier: str):
    """Returns a mutation for indicating that a MediaObject *used* some other thing to create it
    (http://www.w3.org/ns/prov#used). For example an MEI file coverted from musicxml might use
    the verovio software.

    Arguments:
        mediaobject_identifier: The unique identifier of a MediaObject.
        thing_identifier: The unique identifier of some Thing that was used to create the MediaObject.

    Returns:
        A GraphQL mutation for MergeMediaObjectUsed.
    """
    return format_link_mutation("MergeMediaObjectUsed", mediaobject_identifier,
                                thing_identifier)
Ejemplo n.º 30
0
def mutation_remove_listitem_item(listitem_id: str, item_id: str):
    """Returns a mutation for removing a Item from a ListItem object
    based on the identifier.
    (https://schema.org/item)

    Arguments:
        listitem_id: The unique identifier of the ListItem object.
        item_id: The unique identifier of the Item object.

    Returns:
        The string for the mutation for removing a Item from a ListItem
    object based on the identifier.
    """
    check_required_args(listitem_id=listitem_id, item_id=item_id)
    return format_link_mutation("RemoveListItemItem", listitem_id, item_id)