cancel
Showing results for 
Search instead for 
Did you mean: 

Primary path missing namespace

colindstephenso
Champ in-the-making
Champ in-the-making
Hey All,

I am using a bulk ingestion tool to import spaces and content into Alfresco.  Each space is a custom type and the content are a custom type.  Everything gets created correctly, apart from when I use the node browser I see my custom objects are missing their namespace qualifier:  eg    

/{http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/content/1....

The objects are created using WebServices and CML and the spaces/content are created of the custom types.  As the name spaces are missing in the primarypath, when constraining searches to these spaces results in query parsing failures in XPath as it cannot intreprey /:CustomSpace.

Any thoughts or additional information I can provide to figure this out?

Thanks,
11 REPLIES 11

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
you are using import from hard dics if I understand good.
 (http://code.google.com/p/alfresco-bulk-filesystem-import/)

so try to import as normal spaces and content, and then change types of spaces and content to your custom typer rather to do it on import. like I am saying if I underststand you good.

colindstephenso
Champ in-the-making
Champ in-the-making
Its actually a homebrew ingestion engine through a 3rd party.  I got my hands on the src code and it turns out they did not put a QName in the parent reference so the namespace was {} rather than {http://www.alfresco.org/model/content/1.0}.

Does anyone know if this is a property that I can "fix" via a custom webscript (or some other code)?

Thanks,
Colin.

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
easiest would be script and


boolean specializeType(string type)
Specialise the type of a node. Return true on success, false otherwise. The type name supplied must be a sub-type of the current type as defined in the Data Dictionary.

for instance document.specializeType("cm:content");

colindstephenso
Champ in-the-making
Champ in-the-making
I tried your suggestion of specializing the type.  I don't think it will work as the folder type is a custom folder which would mean trying to specialze to a supertype. Extracting the childAssociationRef from the object via webscripts shows me:

[The incorrect one]
|{http://www.alfresco.org/model/content/1.0}contains|{}2012|true|-1

[The correct one]
|{http://www.alfresco.org/model/content/1.0}contains|{http://www.alfresco.org/model/content/1.0}2011|t...

I'm hoping its possible to fix the childQName….

Thanks,
Colin.

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
"cm:folder"?

colindstephenso
Champ in-the-making
Champ in-the-making
No dice with cm:folder.  The full childAssociationRef is:

parentNodeRef =  workspace://SpacesStore/873ad95b-7530-4c58-8580-c3984b71b505
childNodeRef =   workspace://SpacesStore/4f55c71a-ef72-4d46-9561-f07ba06ae171
assocTypeQName = {http://www.alfresco.org/model/content/1.0}contains
assocQName =     {}2011
isPrimary =      true
nthSiblin =      -1

So I need to fix the assocQName, i need to see if I can get a handle to this and see if there is an API which allows me to update the assocQName

I do appreciate your input on this issue so far Smiley Happy

Thanks,
Colin.

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
why do not you use import tool that I have given, it is really the best used it and works great.

colindstephenso
Champ in-the-making
Champ in-the-making
i will certainly investigate the import tool you directed me to for future imports.  In the meantime I need to determine if I can fix the objects in the repository without have to re-ingest them,

Thanks
Colin.

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
I do not have solution for you sorry .
just this note:
instalation of import tool: 10 min
import : depends of how many data
change types: 30 min to write and test javascript code and 5 min to set rule.
so  you would already have finished with this .