AnsweredAssumed Answered

Creating Custom Content Model for a XML file

Question asked by carolanna on Apr 27, 2011
Latest reply on May 3, 2011 by carolanna
Hi. Am using Alfresco community version 3.2r.
I want to create a custom content model for the below xml file.

<?xml version="1.0" encoding="UTF-8"?>

am able to upload xml files into alfresco using java application.while retriving i want to retrieve based on particular parameters such as address,zip,started number etc.

i have created a constants java file for creating new QNames
import org.alfresco.service.namespace.QName;
public class ExtractorConstants {

   // public static final String NAMESPACE_CONTENT_MODEL = "";
      public static final QName DATE_STARTED = QName.createQName("", "STARTED");
      public static final QName DATE_FINISHED = QName.createQName("", "FINISHED");
      public static final QName ORDER_NUMBER = QName.createQName("", "SUBMISSIONKEY");
      public static final QName ADDRESS=QName.createQName("", "ADDRESS");
      public static final QName ZIP=QName.createQName("", "ZIP");
      public static final QName FIRST_NAME=QName.createQName("", "ADRFNAME");
      public static final QName LAST_NAME=QName.createQName("", "ADRLNAME");


Normally if am using default alfresco content model we specify

public static final String   PROP_NAME = createQNameString(NAMESPACE_CONTENT_MODEL, "name");

but what in case of custom content model.

Anyone plz help me with this.