Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

DasType #15

Open
GoogleCodeExporter opened this issue Jan 12, 2016 · 3 comments
Open

DasType #15

GoogleCodeExporter opened this issue Jan 12, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

myType = new DasType("my-type",null,null,null);

should return ...

<TYPE id="my-type"/>

... instead it returns ...

<TYPE id="my-type" category="my-type"/>

Is this OK?


Original issue reported on code.google.com by [email protected] on 16 Aug 2010 at 3:14

@GoogleCodeExporter
Copy link
Author

In DasTypeE class, the method that serializes Types looks like:

public void serialize(String DAS_XML_NAMESPACE, XmlSerializer serializer, 
Integer count, boolean featuresCommand) throws IllegalArgumentException, 
IllegalStateException, IOException{
        this.serialize( DAS_XML_NAMESPACE, serializer, count, true, false, false, false, featuresCommand);
    }

The called method is:
public void serialize(String DAS_XML_NAMESPACE, XmlSerializer serializer, 
Integer count, boolean categorize, boolean hasReferenceFeatures, boolean 
hasSubParts, boolean hasSuperParts, boolean featuresCommand) ...

The argument "boolean categorize" is used to add a category even when it is not 
there. It does not come from any configuration file and it is always set as 
true.

According to DAS spec 1.6, draft 6, category attribute in response is optional 
for both commands types and features.

Solution: Remove the argument "boolean categorize"

Original comment by [email protected] on 18 Aug 2010 at 1:07

@GoogleCodeExporter
Copy link
Author

Changes were already commit but I am double checking this with Andy.
DAS spec 1.6, draft 6, features command establishes that:
categorize (optional)
    Either "yes" (default) or "no". If "yes", then each annotation must include its functional category.

Depending on Andy's answer, I would have to duplicate the category again (even 
when the server does not provide it) but only for the features command, not for 
the types command.

Original comment by [email protected] on 20 Aug 2010 at 12:09

@GoogleCodeExporter
Copy link
Author

Both Andy and Jonathan agree that no category should be displayed (even when 
categorize is "yes") when it does not exist.

Email discussion:
On 23/08/2010 10:44, Jonathan Warren wrote:
>
> On 23 Aug 2010, at 10:03, Andy Jenkinson wrote:
>
>> On 20 Aug 2010, at 13:06, Leyla Garcia wrote:
>>
>>> Hi Andy,
>>>
>>> One of the parameters for features command is categorize:
>>>
>>> categorize (optional)
>>> Either "yes" (default) or "no". If "yes", then each annotation must include 
its functional category.
>>>
>>>
>>> In the response category attribute in TYPE element is optional. Since 
categorize is "yes" by default, category should be display even if the server 
does not provide a value for that? MyDas duplicates the id attribute value into 
category when it is required but not present. Is this the right thing to do?
> Yes I agree with Andy that this should only return a category if it has one 
and not make one up. 

Original comment by [email protected] on 23 Aug 2010 at 10:18

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants
@GoogleCodeExporter and others