Java Code Examples for org.fourthline.cling.support.model.container.Container#setSearchable()

The following examples show how to use org.fourthline.cling.support.model.container.Container#setSearchable() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DIDLParser.java    From TVRemoteIME with GNU General Public License v2.0 5 votes vote down vote up
protected Container createContainer(Attributes attributes) {
    Container container = new Container();

    container.setId(attributes.getValue("id"));
    container.setParentID(attributes.getValue("parentID"));

    if ((attributes.getValue("childCount") != null))
        container.setChildCount(Integer.valueOf(attributes.getValue("childCount")));

    try {
        Boolean value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf(
                attributes.getValue("restricted")
        );
        if (value != null)
            container.setRestricted(value);

        value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf(
                attributes.getValue("searchable")
        );
        if (value != null)
            container.setSearchable(value);
    } catch (Exception ex) {
        // Ignore
    }

    return container;
}
 
Example 2
Source File: ContentTree.java    From HPlayer with Apache License 2.0 5 votes vote down vote up
protected static ContentNode createRootNode() {
    // create root container
    Container root = new Container();
    root.setId(ROOT_ID);
    root.setParentID("-1");
    root.setTitle("HPlayer MediaServer root directory");
    root.setCreator("HPlayer Media Server");
    root.setRestricted(true);
    root.setSearchable(true);
    root.setWriteStatus(WriteStatus.NOT_WRITABLE);
    root.setChildCount(0);
    ContentNode rootNode = new ContentNode(ROOT_ID, root);
    contentMap.put(ROOT_ID, rootNode);
    return rootNode;
}
 
Example 3
Source File: DIDLParser.java    From DroidDLNA with GNU General Public License v3.0 5 votes vote down vote up
protected Container createContainer(Attributes attributes) {
    Container container = new Container();

    container.setId(attributes.getValue("id"));
    container.setParentID(attributes.getValue("parentID"));

    if ((attributes.getValue("childCount") != null))
        container.setChildCount(Integer.valueOf(attributes.getValue("childCount")));

    try {
        Boolean value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf(
                attributes.getValue("restricted")
        );
        if (value != null)
            container.setRestricted(value);

        value = (Boolean)Datatype.Builtin.BOOLEAN.getDatatype().valueOf(
                attributes.getValue("searchable")
        );
        if (value != null)
            container.setSearchable(value);
    } catch (Exception ex) {
        // Ignore
    }

    return container;
}
 
Example 4
Source File: ContentTree.java    From DroidDLNA with GNU General Public License v3.0 5 votes vote down vote up
protected static ContentNode createRootNode() {
	// create root container
	Container root = new Container();
	root.setId(ROOT_ID);
	root.setParentID("-1");
	root.setTitle("GNaP MediaServer root directory");
	root.setCreator("GNaP Media Server");
	root.setRestricted(true);
	root.setSearchable(true);
	root.setWriteStatus(WriteStatus.NOT_WRITABLE);
	root.setChildCount(0);
	ContentNode rootNode = new ContentNode(ROOT_ID, root);
	contentMap.put(ROOT_ID, rootNode);
	return rootNode;
}