Examples of WGSchemaDefinition


Examples of de.innovationgate.webgate.api.schemadef.WGSchemaDefinition

        InputStream schemaIn = null;
        try {
            schemaIn = getSchemaDefinitionFile().getContents();
            if (schemaIn.read() == -1) {
                // schema.xml is empty
                _schema = new WGSchemaDefinition();
            } else {
                try {
                        _schema = WGSchemaDefinition.read(getSchemaDefinitionFile().getContents());
                    }
                    catch (Exception e) {
View Full Code Here

Examples of de.innovationgate.webgate.api.schemadef.WGSchemaDefinition

        return null;
    }

    public WGContentTypeDefinition createContentTypeDefinition() {
        if (_schema == null && isFeatureSupported(FEATURE_SCHEMADEFINITION)) {
            _schema = new WGSchemaDefinition();
            fireSchemaModelChanged();
        }
        WGContentTypeDefinition cTypeDef = new WGContentTypeDefinition();
        cTypeDef.setName("<name>");
        _schema.addDocumentDefinition(cTypeDef);
View Full Code Here

Examples of de.innovationgate.webgate.api.schemadef.WGSchemaDefinition

        return cTypeDef;
    }

    public WGAreaDefinition createAreaDefinition() {
        if (_schema == null && isFeatureSupported(FEATURE_SCHEMADEFINITION)) {
            _schema = new WGSchemaDefinition();
            fireSchemaModelChanged();
        }
        WGAreaDefinition def = new WGAreaDefinition();
        def.setName("<name>");
        _schema.addDocumentDefinition(def);
View Full Code Here

Examples of de.innovationgate.webgate.api.schemadef.WGSchemaDefinition

        return def;
    }

    public WGLanguageDefinition createLanguageDefinition() {
        if (_schema == null && isFeatureSupported(FEATURE_SCHEMADEFINITION)) {
            _schema = new WGSchemaDefinition();
            fireSchemaModelChanged();
        }
        WGLanguageDefinition def = new WGLanguageDefinition();
        def.setName("<name>");
        _schema.addDocumentDefinition(def);
View Full Code Here

Examples of de.innovationgate.webgate.api.schemadef.WGSchemaDefinition

     * Creates a schema definition containing all content types and areas in this database with their current metadata.
     * @throws WGAPIException
     */
    public WGSchemaDefinition createSchemaDefinition() throws WGAPIException {
       
        WGSchemaDefinition schemaDef = new WGSchemaDefinition();
        for (WGContentType ct : getContentTypes()) {
            schemaDef.addDocumentDefinition(ct.createSchemaDefinition());
        }
        for (WGArea area : getAreas().values()) {
            schemaDef.addDocumentDefinition(area.createSchemaDefinition());
        }
        for (WGLanguage lang : getLanguages().values()) {
            schemaDef.addDocumentDefinition(lang.createSchemaDefinition());
        }
       
        return schemaDef;
       
    }
View Full Code Here

Examples of de.innovationgate.webgate.api.schemadef.WGSchemaDefinition

    /**
     * Returns the schema definition for this document, if available. Otherwise returns null.
     * @throws WGAPIException
     */
    public WGSchemaDocumentDefinition getSchemaDefinition() throws WGAPIException {
        WGSchemaDefinition schemaDef = getDatabase().getSchemaDefinition();
        if (schemaDef == null) {
            return null;
        }
        String schemaKey = (String) getExtensionData(EXTDATA_SCHEMADEFINITION);
        if (schemaKey == null) {
            schemaKey = getDocumentKey();
        }
       
       
        return schemaDef.getDocumentDefinitionsCache().get(schemaKey);
       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.