id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
55,600
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/common/Workspace.java
Workspace.parseWorkspaceElement
protected void parseWorkspaceElement(final Element element) throws ProponoException { final Element titleElem = element.getChild("title", AtomService.ATOM_FORMAT); setTitle(titleElem.getText()); if (titleElem.getAttribute("type", AtomService.ATOM_FORMAT) != null) { setTitleType(title...
java
protected void parseWorkspaceElement(final Element element) throws ProponoException { final Element titleElem = element.getChild("title", AtomService.ATOM_FORMAT); setTitle(titleElem.getText()); if (titleElem.getAttribute("type", AtomService.ATOM_FORMAT) != null) { setTitleType(title...
[ "protected", "void", "parseWorkspaceElement", "(", "final", "Element", "element", ")", "throws", "ProponoException", "{", "final", "Element", "titleElem", "=", "element", ".", "getChild", "(", "\"title\"", ",", "AtomService", ".", "ATOM_FORMAT", ")", ";", "setTitl...
Deserialize a Atom workspace XML element into an object
[ "Deserialize", "a", "Atom", "workspace", "XML", "element", "into", "an", "object" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/common/Workspace.java#L139-L149
55,601
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/common/AtomService.java
AtomService.findWorkspace
public Workspace findWorkspace(final String title) { for (final Object element : workspaces) { final Workspace ws = (Workspace) element; if (title.equals(ws.getTitle())) { return ws; } } return null; }
java
public Workspace findWorkspace(final String title) { for (final Object element : workspaces) { final Workspace ws = (Workspace) element; if (title.equals(ws.getTitle())) { return ws; } } return null; }
[ "public", "Workspace", "findWorkspace", "(", "final", "String", "title", ")", "{", "for", "(", "final", "Object", "element", ":", "workspaces", ")", "{", "final", "Workspace", "ws", "=", "(", "Workspace", ")", "element", ";", "if", "(", "title", ".", "eq...
Find workspace by title. @param title Match this title @return Matching Workspace or null if none found.
[ "Find", "workspace", "by", "title", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/common/AtomService.java#L79-L87
55,602
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/common/AtomService.java
AtomService.serviceToDocument
public Document serviceToDocument() { final AtomService service = this; final Document doc = new Document(); final Element root = new Element("service", ATOM_PROTOCOL); doc.setRootElement(root); final List<Workspace> spaces = service.getWorkspaces(); for (final Workspace...
java
public Document serviceToDocument() { final AtomService service = this; final Document doc = new Document(); final Element root = new Element("service", ATOM_PROTOCOL); doc.setRootElement(root); final List<Workspace> spaces = service.getWorkspaces(); for (final Workspace...
[ "public", "Document", "serviceToDocument", "(", ")", "{", "final", "AtomService", "service", "=", "this", ";", "final", "Document", "doc", "=", "new", "Document", "(", ")", ";", "final", "Element", "root", "=", "new", "Element", "(", "\"service\"", ",", "A...
Serialize an AtomService object into an XML document
[ "Serialize", "an", "AtomService", "object", "into", "an", "XML", "document" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/common/AtomService.java#L105-L116
55,603
rometools/rome
rome-modules/src/main/java/com/rometools/modules/sle/SortableList.java
SortableList.sortOnProperty
public synchronized void sortOnProperty(final Object value, final boolean ascending, final ValueStrategy strategy) { final int elementCount = size(); for (int i = 0; i < elementCount - 1; i++) { for (int j = i + 1; j < elementCount; j++) { final T entry1 = get(i); ...
java
public synchronized void sortOnProperty(final Object value, final boolean ascending, final ValueStrategy strategy) { final int elementCount = size(); for (int i = 0; i < elementCount - 1; i++) { for (int j = i + 1; j < elementCount; j++) { final T entry1 = get(i); ...
[ "public", "synchronized", "void", "sortOnProperty", "(", "final", "Object", "value", ",", "final", "boolean", "ascending", ",", "final", "ValueStrategy", "strategy", ")", "{", "final", "int", "elementCount", "=", "size", "(", ")", ";", "for", "(", "int", "i"...
performs a selection sort on all the beans in the List
[ "performs", "a", "selection", "sort", "on", "all", "the", "beans", "in", "the", "List" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/sle/SortableList.java#L34-L68
55,604
rometools/rome
rome-propono/src/main/java/com/rometools/propono/blogclient/metaweblog/MetaWeblogResource.java
MetaWeblogResource.getAsStream
@Override public InputStream getAsStream() throws BlogClientException { final HttpClient httpClient = new HttpClient(); final GetMethod method = new GetMethod(permalink); try { httpClient.executeMethod(method); } catch (final Exception e) { throw new BlogClien...
java
@Override public InputStream getAsStream() throws BlogClientException { final HttpClient httpClient = new HttpClient(); final GetMethod method = new GetMethod(permalink); try { httpClient.executeMethod(method); } catch (final Exception e) { throw new BlogClien...
[ "@", "Override", "public", "InputStream", "getAsStream", "(", ")", "throws", "BlogClientException", "{", "final", "HttpClient", "httpClient", "=", "new", "HttpClient", "(", ")", ";", "final", "GetMethod", "method", "=", "new", "GetMethod", "(", "permalink", ")",...
Get media resource as input stream.
[ "Get", "media", "resource", "as", "input", "stream", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/blogclient/metaweblog/MetaWeblogResource.java#L75-L92
55,605
rometools/rome
rome/src/main/java/com/rometools/rome/io/WireFeedInput.java
WireFeedInput.createSAXBuilder
protected SAXBuilder createSAXBuilder() { SAXBuilder saxBuilder; if (validate) { saxBuilder = new SAXBuilder(XMLReaders.DTDVALIDATING); } else { saxBuilder = new SAXBuilder(XMLReaders.NONVALIDATING); } saxBuilder.setEntityResolver(RESOLVER); // ...
java
protected SAXBuilder createSAXBuilder() { SAXBuilder saxBuilder; if (validate) { saxBuilder = new SAXBuilder(XMLReaders.DTDVALIDATING); } else { saxBuilder = new SAXBuilder(XMLReaders.NONVALIDATING); } saxBuilder.setEntityResolver(RESOLVER); // ...
[ "protected", "SAXBuilder", "createSAXBuilder", "(", ")", "{", "SAXBuilder", "saxBuilder", ";", "if", "(", "validate", ")", "{", "saxBuilder", "=", "new", "SAXBuilder", "(", "XMLReaders", ".", "DTDVALIDATING", ")", ";", "}", "else", "{", "saxBuilder", "=", "n...
Creates and sets up a org.jdom2.input.SAXBuilder for parsing. @return a new org.jdom2.input.SAXBuilder object
[ "Creates", "and", "sets", "up", "a", "org", ".", "jdom2", ".", "input", ".", "SAXBuilder", "for", "parsing", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/WireFeedInput.java#L322-L365
55,606
rometools/rome
rome-propono/src/main/java/com/rometools/propono/utils/ProponoException.java
ProponoException.getRootCauseMessage
public String getRootCauseMessage() { String rcmessage = null; if (getRootCause() != null) { if (getRootCause().getCause() != null) { rcmessage = getRootCause().getCause().getMessage(); } rcmessage = rcmessage == null ? getRootCause().getMessage() : rc...
java
public String getRootCauseMessage() { String rcmessage = null; if (getRootCause() != null) { if (getRootCause().getCause() != null) { rcmessage = getRootCause().getCause().getMessage(); } rcmessage = rcmessage == null ? getRootCause().getMessage() : rc...
[ "public", "String", "getRootCauseMessage", "(", ")", "{", "String", "rcmessage", "=", "null", ";", "if", "(", "getRootCause", "(", ")", "!=", "null", ")", "{", "if", "(", "getRootCause", "(", ")", ".", "getCause", "(", ")", "!=", "null", ")", "{", "r...
Get root cause message. @return Root cause message.
[ "Get", "root", "cause", "message", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/utils/ProponoException.java#L102-L113
55,607
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/common/Categories.java
Categories.getHrefResolved
public String getHrefResolved() { if (Atom10Parser.isAbsoluteURI(href)) { return href; } else if (baseURI != null && categoriesElement != null) { return Atom10Parser.resolveURI(baseURI, categoriesElement, href); } return null; }
java
public String getHrefResolved() { if (Atom10Parser.isAbsoluteURI(href)) { return href; } else if (baseURI != null && categoriesElement != null) { return Atom10Parser.resolveURI(baseURI, categoriesElement, href); } return null; }
[ "public", "String", "getHrefResolved", "(", ")", "{", "if", "(", "Atom10Parser", ".", "isAbsoluteURI", "(", "href", ")", ")", "{", "return", "href", ";", "}", "else", "if", "(", "baseURI", "!=", "null", "&&", "categoriesElement", "!=", "null", ")", "{", ...
Get unresolved URI of the collection, or null if impossible to determine
[ "Get", "unresolved", "URI", "of", "the", "collection", "or", "null", "if", "impossible", "to", "determine" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/common/Categories.java#L99-L106
55,608
rometools/rome
rome-utils/src/main/java/com/rometools/utils/Lists.java
Lists.createWhenNull
public static <T> List<T> createWhenNull(final List<T> list) { if (list == null) { return new ArrayList<T>(); } else { return list; } }
java
public static <T> List<T> createWhenNull(final List<T> list) { if (list == null) { return new ArrayList<T>(); } else { return list; } }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "createWhenNull", "(", "final", "List", "<", "T", ">", "list", ")", "{", "if", "(", "list", "==", "null", ")", "{", "return", "new", "ArrayList", "<", "T", ">", "(", ")", ";", "}", "else...
Returns the list when it is not null. Returns a new list otherwise. @param list The list to process, can be null @return The input list when it is not null, a new list otherwise
[ "Returns", "the", "list", "when", "it", "is", "not", "null", ".", "Returns", "a", "new", "list", "otherwise", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-utils/src/main/java/com/rometools/utils/Lists.java#L31-L37
55,609
rometools/rome
rome-utils/src/main/java/com/rometools/utils/Lists.java
Lists.create
public static <T> List<T> create(final T item) { final List<T> list = new ArrayList<T>(); list.add(item); return list; }
java
public static <T> List<T> create(final T item) { final List<T> list = new ArrayList<T>(); list.add(item); return list; }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "create", "(", "final", "T", "item", ")", "{", "final", "List", "<", "T", ">", "list", "=", "new", "ArrayList", "<", "T", ">", "(", ")", ";", "list", ".", "add", "(", "item", ")", ";",...
Creates a new List with the given item as the first entry. @param item The item to add to the new list @return List containing the given item
[ "Creates", "a", "new", "List", "with", "the", "given", "item", "as", "the", "first", "entry", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-utils/src/main/java/com/rometools/utils/Lists.java#L45-L49
55,610
rometools/rome
rome-utils/src/main/java/com/rometools/utils/Lists.java
Lists.firstEntry
public static <T> T firstEntry(final List<T> list) { if (list != null && !list.isEmpty()) { return list.get(0); } else { return null; } }
java
public static <T> T firstEntry(final List<T> list) { if (list != null && !list.isEmpty()) { return list.get(0); } else { return null; } }
[ "public", "static", "<", "T", ">", "T", "firstEntry", "(", "final", "List", "<", "T", ">", "list", ")", "{", "if", "(", "list", "!=", "null", "&&", "!", "list", ".", "isEmpty", "(", ")", ")", "{", "return", "list", ".", "get", "(", "0", ")", ...
Extracts the first entry of the list when it is not null and contains values. @param list The list to extract the first entry from, can be null @return The first entry of the list when it is not null or empty, null otherwise
[ "Extracts", "the", "first", "entry", "of", "the", "list", "when", "it", "is", "not", "null", "and", "contains", "values", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-utils/src/main/java/com/rometools/utils/Lists.java#L57-L63
55,611
rometools/rome
rome-utils/src/main/java/com/rometools/utils/Lists.java
Lists.sizeIs
public static boolean sizeIs(final List<?> list, final int size) { if (size == 0) { return list == null || list.isEmpty(); } else { return list != null && list.size() == size; } }
java
public static boolean sizeIs(final List<?> list, final int size) { if (size == 0) { return list == null || list.isEmpty(); } else { return list != null && list.size() == size; } }
[ "public", "static", "boolean", "sizeIs", "(", "final", "List", "<", "?", ">", "list", ",", "final", "int", "size", ")", "{", "if", "(", "size", "==", "0", ")", "{", "return", "list", "==", "null", "||", "list", ".", "isEmpty", "(", ")", ";", "}",...
Checks whether the list has the given size. A null list is treated like a list without entries. @param list The list to check @param size The size to check @return true when the list has the given size or when size = 0 and the list is null, false otherwise
[ "Checks", "whether", "the", "list", "has", "the", "given", "size", ".", "A", "null", "list", "is", "treated", "like", "a", "list", "without", "entries", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-utils/src/main/java/com/rometools/utils/Lists.java#L94-L100
55,612
rometools/rome
rome-utils/src/main/java/com/rometools/utils/Lists.java
Lists.emptyToNull
public static <T> List<T> emptyToNull(final List<T> list) { if (isEmpty(list)) { return null; } else { return list; } }
java
public static <T> List<T> emptyToNull(final List<T> list) { if (isEmpty(list)) { return null; } else { return list; } }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "emptyToNull", "(", "final", "List", "<", "T", ">", "list", ")", "{", "if", "(", "isEmpty", "(", "list", ")", ")", "{", "return", "null", ";", "}", "else", "{", "return", "list", ";", "}...
Returns null, when the given list is empty or null @param list The list to process @return null when the list is empty or null, the given list otherwise
[ "Returns", "null", "when", "the", "given", "list", "is", "empty", "or", "null" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-utils/src/main/java/com/rometools/utils/Lists.java#L108-L114
55,613
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/NumberParser.java
NumberParser.parseLong
public static Long parseLong(final String str) { if (null != str) { try { return new Long(Long.parseLong(str.trim())); } catch (final Exception e) { // :IGNORE: } } return null; }
java
public static Long parseLong(final String str) { if (null != str) { try { return new Long(Long.parseLong(str.trim())); } catch (final Exception e) { // :IGNORE: } } return null; }
[ "public", "static", "Long", "parseLong", "(", "final", "String", "str", ")", "{", "if", "(", "null", "!=", "str", ")", "{", "try", "{", "return", "new", "Long", "(", "Long", ".", "parseLong", "(", "str", ".", "trim", "(", ")", ")", ")", ";", "}",...
Parses a Long out of a string. @param str string to parse for a Long. @return the Long represented by the given string, It returns <b>null</b> if it was not possible to parse the the string.
[ "Parses", "a", "Long", "out", "of", "a", "string", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/NumberParser.java#L42-L51
55,614
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/NumberParser.java
NumberParser.parseFloat
public static Float parseFloat(final String str) { if (null != str) { try { return new Float(Float.parseFloat(str.trim())); } catch (final Exception e) { // :IGNORE: } } return null; }
java
public static Float parseFloat(final String str) { if (null != str) { try { return new Float(Float.parseFloat(str.trim())); } catch (final Exception e) { // :IGNORE: } } return null; }
[ "public", "static", "Float", "parseFloat", "(", "final", "String", "str", ")", "{", "if", "(", "null", "!=", "str", ")", "{", "try", "{", "return", "new", "Float", "(", "Float", ".", "parseFloat", "(", "str", ".", "trim", "(", ")", ")", ")", ";", ...
Parse a Float from a String without exceptions. If the String is not a Float then null is returned @param str the String to parse @return The Float represented by the String, or null if it could not be parsed.
[ "Parse", "a", "Float", "from", "a", "String", "without", "exceptions", ".", "If", "the", "String", "is", "not", "a", "Float", "then", "null", "is", "returned" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/NumberParser.java#L78-L87
55,615
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/NumberParser.java
NumberParser.parseFloat
public static float parseFloat(final String str, final float def) { final Float result = parseFloat(str); if (result == null) { return def; } else { return result.floatValue(); } }
java
public static float parseFloat(final String str, final float def) { final Float result = parseFloat(str); if (result == null) { return def; } else { return result.floatValue(); } }
[ "public", "static", "float", "parseFloat", "(", "final", "String", "str", ",", "final", "float", "def", ")", "{", "final", "Float", "result", "=", "parseFloat", "(", "str", ")", ";", "if", "(", "result", "==", "null", ")", "{", "return", "def", ";", ...
Parse a float from a String, with a default value @param str @param def the value to return if the String cannot be parsed
[ "Parse", "a", "float", "from", "a", "String", "with", "a", "default", "value" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/NumberParser.java#L95-L102
55,616
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/NumberParser.java
NumberParser.parseLong
public static long parseLong(final String str, final long def) { final Long ret = parseLong(str); if (ret == null) { return def; } else { return ret.longValue(); } }
java
public static long parseLong(final String str, final long def) { final Long ret = parseLong(str); if (ret == null) { return def; } else { return ret.longValue(); } }
[ "public", "static", "long", "parseLong", "(", "final", "String", "str", ",", "final", "long", "def", ")", "{", "final", "Long", "ret", "=", "parseLong", "(", "str", ")", ";", "if", "(", "ret", "==", "null", ")", "{", "return", "def", ";", "}", "els...
Parses a long out of a string. @param str string to parse for a long. @param def default value to return if it is not possible to parse the the string. @return the long represented by the given string, or the default.
[ "Parses", "a", "long", "out", "of", "a", "string", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/NumberParser.java#L111-L118
55,617
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/PropertiesLoader.java
PropertiesLoader.getPropertiesLoader
public static PropertiesLoader getPropertiesLoader() { synchronized (PropertiesLoader.class) { final ClassLoader classLoader = ConfigurableClassLoader.INSTANCE.getClassLoader(); PropertiesLoader loader = clMap.get(classLoader); if (loader == null) { try { loader = new PropertiesLoader(MASTER_PLUGIN_...
java
public static PropertiesLoader getPropertiesLoader() { synchronized (PropertiesLoader.class) { final ClassLoader classLoader = ConfigurableClassLoader.INSTANCE.getClassLoader(); PropertiesLoader loader = clMap.get(classLoader); if (loader == null) { try { loader = new PropertiesLoader(MASTER_PLUGIN_...
[ "public", "static", "PropertiesLoader", "getPropertiesLoader", "(", ")", "{", "synchronized", "(", "PropertiesLoader", ".", "class", ")", "{", "final", "ClassLoader", "classLoader", "=", "ConfigurableClassLoader", ".", "INSTANCE", ".", "getClassLoader", "(", ")", ";...
Returns the PropertiesLoader singleton used by ROME to load plugin components. @return PropertiesLoader singleton.
[ "Returns", "the", "PropertiesLoader", "singleton", "used", "by", "ROME", "to", "load", "plugin", "components", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/PropertiesLoader.java#L57-L71
55,618
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/Atom10Generator.java
Atom10Generator.serializeEntry
public static void serializeEntry(final Entry entry, final Writer writer) throws IllegalArgumentException, FeedException, IOException { // Build a feed containing only the entry final List<Entry> entries = new ArrayList<Entry>(); entries.add(entry); final Feed feed1 = new Feed(); ...
java
public static void serializeEntry(final Entry entry, final Writer writer) throws IllegalArgumentException, FeedException, IOException { // Build a feed containing only the entry final List<Entry> entries = new ArrayList<Entry>(); entries.add(entry); final Feed feed1 = new Feed(); ...
[ "public", "static", "void", "serializeEntry", "(", "final", "Entry", "entry", ",", "final", "Writer", "writer", ")", "throws", "IllegalArgumentException", ",", "FeedException", ",", "IOException", "{", "// Build a feed containing only the entry", "final", "List", "<", ...
Utility method to serialize an entry to writer.
[ "Utility", "method", "to", "serialize", "an", "entry", "to", "writer", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/Atom10Generator.java#L541-L559
55,619
rometools/rome
rome-fetcher/src/main/java/com/rometools/fetcher/impl/HttpURLFeedFetcher.java
HttpURLFeedFetcher.retrieveFeed
@Override public SyndFeed retrieveFeed(final String userAgent, final URL feedUrl) throws IllegalArgumentException, IOException, FeedException, FetcherException { if (feedUrl == null) { throw new IllegalArgumentException("null is not a valid URL"); } final URLConnection connectio...
java
@Override public SyndFeed retrieveFeed(final String userAgent, final URL feedUrl) throws IllegalArgumentException, IOException, FeedException, FetcherException { if (feedUrl == null) { throw new IllegalArgumentException("null is not a valid URL"); } final URLConnection connectio...
[ "@", "Override", "public", "SyndFeed", "retrieveFeed", "(", "final", "String", "userAgent", ",", "final", "URL", "feedUrl", ")", "throws", "IllegalArgumentException", ",", "IOException", ",", "FeedException", ",", "FetcherException", "{", "if", "(", "feedUrl", "==...
Retrieve a feed over HTTP @param feedUrl A non-null URL of a RSS/Atom feed to retrieve @return A {@link com.rometools.rome.feed.synd.SyndFeed} object @throws IllegalArgumentException if the URL is null; @throws IOException if a TCP error occurs @throws FeedException if the feed is not valid @throws FetcherException if...
[ "Retrieve", "a", "feed", "over", "HTTP" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-fetcher/src/main/java/com/rometools/fetcher/impl/HttpURLFeedFetcher.java#L118-L184
55,620
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/FactoryFinder.java
FactoryFinder.newInstance
private static Object newInstance(final String className, ClassLoader cl, final boolean doFallback) throws ConfigurationError { try { Class<?> providerClass; if (cl == null) { // If classloader is null Use the bootstrap ClassLoader. // Thus Class.forName(...
java
private static Object newInstance(final String className, ClassLoader cl, final boolean doFallback) throws ConfigurationError { try { Class<?> providerClass; if (cl == null) { // If classloader is null Use the bootstrap ClassLoader. // Thus Class.forName(...
[ "private", "static", "Object", "newInstance", "(", "final", "String", "className", ",", "ClassLoader", "cl", ",", "final", "boolean", "doFallback", ")", "throws", "ConfigurationError", "{", "try", "{", "Class", "<", "?", ">", "providerClass", ";", "if", "(", ...
Create an instance of a class using the specified ClassLoader and optionally fall back to the current ClassLoader if not found. @param className Name of the concrete class corresponding to the service provider @param cl ClassLoader to use to load the class, null means to use the bootstrap ClassLoader @param doFallba...
[ "Create", "an", "instance", "of", "a", "class", "using", "the", "specified", "ClassLoader", "and", "optionally", "fall", "back", "to", "the", "current", "ClassLoader", "if", "not", "found", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/FactoryFinder.java#L58-L89
55,621
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/FactoryFinder.java
FactoryFinder.find
static Object find(final String factoryId, final String fallbackClassName) throws ConfigurationError { // Figure out which ClassLoader to use for loading the provider // class. If there is a Context ClassLoader then use it. ClassLoader classLoader = ss.getContextClassLoader(); if (cla...
java
static Object find(final String factoryId, final String fallbackClassName) throws ConfigurationError { // Figure out which ClassLoader to use for loading the provider // class. If there is a Context ClassLoader then use it. ClassLoader classLoader = ss.getContextClassLoader(); if (cla...
[ "static", "Object", "find", "(", "final", "String", "factoryId", ",", "final", "String", "fallbackClassName", ")", "throws", "ConfigurationError", "{", "// Figure out which ClassLoader to use for loading the provider", "// class. If there is a Context ClassLoader then use it.", "Cl...
Finds the implementation Class object in the specified order. Main entry point. @return Class object of factory, never null @param factoryId Name of the factory to find, same as a property name @param fallbackClassName Implementation class name, if nothing else is found. Use null to mean no fallback. Package private...
[ "Finds", "the", "implementation", "Class", "object", "in", "the", "specified", "order", ".", "Main", "entry", "point", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/FactoryFinder.java#L102-L171
55,622
rometools/rome
rome-utils/src/main/java/com/rometools/utils/Doubles.java
Doubles.parse
public static Double parse(final String s) { Double parsed = null; try { if (s != null) { parsed = Double.parseDouble(s); } } catch (final NumberFormatException e) { } return parsed; }
java
public static Double parse(final String s) { Double parsed = null; try { if (s != null) { parsed = Double.parseDouble(s); } } catch (final NumberFormatException e) { } return parsed; }
[ "public", "static", "Double", "parse", "(", "final", "String", "s", ")", "{", "Double", "parsed", "=", "null", ";", "try", "{", "if", "(", "s", "!=", "null", ")", "{", "parsed", "=", "Double", ".", "parseDouble", "(", "s", ")", ";", "}", "}", "ca...
Converts a String into an Double. @param s The String to convert, may be null @return The parsed Double or null when parsing is not possible
[ "Converts", "a", "String", "into", "an", "Double", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-utils/src/main/java/com/rometools/utils/Doubles.java#L28-L37
55,623
rometools/rome
rome-modules/src/main/java/com/rometools/modules/base/types/PriceTypeEnumeration.java
PriceTypeEnumeration.findByValue
public static PriceTypeEnumeration findByValue(final String value) { if (value.equalsIgnoreCase("negotiable")) { return PriceTypeEnumeration.NEGOTIABLE; } else { return PriceTypeEnumeration.STARTING; } }
java
public static PriceTypeEnumeration findByValue(final String value) { if (value.equalsIgnoreCase("negotiable")) { return PriceTypeEnumeration.NEGOTIABLE; } else { return PriceTypeEnumeration.STARTING; } }
[ "public", "static", "PriceTypeEnumeration", "findByValue", "(", "final", "String", "value", ")", "{", "if", "(", "value", ".", "equalsIgnoreCase", "(", "\"negotiable\"", ")", ")", "{", "return", "PriceTypeEnumeration", ".", "NEGOTIABLE", ";", "}", "else", "{", ...
Returns a PriceTypeEnumeration based on the String value or null. @param value Value to search for. @return PriceTypeEnumeration or null.
[ "Returns", "a", "PriceTypeEnumeration", "based", "on", "the", "String", "value", "or", "null", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/base/types/PriceTypeEnumeration.java#L57-L63
55,624
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/RSS090Generator.java
RSS090Generator.populateChannel
protected void populateChannel(final Channel channel, final Element eChannel) { final String title = channel.getTitle(); if (title != null) { eChannel.addContent(generateSimpleElement("title", title)); } final String link = channel.getLink(); if (link != null) { ...
java
protected void populateChannel(final Channel channel, final Element eChannel) { final String title = channel.getTitle(); if (title != null) { eChannel.addContent(generateSimpleElement("title", title)); } final String link = channel.getLink(); if (link != null) { ...
[ "protected", "void", "populateChannel", "(", "final", "Channel", "channel", ",", "final", "Element", "eChannel", ")", "{", "final", "String", "title", "=", "channel", ".", "getTitle", "(", ")", ";", "if", "(", "title", "!=", "null", ")", "{", "eChannel", ...
Populates the given channel with parsed data from the ROME element that holds the channel data. @param channel the channel into which parsed data will be added. @param eChannel the XML element that holds the data for the channel.
[ "Populates", "the", "given", "channel", "with", "parsed", "data", "from", "the", "ROME", "element", "that", "holds", "the", "channel", "data", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/RSS090Generator.java#L111-L124
55,625
rometools/rome
rome/src/main/java/com/rometools/rome/feed/synd/impl/ConverterForRSS10.java
ConverterForRSS10.createSyndEntry
@Override protected SyndEntry createSyndEntry(final Item item, final boolean preserveWireItem) { final SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem); final Description desc = item.getDescription(); if (desc != null) { final SyndContent descContent = new Sy...
java
@Override protected SyndEntry createSyndEntry(final Item item, final boolean preserveWireItem) { final SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem); final Description desc = item.getDescription(); if (desc != null) { final SyndContent descContent = new Sy...
[ "@", "Override", "protected", "SyndEntry", "createSyndEntry", "(", "final", "Item", "item", ",", "final", "boolean", "preserveWireItem", ")", "{", "final", "SyndEntry", "syndEntry", "=", "super", ".", "createSyndEntry", "(", "item", ",", "preserveWireItem", ")", ...
rss.description -> synd.description
[ "rss", ".", "description", "-", ">", "synd", ".", "description" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/feed/synd/impl/ConverterForRSS10.java#L64-L92
55,626
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/AtomServlet.java
AtomServlet.doDelete
@Override protected void doDelete(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException { LOG.debug("Entering"); final AtomHandler handler = createAtomRequestHandler(req, res); final String userName = handler.getAuthenticatedUsername(); if ...
java
@Override protected void doDelete(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException { LOG.debug("Entering"); final AtomHandler handler = createAtomRequestHandler(req, res); final String userName = handler.getAuthenticatedUsername(); if ...
[ "@", "Override", "protected", "void", "doDelete", "(", "final", "HttpServletRequest", "req", ",", "final", "HttpServletResponse", "res", ")", "throws", "ServletException", ",", "IOException", "{", "LOG", ".", "debug", "(", "\"Entering\"", ")", ";", "final", "Ato...
Handle Atom DELETE by calling appropriate handler.
[ "Handle", "Atom", "DELETE", "by", "calling", "appropriate", "handler", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/AtomServlet.java#L328-L356
55,627
rometools/rome
rome-opml/src/main/java/com/rometools/opml/feed/opml/Outline.java
Outline.getAttributeValue
public String getAttributeValue(final String name) { final List<Attribute> attributes = Collections.synchronizedList(getAttributes()); for (int i = 0; i < attributes.size(); i++) { final Attribute a = attributes.get(i); if (a.getName() != null && a.getName().equals(name)) { ...
java
public String getAttributeValue(final String name) { final List<Attribute> attributes = Collections.synchronizedList(getAttributes()); for (int i = 0; i < attributes.size(); i++) { final Attribute a = attributes.get(i); if (a.getName() != null && a.getName().equals(name)) { ...
[ "public", "String", "getAttributeValue", "(", "final", "String", "name", ")", "{", "final", "List", "<", "Attribute", ">", "attributes", "=", "Collections", ".", "synchronizedList", "(", "getAttributes", "(", ")", ")", ";", "for", "(", "int", "i", "=", "0"...
Returns the value of an attribute on the outline or null. @param name name of the attribute.
[ "Returns", "the", "value", "of", "an", "attribute", "on", "the", "outline", "or", "null", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-opml/src/main/java/com/rometools/opml/feed/opml/Outline.java#L310-L320
55,628
rometools/rome
rome-certiorem/src/main/java/com/rometools/certiorem/pub/Publisher.java
Publisher.sendUpdateNotification
public void sendUpdateNotification(final String hub, final String topic) throws NotificationException { try { final StringBuilder sb = new StringBuilder("hub.mode=publish&hub.url=").append(URLEncoder.encode(topic, "UTF-8")); final URL hubUrl = new URL(hub); final HttpURLConne...
java
public void sendUpdateNotification(final String hub, final String topic) throws NotificationException { try { final StringBuilder sb = new StringBuilder("hub.mode=publish&hub.url=").append(URLEncoder.encode(topic, "UTF-8")); final URL hubUrl = new URL(hub); final HttpURLConne...
[ "public", "void", "sendUpdateNotification", "(", "final", "String", "hub", ",", "final", "String", "topic", ")", "throws", "NotificationException", "{", "try", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "\"hub.mode=publish&hub.url=\"", ")...
Sends the HUB url a notification of a change in topic @param hub URL of the hub to notify. @param topic The Topic that has changed @throws NotificationException Any failure
[ "Sends", "the", "HUB", "url", "a", "notification", "of", "a", "change", "in", "topic" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-certiorem/src/main/java/com/rometools/certiorem/pub/Publisher.java#L68-L97
55,629
rometools/rome
rome-certiorem/src/main/java/com/rometools/certiorem/pub/Publisher.java
Publisher.sendUpdateNotification
public void sendUpdateNotification(final String topic, final SyndFeed feed) throws NotificationException { for (final SyndLink link : feed.getLinks()) { if ("hub".equals(link.getRel())) { sendUpdateNotification(link.getRel(), topic); return; } } ...
java
public void sendUpdateNotification(final String topic, final SyndFeed feed) throws NotificationException { for (final SyndLink link : feed.getLinks()) { if ("hub".equals(link.getRel())) { sendUpdateNotification(link.getRel(), topic); return; } } ...
[ "public", "void", "sendUpdateNotification", "(", "final", "String", "topic", ",", "final", "SyndFeed", "feed", ")", "throws", "NotificationException", "{", "for", "(", "final", "SyndLink", "link", ":", "feed", ".", "getLinks", "(", ")", ")", "{", "if", "(", ...
Sends a notification for a feed located at "topic". The feed MUST contain rel="hub". @param topic URL for the feed @param feed The feed itself @throws NotificationException Any failure
[ "Sends", "a", "notification", "for", "a", "feed", "located", "at", "topic", ".", "The", "feed", "MUST", "contain", "rel", "=", "hub", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-certiorem/src/main/java/com/rometools/certiorem/pub/Publisher.java#L106-L115
55,630
rometools/rome
rome-certiorem/src/main/java/com/rometools/certiorem/pub/Publisher.java
Publisher.sendUpdateNotification
public void sendUpdateNotification(final SyndFeed feed) throws NotificationException { SyndLink hub = null; SyndLink self = null; for (final SyndLink link : feed.getLinks()) { if ("hub".equals(link.getRel())) { hub = link; } if ("self".equals...
java
public void sendUpdateNotification(final SyndFeed feed) throws NotificationException { SyndLink hub = null; SyndLink self = null; for (final SyndLink link : feed.getLinks()) { if ("hub".equals(link.getRel())) { hub = link; } if ("self".equals...
[ "public", "void", "sendUpdateNotification", "(", "final", "SyndFeed", "feed", ")", "throws", "NotificationException", "{", "SyndLink", "hub", "=", "null", ";", "SyndLink", "self", "=", "null", ";", "for", "(", "final", "SyndLink", "link", ":", "feed", ".", "...
Sends a notification for a feed. The feed MUST contain rel="hub" and rel="self" links. @param feed The feed to notify @throws NotificationException Any failure
[ "Sends", "a", "notification", "for", "a", "feed", ".", "The", "feed", "MUST", "contain", "rel", "=", "hub", "and", "rel", "=", "self", "links", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-certiorem/src/main/java/com/rometools/certiorem/pub/Publisher.java#L123-L150
55,631
rometools/rome
rome-certiorem/src/main/java/com/rometools/certiorem/pub/Publisher.java
Publisher.sendUpdateNotificationAsyncronously
public void sendUpdateNotificationAsyncronously(final String hub, final String topic, final AsyncNotificationCallback callback) { final Runnable r = new Runnable() { @Override public void run() { try { sendUpdateNotification(hub, topic); ...
java
public void sendUpdateNotificationAsyncronously(final String hub, final String topic, final AsyncNotificationCallback callback) { final Runnable r = new Runnable() { @Override public void run() { try { sendUpdateNotification(hub, topic); ...
[ "public", "void", "sendUpdateNotificationAsyncronously", "(", "final", "String", "hub", ",", "final", "String", "topic", ",", "final", "AsyncNotificationCallback", "callback", ")", "{", "final", "Runnable", "r", "=", "new", "Runnable", "(", ")", "{", "@", "Overr...
Sends the HUB url a notification of a change in topic asynchronously @param hub URL of the hub to notify. @param topic The Topic that has changed @param callback A callback invoked when the notification completes. @throws NotificationException Any failure
[ "Sends", "the", "HUB", "url", "a", "notification", "of", "a", "change", "in", "topic", "asynchronously" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-certiorem/src/main/java/com/rometools/certiorem/pub/Publisher.java#L160-L178
55,632
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.getCategories
@Override public Categories getCategories(final AtomRequest areq) throws AtomException { LOG.debug("getCollection"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final FileBased...
java
@Override public Categories getCategories(final AtomRequest areq) throws AtomException { LOG.debug("getCollection"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final FileBased...
[ "@", "Override", "public", "Categories", "getCategories", "(", "final", "AtomRequest", "areq", ")", "throws", "AtomException", "{", "LOG", ".", "debug", "(", "\"getCollection\"", ")", ";", "final", "String", "[", "]", "pathInfo", "=", "StringUtils", ".", "spli...
Returns null because we use in-line categories. @throws com.rometools.rome.propono.atom.server.AtomException Unexpected exception. @return Categories object
[ "Returns", "null", "because", "we", "use", "in", "-", "line", "categories", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L138-L146
55,633
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.getCollection
@Override public Feed getCollection(final AtomRequest areq) throws AtomException { LOG.debug("getCollection"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final FileBasedCollec...
java
@Override public Feed getCollection(final AtomRequest areq) throws AtomException { LOG.debug("getCollection"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final FileBasedCollec...
[ "@", "Override", "public", "Feed", "getCollection", "(", "final", "AtomRequest", "areq", ")", "throws", "AtomException", "{", "LOG", ".", "debug", "(", "\"getCollection\"", ")", ";", "final", "String", "[", "]", "pathInfo", "=", "StringUtils", ".", "split", ...
Get collection specified by pathinfo. @param areq Details of HTTP request @return ROME feed representing collection. @throws com.rometools.rome.propono.atom.server.AtomException Invalid collection or other exception.
[ "Get", "collection", "specified", "by", "pathinfo", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L156-L164
55,634
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.postEntry
@Override public Entry postEntry(final AtomRequest areq, final Entry entry) throws AtomException { LOG.debug("postEntry"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final Fi...
java
@Override public Entry postEntry(final AtomRequest areq, final Entry entry) throws AtomException { LOG.debug("postEntry"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final Fi...
[ "@", "Override", "public", "Entry", "postEntry", "(", "final", "AtomRequest", "areq", ",", "final", "Entry", "entry", ")", "throws", "AtomException", "{", "LOG", ".", "debug", "(", "\"postEntry\"", ")", ";", "final", "String", "[", "]", "pathInfo", "=", "S...
Create a new entry specified by pathInfo and posted entry. We save the submitted Atom entry verbatim, but we do set the id and reset the update time. @param entry Entry to be added to collection. @param areq Details of HTTP request @throws com.rometools.rome.propono.atom.server.AtomException On invalid collection or o...
[ "Create", "a", "new", "entry", "specified", "by", "pathInfo", "and", "posted", "entry", ".", "We", "save", "the", "submitted", "Atom", "entry", "verbatim", "but", "we", "do", "set", "the", "id", "and", "reset", "the", "update", "time", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L176-L191
55,635
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.putEntry
@Override public void putEntry(final AtomRequest areq, final Entry entry) throws AtomException { LOG.debug("putEntry"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final String...
java
@Override public void putEntry(final AtomRequest areq, final Entry entry) throws AtomException { LOG.debug("putEntry"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final String...
[ "@", "Override", "public", "void", "putEntry", "(", "final", "AtomRequest", "areq", ",", "final", "Entry", "entry", ")", "throws", "AtomException", "{", "LOG", ".", "debug", "(", "\"putEntry\"", ")", ";", "final", "String", "[", "]", "pathInfo", "=", "Stri...
Update entry specified by pathInfo and posted entry. @param entry @param areq Details of HTTP request @throws com.rometools.rome.propono.atom.server.AtomException
[ "Update", "entry", "specified", "by", "pathInfo", "and", "posted", "entry", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L227-L241
55,636
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.deleteEntry
@Override public void deleteEntry(final AtomRequest areq) throws AtomException { LOG.debug("deleteEntry"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final String fileName = p...
java
@Override public void deleteEntry(final AtomRequest areq) throws AtomException { LOG.debug("deleteEntry"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final String fileName = p...
[ "@", "Override", "public", "void", "deleteEntry", "(", "final", "AtomRequest", "areq", ")", "throws", "AtomException", "{", "LOG", ".", "debug", "(", "\"deleteEntry\"", ")", ";", "final", "String", "[", "]", "pathInfo", "=", "StringUtils", ".", "split", "(",...
Delete entry specified by pathInfo. @param areq Details of HTTP request
[ "Delete", "entry", "specified", "by", "pathInfo", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L248-L264
55,637
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.postMedia
@Override public Entry postMedia(final AtomRequest areq, final Entry entry) throws AtomException { // get incoming slug from HTTP header final String slug = areq.getHeader("Slug"); if (LOG.isDebugEnabled()) { LOG.debug("postMedia - title: " + entry.getTitle() + " slug:" + slug)...
java
@Override public Entry postMedia(final AtomRequest areq, final Entry entry) throws AtomException { // get incoming slug from HTTP header final String slug = areq.getHeader("Slug"); if (LOG.isDebugEnabled()) { LOG.debug("postMedia - title: " + entry.getTitle() + " slug:" + slug)...
[ "@", "Override", "public", "Entry", "postMedia", "(", "final", "AtomRequest", "areq", ",", "final", "Entry", "entry", ")", "throws", "AtomException", "{", "// get incoming slug from HTTP header", "final", "String", "slug", "=", "areq", ".", "getHeader", "(", "\"Sl...
Store media data in collection specified by pathInfo, create an Atom media-link entry to store metadata for the new media file and return that entry to the caller. @param areq Details of HTTP request @param entry New entry initialzied with only title and content type @return Location URL of new media entry
[ "Store", "media", "data", "in", "collection", "specified", "by", "pathInfo", "create", "an", "Atom", "media", "-", "link", "entry", "to", "store", "metadata", "for", "the", "new", "media", "file", "and", "return", "that", "entry", "to", "the", "caller", "....
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L274-L308
55,638
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.putMedia
@Override public void putMedia(final AtomRequest areq) throws AtomException { LOG.debug("putMedia"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final String fileName = pathIn...
java
@Override public void putMedia(final AtomRequest areq) throws AtomException { LOG.debug("putMedia"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final String fileName = pathIn...
[ "@", "Override", "public", "void", "putMedia", "(", "final", "AtomRequest", "areq", ")", "throws", "AtomException", "{", "LOG", ".", "debug", "(", "\"putMedia\"", ")", ";", "final", "String", "[", "]", "pathInfo", "=", "StringUtils", ".", "split", "(", "ar...
Update the media file part of a media-link entry. @param areq Details of HTTP request Assuming pathInfo of form /user-name/resource/name
[ "Update", "the", "media", "file", "part", "of", "a", "media", "-", "link", "entry", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L315-L330
55,639
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.isAtomServiceURI
@Override public boolean isAtomServiceURI(final AtomRequest areq) { final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); if (pathInfo.length == 0) { return true; } return false; }
java
@Override public boolean isAtomServiceURI(final AtomRequest areq) { final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); if (pathInfo.length == 0) { return true; } return false; }
[ "@", "Override", "public", "boolean", "isAtomServiceURI", "(", "final", "AtomRequest", "areq", ")", "{", "final", "String", "[", "]", "pathInfo", "=", "StringUtils", ".", "split", "(", "areq", ".", "getPathInfo", "(", ")", ",", "\"/\"", ")", ";", "if", "...
Return true if specified pathinfo represents URI of service doc.
[ "Return", "true", "if", "specified", "pathinfo", "represents", "URI", "of", "service", "doc", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L351-L358
55,640
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.isCategoriesURI
@Override public boolean isCategoriesURI(final AtomRequest areq) { LOG.debug("isCategoriesDocumentURI"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); if (pathInfo.length == 3 && "categories".equals(pathInfo[2])) { return true; } return fal...
java
@Override public boolean isCategoriesURI(final AtomRequest areq) { LOG.debug("isCategoriesDocumentURI"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); if (pathInfo.length == 3 && "categories".equals(pathInfo[2])) { return true; } return fal...
[ "@", "Override", "public", "boolean", "isCategoriesURI", "(", "final", "AtomRequest", "areq", ")", "{", "LOG", ".", "debug", "(", "\"isCategoriesDocumentURI\"", ")", ";", "final", "String", "[", "]", "pathInfo", "=", "StringUtils", ".", "split", "(", "areq", ...
Return true if specified pathinfo represents URI of category doc.
[ "Return", "true", "if", "specified", "pathinfo", "represents", "URI", "of", "category", "doc", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L363-L371
55,641
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.isCollectionURI
@Override public boolean isCollectionURI(final AtomRequest areq) { LOG.debug("isCollectionURI"); // workspace/collection-plural // if length is 2 and points to a valid collection then YES final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); if (pathInfo.lengt...
java
@Override public boolean isCollectionURI(final AtomRequest areq) { LOG.debug("isCollectionURI"); // workspace/collection-plural // if length is 2 and points to a valid collection then YES final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); if (pathInfo.lengt...
[ "@", "Override", "public", "boolean", "isCollectionURI", "(", "final", "AtomRequest", "areq", ")", "{", "LOG", ".", "debug", "(", "\"isCollectionURI\"", ")", ";", "// workspace/collection-plural", "// if length is 2 and points to a valid collection then YES", "final", "Stri...
Return true if specified pathinfo represents URI of a collection.
[ "Return", "true", "if", "specified", "pathinfo", "represents", "URI", "of", "a", "collection", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L376-L391
55,642
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java
FileBasedAtomHandler.authenticateBASIC
public String authenticateBASIC(final HttpServletRequest request) { LOG.debug("authenticateBASIC"); boolean valid = false; String userID = null; String password = null; try { final String authHeader = request.getHeader("Authorization"); if (authHeader != n...
java
public String authenticateBASIC(final HttpServletRequest request) { LOG.debug("authenticateBASIC"); boolean valid = false; String userID = null; String password = null; try { final String authHeader = request.getHeader("Authorization"); if (authHeader != n...
[ "public", "String", "authenticateBASIC", "(", "final", "HttpServletRequest", "request", ")", "{", "LOG", ".", "debug", "(", "\"authenticateBASIC\"", ")", ";", "boolean", "valid", "=", "false", ";", "String", "userID", "=", "null", ";", "String", "password", "=...
BASIC authentication.
[ "BASIC", "authentication", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java#L438-L471
55,643
rometools/rome
rome/src/main/java/com/rometools/rome/feed/atom/Entry.java
Entry.isMediaEntry
public boolean isMediaEntry() { boolean mediaEntry = false; final List<Link> links = getOtherLinks(); for (final Link link : links) { if ("edit-media".equals(link.getRel())) { mediaEntry = true; break; } } return mediaEntry;...
java
public boolean isMediaEntry() { boolean mediaEntry = false; final List<Link> links = getOtherLinks(); for (final Link link : links) { if ("edit-media".equals(link.getRel())) { mediaEntry = true; break; } } return mediaEntry;...
[ "public", "boolean", "isMediaEntry", "(", ")", "{", "boolean", "mediaEntry", "=", "false", ";", "final", "List", "<", "Link", ">", "links", "=", "getOtherLinks", "(", ")", ";", "for", "(", "final", "Link", "link", ":", "links", ")", "{", "if", "(", "...
Returns true if entry is a media entry, i.e. has rel="edit-media". @return true if entry is a media entry
[ "Returns", "true", "if", "entry", "is", "a", "media", "entry", "i", ".", "e", ".", "has", "rel", "=", "edit", "-", "media", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/feed/atom/Entry.java#L261-L271
55,644
rometools/rome
rome-certiorem/src/main/java/com/rometools/certiorem/hub/notify/standard/ThreadPoolNotifier.java
ThreadPoolNotifier.enqueueNotification
@Override protected void enqueueNotification(final Notification not) { final Runnable r = new Runnable() { @Override public void run() { not.lastRun = System.currentTimeMillis(); final SubscriptionSummary summary = postNotification(not.subscriber, not...
java
@Override protected void enqueueNotification(final Notification not) { final Runnable r = new Runnable() { @Override public void run() { not.lastRun = System.currentTimeMillis(); final SubscriptionSummary summary = postNotification(not.subscriber, not...
[ "@", "Override", "protected", "void", "enqueueNotification", "(", "final", "Notification", "not", ")", "{", "final", "Runnable", "r", "=", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "not", ".", "lastRun", "...
Enqueues a notification to run. If the notification fails, it will be retried every two minutes until 5 attempts are completed. Notifications to the same callback should be delivered successfully in order. @param not
[ "Enqueues", "a", "notification", "to", "run", ".", "If", "the", "notification", "fails", "it", "will", "be", "retried", "every", "two", "minutes", "until", "5", "attempts", "are", "completed", ".", "Notifications", "to", "the", "same", "callback", "should", ...
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-certiorem/src/main/java/com/rometools/certiorem/hub/notify/standard/ThreadPoolNotifier.java#L62-L84
55,645
rometools/rome
rome-certiorem/src/main/java/com/rometools/certiorem/hub/notify/standard/ThreadPoolNotifier.java
ThreadPoolNotifier.retry
protected void retry(final Notification not) { if (!pendings.contains(not.subscriber.getCallback())) { // We don't have a current retry for this callback pending, so we // will schedule the retry pendings.add(not.subscriber.getCallback()); timer.schedule(new Timer...
java
protected void retry(final Notification not) { if (!pendings.contains(not.subscriber.getCallback())) { // We don't have a current retry for this callback pending, so we // will schedule the retry pendings.add(not.subscriber.getCallback()); timer.schedule(new Timer...
[ "protected", "void", "retry", "(", "final", "Notification", "not", ")", "{", "if", "(", "!", "pendings", ".", "contains", "(", "not", ".", "subscriber", ".", "getCallback", "(", ")", ")", ")", "{", "// We don't have a current retry for this callback pending, so we...
Schedules a notification to retry in two minutes. @param not Notification to retry
[ "Schedules", "a", "notification", "to", "retry", "in", "two", "minutes", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-certiorem/src/main/java/com/rometools/certiorem/hub/notify/standard/ThreadPoolNotifier.java#L91-L113
55,646
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/RSS091UserlandParser.java
RSS091UserlandParser.getItems
@Override protected List<Element> getItems(final Element rssRoot) { final Element eChannel = rssRoot.getChild("channel", getRSSNamespace()); if (eChannel != null) { return eChannel.getChildren("item", getRSSNamespace()); } else { return Collections.emptyList(); ...
java
@Override protected List<Element> getItems(final Element rssRoot) { final Element eChannel = rssRoot.getChild("channel", getRSSNamespace()); if (eChannel != null) { return eChannel.getChildren("item", getRSSNamespace()); } else { return Collections.emptyList(); ...
[ "@", "Override", "protected", "List", "<", "Element", ">", "getItems", "(", "final", "Element", "rssRoot", ")", "{", "final", "Element", "eChannel", "=", "rssRoot", ".", "getChild", "(", "\"channel\"", ",", "getRSSNamespace", "(", ")", ")", ";", "if", "(",...
It looks for the 'item' elements under the 'channel' elemment.
[ "It", "looks", "for", "the", "item", "elements", "under", "the", "channel", "elemment", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/RSS091UserlandParser.java#L202-L213
55,647
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/RSS091UserlandParser.java
RSS091UserlandParser.getImage
@Override protected Element getImage(final Element rssRoot) { final Element eChannel = rssRoot.getChild("channel", getRSSNamespace()); if (eChannel != null) { return eChannel.getChild("image", getRSSNamespace()); } else { return null; } }
java
@Override protected Element getImage(final Element rssRoot) { final Element eChannel = rssRoot.getChild("channel", getRSSNamespace()); if (eChannel != null) { return eChannel.getChild("image", getRSSNamespace()); } else { return null; } }
[ "@", "Override", "protected", "Element", "getImage", "(", "final", "Element", "rssRoot", ")", "{", "final", "Element", "eChannel", "=", "rssRoot", ".", "getChild", "(", "\"channel\"", ",", "getRSSNamespace", "(", ")", ")", ";", "if", "(", "eChannel", "!=", ...
It looks for the 'image' elements under the 'channel' elemment.
[ "It", "looks", "for", "the", "image", "elements", "under", "the", "channel", "elemment", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/RSS091UserlandParser.java#L218-L229
55,648
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/RSS091UserlandParser.java
RSS091UserlandParser.getTextInput
@Override protected Element getTextInput(final Element rssRoot) { final String elementName = getTextInputLabel(); final Element eChannel = rssRoot.getChild("channel", getRSSNamespace()); if (eChannel != null) { return eChannel.getChild(elementName, getRSSNamespace()); }...
java
@Override protected Element getTextInput(final Element rssRoot) { final String elementName = getTextInputLabel(); final Element eChannel = rssRoot.getChild("channel", getRSSNamespace()); if (eChannel != null) { return eChannel.getChild(elementName, getRSSNamespace()); }...
[ "@", "Override", "protected", "Element", "getTextInput", "(", "final", "Element", "rssRoot", ")", "{", "final", "String", "elementName", "=", "getTextInputLabel", "(", ")", ";", "final", "Element", "eChannel", "=", "rssRoot", ".", "getChild", "(", "\"channel\"",...
It looks for the 'textinput' elements under the 'channel' elemment.
[ "It", "looks", "for", "the", "textinput", "elements", "under", "the", "channel", "elemment", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/RSS091UserlandParser.java#L241-L253
55,649
rometools/rome
rome-modules/src/main/java/com/rometools/modules/itunes/FeedInformationImpl.java
FeedInformationImpl.getCategories
@Override public List<Category> getCategories() { return categories == null ? (categories = new ArrayList<Category>()) : categories; }
java
@Override public List<Category> getCategories() { return categories == null ? (categories = new ArrayList<Category>()) : categories; }
[ "@", "Override", "public", "List", "<", "Category", ">", "getCategories", "(", ")", "{", "return", "categories", "==", "null", "?", "(", "categories", "=", "new", "ArrayList", "<", "Category", ">", "(", ")", ")", ":", "categories", ";", "}" ]
The parent categories for this feed @return The parent categories for this feed
[ "The", "parent", "categories", "for", "this", "feed" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/itunes/FeedInformationImpl.java#L54-L57
55,650
rometools/rome
rome-utils/src/main/java/com/rometools/utils/Longs.java
Longs.parseDecimal
public static Long parseDecimal(final String s) { Long parsed = null; try { if (s != null) { parsed = (long) Double.parseDouble(s); } } catch (final NumberFormatException e) { } return parsed; }
java
public static Long parseDecimal(final String s) { Long parsed = null; try { if (s != null) { parsed = (long) Double.parseDouble(s); } } catch (final NumberFormatException e) { } return parsed; }
[ "public", "static", "Long", "parseDecimal", "(", "final", "String", "s", ")", "{", "Long", "parsed", "=", "null", ";", "try", "{", "if", "(", "s", "!=", "null", ")", "{", "parsed", "=", "(", "long", ")", "Double", ".", "parseDouble", "(", "s", ")",...
Converts a String into a Long by first parsing it as Double and then casting it to Long. @param s The String to convert, may be null or in decimal format @return The parsed Long or null when parsing is not possible
[ "Converts", "a", "String", "into", "a", "Long", "by", "first", "parsing", "it", "as", "Double", "and", "then", "casting", "it", "to", "Long", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-utils/src/main/java/com/rometools/utils/Longs.java#L28-L37
55,651
rometools/rome
rome-modules/src/main/java/com/rometools/modules/georss/geometries/PositionList.java
PositionList.add
public void add(final double latitude, final double longitude) { ensureCapacity(size + 1); this.longitude[size] = longitude; this.latitude[size] = latitude; ++size; }
java
public void add(final double latitude, final double longitude) { ensureCapacity(size + 1); this.longitude[size] = longitude; this.latitude[size] = latitude; ++size; }
[ "public", "void", "add", "(", "final", "double", "latitude", ",", "final", "double", "longitude", ")", "{", "ensureCapacity", "(", "size", "+", "1", ")", ";", "this", ".", "longitude", "[", "size", "]", "=", "longitude", ";", "this", ".", "latitude", "...
Add a position at the end of the list
[ "Add", "a", "position", "at", "the", "end", "of", "the", "list" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/georss/geometries/PositionList.java#L116-L121
55,652
rometools/rome
rome-modules/src/main/java/com/rometools/modules/georss/geometries/PositionList.java
PositionList.insert
public void insert(final int pos, final double latitude, final double longitude) { ensureCapacity(size + 1); System.arraycopy(this.longitude, pos, this.longitude, pos + 1, size - pos); System.arraycopy(this.latitude, pos, this.latitude, pos + 1, size - pos); this.longitude[pos] = longitu...
java
public void insert(final int pos, final double latitude, final double longitude) { ensureCapacity(size + 1); System.arraycopy(this.longitude, pos, this.longitude, pos + 1, size - pos); System.arraycopy(this.latitude, pos, this.latitude, pos + 1, size - pos); this.longitude[pos] = longitu...
[ "public", "void", "insert", "(", "final", "int", "pos", ",", "final", "double", "latitude", ",", "final", "double", "longitude", ")", "{", "ensureCapacity", "(", "size", "+", "1", ")", ";", "System", ".", "arraycopy", "(", "this", ".", "longitude", ",", ...
Add a position at a given index in the list. The rest of the list is shifted one place to the "right" @param pos position index
[ "Add", "a", "position", "at", "a", "given", "index", "in", "the", "list", ".", "The", "rest", "of", "the", "list", "is", "shifted", "one", "place", "to", "the", "right" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/georss/geometries/PositionList.java#L129-L136
55,653
rometools/rome
rome-modules/src/main/java/com/rometools/modules/georss/geometries/PositionList.java
PositionList.replace
public void replace(final int pos, final double latitude, final double longitude) { this.longitude[pos] = longitude; this.latitude[pos] = latitude; }
java
public void replace(final int pos, final double latitude, final double longitude) { this.longitude[pos] = longitude; this.latitude[pos] = latitude; }
[ "public", "void", "replace", "(", "final", "int", "pos", ",", "final", "double", "latitude", ",", "final", "double", "longitude", ")", "{", "this", ".", "longitude", "[", "pos", "]", "=", "longitude", ";", "this", ".", "latitude", "[", "pos", "]", "=",...
Replace the position at the index with new values @param pos position index
[ "Replace", "the", "position", "at", "the", "index", "with", "new", "values" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/georss/geometries/PositionList.java#L143-L146
55,654
rometools/rome
rome-modules/src/main/java/com/rometools/modules/georss/geometries/PositionList.java
PositionList.remove
public void remove(final int pos) { System.arraycopy(longitude, pos + 1, longitude, pos, size - pos - 1); System.arraycopy(latitude, pos + 1, latitude, pos, size - pos - 1); --size; }
java
public void remove(final int pos) { System.arraycopy(longitude, pos + 1, longitude, pos, size - pos - 1); System.arraycopy(latitude, pos + 1, latitude, pos, size - pos - 1); --size; }
[ "public", "void", "remove", "(", "final", "int", "pos", ")", "{", "System", ".", "arraycopy", "(", "longitude", ",", "pos", "+", "1", ",", "longitude", ",", "pos", ",", "size", "-", "pos", "-", "1", ")", ";", "System", ".", "arraycopy", "(", "latit...
Remove the position at the index, the rest of the list is shifted one place to the "left" @param pos position index
[ "Remove", "the", "position", "at", "the", "index", "the", "rest", "of", "the", "list", "is", "shifted", "one", "place", "to", "the", "left" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/georss/geometries/PositionList.java#L153-L157
55,655
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java
Atom10Parser.findBaseURI
private String findBaseURI(final Element root) throws MalformedURLException { String ret = null; if (findAtomLink(root, "self") != null) { ret = findAtomLink(root, "self"); if (".".equals(ret) || "./".equals(ret)) { ret = ""; } if (ret.inde...
java
private String findBaseURI(final Element root) throws MalformedURLException { String ret = null; if (findAtomLink(root, "self") != null) { ret = findAtomLink(root, "self"); if (".".equals(ret) || "./".equals(ret)) { ret = ""; } if (ret.inde...
[ "private", "String", "findBaseURI", "(", "final", "Element", "root", ")", "throws", "MalformedURLException", "{", "String", "ret", "=", "null", ";", "if", "(", "findAtomLink", "(", "root", ",", "\"self\"", ")", "!=", "null", ")", "{", "ret", "=", "findAtom...
Find base URI of feed considering relative URIs. @param root Root element of feed.
[ "Find", "base", "URI", "of", "feed", "considering", "relative", "URIs", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java#L600-L613
55,656
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java
Atom10Parser.findAtomLink
private String findAtomLink(final Element parent, final String rel) { String ret = null; final List<Element> linksList = parent.getChildren("link", ATOM_10_NS); if (linksList != null) { for (final Element element : linksList) { final Element link = element; ...
java
private String findAtomLink(final Element parent, final String rel) { String ret = null; final List<Element> linksList = parent.getChildren("link", ATOM_10_NS); if (linksList != null) { for (final Element element : linksList) { final Element link = element; ...
[ "private", "String", "findAtomLink", "(", "final", "Element", "parent", ",", "final", "String", "rel", ")", "{", "String", "ret", "=", "null", ";", "final", "List", "<", "Element", ">", "linksList", "=", "parent", ".", "getChildren", "(", "\"link\"", ",", ...
Return URL string of Atom link element under parent element. Link with no rel attribute is considered to be rel="alternate" @param parent Consider only children of this parent element @param rel Consider only links with this relationship
[ "Return", "URL", "string", "of", "Atom", "link", "element", "under", "parent", "element", ".", "Link", "with", "no", "rel", "attribute", "is", "considered", "to", "be", "rel", "=", "alternate" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java#L622-L637
55,657
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java
Atom10Parser.formURI
private static String formURI(String base, String append) { base = stripTrailingSlash(base); append = stripStartingSlash(append); if (append.startsWith("..")) { final String[] parts = append.split("/"); for (final String part : parts) { if ("..".equals(par...
java
private static String formURI(String base, String append) { base = stripTrailingSlash(base); append = stripStartingSlash(append); if (append.startsWith("..")) { final String[] parts = append.split("/"); for (final String part : parts) { if ("..".equals(par...
[ "private", "static", "String", "formURI", "(", "String", "base", ",", "String", "append", ")", "{", "base", "=", "stripTrailingSlash", "(", "base", ")", ";", "append", "=", "stripStartingSlash", "(", "append", ")", ";", "if", "(", "append", ".", "startsWit...
Form URI by combining base with append portion and giving special consideration to append portions that begin with ".." @param base Base of URI, may end with trailing slash @param append String to append, may begin with slash or ".."
[ "Form", "URI", "by", "combining", "base", "with", "append", "portion", "and", "giving", "special", "consideration", "to", "append", "portions", "that", "begin", "with", ".." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java#L646-L664
55,658
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java
Atom10Parser.stripStartingSlash
private static String stripStartingSlash(String s) { if (s != null && s.startsWith("/")) { s = s.substring(1, s.length()); } return s; }
java
private static String stripStartingSlash(String s) { if (s != null && s.startsWith("/")) { s = s.substring(1, s.length()); } return s; }
[ "private", "static", "String", "stripStartingSlash", "(", "String", "s", ")", "{", "if", "(", "s", "!=", "null", "&&", "s", ".", "startsWith", "(", "\"/\"", ")", ")", "{", "s", "=", "s", ".", "substring", "(", "1", ",", "s", ".", "length", "(", "...
Strip starting slash from beginning of string.
[ "Strip", "starting", "slash", "from", "beginning", "of", "string", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java#L669-L674
55,659
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java
Atom10Parser.stripTrailingSlash
private static String stripTrailingSlash(String s) { if (s != null && s.endsWith("/")) { s = s.substring(0, s.length() - 1); } return s; }
java
private static String stripTrailingSlash(String s) { if (s != null && s.endsWith("/")) { s = s.substring(0, s.length() - 1); } return s; }
[ "private", "static", "String", "stripTrailingSlash", "(", "String", "s", ")", "{", "if", "(", "s", "!=", "null", "&&", "s", ".", "endsWith", "(", "\"/\"", ")", ")", "{", "s", "=", "s", ".", "substring", "(", "0", ",", "s", ".", "length", "(", ")"...
Strip trailing slash from end of string.
[ "Strip", "trailing", "slash", "from", "end", "of", "string", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java#L679-L684
55,660
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java
Atom10Parser.parseEntry
public static Entry parseEntry(final Reader rd, final String baseURI, final Locale locale) throws JDOMException, IOException, IllegalArgumentException, FeedException { // Parse entry into JDOM tree final SAXBuilder builder = new SAXBuilder(); final Document entryDoc = builder.build(...
java
public static Entry parseEntry(final Reader rd, final String baseURI, final Locale locale) throws JDOMException, IOException, IllegalArgumentException, FeedException { // Parse entry into JDOM tree final SAXBuilder builder = new SAXBuilder(); final Document entryDoc = builder.build(...
[ "public", "static", "Entry", "parseEntry", "(", "final", "Reader", "rd", ",", "final", "String", "baseURI", ",", "final", "Locale", "locale", ")", "throws", "JDOMException", ",", "IOException", ",", "IllegalArgumentException", ",", "FeedException", "{", "// Parse ...
Parse entry from reader.
[ "Parse", "entry", "from", "reader", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java#L689-L713
55,661
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.getFeedDocument
public Feed getFeedDocument() throws AtomException { InputStream in = null; synchronized (FileStore.getFileStore()) { in = FileStore.getFileStore().getFileInputStream(getFeedPath()); if (in == null) { in = createDefaultFeedDocument(contextURI + servletPath + "/" +...
java
public Feed getFeedDocument() throws AtomException { InputStream in = null; synchronized (FileStore.getFileStore()) { in = FileStore.getFileStore().getFileInputStream(getFeedPath()); if (in == null) { in = createDefaultFeedDocument(contextURI + servletPath + "/" +...
[ "public", "Feed", "getFeedDocument", "(", ")", "throws", "AtomException", "{", "InputStream", "in", "=", "null", ";", "synchronized", "(", "FileStore", ".", "getFileStore", "(", ")", ")", "{", "in", "=", "FileStore", ".", "getFileStore", "(", ")", ".", "ge...
Get feed document representing collection. @throws com.rometools.rome.propono.atom.server.AtomException On error retrieving feed file. @return Atom Feed representing collection.
[ "Get", "feed", "document", "representing", "collection", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L130-L145
55,662
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.getCategories
public List<Categories> getCategories(final boolean inline) { final Categories cats = new Categories(); cats.setFixed(true); cats.setScheme(contextURI + "/" + handle + "/" + singular); if (inline) { for (final String catName : catNames) { final Category cat = ...
java
public List<Categories> getCategories(final boolean inline) { final Categories cats = new Categories(); cats.setFixed(true); cats.setScheme(contextURI + "/" + handle + "/" + singular); if (inline) { for (final String catName : catNames) { final Category cat = ...
[ "public", "List", "<", "Categories", ">", "getCategories", "(", "final", "boolean", "inline", ")", "{", "final", "Categories", "cats", "=", "new", "Categories", "(", ")", ";", "cats", ".", "setFixed", "(", "true", ")", ";", "cats", ".", "setScheme", "(",...
Get list of one Categories object containing categories allowed by collection. @param inline True if Categories object should contain collection of in-line Categories objects or false if it should set the Href for out-of-line categories.
[ "Get", "list", "of", "one", "Categories", "object", "containing", "categories", "allowed", "by", "collection", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L153-L167
55,663
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.addEntry
public Entry addEntry(final Entry entry) throws Exception { synchronized (FileStore.getFileStore()) { final Feed f = getFeedDocument(); final String fsid = FileStore.getFileStore().getNextId(); updateTimestamps(entry); // Save entry to file final Str...
java
public Entry addEntry(final Entry entry) throws Exception { synchronized (FileStore.getFileStore()) { final Feed f = getFeedDocument(); final String fsid = FileStore.getFileStore().getNextId(); updateTimestamps(entry); // Save entry to file final Str...
[ "public", "Entry", "addEntry", "(", "final", "Entry", "entry", ")", "throws", "Exception", "{", "synchronized", "(", "FileStore", ".", "getFileStore", "(", ")", ")", "{", "final", "Feed", "f", "=", "getFeedDocument", "(", ")", ";", "final", "String", "fsid...
Add entry to collection. @param entry Entry to be added to collection. Entry will be saved to disk in a directory under the collection's directory and the path will follow the pattern [collection-plural]/[entryid]/entry.xml. The entry will be added to the collection's feed in [collection-plural]/feed.xml. @throws java...
[ "Add", "entry", "to", "collection", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L188-L210
55,664
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.getEntry
public Entry getEntry(String fsid) throws Exception { if (fsid.endsWith(".media-link")) { fsid = fsid.substring(0, fsid.length() - ".media-link".length()); } final String entryPath = getEntryPath(fsid); checkExistence(entryPath); final InputStream in = FileStore.get...
java
public Entry getEntry(String fsid) throws Exception { if (fsid.endsWith(".media-link")) { fsid = fsid.substring(0, fsid.length() - ".media-link".length()); } final String entryPath = getEntryPath(fsid); checkExistence(entryPath); final InputStream in = FileStore.get...
[ "public", "Entry", "getEntry", "(", "String", "fsid", ")", "throws", "Exception", "{", "if", "(", "fsid", ".", "endsWith", "(", "\".media-link\"", ")", ")", "{", "fsid", "=", "fsid", ".", "substring", "(", "0", ",", "fsid", ".", "length", "(", ")", "...
Get an entry from the collection. @param fsid Internal ID of entry to be returned @throws java.lang.Exception On error @return Entry specified by fileName/ID
[ "Get", "an", "entry", "from", "the", "collection", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L273-L293
55,665
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.getMediaResource
public AtomMediaResource getMediaResource(final String fileName) throws Exception { final String filePath = getEntryMediaPath(fileName); final File resource = new File(filePath); return new AtomMediaResource(resource); }
java
public AtomMediaResource getMediaResource(final String fileName) throws Exception { final String filePath = getEntryMediaPath(fileName); final File resource = new File(filePath); return new AtomMediaResource(resource); }
[ "public", "AtomMediaResource", "getMediaResource", "(", "final", "String", "fileName", ")", "throws", "Exception", "{", "final", "String", "filePath", "=", "getEntryMediaPath", "(", "fileName", ")", ";", "final", "File", "resource", "=", "new", "File", "(", "fil...
Get media resource wrapping a file.
[ "Get", "media", "resource", "wrapping", "a", "file", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L298-L302
55,666
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.updateEntry
public void updateEntry(final Entry entry, String fsid) throws Exception { synchronized (FileStore.getFileStore()) { final Feed f = getFeedDocument(); if (fsid.endsWith(".media-link")) { fsid = fsid.substring(0, fsid.length() - ".media-link".length()); } ...
java
public void updateEntry(final Entry entry, String fsid) throws Exception { synchronized (FileStore.getFileStore()) { final Feed f = getFeedDocument(); if (fsid.endsWith(".media-link")) { fsid = fsid.substring(0, fsid.length() - ".media-link".length()); } ...
[ "public", "void", "updateEntry", "(", "final", "Entry", "entry", ",", "String", "fsid", ")", "throws", "Exception", "{", "synchronized", "(", "FileStore", ".", "getFileStore", "(", ")", ")", "{", "final", "Feed", "f", "=", "getFeedDocument", "(", ")", ";",...
Update an entry in the collection. @param entry Updated entry to be stored @param fsid Internal ID of entry @throws java.lang.Exception On error
[ "Update", "an", "entry", "in", "the", "collection", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L311-L332
55,667
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.updateMediaEntry
public Entry updateMediaEntry(final String fileName, final String contentType, final InputStream is) throws Exception { synchronized (FileStore.getFileStore()) { final File tempFile = File.createTempFile(fileName, "tmp"); final FileOutputStream fos = new FileOutputStream(tempFile); ...
java
public Entry updateMediaEntry(final String fileName, final String contentType, final InputStream is) throws Exception { synchronized (FileStore.getFileStore()) { final File tempFile = File.createTempFile(fileName, "tmp"); final FileOutputStream fos = new FileOutputStream(tempFile); ...
[ "public", "Entry", "updateMediaEntry", "(", "final", "String", "fileName", ",", "final", "String", "contentType", ",", "final", "InputStream", "is", ")", "throws", "Exception", "{", "synchronized", "(", "FileStore", ".", "getFileStore", "(", ")", ")", "{", "fi...
Update media associated with a media-link entry. @param fileName Internal ID of entry being updated @param contentType Content type of data @param is Source of updated data @throws java.lang.Exception On error @return Updated Entry as it exists on server
[ "Update", "media", "associated", "with", "a", "media", "-", "link", "entry", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L343-L378
55,668
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.deleteEntry
public void deleteEntry(final String fsid) throws Exception { synchronized (FileStore.getFileStore()) { // Remove entry from Feed final Feed feed = getFeedDocument(); updateFeedDocumentRemovingEntry(feed, fsid); final String entryFilePath = getEntryPath(fsid); ...
java
public void deleteEntry(final String fsid) throws Exception { synchronized (FileStore.getFileStore()) { // Remove entry from Feed final Feed feed = getFeedDocument(); updateFeedDocumentRemovingEntry(feed, fsid); final String entryFilePath = getEntryPath(fsid); ...
[ "public", "void", "deleteEntry", "(", "final", "String", "fsid", ")", "throws", "Exception", "{", "synchronized", "(", "FileStore", ".", "getFileStore", "(", ")", ")", "{", "// Remove entry from Feed", "final", "Feed", "feed", "=", "getFeedDocument", "(", ")", ...
Delete an entry and any associated media file. @param fsid Internal ID of entry @throws java.lang.Exception On error
[ "Delete", "an", "entry", "and", "any", "associated", "media", "file", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L386-L409
55,669
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.loadAtomEntry
private Entry loadAtomEntry(final InputStream in) { try { return Atom10Parser.parseEntry(new BufferedReader(new InputStreamReader(in, "UTF-8")), null, Locale.US); } catch (final Exception e) { e.printStackTrace(); return null; } }
java
private Entry loadAtomEntry(final InputStream in) { try { return Atom10Parser.parseEntry(new BufferedReader(new InputStreamReader(in, "UTF-8")), null, Locale.US); } catch (final Exception e) { e.printStackTrace(); return null; } }
[ "private", "Entry", "loadAtomEntry", "(", "final", "InputStream", "in", ")", "{", "try", "{", "return", "Atom10Parser", ".", "parseEntry", "(", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "in", ",", "\"UTF-8\"", ")", ")", ",", "null", ",",...
Create a Rome Atom entry based on a Roller entry. Content is escaped. Link is stored as rel=alternate link.
[ "Create", "a", "Rome", "Atom", "entry", "based", "on", "a", "Roller", "entry", ".", "Content", "is", "escaped", ".", "Link", "is", "stored", "as", "rel", "=", "alternate", "link", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L616-L623
55,670
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.saveMediaFile
private void saveMediaFile(final String name, final String contentType, final long size, final InputStream is) throws AtomException { final byte[] buffer = new byte[8192]; int bytesRead = 0; final File dirPath = new File(getEntryMediaPath(name)); if (!dirPath.getParentFile().exists()) ...
java
private void saveMediaFile(final String name, final String contentType, final long size, final InputStream is) throws AtomException { final byte[] buffer = new byte[8192]; int bytesRead = 0; final File dirPath = new File(getEntryMediaPath(name)); if (!dirPath.getParentFile().exists()) ...
[ "private", "void", "saveMediaFile", "(", "final", "String", "name", ",", "final", "String", "contentType", ",", "final", "long", "size", ",", "final", "InputStream", "is", ")", "throws", "AtomException", "{", "final", "byte", "[", "]", "buffer", "=", "new", ...
Save file to website's resource directory. @param handle Weblog handle to save to @param name Name of file to save @param size Size of file to be saved @param is Read file from input stream
[ "Save", "file", "to", "website", "s", "resource", "directory", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L650-L675
55,671
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.createFileName
private String createFileName(final String title, final String contentType) { if (handle == null) { throw new IllegalArgumentException("weblog handle cannot be null"); } if (contentType == null) { throw new IllegalArgumentException("contentType cannot be null"); ...
java
private String createFileName(final String title, final String contentType) { if (handle == null) { throw new IllegalArgumentException("weblog handle cannot be null"); } if (contentType == null) { throw new IllegalArgumentException("contentType cannot be null"); ...
[ "private", "String", "createFileName", "(", "final", "String", "title", ",", "final", "String", "contentType", ")", "{", "if", "(", "handle", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"weblog handle cannot be null\"", ")", ";", "...
Creates a file name for a file based on a weblog handle, title string and a content-type. @param handle Weblog handle @param title Title to be used as basis for file name (or null) @param contentType Content type of file (must not be null) If a title is specified, the method will apply the same create-anchor logic we...
[ "Creates", "a", "file", "name", "for", "a", "file", "based", "on", "a", "weblog", "handle", "title", "string", "and", "a", "content", "-", "type", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L699-L741
55,672
rometools/rome
rome-utils/src/main/java/com/rometools/utils/Alternatives.java
Alternatives.firstNotNull
public static <T> T firstNotNull(final T... objects) { for (final T object : objects) { if (object != null) { return object; } } return null; }
java
public static <T> T firstNotNull(final T... objects) { for (final T object : objects) { if (object != null) { return object; } } return null; }
[ "public", "static", "<", "T", ">", "T", "firstNotNull", "(", "final", "T", "...", "objects", ")", "{", "for", "(", "final", "T", "object", ":", "objects", ")", "{", "if", "(", "object", "!=", "null", ")", "{", "return", "object", ";", "}", "}", "...
Returns the first object that is not null @param objects The objects to process @return The first value that is not null. null when there is no not-null value
[ "Returns", "the", "first", "object", "that", "is", "not", "null" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-utils/src/main/java/com/rometools/utils/Alternatives.java#L28-L35
55,673
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/PluginManager.java
PluginManager.loadPlugins
private void loadPlugins() { final List<T> finalPluginsList = new ArrayList<T>(); pluginsList = new ArrayList<T>(); pluginsMap = new HashMap<String, T>(); String className = null; try { final Class<T>[] classes = getClasses(); for (final Class<T> clazz :...
java
private void loadPlugins() { final List<T> finalPluginsList = new ArrayList<T>(); pluginsList = new ArrayList<T>(); pluginsMap = new HashMap<String, T>(); String className = null; try { final Class<T>[] classes = getClasses(); for (final Class<T> clazz :...
[ "private", "void", "loadPlugins", "(", ")", "{", "final", "List", "<", "T", ">", "finalPluginsList", "=", "new", "ArrayList", "<", "T", ">", "(", ")", ";", "pluginsList", "=", "new", "ArrayList", "<", "T", ">", "(", ")", ";", "pluginsMap", "=", "new"...
PRIVATE - LOADER PART
[ "PRIVATE", "-", "LOADER", "PART" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/PluginManager.java#L83-L132
55,674
rometools/rome
rome-utils/src/main/java/com/rometools/utils/Strings.java
Strings.toLowerCase
public static String toLowerCase(final String s) { if (s == null) { return null; } else { return s.toLowerCase(Locale.ENGLISH); } }
java
public static String toLowerCase(final String s) { if (s == null) { return null; } else { return s.toLowerCase(Locale.ENGLISH); } }
[ "public", "static", "String", "toLowerCase", "(", "final", "String", "s", ")", "{", "if", "(", "s", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "s", ".", "toLowerCase", "(", "Locale", ".", "ENGLISH", ")", ";", "}", "}...
null-safe lower-case conversion of a String. @param s The String to process, may be null @return null when the input String is null, the String in lower-case otherwise
[ "null", "-", "safe", "lower", "-", "case", "conversion", "of", "a", "String", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-utils/src/main/java/com/rometools/utils/Strings.java#L118-L124
55,675
rometools/rome
rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java
Utilities.streamToString
public static String streamToString(final InputStream is) throws IOException { final StringBuffer sb = new StringBuffer(); final BufferedReader in = new BufferedReader(new InputStreamReader(is)); String line; while ((line = in.readLine()) != null) { sb.append(line); ...
java
public static String streamToString(final InputStream is) throws IOException { final StringBuffer sb = new StringBuffer(); final BufferedReader in = new BufferedReader(new InputStreamReader(is)); String line; while ((line = in.readLine()) != null) { sb.append(line); ...
[ "public", "static", "String", "streamToString", "(", "final", "InputStream", "is", ")", "throws", "IOException", "{", "final", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "final", "BufferedReader", "in", "=", "new", "BufferedReader", "(", ...
Read input from stream and into string.
[ "Read", "input", "from", "stream", "and", "into", "string", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java#L88-L97
55,676
rometools/rome
rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java
Utilities.copyInputToOutput
public static void copyInputToOutput(final InputStream input, final OutputStream output) throws IOException { final BufferedInputStream in = new BufferedInputStream(input); final BufferedOutputStream out = new BufferedOutputStream(output); final byte buffer[] = new byte[8192]; for (int c...
java
public static void copyInputToOutput(final InputStream input, final OutputStream output) throws IOException { final BufferedInputStream in = new BufferedInputStream(input); final BufferedOutputStream out = new BufferedOutputStream(output); final byte buffer[] = new byte[8192]; for (int c...
[ "public", "static", "void", "copyInputToOutput", "(", "final", "InputStream", "input", ",", "final", "OutputStream", "output", ")", "throws", "IOException", "{", "final", "BufferedInputStream", "in", "=", "new", "BufferedInputStream", "(", "input", ")", ";", "fina...
Copy input stream to output stream using 8K buffer.
[ "Copy", "input", "stream", "to", "output", "stream", "using", "8K", "buffer", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java#L102-L119
55,677
rometools/rome
rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java
Utilities.replaceNonAlphanumeric
public static String replaceNonAlphanumeric(final String str, final char subst) { final StringBuffer ret = new StringBuffer(str.length()); final char[] testChars = str.toCharArray(); for (final char testChar : testChars) { if (Character.isLetterOrDigit(testChar)) { re...
java
public static String replaceNonAlphanumeric(final String str, final char subst) { final StringBuffer ret = new StringBuffer(str.length()); final char[] testChars = str.toCharArray(); for (final char testChar : testChars) { if (Character.isLetterOrDigit(testChar)) { re...
[ "public", "static", "String", "replaceNonAlphanumeric", "(", "final", "String", "str", ",", "final", "char", "subst", ")", "{", "final", "StringBuffer", "ret", "=", "new", "StringBuffer", "(", "str", ".", "length", "(", ")", ")", ";", "final", "char", "[",...
Replaces occurences of non-alphanumeric characters with a supplied char.
[ "Replaces", "occurences", "of", "non", "-", "alphanumeric", "characters", "with", "a", "supplied", "char", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java#L124-L135
55,678
rometools/rome
rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java
Utilities.stringToStringArray
public static String[] stringToStringArray(final String instr, final String delim) throws NoSuchElementException, NumberFormatException { final StringTokenizer toker = new StringTokenizer(instr, delim); final String stringArray[] = new String[toker.countTokens()]; int i = 0; while (toker...
java
public static String[] stringToStringArray(final String instr, final String delim) throws NoSuchElementException, NumberFormatException { final StringTokenizer toker = new StringTokenizer(instr, delim); final String stringArray[] = new String[toker.countTokens()]; int i = 0; while (toker...
[ "public", "static", "String", "[", "]", "stringToStringArray", "(", "final", "String", "instr", ",", "final", "String", "delim", ")", "throws", "NoSuchElementException", ",", "NumberFormatException", "{", "final", "StringTokenizer", "toker", "=", "new", "StringToken...
Convert string to string array.
[ "Convert", "string", "to", "string", "array", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java#L140-L148
55,679
rometools/rome
rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java
Utilities.stringArrayToString
public static String stringArrayToString(final String[] stringArray, final String delim) { String ret = ""; for (final String element : stringArray) { if (ret.length() > 0) { ret = ret + delim + element; } else { ret = element; } ...
java
public static String stringArrayToString(final String[] stringArray, final String delim) { String ret = ""; for (final String element : stringArray) { if (ret.length() > 0) { ret = ret + delim + element; } else { ret = element; } ...
[ "public", "static", "String", "stringArrayToString", "(", "final", "String", "[", "]", "stringArray", ",", "final", "String", "delim", ")", "{", "String", "ret", "=", "\"\"", ";", "for", "(", "final", "String", "element", ":", "stringArray", ")", "{", "if"...
Convert string array to string.
[ "Convert", "string", "array", "to", "string", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java#L153-L163
55,680
rometools/rome
rome-utils/src/main/java/com/rometools/utils/Integers.java
Integers.parse
public static Integer parse(final String s) { try { return Integer.parseInt(s); } catch (final NumberFormatException e) { return null; } }
java
public static Integer parse(final String s) { try { return Integer.parseInt(s); } catch (final NumberFormatException e) { return null; } }
[ "public", "static", "Integer", "parse", "(", "final", "String", "s", ")", "{", "try", "{", "return", "Integer", ".", "parseInt", "(", "s", ")", ";", "}", "catch", "(", "final", "NumberFormatException", "e", ")", "{", "return", "null", ";", "}", "}" ]
Converts a String into an Integer. @param s The String to convert, may be null @return The parsed Integer or null when parsing is not possible
[ "Converts", "a", "String", "into", "an", "Integer", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-utils/src/main/java/com/rometools/utils/Integers.java#L28-L34
55,681
rometools/rome
rome-modules/src/main/java/com/rometools/modules/sse/modules/History.java
History.addUpdate
public void addUpdate(final Update update) { if (updates == null) { updates = new ArrayList<Update>(); } updates.add(update); }
java
public void addUpdate(final Update update) { if (updates == null) { updates = new ArrayList<Update>(); } updates.add(update); }
[ "public", "void", "addUpdate", "(", "final", "Update", "update", ")", "{", "if", "(", "updates", "==", "null", ")", "{", "updates", "=", "new", "ArrayList", "<", "Update", ">", "(", ")", ";", "}", "updates", ".", "add", "(", "update", ")", ";", "}"...
Add an update to this history @param update an update to add to the list of updates for this history.
[ "Add", "an", "update", "to", "this", "history" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/sse/modules/History.java#L126-L131
55,682
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateThumbails
private void generateThumbails(final Metadata m, final Element e) { for (final Thumbnail thumb : m.getThumbnail()) { final Element t = new Element("thumbnail", NS); addNotNullAttribute(t, "url", thumb.getUrl()); addNotNullAttribute(t, "width", thumb.getWidth()); a...
java
private void generateThumbails(final Metadata m, final Element e) { for (final Thumbnail thumb : m.getThumbnail()) { final Element t = new Element("thumbnail", NS); addNotNullAttribute(t, "url", thumb.getUrl()); addNotNullAttribute(t, "width", thumb.getWidth()); a...
[ "private", "void", "generateThumbails", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "for", "(", "final", "Thumbnail", "thumb", ":", "m", ".", "getThumbnail", "(", ")", ")", "{", "final", "Element", "t", "=", "new", "Element", ...
Generation of thumbnail tags. @param m source @param e element to attach new element to
[ "Generation", "of", "thumbnail", "tags", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L243-L252
55,683
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateComments
private void generateComments(final Metadata m, final Element e) { final Element commentsElements = new Element("comments", NS); for (final String comment : m.getComments()) { addNotNullElement(commentsElements, "comment", comment); } if (!commentsElements.getChildren().isEmp...
java
private void generateComments(final Metadata m, final Element e) { final Element commentsElements = new Element("comments", NS); for (final String comment : m.getComments()) { addNotNullElement(commentsElements, "comment", comment); } if (!commentsElements.getChildren().isEmp...
[ "private", "void", "generateComments", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "final", "Element", "commentsElements", "=", "new", "Element", "(", "\"comments\"", ",", "NS", ")", ";", "for", "(", "final", "String", "comment", ...
Generation of comments tag. @param m source @param e element to attach new element to
[ "Generation", "of", "comments", "tag", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L276-L284
55,684
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateCommunity
private void generateCommunity(final Metadata m, final Element e) { if (m.getCommunity() == null) { return; } final Element communityElement = new Element("community", NS); if (m.getCommunity().getStarRating() != null) { final Element starRatingElement = new Eleme...
java
private void generateCommunity(final Metadata m, final Element e) { if (m.getCommunity() == null) { return; } final Element communityElement = new Element("community", NS); if (m.getCommunity().getStarRating() != null) { final Element starRatingElement = new Eleme...
[ "private", "void", "generateCommunity", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "if", "(", "m", ".", "getCommunity", "(", ")", "==", "null", ")", "{", "return", ";", "}", "final", "Element", "communityElement", "=", "new", ...
Generation of community tag. @param m source @param e element to attach new element to
[ "Generation", "of", "community", "tag", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L292-L336
55,685
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateEmbed
private void generateEmbed(final Metadata m, final Element e) { if (m.getEmbed() == null) { return; } final Element embedElement = new Element("embed", NS); addNotNullAttribute(embedElement, "url", m.getEmbed().getUrl()); addNotNullAttribute(embedElement, "width", m.g...
java
private void generateEmbed(final Metadata m, final Element e) { if (m.getEmbed() == null) { return; } final Element embedElement = new Element("embed", NS); addNotNullAttribute(embedElement, "url", m.getEmbed().getUrl()); addNotNullAttribute(embedElement, "width", m.g...
[ "private", "void", "generateEmbed", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "if", "(", "m", ".", "getEmbed", "(", ")", "==", "null", ")", "{", "return", ";", "}", "final", "Element", "embedElement", "=", "new", "Element",...
Generation of embed tag. @param m source @param e element to attach new element to
[ "Generation", "of", "embed", "tag", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L344-L361
55,686
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateScenes
private void generateScenes(final Metadata m, final Element e) { final Element scenesElement = new Element("scenes", NS); for (final Scene scene : m.getScenes()) { final Element sceneElement = new Element("scene", NS); addNotNullElement(sceneElement, "sceneTitle", scene.getTitle(...
java
private void generateScenes(final Metadata m, final Element e) { final Element scenesElement = new Element("scenes", NS); for (final Scene scene : m.getScenes()) { final Element sceneElement = new Element("scene", NS); addNotNullElement(sceneElement, "sceneTitle", scene.getTitle(...
[ "private", "void", "generateScenes", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "final", "Element", "scenesElement", "=", "new", "Element", "(", "\"scenes\"", ",", "NS", ")", ";", "for", "(", "final", "Scene", "scene", ":", "m...
Generation of scenes tag. @param m source @param e element to attach new element to
[ "Generation", "of", "scenes", "tag", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L369-L384
55,687
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateLocations
private void generateLocations(final Metadata m, final Element e) { final GMLGenerator geoRssGenerator = new GMLGenerator(); for (final Location location : m.getLocations()) { final Element locationElement = new Element("location", NS); addNotNullAttribute(locationElement, "descr...
java
private void generateLocations(final Metadata m, final Element e) { final GMLGenerator geoRssGenerator = new GMLGenerator(); for (final Location location : m.getLocations()) { final Element locationElement = new Element("location", NS); addNotNullAttribute(locationElement, "descr...
[ "private", "void", "generateLocations", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "final", "GMLGenerator", "geoRssGenerator", "=", "new", "GMLGenerator", "(", ")", ";", "for", "(", "final", "Location", "location", ":", "m", ".", ...
Generation of location tags. @param m source @param e element to attach new element to
[ "Generation", "of", "location", "tags", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L392-L406
55,688
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generatePeerLinks
private void generatePeerLinks(final Metadata m, final Element e) { for (final PeerLink peerLink : m.getPeerLinks()) { final Element peerLinkElement = new Element("peerLink", NS); addNotNullAttribute(peerLinkElement, "type", peerLink.getType()); addNotNullAttribute(peerLinkEl...
java
private void generatePeerLinks(final Metadata m, final Element e) { for (final PeerLink peerLink : m.getPeerLinks()) { final Element peerLinkElement = new Element("peerLink", NS); addNotNullAttribute(peerLinkElement, "type", peerLink.getType()); addNotNullAttribute(peerLinkEl...
[ "private", "void", "generatePeerLinks", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "for", "(", "final", "PeerLink", "peerLink", ":", "m", ".", "getPeerLinks", "(", ")", ")", "{", "final", "Element", "peerLinkElement", "=", "new"...
Generation of peerLink tags. @param m source @param e element to attach new element to
[ "Generation", "of", "peerLink", "tags", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L414-L423
55,689
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateSubTitles
private void generateSubTitles(final Metadata m, final Element e) { for (final SubTitle subTitle : m.getSubTitles()) { final Element subTitleElement = new Element("subTitle", NS); addNotNullAttribute(subTitleElement, "type", subTitle.getType()); addNotNullAttribute(subTitleEl...
java
private void generateSubTitles(final Metadata m, final Element e) { for (final SubTitle subTitle : m.getSubTitles()) { final Element subTitleElement = new Element("subTitle", NS); addNotNullAttribute(subTitleElement, "type", subTitle.getType()); addNotNullAttribute(subTitleEl...
[ "private", "void", "generateSubTitles", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "for", "(", "final", "SubTitle", "subTitle", ":", "m", ".", "getSubTitles", "(", ")", ")", "{", "final", "Element", "subTitleElement", "=", "new"...
Generation of subTitle tags. @param m source @param e element to attach new element to
[ "Generation", "of", "subTitle", "tags", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L431-L441
55,690
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateLicenses
private void generateLicenses(final Metadata m, final Element e) { for (final License license : m.getLicenses()) { final Element licenseElement = new Element("license", NS); addNotNullAttribute(licenseElement, "type", license.getType()); addNotNullAttribute(licenseElement, "h...
java
private void generateLicenses(final Metadata m, final Element e) { for (final License license : m.getLicenses()) { final Element licenseElement = new Element("license", NS); addNotNullAttribute(licenseElement, "type", license.getType()); addNotNullAttribute(licenseElement, "h...
[ "private", "void", "generateLicenses", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "for", "(", "final", "License", "license", ":", "m", ".", "getLicenses", "(", ")", ")", "{", "final", "Element", "licenseElement", "=", "new", "...
Generation of license tags. @param m source @param e element to attach new element to
[ "Generation", "of", "license", "tags", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L449-L461
55,691
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateResponses
private void generateResponses(final Metadata m, final Element e) { if (m.getResponses() == null || m.getResponses().length == 0) { return; } final Element responsesElements = new Element("responses", NS); for (final String response : m.getResponses()) { addNotNul...
java
private void generateResponses(final Metadata m, final Element e) { if (m.getResponses() == null || m.getResponses().length == 0) { return; } final Element responsesElements = new Element("responses", NS); for (final String response : m.getResponses()) { addNotNul...
[ "private", "void", "generateResponses", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "if", "(", "m", ".", "getResponses", "(", ")", "==", "null", "||", "m", ".", "getResponses", "(", ")", ".", "length", "==", "0", ")", "{", ...
Generation of responses tag. @param m source @param e element to attach new element to
[ "Generation", "of", "responses", "tag", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L493-L502
55,692
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateStatus
private void generateStatus(final Metadata m, final Element e) { if (m.getStatus() == null) { return; } final Element statusElement = new Element("status", NS); if (m.getStatus().getState() != null) { statusElement.setAttribute("state", m.getStatus().getState().na...
java
private void generateStatus(final Metadata m, final Element e) { if (m.getStatus() == null) { return; } final Element statusElement = new Element("status", NS); if (m.getStatus().getState() != null) { statusElement.setAttribute("state", m.getStatus().getState().na...
[ "private", "void", "generateStatus", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "if", "(", "m", ".", "getStatus", "(", ")", "==", "null", ")", "{", "return", ";", "}", "final", "Element", "statusElement", "=", "new", "Elemen...
Generation of status tag. @param m source @param e element to attach new element to
[ "Generation", "of", "status", "tag", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L510-L522
55,693
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/common/rome/AppModuleImpl.java
AppModuleImpl.copyFrom
@Override public void copyFrom(final CopyFrom obj) { final AppModule m = (AppModule) obj; setDraft(m.getDraft()); setEdited(m.getEdited()); }
java
@Override public void copyFrom(final CopyFrom obj) { final AppModule m = (AppModule) obj; setDraft(m.getDraft()); setEdited(m.getEdited()); }
[ "@", "Override", "public", "void", "copyFrom", "(", "final", "CopyFrom", "obj", ")", "{", "final", "AppModule", "m", "=", "(", "AppModule", ")", "obj", ";", "setDraft", "(", "m", ".", "getDraft", "(", ")", ")", ";", "setEdited", "(", "m", ".", "getEd...
Copy from other module
[ "Copy", "from", "other", "module" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/common/rome/AppModuleImpl.java#L76-L81
55,694
rometools/rome
rome/src/main/java/com/rometools/rome/io/XmlReader.java
XmlReader.getContentTypeMime
private static String getContentTypeMime(final String httpContentType) { String mime = null; if (httpContentType != null) { final int i = httpContentType.indexOf(";"); if (i == -1) { mime = httpContentType.trim(); } else { mime = httpCo...
java
private static String getContentTypeMime(final String httpContentType) { String mime = null; if (httpContentType != null) { final int i = httpContentType.indexOf(";"); if (i == -1) { mime = httpContentType.trim(); } else { mime = httpCo...
[ "private", "static", "String", "getContentTypeMime", "(", "final", "String", "httpContentType", ")", "{", "String", "mime", "=", "null", ";", "if", "(", "httpContentType", "!=", "null", ")", "{", "final", "int", "i", "=", "httpContentType", ".", "indexOf", "...
returns MIME type or NULL if httpContentType is NULL
[ "returns", "MIME", "type", "or", "NULL", "if", "httpContentType", "is", "NULL" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/XmlReader.java#L610-L621
55,695
rometools/rome
rome/src/main/java/com/rometools/rome/io/XmlReader.java
XmlReader.getContentTypeEncoding
private static String getContentTypeEncoding(final String httpContentType) { String encoding = null; if (httpContentType != null) { final int i = httpContentType.indexOf(";"); if (i > -1) { final String postMime = httpContentType.substring(i + 1); ...
java
private static String getContentTypeEncoding(final String httpContentType) { String encoding = null; if (httpContentType != null) { final int i = httpContentType.indexOf(";"); if (i > -1) { final String postMime = httpContentType.substring(i + 1); ...
[ "private", "static", "String", "getContentTypeEncoding", "(", "final", "String", "httpContentType", ")", "{", "String", "encoding", "=", "null", ";", "if", "(", "httpContentType", "!=", "null", ")", "{", "final", "int", "i", "=", "httpContentType", ".", "index...
httpContentType is NULL
[ "httpContentType", "is", "NULL" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/XmlReader.java#L625-L644
55,696
rometools/rome
rome/src/main/java/com/rometools/rome/io/XmlReader.java
XmlReader.getBOMEncoding
private static String getBOMEncoding(final BufferedInputStream is) throws IOException { String encoding = null; final int[] bytes = new int[3]; is.mark(3); bytes[0] = is.read(); bytes[1] = is.read(); bytes[2] = is.read(); if (bytes[0] == 0xFE && bytes[1] == 0xFF)...
java
private static String getBOMEncoding(final BufferedInputStream is) throws IOException { String encoding = null; final int[] bytes = new int[3]; is.mark(3); bytes[0] = is.read(); bytes[1] = is.read(); bytes[2] = is.read(); if (bytes[0] == 0xFE && bytes[1] == 0xFF)...
[ "private", "static", "String", "getBOMEncoding", "(", "final", "BufferedInputStream", "is", ")", "throws", "IOException", "{", "String", "encoding", "=", "null", ";", "final", "int", "[", "]", "bytes", "=", "new", "int", "[", "3", "]", ";", "is", ".", "m...
if there was BOM the in the stream it is consumed
[ "if", "there", "was", "BOM", "the", "in", "the", "stream", "it", "is", "consumed" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/XmlReader.java#L648-L672
55,697
rometools/rome
rome/src/main/java/com/rometools/rome/io/XmlReader.java
XmlReader.isAppXml
private static boolean isAppXml(final String mime) { return mime != null && (mime.equals("application/xml") || mime.equals("application/xml-dtd") || mime.equals("application/xml-external-parsed-entity") || mime .startsWith("application/") && mime.endsWith("+xml")); }
java
private static boolean isAppXml(final String mime) { return mime != null && (mime.equals("application/xml") || mime.equals("application/xml-dtd") || mime.equals("application/xml-external-parsed-entity") || mime .startsWith("application/") && mime.endsWith("+xml")); }
[ "private", "static", "boolean", "isAppXml", "(", "final", "String", "mime", ")", "{", "return", "mime", "!=", "null", "&&", "(", "mime", ".", "equals", "(", "\"application/xml\"", ")", "||", "mime", ".", "equals", "(", "\"application/xml-dtd\"", ")", "||", ...
indicates if the MIME type belongs to the APPLICATION XML family
[ "indicates", "if", "the", "MIME", "type", "belongs", "to", "the", "APPLICATION", "XML", "family" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/XmlReader.java#L736-L740
55,698
rometools/rome
rome/src/main/java/com/rometools/rome/io/XmlReader.java
XmlReader.isTextXml
private static boolean isTextXml(final String mime) { return mime != null && (mime.equals("text/xml") || mime.equals("text/xml-external-parsed-entity") || mime.startsWith("text/") && mime.endsWith("+xml")); }
java
private static boolean isTextXml(final String mime) { return mime != null && (mime.equals("text/xml") || mime.equals("text/xml-external-parsed-entity") || mime.startsWith("text/") && mime.endsWith("+xml")); }
[ "private", "static", "boolean", "isTextXml", "(", "final", "String", "mime", ")", "{", "return", "mime", "!=", "null", "&&", "(", "mime", ".", "equals", "(", "\"text/xml\"", ")", "||", "mime", ".", "equals", "(", "\"text/xml-external-parsed-entity\"", ")", "...
indicates if the MIME type belongs to the TEXT XML family
[ "indicates", "if", "the", "MIME", "type", "belongs", "to", "the", "TEXT", "XML", "family" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/XmlReader.java#L743-L745
55,699
rometools/rome
rome-modules/src/main/java/com/rometools/modules/sle/SleUtility.java
SleUtility.group
public static <T extends Extendable> List<T> group(final List<T> values, final Group[] groups) { final SortableList<T> list = getSortableList(values); final GroupStrategy strategy = new GroupStrategy(); for (int i = groups.length - 1; i >= 0; i--) { list.sortOnProperty(groups[i], tru...
java
public static <T extends Extendable> List<T> group(final List<T> values, final Group[] groups) { final SortableList<T> list = getSortableList(values); final GroupStrategy strategy = new GroupStrategy(); for (int i = groups.length - 1; i >= 0; i--) { list.sortOnProperty(groups[i], tru...
[ "public", "static", "<", "T", "extends", "Extendable", ">", "List", "<", "T", ">", "group", "(", "final", "List", "<", "T", ">", "values", ",", "final", "Group", "[", "]", "groups", ")", "{", "final", "SortableList", "<", "T", ">", "list", "=", "ge...
Groups values by the groups from the SLE. @param values List of Extendable implementations to group. @param groups Group fields (from the SimpleListExtension module) @return Grouped list of entries.
[ "Groups", "values", "by", "the", "groups", "from", "the", "SLE", "." ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/sle/SleUtility.java#L58-L65