Examples of newFieldType()


Examples of org.lilyproject.repository.api.TypeManager.newFieldType()

                    " rather than a nested object with the 'primitive' property.");
        }

        String valueTypeString = getString(node, "valueType");
        ValueType valueType = typeManager.getValueType(ValueTypeNSConverter.fromJson(valueTypeString, namespaces));
        FieldType fieldType = typeManager.newFieldType(valueType, name, scope);

        String idString = getString(node, "id", null);
        SchemaId id = null;
        if (idString != null) {
            id = new SchemaIdImpl(idString);
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newFieldType()

        } catch (FieldTypeNotFoundException e) {
            System.out.println("[KeepDataTest] Field Type does not exist yet: " + FIELD1);
        }

        try {
            fieldType1 = typeManager.createFieldType(typeManager.newFieldType(typeManager.getValueType("STRING"),
                    FIELD1, Scope.NON_VERSIONED));
        } catch (FieldTypeExistsException e) {
            System.out.println("[KeepDataTest] Field Type already exists: " + FIELD1);
        }
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newFieldType()

    @Test
    public void testCreateRecord() throws Exception {
        repository = lilyClient.getRepository();
        // Create schema
        TypeManager typeManager = repository.getTypeManager();
        FieldType fieldType1 = typeManager.createFieldType(typeManager.newFieldType(typeManager.getValueType("STRING"),
                FIELD1, Scope.NON_VERSIONED));
        RecordType recordType1 = typeManager.newRecordType(RECORDTYPE1);
        recordType1.addFieldTypeEntry(typeManager.newFieldTypeEntry(fieldType1.getId(), false));
        typeManager.createRecordType(recordType1);
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newFieldType()

        Repository repository = client.getRepository();

        TypeManager typeMgr = repository.getTypeManager();

        QName fieldName = new QName("ns", "f1");
        FieldType fieldType = typeMgr.newFieldType(typeMgr.getValueType("STRING"), fieldName, Scope.NON_VERSIONED);
        fieldType = typeMgr.createFieldType(fieldType);

        QName typeName = new QName("ns", "rt1");
        RecordType recordType = typeMgr.newRecordType(typeName);
        recordType.addFieldTypeEntry(fieldType.getId(), false);
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newFieldType()

        // Make a schema
        TypeManager typeMgr = client.getDefaultRepository().getTypeManager();

        QName field1 = new QName("ns", "f1");
        FieldType fieldType1 = typeMgr.newFieldType(typeMgr.getValueType("STRING"), field1, Scope.NON_VERSIONED);
        fieldType1 = typeMgr.createFieldType(fieldType1);

        QName field2 = new QName("ns", "f2");
        FieldType fieldType2 = typeMgr.newFieldType(typeMgr.getValueType("STRING"), field2, Scope.NON_VERSIONED);
        fieldType2 = typeMgr.createFieldType(fieldType2);
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newFieldType()

        QName field1 = new QName("ns", "f1");
        FieldType fieldType1 = typeMgr.newFieldType(typeMgr.getValueType("STRING"), field1, Scope.NON_VERSIONED);
        fieldType1 = typeMgr.createFieldType(fieldType1);

        QName field2 = new QName("ns", "f2");
        FieldType fieldType2 = typeMgr.newFieldType(typeMgr.getValueType("STRING"), field2, Scope.NON_VERSIONED);
        fieldType2 = typeMgr.createFieldType(fieldType2);

        QName typeName = new QName("ns", "rt1");
        RecordType recordType = typeMgr.newRecordType(typeName);
        recordType.addFieldTypeEntry(fieldType1.getId(), false);
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newFieldType()

        String NS = "org.lilyproject.client.test";

        // Create a blob field type and record type
        TypeManager typeManager = repository.getTypeManager();
        ValueType blobType = typeManager.getValueType("BLOB");
        FieldType blobFieldType = typeManager.newFieldType(blobType, new QName(NS, "data"), Scope.VERSIONED);
        blobFieldType = typeManager.createFieldType(blobFieldType);

        RecordType recordType = typeManager.newRecordType(new QName(NS, "file"));
        recordType.addFieldTypeEntry(blobFieldType.getId(), true);
        recordType = typeManager.createRecordType(recordType);
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newFieldType()

        String NS = "org.lilyproject.client.test";

        // Create a field type and record type
        TypeManager typeManager = repository.getTypeManager();
        FieldType fieldType = typeManager.newFieldType("STRING", new QName(NS, "scanfield"), Scope.VERSIONED);
        fieldType = typeManager.createFieldType(fieldType);

        RecordType recordType = typeManager.newRecordType(new QName(NS, "scanrt"));
        recordType.addFieldTypeEntry(fieldType.getId(), true);
        recordType = typeManager.createRecordType(recordType);
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.