1 import com.adobe.repository.infomodel.bean.ResourceProperty;
import java.util.Collection;
2. Use: Resource newResource = (Resource) infomodelFactory.newResource (not Resource newResource = (Resource) infomodelFactory.newImage(...) )
3. Add the following lines of code:
ResourceProperty rProperty=new ResourceProperty();
rProperty.setNamespace("System");
rProperty.setName("PRIMARY");
rProperty.setValue(“true”);
Collection rProperties=newResource.getResourceProperties();
rProperties.add(rProperty);
2. Use: Resource newResource = (Resource) infomodelFactory.newResource (not Resource newResource = (Resource) infomodelFactory.newImage(...) )
3. Add the following lines of code:
ResourceProperty rProperty=new ResourceProperty();
rProperty.setNamespace("System");
rProperty.setName("PRIMARY");
rProperty.setValue(“true”);
Collection rProperties=newResource.getResourceProperties();
rProperties.add(rProperty);