[Developers] Unlinking Objects of Type...
Kurt Bollacker
kurt at metaweb.com
Tue Sep 4 01:14:40 UTC 2007
On Sat, Aug 25, 2007 at 03:35:34PM -0700, Michael Jones wrote:
> Thanks folks.
>
> I finally just bit the bullet and converted the python unlinker.py
> over to Perl. It works fine. If anyone wants the code, let me know,
> but it is not at all polished.
Please post/email this code. From the perspective of a MQL user,
there are multiple flavors of topic deletion:
#1 You want to "hide" a topic as a type by simply deleting the typing
link. The properties for that type still exist, and so "undo" of
the de-typing is easy.
#2 topic A has type T0 and you want to delete the typing and
properties for T0.
#3 You want to fully delete topic A. Note that this is a subset of
the union of #2 for all types Tx on A, because there are possibly
incoming links that are not visible as properties on A.
The unlink.py python code in the MQL docs does not consider incoming
links, and may not fully delete a topic.
The Freebase UI client has a feature to allow users to flag a topic
with "mark for delete". Metaweb has an administrative process to vet
such marks and execute deletions. You could do this through the Web
client if the number of deletions is small enough.
Kurt
:-)
> MJ
>
> On 8/22/07, Kurt Bollacker <kurt at metaweb.com> wrote:
> > On Wed, Aug 22, 2007 at 08:31:09PM -0700, Michael Jones wrote:
> > > Hi Folks,
> > >
> > > I'm looking for a way to unlink some instances of a specific type (I'd
> > > prefer to delete them entirely, but that another discussion.) There
> > > are a lot of them, so manually doing it is out. I could write a
> > > script, but it seems this ought to be doable with a single query.
> > >
> > > My attempts, which all fail due to uniqueness errors, look like this:
> > >
> > > {"query":[{
> > > type:[{
> > > {"id":"/user/szaijan/fantasy_football/statline",
> > > "type":"/type/type"
> > > },
> > > {"connect":"delete",
> > > "id":"/user/szaijan/fantasy_football/projection",
> > > "type":"/type/type"
> > > }]
> > > }]
> > > }
> > >
> > > Does anyone know how to go about this correctly without writing a
> > > script? The brute force method would be to query all the ids of
> > > instances with the types I want to remove, then remove those types in
> > > a seperate query. Hopefully, there's a better way.
> >
> > I should point out that if you delete the /type/object/type link of a
> > topic, it does not automatically remove the properties associated with
> > that type. They become harder to find (you must use the full path ID
> > of the property, and they don't show up in the Web UI), but are still
> > exist and are usable.
> >
> > Kurt :-)
> >
> >
> >
> > > ____________________________________________________________________
> > >
> > > Michael Jones, Gamer at Large
> > > szaijan at ternea.com
> > > ____________________________________________________________________
> > > _______________________________________________
> > > Developers mailing list
> > > Developers at freebase.com
> > > http://lists.freebase.com/mailman/listinfo/developers
> >
>
>
> --
> ____________________________________________________________________
>
> Michael Jones, Gamer at Large
> szaijan at ternea.com
> ____________________________________________________________________
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
More information about the Developers
mailing list