public class DocumentModelFactory extends Object
DocumentModel
and a Document
for creation /
update.Modifier and Type | Method and Description |
---|---|
static DataModel |
createDataModel(Document doc,
Schema schema)
Creates a data model from a document and a schema.
|
static DocumentModelImpl |
createDocumentModel(Document doc) |
static DocumentModelImpl |
createDocumentModel(Document doc,
String[] schemas)
Creates a document model for an existing document.
|
static DocumentModelImpl |
createDocumentModel(DocumentType docType) |
static DocumentModelImpl |
createDocumentModel(String docType)
Returns a document model computed from its type, querying the
SchemaManager service. |
static DocumentModelImpl |
createDocumentModel(String sessionId,
DocumentType docType)
Creates a document model for a new document.
|
static DocumentModelImpl |
createDocumentModel(String parentPath,
String id,
DocumentType docType,
String[] schemas)
Deprecated.
unused
|
static DocumentModel |
newDocument(DocumentModel parent,
DocumentType type)
Deprecated.
unused
|
static DocumentModel |
newDocument(DocumentModel parent,
String type)
Deprecated.
unused
|
static DocumentModel |
newDocument(DocumentModel parent,
String name,
DocumentType type)
Deprecated.
unused
|
static DocumentModel |
newDocument(DocumentModel parent,
String name,
String type)
Deprecated.
unused
|
static void |
prefetchValues(Property property,
String start,
String xpath,
Prefetch prefetch,
Set<String> docSchemas)
Computes the keys and values of a document for a given xpath name.
|
static DocumentModel.DocumentModelRefresh |
refreshDocumentModel(Document doc,
int flags,
String[] schemas)
Gets what's to refresh in a model (except for the ACPs, which need the
session).
|
static DocumentModel |
writeDocumentModel(DocumentModel docModel,
Document doc)
Writes a document model to a document.
|
@Deprecated public static DocumentModel newDocument(DocumentModel parent, String type)
@Deprecated public static DocumentModel newDocument(DocumentModel parent, String name, String type)
@Deprecated public static DocumentModel newDocument(DocumentModel parent, DocumentType type)
@Deprecated public static DocumentModel newDocument(DocumentModel parent, String name, DocumentType type)
public static DocumentModelImpl createDocumentModel(Document doc) throws DocumentException
DocumentException
public static DocumentModelImpl createDocumentModel(Document doc, String[] schemas) throws DocumentException
doc
- the documentschemas
- the schemas to prefetch (deprecated), or null
DocumentException
public static DocumentModelImpl createDocumentModel(String docType)
SchemaManager
service.
The created document model is not linked to any core session.
public static DocumentModelImpl createDocumentModel(String sessionId, DocumentType docType) throws DocumentException
Initializes the proper data models according to the type info.
sessionId
- the CoreSession iddocType
- the document typeDocumentException
public static DocumentModelImpl createDocumentModel(DocumentType docType) throws DocumentException
DocumentException
@Deprecated public static DocumentModelImpl createDocumentModel(String parentPath, String id, DocumentType docType, String[] schemas) throws DocumentException
DocumentException
public static DataModel createDataModel(Document doc, Schema schema) throws DocumentException
DocumentException
public static DocumentModel writeDocumentModel(DocumentModel docModel, Document doc) throws DocumentException, ClientException
DocumentException
ClientException
public static DocumentModel.DocumentModelRefresh refreshDocumentModel(Document doc, int flags, String[] schemas) throws DocumentException, LifeCycleException, Exception
public static void prefetchValues(Property property, String start, String xpath, Prefetch prefetch, Set<String> docSchemas)
There may be several results returned as the name may contain wildcards for the complex lists indices.
INTERNAL
property
- the document or a sub-property containerstart
- the xpath that led to this propertyxpath
- the canonical xpath with allowed list wildcardsprefetch
- the prefetch to filldocSchemas
- the available schemas on the documentCopyright © 2011 Nuxeo SA. All Rights Reserved.