当前位置: 首页>>代码示例>>Java>>正文


Java FullQualifiedName类代码示例

本文整理汇总了Java中org.apache.olingo.commons.api.edm.FullQualifiedName的典型用法代码示例。如果您正苦于以下问题:Java FullQualifiedName类的具体用法?Java FullQualifiedName怎么用?Java FullQualifiedName使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FullQualifiedName类属于org.apache.olingo.commons.api.edm包,在下文中一共展示了FullQualifiedName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testAllMembersMarshalled

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Test
public void testAllMembersMarshalled() {

    ClientEntity transportEnity = new ClientEntityImpl(new FullQualifiedName("AI_CRM_GW_CM_CI_SRV.Change"));
    List<ClientProperty> props = transportEnity.getProperties();
    props.add(new ClientPropertyImpl("TransportID", new ClientObjectFactoryImpl().newPrimitiveValueBuilder().setValue("8000038673").build()));
    props.add(new ClientPropertyImpl("IsModifiable", new ClientObjectFactoryImpl().newPrimitiveValueBuilder().setValue("true").build()));
    props.add(new ClientPropertyImpl("Owner", new ClientObjectFactoryImpl().newPrimitiveValueBuilder().setValue("me").build()));
    props.add(new ClientPropertyImpl("Description", new ClientObjectFactoryImpl().newPrimitiveValueBuilder().setValue("Lorem ipsum").build()));

    CMODataTransport transport = CMODataClient.toTransport("x", transportEnity);

    assertThat(transport.getTransportID(), is(equalTo("8000038673")));
    assertThat(transport.isModifiable(), is(equalTo(true)));
    assertThat(transport.getOwner(), is(equalTo("me")));
    assertThat(transport.getDescription(), is(equalTo("Lorem ipsum")));
}
 
开发者ID:SAP,项目名称:devops-cm-client,代码行数:18,代码来源:CMODataClientTransportMarshallingTest.java

示例2: updateTypesMapWithType

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
private <T extends CsdlAbstractEdmItem> void updateTypesMapWithType(T type, Map<FullQualifiedName, T> types) {
    if (type != null) {
        FullQualifiedName fqn;
        if (type instanceof CsdlEntityType) {
            fqn = FullQualifiedNamesUtil.createFullQualifiedEntityName(((CsdlEntityType) type).getName());
        } else if (type instanceof CsdlEnumType) {
            fqn = FullQualifiedNamesUtil.createFullQualifiedEnumName(((CsdlEnumType) type).getName());
        } else if (type instanceof CsdlComplexType) {
            fqn = FullQualifiedNamesUtil.createFullQualifiedComplexTypeName(((CsdlComplexType) type).getName());
        } else {
            throw new IllegalStateException("Unsupported CSDL Type");
        }

        types.put(fqn, type);
    }
}
 
开发者ID:mat3e,项目名称:olingo-jpa,代码行数:17,代码来源:AbstractEdmProvider.java

示例3: updateOperationsMapFromList

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
private <T extends CsdlOperation> void updateOperationsMapFromList(List<T> list,
        Map<FullQualifiedName, List<T>> operations) {
    for (T operation : list) {
        FullQualifiedName fqn;
        if (operation instanceof CsdlAction) {
            fqn = FullQualifiedNamesUtil.createFullQualifiedActionName(operation.getName());
        } else if (operation instanceof CsdlFunction) {
            fqn = FullQualifiedNamesUtil.createFullQualifiedFunctionName(operation.getName());
        } else {
            throw new IllegalStateException("Not an operation");
        }

        if (operations.containsKey(fqn)) {
            operations.get(fqn).add(operation);
        } else {
            operations.put(fqn, Arrays.asList(operation));
        }
    }
}
 
开发者ID:mat3e,项目名称:olingo-jpa,代码行数:20,代码来源:AbstractEdmProvider.java

示例4: getEntityType

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Override
public CsdlEntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException {

	String nameSpace = edmFQName.getNamespace();
	try {
		for (CsdlSchema schema : this.rdfEdmModelProvider.getEdmMetadata().getSchemas()) {
			if (nameSpace.equals(schema.getNamespace())) {
				String entityTypeName = edmFQName.getName();
				for (CsdlEntityType entityType : schema.getEntityTypes()) {
					if (entityTypeName.equals(entityType.getName())) {
						return entityType;
					}
				}
			}
		}
	} catch (NullPointerException e) {
		log.error("NullPointerException getEntityType " + edmFQName);
		throw new ODataException("NullPointerException getEntityType " + edmFQName);
	}
	return null;
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.odata2sparql.v4,代码行数:22,代码来源:RdfEdmProvider.java

示例5: getComplexType

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Override
public CsdlComplexType getComplexType(final FullQualifiedName edmFQName) throws ODataException {

	String nameSpace = edmFQName.getNamespace();
	try {
		for (CsdlSchema schema : this.rdfEdmModelProvider.getEdmMetadata().getSchemas()) {
			if (nameSpace.equals(schema.getNamespace())) {
				String complexTypeName = edmFQName.getName();
				for (CsdlComplexType complexType : schema.getComplexTypes()) {
					if (complexTypeName.equals(complexType.getName())) {
						return complexType;
					}
				}
			}
		}
	} catch (NullPointerException e) {
		log.error("NullPointerException getComplexType " + edmFQName);
		throw new ODataException("NullPointerException getComplexType " + edmFQName);
	}
	return null;
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.odata2sparql.v4,代码行数:22,代码来源:RdfEdmProvider.java

示例6: getEntitySet

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Override
public CsdlEntitySet getEntitySet(FullQualifiedName entityContainer, final String name) throws ODataException {

	try {
		//for (CsdlSchema schema : this.rdfEdmModelProvider.getEdmMetadata().getSchemas()) {
			CsdlEntityContainer schemaEntityContainer = this.rdfEdmModelProvider.getEdmMetadata().getSchema(entityContainer.getNamespace()).getEntityContainer();
			//if (entityContainer.equals(schemaEntityContainer.getName())) {
				for (CsdlEntitySet entitySet : schemaEntityContainer.getEntitySets()) {
					if (name.equals(entitySet.getName())) {
						return entitySet;
					}
				}

			//}
	//	}
	} catch (NullPointerException e) {
		log.error("NullPointerException getEntitySet " + entityContainer + " " + name);
		throw new ODataException("NullPointerException getEntitySet " + entityContainer + " " + name);
	}
	return null;
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.odata2sparql.v4,代码行数:22,代码来源:RdfEdmProvider.java

示例7: getFunctionImport

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Override
public CsdlFunctionImport getFunctionImport(FullQualifiedName entityContainer, final String name)
		throws ODataException {

	try {
		//for (CsdlSchema schema : this.rdfEdmModelProvider.getEdmMetadata().getSchemas()) {
			CsdlEntityContainer schemaEntityContainer = this.rdfEdmModelProvider.getEdmMetadata().getSchema(entityContainer.getNamespace()).getEntityContainer();
			
			//if (entityContainer.equals(schemaEntityContainer.getName())) {
				for (CsdlFunctionImport functionImport : schemaEntityContainer.getFunctionImports()) {
					if (name.equals(functionImport.getName())) {
						return functionImport;
					}
				}

			//}
		//}
	} catch (NullPointerException e) {
		log.error("NullPointerException getFunctionImport " + entityContainer + " " + name);
		throw new ODataException("NullPointerException getFunctionImport " + entityContainer + " " + name);
	}

	return null;
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.odata2sparql.v4,代码行数:25,代码来源:RdfEdmProvider.java

示例8: getEntityContainerInfo

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Override
public CsdlEntityContainerInfo getEntityContainerInfo(FullQualifiedName entityContainer) throws ODataException {
	if (entityContainer == null) {
		// Assume request for null container means default container
		return new CsdlEntityContainerInfo().setContainerName(new FullQualifiedName(RdfConstants.ENTITYCONTAINERNAMESPACE,RdfConstants.ENTITYCONTAINER));
	} else {
		try {
			for (CsdlSchema schema : this.rdfEdmModelProvider.getEdmMetadata().getSchemas()) {
				CsdlEntityContainer schemaEntityContainer = schema.getEntityContainer();
				if (entityContainer.equals(schemaEntityContainer.getName())) {
					return new CsdlEntityContainerInfo().setContainerName(entityContainer);
				}
			}
		} catch (NullPointerException e) {
			log.error("NullPointerException getEntityContainerInfo " + entityContainer);
			throw new ODataException("NullPointerException getEntityContainerInfo " + entityContainer);
		}
	}
	return null;
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.odata2sparql.v4,代码行数:21,代码来源:RdfEdmProvider.java

示例9: getEntityType

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Override
public ElasticCsdlEntityType getEntityType(FullQualifiedName entityTypeName)
        throws ODataException {
    String esIndex = namespaceToIndex(entityTypeName.getNamespace());
    // If there is no index mapping for provided namespace - return null, no
    // entity type is found.
    if (esIndex != null) {
        List<ElasticCsdlEntityType> entityTypes = getEntityTypes(esIndex);
        for (ElasticCsdlEntityType entityType : entityTypes) {
            if (entityType.getESType().equals(entityTypeName.getName())) {
                return entityType;
            }
        }
    }
    return null;
}
 
开发者ID:Hevelian,项目名称:hevelian-olastic,代码行数:17,代码来源:ElasticCsdlEdmProvider.java

示例10: createEntitySet

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
/**
 * Create's entity set for particular index and type.
 *
 * @param index
 *            index name
 * @param type
 *            type name
 * @return entity set instance
 */
protected ElasticCsdlEntitySet createEntitySet(String index, String type) {
    ElasticCsdlEntitySet entitySet = new ElasticCsdlEntitySet();
    entitySet.setESIndex(index);
    entitySet.setESType(type);
    entitySet.setName(csdlMapper.esTypeToEntitySet(index, type));
    FullQualifiedName entityType = csdlMapper.esTypeToEntityType(index, type);
    entitySet.setType(entityType);

    // define navigation property bindings
    List<CsdlNavigationPropertyBinding> navigationBindings = new ArrayList<>();
    for (ElasticCsdlNavigationProperty property : getNavigationProperties(index, type)) {
        CsdlNavigationPropertyBinding navPropBinding = new CsdlNavigationPropertyBinding();
        navPropBinding.setTarget(csdlMapper.esTypeToEntitySet(
                namespaceToIndex(property.getTypeFQN().getNamespace()), property.getESType()));
        navPropBinding.setPath(property.getName());
        navigationBindings.add(navPropBinding);
    }
    entitySet.setNavigationPropertyBindings(navigationBindings);
    return entitySet;
}
 
开发者ID:Hevelian,项目名称:hevelian-olastic,代码行数:30,代码来源:ElasticCsdlEdmProvider.java

示例11: getPropertyType

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
/**
 * Get {@link FullQualifiedName} property type by value type.
 * 
 * @param value
 *            value
 * @return property type
 */
public static FullQualifiedName getPropertyType(Object value) {
    FullQualifiedName fqn = null;
    if (value instanceof String) {
        fqn = EdmPrimitiveTypeKind.String.getFullQualifiedName();
    } else if (value instanceof Byte) {
        fqn = EdmPrimitiveTypeKind.Byte.getFullQualifiedName();
    } else if (value instanceof Short) {
        fqn = EdmPrimitiveTypeKind.Int16.getFullQualifiedName();
    } else if (value instanceof Integer) {
        fqn = EdmPrimitiveTypeKind.Int32.getFullQualifiedName();
    } else if (value instanceof Long) {
        fqn = EdmPrimitiveTypeKind.Int64.getFullQualifiedName();
    } else if (value instanceof Double) {
        fqn = EdmPrimitiveTypeKind.Double.getFullQualifiedName();
    } else if (value instanceof Boolean) {
        fqn = EdmPrimitiveTypeKind.Boolean.getFullQualifiedName();
    } else if (value instanceof Date) {
        fqn = EdmPrimitiveTypeKind.Date.getFullQualifiedName();
    } else {
        throw new ODataRuntimeException("Property type is not supported.");
    }
    return fqn;
}
 
开发者ID:Hevelian,项目名称:hevelian-olastic,代码行数:31,代码来源:SerializeUtils.java

示例12: getComplexType_DifferenetNames_ExpectedValuesRetrieved

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Test
public void getComplexType_DifferenetNames_ExpectedValuesRetrieved() throws ODataException {
    MultyElasticIndexCsdlEdmProvider edmProvider = spy(
            new MultyElasticIndexCsdlEdmProvider(metaDataProvider, indices));
    List<CsdlSchema> schemas = new ArrayList<>();
    CsdlSchema schema = mock(CsdlSchema.class);
    String namespace = "OData";
    when(schema.getNamespace()).thenReturn(namespace);
    ElasticCsdlComplexType expectedComplexType = mock(ElasticCsdlComplexType.class);
    String complexTypeName = "dimension";
    when(schema.getComplexType(complexTypeName)).thenReturn(expectedComplexType);
    schemas.add(schema);
    doReturn(schemas).when(edmProvider).getSchemas();
    ElasticCsdlComplexType actualComplexType = edmProvider
            .getComplexType(new FullQualifiedName(namespace, complexTypeName));
    assertEquals(expectedComplexType, actualComplexType);
    assertNull(edmProvider.getComplexType(new FullQualifiedName("Test", "complex")));
}
 
开发者ID:Hevelian,项目名称:hevelian-olastic,代码行数:19,代码来源:MultyElasticIndexCsdlEdmProviderTest.java

示例13: getEntityType

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Override
public EntityType getEntityType(FullQualifiedName entityTypeName)
		throws ODataException {

	EntityType result = null;
	Map<String, EntityProvider> entityProviders = ctx
			.getBeansOfType(EntityProvider.class);

	for (String entity : entityProviders.keySet()) {

		EntityProvider entityProvider = entityProviders.get(entity);
		EntityType entityType = entityProvider.getEntityType();
		if (entityType.getName().equals(entityTypeName.getName())) {
			result = entityType;
			break;
		}

	}
	return result;

}
 
开发者ID:rohitghatol,项目名称:spring-boot-Olingo-oData,代码行数:22,代码来源:GenericEdmProvider.java

示例14: getEntitySet

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Override
public EntitySet getEntitySet(FullQualifiedName entityContainer,
		String entitySetName) throws ODataException {

	EntitySet result = null;
	Map<String, EntityProvider> entityProviders = ctx
			.getBeansOfType(EntityProvider.class);

	for (String entity : entityProviders.keySet()) {

		EntityProvider entityProvider = entityProviders.get(entity);
		EntityType entityType = entityProvider.getEntityType();
		if (entityProvider.getEntitySetName().equals(entitySetName)) {
			result = new EntitySet();
			result.setName(entityProvider.getEntitySetName());
			result.setType(entityProvider.getFullyQualifiedName());
			break;
		}

	}
	return result;

}
 
开发者ID:rohitghatol,项目名称:spring-boot-Olingo-oData,代码行数:24,代码来源:GenericEdmProvider.java

示例15: getActions

import org.apache.olingo.commons.api.edm.FullQualifiedName; //导入依赖的package包/类
@Override
public List<CsdlAction> getActions(FullQualifiedName actionName) throws ODataException {
  List<CsdlAction> list = null;

  /**
   * todo change this lookup to a map.get();
   */
  for (RedHxEdmActionProvider edmProvider : EDM_ACTION_PROVIDER_LIST) {
    list = edmProvider.getActionList(actionName);

    if (!list.isEmpty()) {
      break;
    }
  }

  if (list == null) {
    list = EMPTY_ACTION_LIST;
  }

  return list;
}
 
开发者ID:RedHelixOrg,项目名称:RedHelix-1,代码行数:22,代码来源:RedHxServiceEdmProvider.java


注:本文中的org.apache.olingo.commons.api.edm.FullQualifiedName类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。