def create(self, uri=None, graph=None, data=None):
        """Method takes an optional URI and graph, first checking if the URL is already
        present in Fedora, if not, creates a Fedora Object with the graph as
        properties. If URI is None, uses Fedora 4 default PID minter to create
        the object's URI.

        Args:
            uri(string): String of URI, default is None
            graph(rdflib.Graph): RDF Graph of subject, default is None
            data(object): Binary datastream that will be saved as fcr:content

        Returns:
            URI(string): New Fedora URI or None if uri already exists
        """
        if uri is not None:
            existing_entity = self.__dedup__(rdflib.URIRef(uri), graph)
            if existing_entity is not None:
                return # Returns nothing
        else:
            default_request = urllib.request.Request(
                "/".join([self.base_url, "rest"]),
                method='POST')
            uri = urllib.request.urlopen(default_request).read().decode()
        if graph is not None:
            new_graph = copy_graph(rdflib.URIRef(uri), graph)
            create_response = self.connect(
                uri,
                data=new_graph.serialize(format='turtle'),
                method='PUT')
            raw_response = create_response.read()
        return uri
def create ( self , uri = None , graph = None , data = None ) : if uri is not None : existing_entity = self . __dedup__ ( rdflib . URIRef ( uri ) , graph ) if existing_entity is not None : return else : default_request = urllib . request . Request ( "/" . join ( [ self . base_url , "rest" ] ) , method = 'POST' ) uri = urllib . request . urlopen ( default_request ) . read ( ) . decode ( ) if graph is not None : new_graph = copy_graph ( rdflib . URIRef ( uri ) , graph ) create_response = self . connect ( uri , data = new_graph . serialize ( format = 'turtle' ) , method = 'PUT' ) raw_response = create_response . read ( ) return uri
Method takes an optional URI and graph, first checking if the URL is already
        present in Fedora, if not, creates a Fedora Object with the graph as
        properties. If URI is None, uses Fedora 4 default PID minter to create
        the object's URI.

        Args:
            uri(string): String of URI, default is None
            graph(rdflib.Graph): RDF Graph of subject, default is None
            data(object): Binary datastream that will be saved as fcr:content

        Returns:
            URI(string): New Fedora URI or None if uri already exists