Pavel Klinov created TINKERPOP3-848:
---------------------------------------

             Summary: Support default attribute values in GraphMLReader
                 Key: TINKERPOP3-848
                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-848
             Project: TinkerPop 3
          Issue Type: Improvement
          Components: io
    Affects Versions: 3.0.1-incubating
         Environment: All
            Reporter: Pavel Klinov
            Assignee: stephen mallette
            Priority: Minor


Looking at the code of GraphMLReader I see that it doesn't support default 
values of attributes, which are allowed by the GraphML spec. This is a bit 
annoying especially if the input defines default values for attributes which 
are used for mandatory data, e.g. edge labels. 

One small example is the sample graph at [1]. "d_e" is the label attribute with 
a default value. There're <edge .. /> elements w/o body later in the document 
and reading those will throw a "java.lang.IllegalArgumentException: Label can 
not be null" exception (if the vendor considers edge labels mandatory).

I'd personaly squash both keyIdMap and keyTypesMap into a single String -> 
AttrInfo map, where AttrInfo would contain information about the data attribute 
name, type, and the default value.

[1] http://www.eecs.wsu.edu/~yyao/DirectedStudyI/Datasets/AS/sample.graphml




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to