本文整理汇总了Java中com.arjuna.databroker.data.DataSink类的典型用法代码示例。如果您正苦于以下问题:Java DataSink类的具体用法?Java DataSink怎么用?Java DataSink使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataSink类属于com.arjuna.databroker.data包,在下文中一共展示了DataSink类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getClasses
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
@Override
public List<Class<? extends DataFlowNode>> getClasses()
{
List<Class<? extends DataFlowNode>> classes = new LinkedList<Class<? extends DataFlowNode>>();
classes.add(DataSource.class);
classes.add(DataSink.class);
return classes;
}
开发者ID:arjuna-technologies,项目名称:Interconnect_DataBroker_PlugIn,代码行数:11,代码来源:BinaryInterconnectDataFlowNodeFactory.java
示例2: getMetaPropertyNames
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
@Override
public <T extends DataFlowNode> List<String> getMetaPropertyNames(Class<T> dataFlowNodeClass)
throws InvalidClassException
{
if (dataFlowNodeClass.equals(DataSource.class) || dataFlowNodeClass.equals(DataSink.class))
{
List<String> metaPropertyNames = new LinkedList<String>();
metaPropertyNames.add("Type");
return metaPropertyNames;
}
else
throw new InvalidClassException("Unsupported class", dataFlowNodeClass.getName());
}
开发者ID:arjuna-technologies,项目名称:Interconnect_DataBroker_PlugIn,代码行数:16,代码来源:BinaryInterconnectDataFlowNodeFactory.java
示例3: getClasses
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
@Override
public List<Class<? extends DataFlowNode>> getClasses()
{
List<Class<? extends DataFlowNode>> classes = new LinkedList<Class<? extends DataFlowNode>>();
classes.add(DataSource.class);
classes.add(DataProcessor.class);
classes.add(DataSink.class);
return classes;
}
开发者ID:arjuna-technologies,项目名称:WebService_DataBroker_PlugIn,代码行数:12,代码来源:SOAPWebServiceDataFlowNodeFactory.java
示例4: getMetaPropertyNames
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
@Override
public <T extends DataFlowNode> List<String> getMetaPropertyNames(Class<T> dataFlowNodeClass)
throws InvalidClassException
{
if (dataFlowNodeClass.equals(DataSource.class) || dataFlowNodeClass.equals(DataProcessor.class) || dataFlowNodeClass.equals(DataSink.class))
return Collections.emptyList();
else
throw new InvalidClassException("Unsupported class", dataFlowNodeClass.getName());
}
开发者ID:arjuna-technologies,项目名称:WebService_DataBroker_PlugIn,代码行数:10,代码来源:SOAPWebServiceDataFlowNodeFactory.java
示例5: createDataFlowNode
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public <T extends DataFlowNode> T createDataFlowNode(String name, Class<T> dataFlowNodeClass, Map<String, String> metaProperties, Map<String, String> properties)
throws InvalidClassException, InvalidNameException, InvalidMetaPropertyException, MissingMetaPropertyException, InvalidPropertyException, MissingPropertyException
{
if (dataFlowNodeClass.equals(DataSource.class))
{
if (metaProperties.isEmpty())
return (T) new PullSOAPWebServiceDataSource(name, properties);
else
throw new InvalidMetaPropertyException("No metaproperties expected", null, null);
}
else if (dataFlowNodeClass.equals(DataProcessor.class))
{
if (metaProperties.isEmpty())
return (T) new Document2TextDataProcessor(name, properties);
else
throw new InvalidMetaPropertyException("No metaproperties expected", null, null);
}
else if (dataFlowNodeClass.equals(DataSink.class))
{
if (metaProperties.isEmpty())
return (T) new PushSOAPWebServiceDataSink(name, properties);
else
throw new InvalidMetaPropertyException("No metaproperties expected", null, null);
}
else
throw new InvalidClassException("Unsupported class", dataFlowNodeClass.getName());
}
开发者ID:arjuna-technologies,项目名称:WebService_DataBroker_PlugIn,代码行数:30,代码来源:SOAPWebServiceDataFlowNodeFactory.java
示例6: getDataBrokerSummariesJSON
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
@GET
@Produces(MediaType.APPLICATION_JSON)
public DataBrokerDTO getDataBrokerSummariesJSON()
{
logger.log(Level.FINE, "DataBrokerWS.getDataBrokerSummariesJSON");
if ((_dataFlowInventory != null) && (_dataFlowNodeFactoryInventory != null))
{
DataBrokerDTO dataBrokerDTO = new DataBrokerDTO();
List<String> dataFlowNames = new LinkedList<String>();
for (DataFlow dataFlow: _dataFlowInventory.getDataFlows())
dataFlowNames.add(dataFlow.getName());
dataBrokerDTO.setDataFlowNames(dataFlowNames);
List<DataFlowNodeFactoryDTO> dataFlowNodeFactories = new LinkedList<DataFlowNodeFactoryDTO>();
for (DataFlowNodeFactory dataFlowNodeFactory: _dataFlowNodeFactoryInventory.getDataFlowNodeFactorys())
{
List<Class<? extends DataFlowNode>> dataFlowNodeFactoryClasses = dataFlowNodeFactory.getClasses();
Boolean dataSourceFactory = dataFlowNodeFactoryClasses.contains(DataSource.class);
Boolean dataSinkFactory = dataFlowNodeFactoryClasses.contains(DataSink.class);;
Boolean dataProcessorFactory = dataFlowNodeFactoryClasses.contains(DataProcessor.class);;
Boolean dataServiceFactory = dataFlowNodeFactoryClasses.contains(DataService.class);;
Boolean dataStoreFactory = dataFlowNodeFactoryClasses.contains(DataStore.class);;
dataFlowNodeFactories.add(new DataFlowNodeFactoryDTO(dataFlowNodeFactory.getName(), dataFlowNodeFactory.getProperties(), dataSourceFactory, dataSinkFactory, dataProcessorFactory, dataServiceFactory, dataStoreFactory));
}
dataBrokerDTO.setDataFlowNodeFactories(dataFlowNodeFactories);
return dataBrokerDTO;
}
else
throw new WebApplicationException(HttpURLConnection.HTTP_INTERNAL_ERROR);
}
开发者ID:RISBIC,项目名称:DataBroker,代码行数:36,代码来源:DataBrokerWS.java
示例7: classToString
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
public static String classToString(Class<? extends DataFlowNode> dataFlowNodeClass)
{
if (DataSource.class.isAssignableFrom(dataFlowNodeClass))
return DATASOURCE_TYPE;
else if (DataSink.class.isAssignableFrom(dataFlowNodeClass))
return DATASINK_TYPE;
else if (DataService.class.isAssignableFrom(dataFlowNodeClass))
return DATASERVICE_TYPE;
else if (DataStore.class.isAssignableFrom(dataFlowNodeClass))
return DATASTORE_TYPE;
else if (DataProcessor.class.isAssignableFrom(dataFlowNodeClass))
return DATAPROCESSOR_TYPE;
else
return null;
}
开发者ID:RISBIC,项目名称:DataBroker,代码行数:16,代码来源:Utils.java
示例8: stringToClass
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
public static Class<? extends DataFlowNode> stringToClass(String dataFlowNodeClassName)
{
if (DATASOURCE_TYPE.equals(dataFlowNodeClassName))
return DataSource.class;
else if (DATASINK_TYPE.equals(dataFlowNodeClassName))
return DataSink.class;
else if (DATASERVICE_TYPE.equals(dataFlowNodeClassName))
return DataService.class;
else if (DATASTORE_TYPE.equals(dataFlowNodeClassName))
return DataStore.class;
else if (DATAPROCESSOR_TYPE.equals(dataFlowNodeClassName))
return DataProcessor.class;
else
return null;
}
开发者ID:RISBIC,项目名称:DataBroker,代码行数:16,代码来源:Utils.java
示例9: getSinkConsumerClasses
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
private Collection<Class<?>> getSinkConsumerClasses(DataFlowNode sinkDataFlowNode)
{
if (sinkDataFlowNode instanceof DataProcessor)
return ((DataProcessor) sinkDataFlowNode).getDataConsumerDataClasses();
else if (sinkDataFlowNode instanceof DataService)
return ((DataService) sinkDataFlowNode).getDataConsumerDataClasses();
else if (sinkDataFlowNode instanceof DataStore)
return ((DataStore) sinkDataFlowNode).getDataConsumerDataClasses();
else if (sinkDataFlowNode instanceof DataSink)
return ((DataSink) sinkDataFlowNode).getDataConsumerDataClasses();
else
return Collections.emptySet();
}
开发者ID:RISBIC,项目名称:DataBroker,代码行数:14,代码来源:XMLConfig.java
示例10: getSinkConsumer
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
private <T> DataConsumer<T> getSinkConsumer(DataFlowNode sinkDataFlowNode, Class<T> dataClass)
{
if (sinkDataFlowNode instanceof DataProcessor)
return ((DataProcessor) sinkDataFlowNode).getDataConsumer(dataClass);
else if (sinkDataFlowNode instanceof DataService)
return ((DataService) sinkDataFlowNode).getDataConsumer(dataClass);
else if (sinkDataFlowNode instanceof DataStore)
return ((DataStore) sinkDataFlowNode).getDataConsumer(dataClass);
else if (sinkDataFlowNode instanceof DataSink)
return ((DataSink) sinkDataFlowNode).getDataConsumer(dataClass);
else
return null;
}
开发者ID:RISBIC,项目名称:DataBroker,代码行数:14,代码来源:XMLConfig.java
示例11: getClasses
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
@Override
public List<Class<? extends DataFlowNode>> getClasses()
{
List<Class<? extends DataFlowNode>> classes = new LinkedList<Class<? extends DataFlowNode>>();
classes.add(DataSource.class);
classes.add(DataProcessor.class);
classes.add(DataSink.class);
classes.add(DataService.class);
classes.add(DataStore.class);
return classes;
}
开发者ID:arjuna-technologies,项目名称:Simple_DataBroker_PlugIn,代码行数:14,代码来源:SimpleDataFlowNodeFactory.java
示例12: getFactoryInfoJSON
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
@GET
@Path("{dataflowid}/_factoryinfo")
@Produces(MediaType.APPLICATION_JSON)
public DataFlowNodeFactoryDTO getFactoryInfoJSON(@PathParam("dataflowid") String dataFlowId, @QueryParam("factoryname") String factoryName)
{
logger.log(Level.FINE, "DataFlowWS.getFactoryInfoJSON");
if (_dataFlowInventory != null)
{
if (dataFlowId != null)
{
DataFlow dataFlow = _dataFlowInventory.getDataFlow(dataFlowId);
if ((dataFlow != null) && (dataFlow.getDataFlowNodeFactoryInventory() != null))
{
DataFlowNodeFactory dataFlowNodeFactory = dataFlow.getDataFlowNodeFactoryInventory().getDataFlowNodeFactory(factoryName);
if (dataFlowNodeFactory != null)
{
try
{
List<Class<? extends DataFlowNode>> dataFlowNodeFactoryClasses = dataFlowNodeFactory.getClasses();
Boolean dataSourceFactory = dataFlowNodeFactoryClasses.contains(DataSource.class);
Boolean dataSinkFactory = dataFlowNodeFactoryClasses.contains(DataSink.class);;
Boolean dataProcessorFactory = dataFlowNodeFactoryClasses.contains(DataProcessor.class);;
Boolean dataServiceFactory = dataFlowNodeFactoryClasses.contains(DataService.class);;
Boolean dataStoreFactory = dataFlowNodeFactoryClasses.contains(DataStore.class);;
return new DataFlowNodeFactoryDTO(dataFlowNodeFactory.getName(), dataFlowNodeFactory.getProperties(), dataSourceFactory, dataSinkFactory, dataProcessorFactory, dataServiceFactory, dataStoreFactory);
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem while obtaining meta property names from data flow node factory: ", throwable);
throw new WebApplicationException(HttpURLConnection.HTTP_INTERNAL_ERROR);
}
}
else
throw new WebApplicationException(HttpURLConnection.HTTP_NOT_FOUND);
}
else
throw new WebApplicationException(HttpURLConnection.HTTP_NOT_FOUND);
}
else
throw new WebApplicationException(HttpURLConnection.HTTP_NOT_FOUND);
}
else
throw new WebApplicationException(HttpURLConnection.HTTP_INTERNAL_ERROR);
}
开发者ID:RISBIC,项目名称:DataBroker,代码行数:51,代码来源:DataFlowWS.java
示例13: getDataFlowNodeJSON
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
@GET
@Path("{dataflowid}/{dataflownodeid}")
@Produces(MediaType.APPLICATION_JSON)
public DataFlowNodeDTO getDataFlowNodeJSON(@PathParam("dataflowid") String dataFlowId, @PathParam("dataflownodeid") String dataflowNodeId)
{
logger.log(Level.FINE, "DataFlowWS.getDataFlowNodeJSON: " + dataFlowId + ", " + dataflowNodeId);
DataFlowNodeDTO dataFlowNodeDTO = new DataFlowNodeDTO();
if (_dataFlowInventory != null)
{
if (dataFlowId != null)
{
DataFlow dataFlow = _dataFlowInventory.getDataFlow(dataFlowId);
if (dataFlow != null)
{
DataFlowNode dataFlowNode = dataFlow.getDataFlowNodeInventory().getDataFlowNode(dataflowNodeId);
if (dataFlowNode != null)
{
dataFlowNodeDTO.setName(dataFlowNode.getName());
if (dataFlowNode instanceof DataSource)
dataFlowNodeDTO.setType("DataSource");
else if (dataFlowNode instanceof DataSink)
dataFlowNodeDTO.setType("DataSink");
else if (dataFlowNode instanceof DataProcessor)
dataFlowNodeDTO.setType("DataProcessor");
else if (dataFlowNode instanceof DataService)
dataFlowNodeDTO.setType("DataService");
else if (dataFlowNode instanceof DataStore)
dataFlowNodeDTO.setType("DataStore");
dataFlowNodeDTO.setProperties(dataFlowNode.getProperties());
}
else
throw new WebApplicationException(HttpURLConnection.HTTP_NOT_FOUND);
}
else
throw new WebApplicationException(HttpURLConnection.HTTP_NOT_FOUND);
}
else
throw new WebApplicationException(HttpURLConnection.HTTP_NOT_FOUND);
}
else
throw new WebApplicationException(HttpURLConnection.HTTP_INTERNAL_ERROR);
return dataFlowNodeDTO;
}
开发者ID:RISBIC,项目名称:DataBroker,代码行数:50,代码来源:DataFlowWS.java
示例14: parseDataFlowNode
import com.arjuna.databroker.data.DataSink; //导入依赖的package包/类
private boolean parseDataFlowNode(Element element, List<Problem> problems, Map<String, Variable> variableMapping, DataFlow dataFlow)
{
boolean valid = true;
String name = null;
String type = null;
String factoryName = null;
NamedNodeMap attributes = element.getAttributes();
for (int attributeIndex = 0; attributeIndex < attributes.getLength(); attributeIndex++)
{
Node attribute = attributes.item(attributeIndex);
if (attribute.getNodeName().equals("name"))
name = attribute.getNodeValue();
else if (attribute.getNodeName().equals("type"))
type = attribute.getNodeValue();
else if (attribute.getNodeName().equals("factoryName"))
factoryName = attribute.getNodeValue();
else
{
logger.log(Level.WARNING, "Unexpected attribute \"" + attribute.getNodeName() + "\" with value \"" + attribute.getNodeValue() + "\"");
problems.add(new Problem("Unexpected attribute \"" + attribute.getNodeName() + "\" with value \"" + attribute.getNodeValue() + "\""));
valid = false;
}
}
Map<String, String> metaProperties = new HashMap<String, String>();
Map<String, String> properties = new HashMap<String, String>();
NodeList childNodes = element.getChildNodes();
for (int childNodeIndex = 0; childNodeIndex < childNodes.getLength(); childNodeIndex++)
{
Node childNode = childNodes.item(childNodeIndex);
if ((childNode.getNodeType() == Node.COMMENT_NODE))
continue;
else if ((childNode.getNodeType() == Node.TEXT_NODE) && isWhiteSpace(childNode.getNodeValue()))
continue;
else if ((childNode.getNodeType() == Node.ELEMENT_NODE) && childNode.getNodeName().equals("metaProperties"))
valid &= parseMetaProperties((Element) childNode, problems, variableMapping, metaProperties);
else if ((childNode.getNodeType() == Node.ELEMENT_NODE) && childNode.getNodeName().equals("properties"))
valid &= parseProperties((Element) childNode, problems, variableMapping, properties);
else
{
processUnexpectedNode(childNode, problems);
valid = false;
}
}
if (valid)
{
if ("datasource".equals(type))
return deployDataFlowNode(dataFlow, problems, factoryName, DataSource.class, name, metaProperties, properties);
else if ("dataprocessor".equals(type))
return deployDataFlowNode(dataFlow, problems, factoryName, DataProcessor.class, name, metaProperties, properties);
else if ("dataservice".equals(type))
return deployDataFlowNode(dataFlow, problems, factoryName, DataService.class, name, metaProperties, properties);
else if ("datastore".equals(type))
return deployDataFlowNode(dataFlow, problems, factoryName, DataStore.class, name, metaProperties, properties);
else if ("datasink".equals(type))
return deployDataFlowNode(dataFlow, problems, factoryName, DataSink.class, name, metaProperties, properties);
else
{
logger.log(Level.WARNING, "Unknown data flow node type \"" + type + "\"");
problems.add(new Problem("Unknown data flow node type \"" + type + "\""));
return false;
}
}
else
return false;
}
开发者ID:RISBIC,项目名称:DataBroker,代码行数:72,代码来源:XMLConfig.java
注:本文中的com.arjuna.databroker.data.DataSink类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论