cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Metadata

alf_shailendra
Champ in-the-making
Champ in-the-making
Hi,

I Want to write a java program for the below functionality using alfresco API.

1.GetNewMetadat
Return new metadata(Web page metadata set) created during the specified time period(startTime, endTime).

2.GetMetadataSize:
Return size of the metadata (new, modified and exited web pages), for the specified time period(startTime, endTime).


I am new to alfresco. Please help me to find solution or any suggestion to solve the above functionality. 

Thanks,
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
You can query on an object's creation date and its last modified date. Once you get a collection of content that matches your date range, you can iterate over the results and inspect its properties, calculating and totaling the length.

But there isn't a way of querying for the subset of metadata that was created or updated on a given object within a date range. For example, if I create an object on 1/1/2012 with some metadata and then update a subset of the object's metadata on 3/1/2012, all you will know is that the object was updated on 3/1/2012, not that field X, Y, or Z was updated.

If you want to query objects and iterate over metadata, I'd recommend using CMIS. The Apache Chemistry project has client-side CMIS APIs for Java, Python, PHP, and .NET.

Now, if you turn on the auditing sub-system, I think you might be able to see property-level changes. Then you could just write SQL queries against the auditing tables. I don't know for sure if those tables will have everything you need, but it is worth a look.

Jeff